public static object Microsoft_Robotics_Services_InfraredSensorArray_Proxy_InfraredSensorArrayState_TO_Microsoft_Robotics_Services_InfraredSensorArray_Proxy_InfraredSensorArrayState0(object transformFrom) { global::Microsoft.Robotics.Services.InfraredSensorArray.Proxy.InfraredSensorArrayState target = new global::Microsoft.Robotics.Services.InfraredSensorArray.Proxy.InfraredSensorArrayState(); global::Microsoft.Robotics.Services.InfraredSensorArray.InfraredSensorArrayState from = ((global::Microsoft.Robotics.Services.InfraredSensorArray.InfraredSensorArrayState)(transformFrom)); global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Infrared.InfraredState> tmp = from.Sensors; if ((tmp != null)) { int count = tmp.Count; global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Infrared.Proxy.InfraredState> tmp0 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Infrared.Proxy.InfraredState>(count); for (int index = 0; (index < count); index = (index + 1)) { global::Microsoft.Robotics.Services.Infrared.Proxy.InfraredState tmp1 = default(global::Microsoft.Robotics.Services.Infrared.Proxy.InfraredState); global::Microsoft.Robotics.Services.Infrared.InfraredState tmp2 = tmp[index]; if ((tmp2 != null)) { tmp1 = ((global::Microsoft.Robotics.Services.Infrared.Proxy.InfraredState)(Microsoft_Robotics_Services_Infrared_Proxy_InfraredState_TO_Microsoft_Robotics_Services_Infrared_Proxy_InfraredState0(tmp2))); } tmp0.Add(tmp1); } target.Sensors = tmp0; } return(target); }
public static object Microsoft_Robotics_ReferencePlatform_MarkRobot_MarkRobotState_TO_Microsoft_Robotics_ReferencePlatform_MarkRobot_Proxy_MarkRobotState(object transformFrom) { global::Microsoft.Robotics.ReferencePlatform.MarkRobot.Proxy.MarkRobotState target = new global::Microsoft.Robotics.ReferencePlatform.MarkRobot.Proxy.MarkRobotState(); global::Microsoft.Robotics.ReferencePlatform.MarkRobot.MarkRobotState from = ((global::Microsoft.Robotics.ReferencePlatform.MarkRobot.MarkRobotState)(transformFrom)); target.LastStartTime = from.LastStartTime; target.SensorPollingInterval = from.SensorPollingInterval; target.BatteryVoltagePinIndex = from.BatteryVoltagePinIndex; target.BatteryVoltageDivider = from.BatteryVoltageDivider; target.InfraredRawValueDivisorScalar = from.InfraredRawValueDivisorScalar; target.InfraredDistanceExponent = from.InfraredDistanceExponent; target.SonarTimeValueMultiplier = from.SonarTimeValueMultiplier; global::Microsoft.Robotics.Services.Drive.DriveDifferentialTwoWheelState tmp = from.DriveState; if ((tmp != null)) { target.DriveState = ((global::Microsoft.Robotics.Services.Drive.Proxy.DriveDifferentialTwoWheelState)(Microsoft_Robotics_Services_Drive_Proxy_DriveDifferentialTwoWheelState_TO_Microsoft_Robotics_Services_Drive_Proxy_DriveDifferentialTwoWheelState0(tmp))); } global::Microsoft.Robotics.Services.InfraredSensorArray.InfraredSensorArrayState tmp0 = from.InfraredSensorState; if ((tmp0 != null)) { target.InfraredSensorState = ((global::Microsoft.Robotics.Services.InfraredSensorArray.Proxy.InfraredSensorArrayState)(Microsoft_Robotics_Services_InfraredSensorArray_Proxy_InfraredSensorArrayState_TO_Microsoft_Robotics_Services_InfraredSensorArray_Proxy_InfraredSensorArrayState0(tmp0))); } global::Microsoft.Robotics.Services.SonarSensorArray.SonarSensorArrayState tmp1 = from.SonarSensorState; if ((tmp1 != null)) { target.SonarSensorState = ((global::Microsoft.Robotics.Services.SonarSensorArray.Proxy.SonarSensorArrayState)(Microsoft_Robotics_Services_SonarSensorArray_Proxy_SonarSensorArrayState_TO_Microsoft_Robotics_Services_SonarSensorArray_Proxy_SonarSensorArrayState0(tmp1))); } global::Microsoft.Robotics.Services.Battery.BatteryState tmp2 = from.BatteryState; if ((tmp2 != null)) { target.BatteryState = ((global::Microsoft.Robotics.Services.Battery.Proxy.BatteryState)(Microsoft_Robotics_Services_Battery_Proxy_BatteryState_TO_Microsoft_Robotics_Services_Battery_Proxy_BatteryState0(tmp2))); } return(target); }