Exemplo n.º 1
0
      private void WriteOsdParameters(XmlWriter writer, OsdParameters osdParameters)
      {
         writer.WriteStartElement("Osd");

         this.WriteElement(writer, "HozizontalOffset", osdParameters.HozizontalOffset);
         this.WriteElement(writer, "VerticalOffset", osdParameters.VerticalOffset);

         this.WriteElement(writer, "ShowDate", osdParameters.ShowDate);
         this.WriteElement(writer, "ShowTime", osdParameters.ShowTime);
         this.WriteElement(writer, "ShowCameraId", osdParameters.ShowCameraId);
         this.WriteElement(writer, "ShowDescription", osdParameters.ShowDescription);
         this.WriteElement(writer, "ShowPipeDisplacement", osdParameters.ShowPipeDisplacement);
         this.WriteElement(writer, "ShowPipePosition", osdParameters.ShowPipePosition);

         this.WriteElement(writer, "Line1", osdParameters.Line1);
         this.WriteElement(writer, "Line2", osdParameters.Line2);
         this.WriteElement(writer, "Line3", osdParameters.Line3);
         this.WriteElement(writer, "Line4", osdParameters.Line4);
         this.WriteElement(writer, "Line5", osdParameters.Line5);

         writer.WriteEndElement();
      }
Exemplo n.º 2
0
      private void SetOsdDefaults(ref OsdParameters osdParameters)
      {
         osdParameters.HozizontalOffset = 35;
         osdParameters.VerticalOffset = 21;

         osdParameters.ShowDate = false;
         osdParameters.ShowTime = false;
         osdParameters.ShowCameraId = false;
         osdParameters.ShowDescription = false;
         osdParameters.ShowPipeDisplacement = false;
         osdParameters.ShowPipePosition = false;

         osdParameters.Line1 = "";
         osdParameters.Line2 = "";
         osdParameters.Line3 = "";
         osdParameters.Line4 = "";
         osdParameters.Line5 = "";
      }
Exemplo n.º 3
0
      private void AssignDefaults(RobotApplications robotApplication = RobotApplications.repair)
      {
         this.RobotApplication = robotApplication;

         this.TruckBus = new TruckBusParameters();
         this.TruckBus.BusInterface = BusInterfaces.PCIA;
         this.TruckBus.BitRate = 50000;
         this.TruckBus.ConsumerHeartbeatRate = 3000;
         this.TruckBus.ProducerHeartbeatRate = 1000;
         this.TruckBus.ControllerBusId = 80;
         this.TruckBus.ReelMotorBusId = 70;
         this.TruckBus.ReelDigitalBusId = 17;
         this.TruckBus.ReelAnalogBusId = 19;
         this.TruckBus.ReelEncoderBusId = 21;
         this.TruckBus.FeederTopFrontMotorBusId = 64;
         this.TruckBus.FeederTopRearMotorBusId = 65;
         this.TruckBus.FeederBottomFrontMotorBusId = 66;
         this.TruckBus.FeederBottomRearMotorBusId = 67;
         this.TruckBus.FeederEncoderBusId = 22;
         this.TruckBus.GuideLeftMotorBusId = 68;
         this.TruckBus.GuideRightMotorBusId = 69;
         this.TruckBus.LaunchDigitalIoBusId = 16;
         this.TruckBus.LaunchAnalogIoBusId = 18;
         this.TruckBus.GpsBusId = 20;
         this.TruckBus.FrontPumpBusId = 71;
         this.TruckBus.FrontScaleRs232BusId = 96;
         this.TruckBus.RearPumpBusId = 72;
         this.TruckBus.RearScaleRs232BusId = 97;

         this.TruckBus.ControllerTraceMask = 0;
         this.TruckBus.ReelMotorTraceMask = 1;
         this.TruckBus.ReelDigitalTraceMask = 1;
         this.TruckBus.ReelAnalogTraceMask = 1;
         this.TruckBus.ReelEncoderTraceMask = 1;
         this.TruckBus.FeederTopFrontMotorTraceMask = 1;
         this.TruckBus.FeederTopRearMotorTraceMask = 1;
         this.TruckBus.FeederBottomFrontMotorTraceMask = 1;
         this.TruckBus.FeederBottomRearMotorTraceMask = 1;
         this.TruckBus.FeederEncoderTraceMask = 1;
         this.TruckBus.GuideLeftMotorTraceMask = 1;
         this.TruckBus.GuideRightMotorTraceMask = 1;
         this.TruckBus.LaunchDigitalIoTraceMask = 1;
         this.TruckBus.LaunchAnalogIoTraceMask = 1;
         this.TruckBus.GpsTraceMask = 1;
         this.TruckBus.FrontPumpTraceMask = 1;
         this.TruckBus.FrontScaleRs232TraceMask = 1;
         this.TruckBus.RearPumpTraceMask = 1;
         this.TruckBus.RearScaleRs232TraceMask = 1;

         this.JoystickDeadband = 5000;
         this.Latitude = double.NaN;
         this.Longitude = double.NaN;

         this.RobotBus = new RobotBusParameters();
         this.RobotBus.BusInterface = BusInterfaces.PCIB;
         this.RobotBus.BitRate = 50000;
         this.RobotBus.ConsumerHeartbeatRate = 3000;
         this.RobotBus.ProducerHeartbeatRate = 1000;
         this.RobotBus.ControllerBusId = 80;
         this.RobotBus.RobotBodyBusId = 32;
         this.RobotBus.RobotTopFrontWheelBusId = 49;
         this.RobotBus.RobotTopRearWheelBusId = 50;
         this.RobotBus.RobotBottomFrontWheelBusId = 51;
         this.RobotBus.RobotBottomRearWheelBusId = 52;
         this.RobotBus.ControllerTraceMask = 0;
         this.RobotBus.RobotBodyTraceMask = 1;
         this.RobotBus.RobotTopFrontWheelTraceMask = 1;
         this.RobotBus.RobotTopRearWheelTraceMask = 1;
         this.RobotBus.RobotBottomFrontWheelTraceMask = 1;
         this.RobotBus.RobotBottomRearWheelTraceMask = 1;

         this.EnableRobotBus = true;

         this.FrontScale = new DigitalScaleParameters("FrontScale", 1, 9600);
         this.RearScale = new DigitalScaleParameters("RearScale", 2, 9600);

         this.Trace = new IpEndpointParameters("Trace", "127.0.0.1", 10000);
         this.LocationServer = new IpEndpointParameters("LocationServer", "0.0.0.0", 5050);
         
         this.ThicknessSensor = new IpEndpointParameters("ThicknessSensor", "192.168.1.101", 0);
         this.ThicknessConversionUnit = new ValueParameter("ThicknessConversionUnit", "mm", 3, 0, 100, 1, 1, 1);
         
         this.StressSensor = new IpEndpointParameters("StressSensor", "192.168.1.102", 0);
         this.StressConversionUnit = new ValueParameter("StressConversionUnit", "MPa", 3, 0, 100, 1, 1, 1);

         this.NitrogenPressureConversionUnit = new ValueParameter("NitrogenPressureConversionUnit", "PSI", 3, 0, 1000, 1, 100, 100);
         this.NitrogenPressureCaution = new CautionParameter("NitrogenPressureCaution", 450, 425, 375, 350);

         this.RobotTotalCurrentConversionUnit = new ValueParameter("RobotTotalCurrentConversionUnit", "A", 2, 0, 1000, 1, 100, 100);
         this.LaunchTotalCurrentConversionUnit = new ValueParameter("LaunchTotalCurrentConversionUnit", "A", 2, 0, 1000, 1, 100, 100);

         this.GuideExtensionSpeed = new ValueParameter("GuideExtensionSpeed", "RPM", 0, 1, 4500, 1, 1500, 1500);
         this.GuideRetractionSpeed = new ValueParameter("GuideRetractionSpeed", "RPM", 0, 1, 4500, 1, 1500, 1500);
         this.GuideMomentaryButtonAction = true;

         this.ReelDistance = new ValueParameter("ReelDistance", "m", 0, 0, 0, 0, 0, 0);
         this.ReelDistanceScale = new ValueParameter("ReelDistanceScale", "m", 6, 0, 1000, 0, 1, 1);
         this.ReelMotionMode = MovementForwardControls.current;
         this.ReelReverseCurrent = new ValueParameter("ReelReverseCurrent", "A", 1, 0.0, 6.5, 0.1, 5.0, 5.0);
         this.ReelLockCurrent = new ValueParameter("ReelLockCurrent", "A", 1, 0.0, 6.5, 0.1, 2.0, 2.0);
         this.ReelCalibrationDistance = new ValueParameter("ReelCalibrationDistance", "m", 0, 1, 100, 1, 1, 1);
         this.ReelManualCurrent = new ValueParameter("ReelManualCurrent", "A", 1, 0.0, 6.5, 0.1, 5.0, 5.0);
         this.ReelReverseSpeed = new ValueParameter("ReelReverseSpeed", "m/MIN", 1, 0.0, 40.0, 0.1, 20.0, 20.0);
         this.ReelManualSpeed = new ValueParameter("ReelManualSpeed", "m/MIN", 1, 0.0, 40.0, 0.1, 20, 20);
         this.ReelVelocityToRpm = (1000 / 40.0); // 40.0 m/MIN at 1000 RPM

         this.FeederAutomaticTracking = false;
         this.FeederVelocityToRpm = (4000 / 12.05992); // 12.05992 m/MIN at 4000 RPM
         this.FeederTrackingCalibration = new ValueParameter("FeederTrackingCalibration", "%", 1, -100, 100, 0.1, 50, 50);
         this.FeederMaxSpeed = new ValueParameter("FeederMaxSpeed", "m/MIN", 2, 0, 12.05992, 1, 12, 12);
         this.FeederLowSpeedScale = new ValueParameter("FeederLowSpeedScale", "%", 0, 1, 100, 1, 30, 30);
         this.FeederLockCurrent = new ValueParameter("FeederLockCurrent", "A", 1, 0.0, 6.5, 0.1, 2.0, 2.0);
         this.FeederCurrentPer1kRPM = new ValueParameter("FeederCurrentPer1kRPM", "A", 1, 0.1, 3.0, 0.1, 0.8, 0.8);
         this.FeederManualSpeed = new ValueParameter("FeederManualSpeed", "m/MIN", 2, 0, 12.05992, 1, 7, 7);
         this.FeederCurrentCaution = new CautionParameter("FeederCurrentCaution", 6.0, 5.0, 0.0, 0.0);

         this.TopFrontFeederMotor = new FeederMotorParameters();
         this.SetFeederMotorDefaults(ref this.TopFrontFeederMotor, "TopFront", false, false);

         this.TopRearFeederMotor = new FeederMotorParameters();
         this.SetFeederMotorDefaults(ref this.TopRearFeederMotor, "TopRear", false, false);

         this.BottomFrontFeederMotor = new FeederMotorParameters();
         this.SetFeederMotorDefaults(ref this.BottomFrontFeederMotor, "BottomFront", true, true);

         this.BottomRearFeederMotor = new FeederMotorParameters();
         this.SetFeederMotorDefaults(ref this.BottomRearFeederMotor, "BottomRear", true, true);


         this.MovementMotorLockCurrent = new ValueParameter("MovementMotorLockCurrent", "A", 1, 0.1, 3.0, 0.1, 1.0, 1.0);
         this.MovementMotorMaxCurrent = new ValueParameter("MovementMotorMaxCurrent", "A", 1, 0.1, 3.0, 0.1, 3.0, 3.0);
         this.MovementMotorMaxSpeed = new ValueParameter("MovementMotorMaxSpeed", "m/MIN", 2, 0, 10, 1, 3.5, 3.5);
         this.MovementMotorCurrentPer1kRPM = new ValueParameter("MovementMotorCurrentPer1kRPM", "A", 1, 0.1, 3.0, 0.1, 1.0, 1.0);
         this.MovementMotorLowSpeedScale = new ValueParameter("MovementMotorLowSpeedScale", "%", 0, 1, 100, 1, 30, 30);
         this.MovementMotorManualJogDistance = new ValueParameter("MovementMotorManualJogDistance", "mm", 0, 1, 100, 1, 1, 1);
         this.MovementMotorManualMoveSpeed = new ValueParameter("MovementMotorManualMoveSpeed", "m/MIN", 2, 0, 10, 1, 2, 2);
         this.MovementMotorVelocityToRpm = (40000.0/19.04); // 19.04m/MIN at 40000 RPM, (0.476mm/(motor revolution)

         this.TopFrontMovementMotor = new MovementMotorParameters();
         this.SetMovementMotorDefaults(ref this.TopFrontMovementMotor, "TopFront", MovementForwardControls.velocity, MovementForwardControls.velocity, MovementForwardControls.velocity, MovementForwardControls.current);

         this.TopRearMovementMotor = new MovementMotorParameters();
         this.SetMovementMotorDefaults(ref this.TopRearMovementMotor, "TopRear", MovementForwardControls.velocity, MovementForwardControls.velocity, MovementForwardControls.velocity, MovementForwardControls.current);

         this.BottomFrontMovementMotor = new MovementMotorParameters();
         this.SetMovementMotorDefaults(ref this.BottomFrontMovementMotor, "BottomFront", MovementForwardControls.velocity, MovementForwardControls.velocity, MovementForwardControls.current, MovementForwardControls.current);

         this.BottomRearMovementMotor = new MovementMotorParameters();
         this.SetMovementMotorDefaults(ref this.BottomRearMovementMotor, "BottomRear", MovementForwardControls.velocity, MovementForwardControls.velocity, MovementForwardControls.current, MovementForwardControls.current);

         this.MovementCurrentCaution = new CautionParameter("MovementCurrentCaution", 15.0, 10.0, 0.0, 0.0);
         this.MovementTemperatureCaution = new CautionParameter("MovementTemperatureCaution", 130.0, 100.0, 0.0, 0.0);

         this.FrontToolSelected = true;

         this.FrontDrill = new DrillParameters();
         this.SetDrillDefaults(ref this.FrontDrill, "Front");

         this.RearDrill = new DrillParameters();
         this.SetDrillDefaults(ref this.RearDrill, "Rear");


         this.FrontPump = new PumpParameters();
         this.SetPumpDefaults(ref this.FrontPump);

         this.RearPump = new PumpParameters();
         this.SetPumpDefaults(ref this.RearPump);


         this.Osd = new OsdParameters();
         this.SetOsdDefaults(ref this.Osd);


         this.robotLightLevels = new ValueParameter[12];
         for (int i = 0; i < this.robotLightLevels.Length; i++)
         {
            ValueParameter value = new ValueParameter();
            this.SetLightDefaults(ref value);
            value.Name = "RobotLightLevel_" + (i + 1).ToString();
            this.robotLightLevels[i] = value;
         }

         this.launchLightLevels = new ValueParameter[4];
         for (int i = 0; i < this.launchLightLevels.Length; i++)
         {
            ValueParameter value = new ValueParameter();
            this.SetLightDefaults(ref value);
            value.Name = "LaunchLightLevel_" + (i + 1).ToString();
            this.launchLightLevels[i] = value;
         }
      }
Exemplo n.º 4
0
      private OsdParameters ReadOsdParameters(XmlReader reader)
      {
         OsdParameters temp = new OsdParameters();
         OsdParameters result = new OsdParameters();
         bool readResult = true;

         for (; readResult; )
         {
            readResult = reader.Read();

            if (reader.IsStartElement())
            {
               switch (reader.Name)
               {
                  case "HozizontalOffset":
                  {
                     temp.HozizontalOffset = this.ReadInt(reader);
                     break;
                  }
                  case "VerticalOffset":
                  {
                     temp.VerticalOffset = this.ReadInt(reader);
                     break;
                  }
                  case "ShowDate":
                  {
                     temp.ShowDate = this.ReadBool(reader);
                     break;
                  }
                  case "ShowTime":
                  {
                     temp.ShowTime = this.ReadBool(reader);
                     break;
                  }
                  case "ShowCameraId":
                  {
                     temp.ShowCameraId = this.ReadBool(reader);
                     break;
                  }
                  case "ShowDescription":
                  {
                     temp.ShowDescription = this.ReadBool(reader);
                     break;
                  }
                  case "ShowPipeDisplacement":
                  {
                     temp.ShowPipeDisplacement = this.ReadBool(reader);
                     break;
                  }
                  case "ShowPipePosition":
                  {
                     temp.ShowPipePosition = this.ReadBool(reader);
                     break;
                  }
                  case "Line1":
                  {
                     temp.Line1 = this.ReadStringNoTrim(reader);
                     break;
                  }
                  case "Line2":
                  {
                     temp.Line2 = this.ReadStringNoTrim(reader);
                     break;
                  }
                  case "Line3":
                  {
                     temp.Line3 = this.ReadStringNoTrim(reader);
                     break;
                  }
                  case "Line4":
                  {
                     temp.Line4 = this.ReadStringNoTrim(reader);
                     break;
                  }
                  case "Line5":
                  {
                     temp.Line5 = this.ReadStringNoTrim(reader);
                     break;
                  }
               }
            }
            else
            {
               if ("Osd" == reader.Name)
               {
                  result = temp;
                  break;
               }
            }
         }

         return (result);
      }
Exemplo n.º 5
0
      private void ReadData(string filePath)
      {
         try
         {
            using (XmlReader reader = XmlReader.Create(filePath))
            {
               bool result = true;

               #region Drill Read
               {
                  for (; result;)
                  {
                     result = reader.Read();

                     if (reader.IsStartElement())
                     {
                        switch (reader.Name)
                        {
                           case "TruckBus":
                           {
                              TruckBusParameters truckBusParameters = this.ReadTruckBusParameters(reader);

                              if (null != truckBusParameters)
                              {
                                 this.TruckBus = truckBusParameters;
                              }

                              break;
                           }
                           case "RobotBus":
                           {
                              RobotBusParameters robotBusParameters = this.ReadRobotBusParameters(reader);

                              if (null != robotBusParameters)
                              {
                                 this.RobotBus = robotBusParameters;
                              }

                              break;
                           }
                           case "IpEndpoint":
                           {
                              IpEndpointParameters ipEndpointParameters = this.ReadIpEndpoint(reader);

                              if (null != ipEndpointParameters)
                              {
                                 switch (ipEndpointParameters.Name)
                                 {
                                    case "Trace":
                                    {
                                       this.Trace = ipEndpointParameters;
                                       break;
                                    }
                                    case "LocationServer":
                                    {
                                       this.LocationServer = ipEndpointParameters;
                                       break;
                                    }
                                    case "ThicknessSensor":
                                    {
                                       this.ThicknessSensor = ipEndpointParameters;
                                       break;
                                    }
                                    case "StressSensor":
                                    {
                                       this.StressSensor = ipEndpointParameters;
                                       break;
                                    }
                                 }
                              }

                              break;
                           }
                           case "DigitalScale":
                           {
                              DigitalScaleParameters digitalScaleParameters = this.ReadDigitalScaleParameters(reader);

                              if (null != digitalScaleParameters)
                              {
                                 switch (digitalScaleParameters.Location)
                                 {
                                    case "FrontScale":
                                    {
                                       this.FrontScale = digitalScaleParameters;
                                       break;
                                    }
                                    case "RearScale":
                                    {
                                       this.RearScale = digitalScaleParameters;
                                       break;
                                    }
                                 }
                              }

                              break;
                           }
                           case "Caution":
                           {
                              CautionParameter cautionParameter = this.ReadCautionParameters(reader);

                              if (null != cautionParameter)
                              {
                                 switch (cautionParameter.Name)
                                 {
                                    case "NitrogenPressureCaution":
                                    {
                                       this.NitrogenPressureCaution = cautionParameter;
                                       break;
                                    }
                                    case "FeederCurrentCaution":
                                    {
                                       this.FeederCurrentCaution = cautionParameter;
                                       break;
                                    }
                                    case "MovementCurrentCaution":
                                    {
                                       this.MovementCurrentCaution = cautionParameter;
                                       break;
                                    }
                                    case "MovementTemperatureCaution":
                                    {
                                       this.MovementTemperatureCaution = cautionParameter;
                                       break;
                                    }
                                 }
                              }

                              break;
                           }
                           case "Value":
                           {
                              ValueParameter valueParameter = this.ReadValueParameters(reader);

                              if (null != valueParameter)
                              {
                                 switch (valueParameter.Name)
                                 {
                                    case "ThicknessConversionUnit":
                                    {
                                       this.ThicknessConversionUnit = valueParameter;
                                       break;
                                    }
                                    case "StressConversionUnit":
                                    {
                                       this.StressConversionUnit = valueParameter;
                                       break;
                                    }
                                    case "NitrogenPressureConversionUnit":
                                    {
                                       this.NitrogenPressureConversionUnit = valueParameter;
                                       break;
                                    }
                                    case "RobotTotalCurrentConversionUnit":
                                    {
                                       this.RobotTotalCurrentConversionUnit = valueParameter;
                                       break;
                                    }
                                    case "LaunchTotalCurrentConversionUnit":
                                    {
                                       this.LaunchTotalCurrentConversionUnit = valueParameter;
                                       break;
                                    }
                                    case "GuideExtensionSpeed":
                                    {
                                       this.GuideExtensionSpeed = valueParameter;
                                       break;
                                    }
                                    case "GuideRetractionSpeed":
                                    {
                                       this.GuideRetractionSpeed = valueParameter;
                                       break;
                                    }
                                    case "ReelDistance":
                                    {
                                       this.ReelDistance = valueParameter;
                                       break;
                                    }
                                    case "ReelDistanceScale":
                                    {
                                       this.ReelDistanceScale = valueParameter;
                                       break;
                                    }
                                    case "ReelReverseCurrent":
                                    {
                                       this.ReelReverseCurrent = valueParameter;
                                       break;
                                    }
                                    case "ReelLockCurrent":
                                    {
                                       this.ReelLockCurrent = valueParameter;
                                       break;
                                    }
                                    case "ReelCalibrationDistance":
                                    {
                                       this.ReelCalibrationDistance = valueParameter;
                                       break;
                                    }
                                    case "ReelManualCurrent":
                                    {
                                       this.ReelManualCurrent = valueParameter;
                                       break;
                                    }
                                    case "ReelReverseSpeed":
                                    {
                                       this.ReelReverseSpeed = valueParameter;
                                       break;
                                    }
                                    case "ReelManualSpeed":
                                    {
                                       this.ReelManualSpeed = valueParameter;
                                       break;
                                    }                                       
                                    case "FeederTrackingCalibration":
                                    {
                                       this.FeederTrackingCalibration = valueParameter;
                                       break;
                                    }
                                    case "FeederMaxSpeed":
                                    {
                                       this.FeederMaxSpeed = valueParameter; 
                                       break;
                                    }
                                    case "FeederLowSpeedScale":
                                    {
                                       this.FeederLowSpeedScale = valueParameter;
                                       break;
                                    }
                                    case "FeederLockCurrent":
                                    {
                                       this.FeederLockCurrent = valueParameter; 
                                       break;
                                    }
                                    case "FeederCurrentPer1kRPM":
                                    {
                                       this.FeederCurrentPer1kRPM = valueParameter; 
                                       break;
                                    }
                                    case "FeederManualSpeed":
                                    {
                                       this.FeederManualSpeed = valueParameter;
                                       break;
                                    }
                                    case "MovementMotorLockCurrent":
                                    {
                                       this.MovementMotorLockCurrent = valueParameter;
                                       break;
                                    }
                                    case "MovementMotorMaxCurrent":
                                    {
                                       this.MovementMotorMaxCurrent = valueParameter;
                                       break;
                                    }
                                    case "MovementMotorMaxSpeed":
                                    {
                                       this.MovementMotorMaxSpeed = valueParameter;
                                       break;
                                    }
                                    case "MovementMotorCurrentPer1kRPM":
                                    {
                                       this.MovementMotorCurrentPer1kRPM = valueParameter;
                                       break;
                                    }
                                    case "MovementMotorLowSpeedScale":
                                    {
                                       this.MovementMotorLowSpeedScale = valueParameter;
                                       break;
                                    }
                                    case "MovementMotorManualJogDistance":
                                    {
                                       this.MovementMotorManualJogDistance = valueParameter;
                                       break;
                                    }
                                    case "MovementMotorManualMoveSpeed":
                                    {
                                       this.MovementMotorManualMoveSpeed = valueParameter;
                                       break;
                                    }
                                 }
                              }
                              
                              break;
                           }
                           case "RobotApplication":
                           {
                              this.RobotApplication = ReadRobotApplication(reader);
                              break;
                           }
                           case "EnableRobotBus":
                           {
                              this.EnableRobotBus = this.ReadBool(reader);
                              break;
                           }
                           case "JoystickDeadband":
                           {
                              this.JoystickDeadband = this.ReadInt(reader);
                              break;
                           }
                           case "Latitude":
                           {
                              this.Latitude = this.ReadDouble(reader);
                              break;
                           }
                           case "Longitude":
                           {
                              this.Longitude = this.ReadDouble(reader);
                              break;
                           }
                           case "GuideMomentaryButtonAction":
                           {
                              this.ReadElement(reader, ref this.GuideMomentaryButtonAction);
                              break;
                           }
                           case "ReelMotionMode":
                           {
                              this.ReelMotionMode = this.ReadMotorForwardControl(reader);
                              break;
                           }
                           case "ReelVelocityToRpm":
                           {
                              this.ReelVelocityToRpm = this.ReadDouble(reader);
                              break;
                           }
                           case "FeederAutomaticTracking":
                           {
                              this.ReadElement(reader, ref this.FeederAutomaticTracking);
                              break;
                           }
                           case "FeederVelocityToRpm":
                           {
                              this.FeederVelocityToRpm = this.ReadDouble(reader);
                              break;
                           }
                           case "FeederMotor":
                           {
                              FeederMotorParameters feederMotorParameters = this.ReadFeederMotorParameters(reader);

                              if (null != feederMotorParameters)
                              {
                                 switch (feederMotorParameters.Location)
                                 {
                                    case "TopFront":
                                    {
                                       this.TopFrontFeederMotor = feederMotorParameters;
                                       break;
                                    }
                                    case "TopRear":
                                    {
                                       this.TopRearFeederMotor = feederMotorParameters;
                                       break;
                                    }
                                    case "BottomFront":
                                    {
                                       this.BottomFrontFeederMotor = feederMotorParameters;
                                       break;
                                    }
                                    case "BottomRear":
                                    {
                                       this.BottomRearFeederMotor = feederMotorParameters;
                                       break;
                                    }
                                 }
                              }

                              break;
                           }
                           case "MovementMotor":
                           {
                              MovementMotorParameters movementMotorParameters = this.ReadMovementMotorParameters(reader);

                              if (null != movementMotorParameters)
                              {
                                 switch (movementMotorParameters.Location)
                                 {
                                    case "TopFront":
                                    {
                                       this.TopFrontMovementMotor = movementMotorParameters;
                                       break;
                                    }
                                    case "TopRear":
                                    {
                                       this.TopRearMovementMotor = movementMotorParameters;
                                       break;
                                    }
                                    case "BottomFront":
                                    {
                                       this.BottomFrontMovementMotor = movementMotorParameters;
                                       break;
                                    }
                                    case "BottomRear":
                                    {
                                       this.BottomRearMovementMotor = movementMotorParameters;
                                       break;
                                    }
                                 }
                              }

                              break;
                           }
                           case "MovementMotorVelocityToRpm":
                           {
                              this.MovementMotorVelocityToRpm = this.ReadDouble(reader);
                              break;
                           }
                           case "FrontToolSelected":
                           {
                              this.FrontToolSelected = this.ReadBool(reader);
                              break;
                           }
                           case "Drill":
                           {
                              DrillParameters drillParameters = this.ReadDrillParameters(reader);

                              if (null != drillParameters)
                              {
                                 switch (drillParameters.Location)
                                 {
                                    case "Front":
                                    {
                                       this.FrontDrill = drillParameters;
                                       break;
                                    }
                                    case "Rear":
                                    {
                                       this.RearDrill = drillParameters;
                                       break;
                                    }
                                 }
                              }

                              break;
                           }
                           case "Pump":
                           {
                              PumpParameters pumpParameters = this.ReadPumpParameters(reader);

                              if (null != pumpParameters)
                              {
                                 switch (pumpParameters.Location)
                                 {
                                    case "Front":
                                    {
                                       this.FrontPump = pumpParameters;
                                       break;
                                    }
                                    case "Rear":
                                    {
                                       this.RearPump = pumpParameters;
                                       break;
                                    }
                                 }
                              }
                              
                              break;
                           }
                           case "Osd":
                           {
                              OsdParameters osdParameters = this.ReadOsdParameters(reader);

                              if (null != osdParameters)
                              {
                                 this.Osd = osdParameters;
                              }
                              
                              break;
                           }
                           case "Lights":
                           {
                              this.ReadLightParameters(reader);
                              break;
                           }
                        }
                     }
                     else
                     {
#if false
                        switch (reader.Name)
                        {
                           case "Drills":
                           {
                              break;
                           }
                           case "Drill":
                           {
                              break;
                           }
                        }
#endif
                     }
                  }
               }
               #endregion

               reader.Close();
               reader.Dispose();
            }
         }
         catch { }
      }
Exemplo n.º 6
0
 public void IncreaseHorizontalOffset(OsdParameters osdParameters)
 {
    if (osdParameters.HozizontalOffset < 63)
    {
       osdParameters.HozizontalOffset++;
       this.SetScreenHorizontalPositionOffset(osdParameters.HozizontalOffset);
    }
 }
Exemplo n.º 7
0
 public void DecreaseHorizontalOffset(OsdParameters osdParameters)
 {
    if (osdParameters.HozizontalOffset > 0)
    {
       osdParameters.HozizontalOffset--;
       this.SetScreenHorizontalPositionOffset(osdParameters.HozizontalOffset);
    }
 }
Exemplo n.º 8
0
 public void DecreaseVeriticalOffset(OsdParameters osdParameters)
 {
    if (osdParameters.VerticalOffset < 31)
    {
       osdParameters.VerticalOffset++;
       this.SetScreenVerticalPositionOffset(osdParameters.VerticalOffset);
    }
 }
Exemplo n.º 9
0
 public void IncreaseVeriticalOffset(OsdParameters osdParameters)
 {
    if (osdParameters.VerticalOffset > 0)
    {
       osdParameters.VerticalOffset--;
       this.SetScreenVerticalPositionOffset(osdParameters.VerticalOffset);
    }
 }
Exemplo n.º 10
0
      public void Configure(OsdParameters osdParameters)
      {
         this.SetVideoChannel(0); // all channels
         this.SetScreenHorizontalPositionOffset(osdParameters.HozizontalOffset);
         this.SetScreenVerticalPositionOffset(osdParameters.VerticalOffset);

         this.ClearScreen();

         this.SetDateVisible(osdParameters.ShowDate);
         Thread.Sleep(50);
         this.SetTimeVisible(osdParameters.ShowTime);
         Thread.Sleep(50);

         this.SetDescriptionText(1, osdParameters.Line1);
         this.SetDescriptionText(2, osdParameters.Line2);
         this.SetDescriptionText(3, osdParameters.Line3);
         this.SetDescriptionText(4, osdParameters.Line4);
         this.SetDescriptionText(5, osdParameters.Line5);

         this.SetCameraIdVisible(osdParameters.ShowCameraId);
         Thread.Sleep(50);
         this.SetPipeDisplacementVisible(osdParameters.ShowPipeDisplacement);
         Thread.Sleep(50);
         this.SetPipePositionVisible(osdParameters.ShowPipePosition);
         Thread.Sleep(50);
         this.SetDescriptionVisible(osdParameters.ShowDescription);

         this.configured = true;
      }