Esempio n. 1
0
            private void BuildServoGroups(object irServoController)
            {
                LogFormatted("Getting ServoGroups Object");
                var servoGroupsField = IRServoControllerType.GetField("ServoGroups");

                if (servoGroupsField == null)
                {
                    LogFormatted("Failed Getting ServoGroups fieldinfo");
                }
                else
                {
                    actualServoGroups = servoGroupsField.GetValue(irServoController);
                    LogFormatted("Success: " + (actualServoGroups != null));
                }
            }
Esempio n. 2
0
            internal IRAPI(Object IRServoController)
            {
                //store the actual object
                actualServoController = IRServoController;

                //these sections get and store the reflection info and actual objects where required. Later in the properties we then read the values from the actual objects
                //for events we also add a handler
                LogFormatted("Getting APIReady Object");
                APIReadyField = IRServoControllerType.GetField("APIReady", BindingFlags.Public | BindingFlags.Static);
                LogFormatted("Success: " + (APIReadyField != null).ToString());

                LogFormatted("Getting ServoGroups Object");
                ServoGroupsField  = IRServoControllerType.GetField("ServoGroups", BindingFlags.Public | BindingFlags.Static);
                actualServoGroups = ServoGroupsField.GetValue(actualServoController);
                LogFormatted("Success: " + (actualServoGroups != null).ToString());
            }
          private void BuildServoGroups()
          {
              var servoGroupsField = IRServoControllerType.GetField("ServoGroups");

              if (servoGroupsField == null)
              {
                  LogFormatted("Failed Getting ServoGroups fieldinfo");
              }
              else if (IRminWrapper.ActualServoController == null)
              {
                  LogFormatted("ServoController Instance not found");
              }
              else
              {
                  actualServoGroups = servoGroupsField.GetValue(IRminWrapper.ActualServoController);
              }
          }