Пример #1
0
 /// <summary>
 ///Deserializes MarkRobotState
 ///</summary>
 ///<param name="reader">the reader from which to deserialize</param>
 ///<returns>deserialized MarkRobotState</returns>
 public virtual object Deserialize(System.IO.BinaryReader reader)
 {
     this._LastStartTime                 = global::Microsoft.Dss.Services.Serializer.BinarySerializationHelper.DeserializeDateTime(reader);
     this._SensorPollingInterval         = reader.ReadInt32();
     this._BatteryVoltagePinIndex        = reader.ReadInt32();
     this._BatteryVoltageDivider         = reader.ReadDouble();
     this._InfraredRawValueDivisorScalar = reader.ReadDouble();
     this._InfraredDistanceExponent      = reader.ReadDouble();
     this._SonarTimeValueMultiplier      = reader.ReadDouble();
     if ((reader.ReadByte() != 0))
     {
         this._DriveState = ((global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState())).Deserialize(reader)));
     }
     if ((reader.ReadByte() != 0))
     {
         this._InfraredSensorState = ((global::Microsoft.Robotics.Services.InfraredSensorArray.Proxy.InfraredSensorArrayState)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.Services.InfraredSensorArray.Proxy.InfraredSensorArrayState())).Deserialize(reader)));
     }
     if ((reader.ReadByte() != 0))
     {
         this._SonarSensorState = ((global::Microsoft.Robotics.Services.SonarSensorArray.Proxy.SonarSensorArrayState)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.Services.SonarSensorArray.Proxy.SonarSensorArrayState())).Deserialize(reader)));
     }
     if ((reader.ReadByte() != 0))
     {
         this._BatteryState = ((global::Microsoft.Robotics.Services.Battery.Proxy.BatteryState)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.Services.Battery.Proxy.BatteryState())).Deserialize(reader)));
     }
     return(this);
 }
Пример #2
0
 public virtual global::Microsoft.Ccr.Core.PortSet <global::Microsoft.Dss.ServiceModel.Dssp.DefaultUpdateResponseType, global:: W3C.Soap.Fault> DriveUpdate(global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState body)
 {
     if ((body == null))
     {
         body = new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState();
     }
     global::Microsoft.Robotics.Services.Explorer.Proxy.DriveUpdate operation = new global::Microsoft.Robotics.Services.Explorer.Proxy.DriveUpdate(body);
     this.Post(operation);
     return(operation.ResponsePort);
 }
Пример #3
0
 public virtual global::Microsoft.Ccr.Core.Choice DriveUpdate(global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState body, out global::Microsoft.Robotics.Services.Explorer.Proxy.DriveUpdate operation)
 {
     if ((body == null))
     {
         body = new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState();
     }
     operation = new global::Microsoft.Robotics.Services.Explorer.Proxy.DriveUpdate(body);
     this.Post(operation);
     return(operation.ResponsePort);
 }
Пример #4
0
 /// <summary>
 ///Deserializes ReferencePlatform2011State
 ///</summary>
 ///<param name="reader">the reader from which to deserialize</param>
 ///<returns>deserialized ReferencePlatform2011State</returns>
 public virtual object Deserialize(System.IO.BinaryReader reader)
 {
     this._InitialPosition = ((global::Microsoft.Robotics.PhysicalModel.Proxy.Vector3)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.PhysicalModel.Proxy.Vector3())).Deserialize(reader)));
     if ((reader.ReadByte() != 0))
     {
         this._EntityName = reader.ReadString();
     }
     if ((reader.ReadByte() != 0))
     {
         this._DriveState = ((global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState())).Deserialize(reader)));
     }
     return(this);
 }
Пример #5
0
 /// <summary>
 ///Deserializes State
 ///</summary>
 ///<param name="reader">the reader from which to deserialize</param>
 ///<returns>deserialized State</returns>
 public virtual object Deserialize(System.IO.BinaryReader reader)
 {
     if ((reader.ReadByte() != 0))
     {
         this._DriveState = ((global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState())).Deserialize(reader)));
     }
     this._Countdown    = reader.ReadInt32();
     this._LogicalState = ((global::Microsoft.Robotics.Services.Explorer.Proxy.LogicalState)(reader.ReadInt32()));
     this._NewHeading   = reader.ReadInt32();
     this._Velocity     = reader.ReadInt32();
     if ((reader.ReadByte() != 0))
     {
         this._South = ((global::Microsoft.Robotics.Services.Sensors.SickLRF.Proxy.State)(((Microsoft.Dss.Core.IDssSerializable)(new global::Microsoft.Robotics.Services.Sensors.SickLRF.Proxy.State())).Deserialize(reader)));
     }
     this._Mapped          = reader.ReadBoolean();
     this._MostRecentLaser = global::Microsoft.Dss.Services.Serializer.BinarySerializationHelper.DeserializeDateTime(reader);
     return(this);
 }
Пример #6
0
 /// <summary>
 ///Copies the data member values of the current MarkRobotState to the specified target object
 ///</summary>
 ///<param name="target">target object (must be an instance of)</param>
 public virtual void CopyTo(Microsoft.Dss.Core.IDssSerializable target)
 {
     global::Microsoft.Robotics.ReferencePlatform.MarkRobot.Proxy.MarkRobotState typedTarget = ((global::Microsoft.Robotics.ReferencePlatform.MarkRobot.Proxy.MarkRobotState)(target));
     typedTarget._LastStartTime                 = this._LastStartTime;
     typedTarget._SensorPollingInterval         = this._SensorPollingInterval;
     typedTarget._BatteryVoltagePinIndex        = this._BatteryVoltagePinIndex;
     typedTarget._BatteryVoltageDivider         = this._BatteryVoltageDivider;
     typedTarget._InfraredRawValueDivisorScalar = this._InfraredRawValueDivisorScalar;
     typedTarget._InfraredDistanceExponent      = this._InfraredDistanceExponent;
     typedTarget._SonarTimeValueMultiplier      = this._SonarTimeValueMultiplier;
     if ((this._DriveState != null))
     {
         global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState tmp = new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState();
         ((Microsoft.Dss.Core.IDssSerializable)(this._DriveState)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp)));
         typedTarget._DriveState = tmp;
     }
     if ((this._InfraredSensorState != null))
     {
         global::Microsoft.Robotics.Services.InfraredSensorArray.Proxy.InfraredSensorArrayState tmp0 = new global::Microsoft.Robotics.Services.InfraredSensorArray.Proxy.InfraredSensorArrayState();
         ((Microsoft.Dss.Core.IDssSerializable)(this._InfraredSensorState)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp0)));
         typedTarget._InfraredSensorState = tmp0;
     }
     if ((this._SonarSensorState != null))
     {
         global::Microsoft.Robotics.Services.SonarSensorArray.Proxy.SonarSensorArrayState tmp1 = new global::Microsoft.Robotics.Services.SonarSensorArray.Proxy.SonarSensorArrayState();
         ((Microsoft.Dss.Core.IDssSerializable)(this._SonarSensorState)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp1)));
         typedTarget._SonarSensorState = tmp1;
     }
     if ((this._BatteryState != null))
     {
         global::Microsoft.Robotics.Services.Battery.Proxy.BatteryState tmp2 = new global::Microsoft.Robotics.Services.Battery.Proxy.BatteryState();
         ((Microsoft.Dss.Core.IDssSerializable)(this._BatteryState)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp2)));
         typedTarget._BatteryState = tmp2;
     }
 }
Пример #7
0
 /// <summary>
 ///Copies the data member values of the current ReferencePlatform2011State to the specified target object
 ///</summary>
 ///<param name="target">target object (must be an instance of)</param>
 public virtual void CopyTo(Microsoft.Dss.Core.IDssSerializable target)
 {
     global::Microsoft.Robotics.Services.Simulation.ReferencePlatform2011.Proxy.ReferencePlatform2011State typedTarget = ((global::Microsoft.Robotics.Services.Simulation.ReferencePlatform2011.Proxy.ReferencePlatform2011State)(target));
     typedTarget._InitialPosition = this._InitialPosition;
     typedTarget._EntityName      = this._EntityName;
     if ((this._DriveState != null))
     {
         global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState tmp = new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState();
         ((Microsoft.Dss.Core.IDssSerializable)(this._DriveState)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp)));
         typedTarget._DriveState = tmp;
     }
 }
 public static object Microsoft_Robotics_Services_Drive_Proxy_DriveDifferentialTwoWheelState_TO_Microsoft_Robotics_Services_Drive_Proxy_DriveDifferentialTwoWheelState0(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState target = new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState();
     global::Microsoft.Robotics.Services.Drive.DriveDifferentialTwoWheelState       from   = ((global::Microsoft.Robotics.Services.Drive.DriveDifferentialTwoWheelState)(transformFrom));
     target.TimeStamp = from.TimeStamp;
     global::Microsoft.Robotics.Services.Motor.WheeledMotorState tmp = from.LeftWheel;
     if ((tmp != null))
     {
         target.LeftWheel = ((global::Microsoft.Robotics.Services.Motor.Proxy.WheeledMotorState)(Microsoft_Robotics_Services_Motor_Proxy_WheeledMotorState_TO_Microsoft_Robotics_Services_Motor_Proxy_WheeledMotorState0(tmp)));
     }
     global::Microsoft.Robotics.Services.Motor.WheeledMotorState tmp0 = from.RightWheel;
     if ((tmp0 != null))
     {
         target.RightWheel = ((global::Microsoft.Robotics.Services.Motor.Proxy.WheeledMotorState)(Microsoft_Robotics_Services_Motor_Proxy_WheeledMotorState_TO_Microsoft_Robotics_Services_Motor_Proxy_WheeledMotorState0(tmp0)));
     }
     target.DistanceBetweenWheels = from.DistanceBetweenWheels;
     target.IsEnabled             = from.IsEnabled;
     target.DriveDistanceStage    = ((global::Microsoft.Robotics.Services.Drive.Proxy.DriveStage)(((int)(from.DriveDistanceStage))));
     target.RotateDegreesStage    = ((global::Microsoft.Robotics.Services.Drive.Proxy.DriveStage)(((int)(from.RotateDegreesStage))));
     target.DriveState            = ((global::Microsoft.Robotics.Services.Drive.Proxy.DriveState)(((int)(from.DriveState))));
     return(target);
 }
Пример #9
0
 public DriveUpdate(global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState body, global::Microsoft.Ccr.Core.PortSet <global::Microsoft.Dss.ServiceModel.Dssp.DefaultUpdateResponseType, global:: W3C.Soap.Fault> responsePort) :
     base(body, responsePort)
 {
 }
Пример #10
0
 public DriveUpdate(global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState body) :
     base(body)
 {
 }
Пример #11
0
 /// <summary>
 ///Copies the data member values of the current State to the specified target object
 ///</summary>
 ///<param name="target">target object (must be an instance of)</param>
 public virtual void CopyTo(Microsoft.Dss.Core.IDssSerializable target)
 {
     global::Microsoft.Robotics.Services.Explorer.Proxy.State typedTarget = ((global::Microsoft.Robotics.Services.Explorer.Proxy.State)(target));
     if ((this._DriveState != null))
     {
         global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState tmp = new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState();
         ((Microsoft.Dss.Core.IDssSerializable)(this._DriveState)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp)));
         typedTarget._DriveState = tmp;
     }
     typedTarget._Countdown    = this._Countdown;
     typedTarget._LogicalState = this._LogicalState;
     typedTarget._NewHeading   = this._NewHeading;
     typedTarget._Velocity     = this._Velocity;
     if ((this._South != null))
     {
         global::Microsoft.Robotics.Services.Sensors.SickLRF.Proxy.State tmp0 = new global::Microsoft.Robotics.Services.Sensors.SickLRF.Proxy.State();
         ((Microsoft.Dss.Core.IDssSerializable)(this._South)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp0)));
         typedTarget._South = tmp0;
     }
     typedTarget._Mapped          = this._Mapped;
     typedTarget._MostRecentLaser = this._MostRecentLaser;
 }
 public static object Microsoft_Robotics_Services_Explorer_State_TO_Microsoft_Robotics_Services_Explorer_Proxy_State(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Explorer.Proxy.State target = new global::Microsoft.Robotics.Services.Explorer.Proxy.State();
     global::Microsoft.Robotics.Services.Explorer.State       from   = ((global::Microsoft.Robotics.Services.Explorer.State)(transformFrom));
     global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState tmp = from.DriveState;
     if ((tmp != null))
     {
         global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState tmp0 = new global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState();
         ((Microsoft.Dss.Core.IDssSerializable)(tmp)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp0)));
         target.DriveState = tmp0;
     }
     target.Countdown    = from.Countdown;
     target.LogicalState = ((global::Microsoft.Robotics.Services.Explorer.Proxy.LogicalState)(((int)(from.LogicalState))));
     target.NewHeading   = from.NewHeading;
     target.Velocity     = from.Velocity;
     global::Microsoft.Robotics.Services.Sensors.SickLRF.Proxy.State tmp1 = from.South;
     if ((tmp1 != null))
     {
         global::Microsoft.Robotics.Services.Sensors.SickLRF.Proxy.State tmp2 = new global::Microsoft.Robotics.Services.Sensors.SickLRF.Proxy.State();
         ((Microsoft.Dss.Core.IDssSerializable)(tmp1)).CopyTo(((Microsoft.Dss.Core.IDssSerializable)(tmp2)));
         target.South = tmp2;
     }
     target.Mapped          = from.Mapped;
     target.MostRecentLaser = from.MostRecentLaser;
     return(target);
 }