public override void deserialize(MemoryStream stream, builtin_interfaces.msg.Duration data) { using (BinaryReader reader = new BinaryReader(stream)) { Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader); read(data, cdr); } }
public override void serialize(builtin_interfaces.msg.Duration data, MemoryStream stream) { using (BinaryWriter writer = new BinaryWriter(stream)) { Halodi.CDR.CDRSerializer cdr = new Halodi.CDR.CDRSerializer(writer); write(data, cdr); } }
public static int getCdrSerializedSize(builtin_interfaces.msg.Duration data, int current_alignment) { int initial_alignment = current_alignment; current_alignment += 4 + Halodi.CDR.CDRCommon.alignment(current_alignment, 4); current_alignment += 4 + Halodi.CDR.CDRCommon.alignment(current_alignment, 4); return(current_alignment - initial_alignment); }
public static void Copy(builtin_interfaces.msg.Duration src, builtin_interfaces.msg.Duration target) { target.Set(src); }
public static void read(builtin_interfaces.msg.Duration data, Halodi.CDR.CDRDeserializer cdr) { data.sec = cdr.read_type_2(); data.nanosec = cdr.read_type_4(); }
public static void write(builtin_interfaces.msg.Duration data, Halodi.CDR.CDRSerializer cdr) { cdr.write_type_2(data.sec); cdr.write_type_4(data.nanosec); }
public static int getCdrSerializedSize(builtin_interfaces.msg.Duration data) { return(getCdrSerializedSize(data, 0)); }