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);
 }
Example #2
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;
 }
Example #3
0
 /// <summary>
 ///Clones State
 ///</summary>
 ///<returns>cloned value</returns>
 public virtual object Clone()
 {
     global::Microsoft.Robotics.Services.Explorer.Proxy.State target0 = new global::Microsoft.Robotics.Services.Explorer.Proxy.State();
     this.CopyTo(target0);
     return(target0);
 }