public override void deserialize(MemoryStream stream, std_msgs.msg.ColorRGBA data) { using (BinaryReader reader = new BinaryReader(stream)) { Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader); read(data, cdr); } }
public override void serialize(std_msgs.msg.ColorRGBA 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(std_msgs.msg.ColorRGBA data, Halodi.CDR.CDRDeserializer cdr) { data.r = cdr.read_type_5(); data.g = cdr.read_type_5(); data.b = cdr.read_type_5(); data.a = cdr.read_type_5(); }
public static void write(std_msgs.msg.ColorRGBA data, Halodi.CDR.CDRSerializer cdr) { cdr.write_type_5(data.r); cdr.write_type_5(data.g); cdr.write_type_5(data.b); cdr.write_type_5(data.a); }
public static void read(visualization_msgs.msg.Marker data, Halodi.CDR.CDRDeserializer cdr) { data.header = std_msgs.msg.HeaderPubSubType.Create(); std_msgs.msg.HeaderPubSubType.read(data.header, cdr); data.ns = cdr.read_type_d(); data.id = cdr.read_type_2(); data.type = cdr.read_type_2(); data.action = cdr.read_type_2(); data.pose = geometry_msgs.msg.PosePubSubType.Create(); geometry_msgs.msg.PosePubSubType.read(data.pose, cdr); data.scale = geometry_msgs.msg.Vector3PubSubType.Create(); geometry_msgs.msg.Vector3PubSubType.read(data.scale, cdr); data.color = std_msgs.msg.ColorRGBAPubSubType.Create(); std_msgs.msg.ColorRGBAPubSubType.read(data.color, cdr); data.lifetime = builtin_interfaces.msg.DurationPubSubType.Create(); builtin_interfaces.msg.DurationPubSubType.read(data.lifetime, cdr); data.frame_locked = cdr.read_type_7(); int points_length = cdr.read_type_2(); data.points = new System.Collections.Generic.List <geometry_msgs.msg.Point>(points_length); for (int i = 0; i < points_length; i++) { geometry_msgs.msg.Point new_points = geometry_msgs.msg.PointPubSubType.Create(); geometry_msgs.msg.PointPubSubType.read(new_points, cdr); data.points.Add(new_points); } int colors_length = cdr.read_type_2(); data.colors = new System.Collections.Generic.List <std_msgs.msg.ColorRGBA>(colors_length); for (int i = 0; i < colors_length; i++) { std_msgs.msg.ColorRGBA new_colors = std_msgs.msg.ColorRGBAPubSubType.Create(); std_msgs.msg.ColorRGBAPubSubType.read(new_colors, cdr); data.colors.Add(new_colors); } data.text = cdr.read_type_d(); data.mesh_resource = cdr.read_type_d(); data.mesh_use_embedded_materials = cdr.read_type_7(); }
public static void read(visualization_msgs.msg.ImageMarker data, Halodi.CDR.CDRDeserializer cdr) { data.header = std_msgs.msg.HeaderPubSubType.Create(); std_msgs.msg.HeaderPubSubType.read(data.header, cdr); data.ns = cdr.read_type_d(); data.id = cdr.read_type_2(); data.type = cdr.read_type_2(); data.action = cdr.read_type_2(); data.position = geometry_msgs.msg.PointPubSubType.Create(); geometry_msgs.msg.PointPubSubType.read(data.position, cdr); data.scale = cdr.read_type_5(); data.outline_color = std_msgs.msg.ColorRGBAPubSubType.Create(); std_msgs.msg.ColorRGBAPubSubType.read(data.outline_color, cdr); data.filled = cdr.read_type_9(); data.fill_color = std_msgs.msg.ColorRGBAPubSubType.Create(); std_msgs.msg.ColorRGBAPubSubType.read(data.fill_color, cdr); data.lifetime = builtin_interfaces.msg.DurationPubSubType.Create(); builtin_interfaces.msg.DurationPubSubType.read(data.lifetime, cdr); int points_length = cdr.read_type_2(); data.points = new System.Collections.Generic.List <geometry_msgs.msg.Point>(points_length); for (int i = 0; i < points_length; i++) { geometry_msgs.msg.Point new_points = geometry_msgs.msg.PointPubSubType.Create(); geometry_msgs.msg.PointPubSubType.read(new_points, cdr); data.points.Add(new_points); } int outline_colors_length = cdr.read_type_2(); data.outline_colors = new System.Collections.Generic.List <std_msgs.msg.ColorRGBA>(outline_colors_length); for (int i = 0; i < outline_colors_length; i++) { std_msgs.msg.ColorRGBA new_outline_colors = std_msgs.msg.ColorRGBAPubSubType.Create(); std_msgs.msg.ColorRGBAPubSubType.read(new_outline_colors, cdr); data.outline_colors.Add(new_outline_colors); } }
public static int getCdrSerializedSize(std_msgs.msg.ColorRGBA 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); 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 void Set(Marker other) { std_msgs.msg.HeaderPubSubType.Copy(other.header, header); ns = other.ns; id = other.id; type = other.type; action = other.action; geometry_msgs.msg.PosePubSubType.Copy(other.pose, pose); geometry_msgs.msg.Vector3PubSubType.Copy(other.scale, scale); std_msgs.msg.ColorRGBAPubSubType.Copy(other.color, color); builtin_interfaces.msg.DurationPubSubType.Copy(other.lifetime, lifetime); frame_locked = other.frame_locked; if (other.points == null) { points = null; } else { points = new System.Collections.Generic.List <geometry_msgs.msg.Point>(other.points.Count); for (int i1 = 0; i1 < other.points.Count; i1++) { if (other.points[i1] == null) { points.Add(null); } else { geometry_msgs.msg.Point newElement = geometry_msgs.msg.PointPubSubType.Create(); geometry_msgs.msg.PointPubSubType.Copy(other.points[i1], newElement); points.Add(newElement); } } } if (other.colors == null) { colors = null; } else { colors = new System.Collections.Generic.List <std_msgs.msg.ColorRGBA>(other.colors.Count); for (int i2 = 0; i2 < other.colors.Count; i2++) { if (other.colors[i2] == null) { colors.Add(null); } else { std_msgs.msg.ColorRGBA newElement = std_msgs.msg.ColorRGBAPubSubType.Create(); std_msgs.msg.ColorRGBAPubSubType.Copy(other.colors[i2], newElement); colors.Add(newElement); } } } text = other.text; mesh_resource = other.mesh_resource; mesh_use_embedded_materials = other.mesh_use_embedded_materials; }
public void Set(ImageMarker other) { std_msgs.msg.HeaderPubSubType.Copy(other.header, header); ns = other.ns; id = other.id; type = other.type; action = other.action; geometry_msgs.msg.PointPubSubType.Copy(other.position, position); scale = other.scale; std_msgs.msg.ColorRGBAPubSubType.Copy(other.outline_color, outline_color); filled = other.filled; std_msgs.msg.ColorRGBAPubSubType.Copy(other.fill_color, fill_color); builtin_interfaces.msg.DurationPubSubType.Copy(other.lifetime, lifetime); if (other.points == null) { points = null; } else { points = new System.Collections.Generic.List <geometry_msgs.msg.Point>(other.points.Count); for (int i1 = 0; i1 < other.points.Count; i1++) { if (other.points[i1] == null) { points.Add(null); } else { geometry_msgs.msg.Point newElement = geometry_msgs.msg.PointPubSubType.Create(); geometry_msgs.msg.PointPubSubType.Copy(other.points[i1], newElement); points.Add(newElement); } } } if (other.outline_colors == null) { outline_colors = null; } else { outline_colors = new System.Collections.Generic.List <std_msgs.msg.ColorRGBA>(other.outline_colors.Count); for (int i2 = 0; i2 < other.outline_colors.Count; i2++) { if (other.outline_colors[i2] == null) { outline_colors.Add(null); } else { std_msgs.msg.ColorRGBA newElement = std_msgs.msg.ColorRGBAPubSubType.Create(); std_msgs.msg.ColorRGBAPubSubType.Copy(other.outline_colors[i2], newElement); outline_colors.Add(newElement); } } } }
public static void Copy(std_msgs.msg.ColorRGBA src, std_msgs.msg.ColorRGBA target) { target.Set(src); }
public static int getCdrSerializedSize(std_msgs.msg.ColorRGBA data) { return(getCdrSerializedSize(data, 0)); }