public override void deserialize(MemoryStream stream, halodi_msgs.msg.BatteryStatus data) { using (BinaryReader reader = new BinaryReader(stream)) { Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader); read(data, cdr); } }
public override void serialize(halodi_msgs.msg.BatteryStatus data, MemoryStream stream) { using (BinaryWriter writer = new BinaryWriter(stream)) { Halodi.CDR.CDRSerializer cdr = new Halodi.CDR.CDRSerializer(writer); write(data, cdr); } }
public static void read(halodi_msgs.msg.BatteryStatus data, Halodi.CDR.CDRDeserializer cdr) { data.battery_status_level = cdr.read_type_9(); data.battery_voltage = cdr.read_type_6(); data.low_battery_voltage = cdr.read_type_6(); data.shutdown_battery_voltage = cdr.read_type_6(); }
public static void write(halodi_msgs.msg.BatteryStatus data, Halodi.CDR.CDRSerializer cdr) { cdr.write_type_9(data.battery_status_level); cdr.write_type_6(data.battery_voltage); cdr.write_type_6(data.low_battery_voltage); cdr.write_type_6(data.shutdown_battery_voltage); }
public static int getCdrSerializedSize(halodi_msgs.msg.BatteryStatus data, int current_alignment) { int initial_alignment = current_alignment; current_alignment += 1 + Halodi.CDR.CDRCommon.alignment(current_alignment, 1); current_alignment += 8 + Halodi.CDR.CDRCommon.alignment(current_alignment, 8); current_alignment += 8 + Halodi.CDR.CDRCommon.alignment(current_alignment, 8); current_alignment += 8 + Halodi.CDR.CDRCommon.alignment(current_alignment, 8); return(current_alignment - initial_alignment); }
public static void Copy(halodi_msgs.msg.BatteryStatus src, halodi_msgs.msg.BatteryStatus target) { target.Set(src); }
public static int getCdrSerializedSize(halodi_msgs.msg.BatteryStatus data) { return(getCdrSerializedSize(data, 0)); }