public override void deserialize(MemoryStream stream, rcl_interfaces.msg.Parameter data) { using (BinaryReader reader = new BinaryReader(stream)) { Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader); read(data, cdr); } }
public override void serialize(rcl_interfaces.msg.Parameter 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(rcl_interfaces.msg.Parameter data, int current_alignment) { int initial_alignment = current_alignment; current_alignment += 4 + Halodi.CDR.CDRCommon.alignment(current_alignment, 4) + data.name.Length + 1; current_alignment += rcl_interfaces.msg.ParameterValuePubSubType.getCdrSerializedSize(data.value, current_alignment); return(current_alignment - initial_alignment); }
public static void read(rcl_interfaces.msg.ParameterEvent data, Halodi.CDR.CDRDeserializer cdr) { data.stamp = builtin_interfaces.msg.TimePubSubType.Create(); builtin_interfaces.msg.TimePubSubType.read(data.stamp, cdr); data.node = cdr.read_type_d(); int new_parameters_length = cdr.read_type_2(); data.new_parameters = new System.Collections.Generic.List <rcl_interfaces.msg.Parameter>(new_parameters_length); for (int i = 0; i < new_parameters_length; i++) { rcl_interfaces.msg.Parameter new_new_parameters = rcl_interfaces.msg.ParameterPubSubType.Create(); rcl_interfaces.msg.ParameterPubSubType.read(new_new_parameters, cdr); data.new_parameters.Add(new_new_parameters); } int changed_parameters_length = cdr.read_type_2(); data.changed_parameters = new System.Collections.Generic.List <rcl_interfaces.msg.Parameter>(changed_parameters_length); for (int i = 0; i < changed_parameters_length; i++) { rcl_interfaces.msg.Parameter new_changed_parameters = rcl_interfaces.msg.ParameterPubSubType.Create(); rcl_interfaces.msg.ParameterPubSubType.read(new_changed_parameters, cdr); data.changed_parameters.Add(new_changed_parameters); } int deleted_parameters_length = cdr.read_type_2(); data.deleted_parameters = new System.Collections.Generic.List <rcl_interfaces.msg.Parameter>(deleted_parameters_length); for (int i = 0; i < deleted_parameters_length; i++) { rcl_interfaces.msg.Parameter new_deleted_parameters = rcl_interfaces.msg.ParameterPubSubType.Create(); rcl_interfaces.msg.ParameterPubSubType.read(new_deleted_parameters, cdr); data.deleted_parameters.Add(new_deleted_parameters); } }
public static void Copy(rcl_interfaces.msg.Parameter src, rcl_interfaces.msg.Parameter target) { target.Set(src); }
public static void read(rcl_interfaces.msg.Parameter data, Halodi.CDR.CDRDeserializer cdr) { data.name = cdr.read_type_d(); data.value = rcl_interfaces.msg.ParameterValuePubSubType.Create(); rcl_interfaces.msg.ParameterValuePubSubType.read(data.value, cdr); }
public static void write(rcl_interfaces.msg.Parameter data, Halodi.CDR.CDRSerializer cdr) { cdr.write_type_d(data.name); rcl_interfaces.msg.ParameterValuePubSubType.write(data.value, cdr); }
public static int getCdrSerializedSize(rcl_interfaces.msg.Parameter data) { return(getCdrSerializedSize(data, 0)); }
public void Set(ParameterEvent other) { builtin_interfaces.msg.TimePubSubType.Copy(other.stamp, stamp); node = other.node; if (other.new_parameters == null) { new_parameters = null; } else { new_parameters = new System.Collections.Generic.List <rcl_interfaces.msg.Parameter>(other.new_parameters.Count); for (int i1 = 0; i1 < other.new_parameters.Count; i1++) { if (other.new_parameters[i1] == null) { new_parameters.Add(null); } else { rcl_interfaces.msg.Parameter newElement = rcl_interfaces.msg.ParameterPubSubType.Create(); rcl_interfaces.msg.ParameterPubSubType.Copy(other.new_parameters[i1], newElement); new_parameters.Add(newElement); } } } if (other.changed_parameters == null) { changed_parameters = null; } else { changed_parameters = new System.Collections.Generic.List <rcl_interfaces.msg.Parameter>(other.changed_parameters.Count); for (int i2 = 0; i2 < other.changed_parameters.Count; i2++) { if (other.changed_parameters[i2] == null) { changed_parameters.Add(null); } else { rcl_interfaces.msg.Parameter newElement = rcl_interfaces.msg.ParameterPubSubType.Create(); rcl_interfaces.msg.ParameterPubSubType.Copy(other.changed_parameters[i2], newElement); changed_parameters.Add(newElement); } } } if (other.deleted_parameters == null) { deleted_parameters = null; } else { deleted_parameters = new System.Collections.Generic.List <rcl_interfaces.msg.Parameter>(other.deleted_parameters.Count); for (int i3 = 0; i3 < other.deleted_parameters.Count; i3++) { if (other.deleted_parameters[i3] == null) { deleted_parameters.Add(null); } else { rcl_interfaces.msg.Parameter newElement = rcl_interfaces.msg.ParameterPubSubType.Create(); rcl_interfaces.msg.ParameterPubSubType.Copy(other.deleted_parameters[i3], newElement); deleted_parameters.Add(newElement); } } } }