Пример #1
0
        public static void write(visualization_msgs.msg.InteractiveMarkerPose data, Halodi.CDR.CDRSerializer cdr)
        {
            std_msgs.msg.HeaderPubSubType.write(data.header, cdr);

            geometry_msgs.msg.PosePubSubType.write(data.pose, cdr);

            cdr.write_type_d(data.name);
        }
Пример #2
0
 public override void deserialize(MemoryStream stream, visualization_msgs.msg.InteractiveMarkerPose data)
 {
     using (BinaryReader reader = new BinaryReader(stream))
     {
         Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader);
         read(data, cdr);
     }
 }
Пример #3
0
 public override void serialize(visualization_msgs.msg.InteractiveMarkerPose data, MemoryStream stream)
 {
     using (BinaryWriter writer = new BinaryWriter(stream))
     {
         Halodi.CDR.CDRSerializer cdr = new Halodi.CDR.CDRSerializer(writer);
         write(data, cdr);
     }
 }
Пример #4
0
        public static void read(visualization_msgs.msg.InteractiveMarkerPose data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.header = std_msgs.msg.HeaderPubSubType.Create();
            std_msgs.msg.HeaderPubSubType.read(data.header, cdr);

            data.pose = geometry_msgs.msg.PosePubSubType.Create();
            geometry_msgs.msg.PosePubSubType.read(data.pose, cdr);

            data.name = cdr.read_type_d();
        }
Пример #5
0
        public static int getCdrSerializedSize(visualization_msgs.msg.InteractiveMarkerPose data, int current_alignment)
        {
            int initial_alignment = current_alignment;

            current_alignment += std_msgs.msg.HeaderPubSubType.getCdrSerializedSize(data.header, current_alignment);

            current_alignment += geometry_msgs.msg.PosePubSubType.getCdrSerializedSize(data.pose, current_alignment);

            current_alignment += 4 + Halodi.CDR.CDRCommon.alignment(current_alignment, 4) + data.name.Length + 1;


            return(current_alignment - initial_alignment);
        }
Пример #6
0
        public static void read(visualization_msgs.msg.InteractiveMarkerUpdate data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.server_id = cdr.read_type_d();
            data.seq_num   = cdr.read_type_12();

            data.type = cdr.read_type_9();


            int markers_length = cdr.read_type_2();

            data.markers = new System.Collections.Generic.List <visualization_msgs.msg.InteractiveMarker>(markers_length);
            for (int i = 0; i < markers_length; i++)
            {
                visualization_msgs.msg.InteractiveMarker new_markers = visualization_msgs.msg.InteractiveMarkerPubSubType.Create();
                visualization_msgs.msg.InteractiveMarkerPubSubType.read(new_markers, cdr);
                data.markers.Add(new_markers);
            }



            int poses_length = cdr.read_type_2();

            data.poses = new System.Collections.Generic.List <visualization_msgs.msg.InteractiveMarkerPose>(poses_length);
            for (int i = 0; i < poses_length; i++)
            {
                visualization_msgs.msg.InteractiveMarkerPose new_poses = visualization_msgs.msg.InteractiveMarkerPosePubSubType.Create();
                visualization_msgs.msg.InteractiveMarkerPosePubSubType.read(new_poses, cdr);
                data.poses.Add(new_poses);
            }



            int erases_length = cdr.read_type_2();

            data.erases = new System.Collections.Generic.List <string>(erases_length);
            for (int i = 0; i < erases_length; i++)
            {
                data.erases.Add(cdr.read_type_d());
            }
        }
        public void Set(InteractiveMarkerUpdate other)
        {
            server_id = other.server_id;

            seq_num = other.seq_num;

            type = other.type;


            if (other.markers == null)
            {
                markers = null;
            }
            else
            {
                markers = new System.Collections.Generic.List <visualization_msgs.msg.InteractiveMarker>(other.markers.Count);
                for (int i1 = 0; i1 < other.markers.Count; i1++)
                {
                    if (other.markers[i1] == null)
                    {
                        markers.Add(null);
                    }
                    else
                    {
                        visualization_msgs.msg.InteractiveMarker newElement = visualization_msgs.msg.InteractiveMarkerPubSubType.Create();
                        visualization_msgs.msg.InteractiveMarkerPubSubType.Copy(other.markers[i1], newElement);
                        markers.Add(newElement);
                    }
                }
            }

            if (other.poses == null)
            {
                poses = null;
            }
            else
            {
                poses = new System.Collections.Generic.List <visualization_msgs.msg.InteractiveMarkerPose>(other.poses.Count);
                for (int i2 = 0; i2 < other.poses.Count; i2++)
                {
                    if (other.poses[i2] == null)
                    {
                        poses.Add(null);
                    }
                    else
                    {
                        visualization_msgs.msg.InteractiveMarkerPose newElement = visualization_msgs.msg.InteractiveMarkerPosePubSubType.Create();
                        visualization_msgs.msg.InteractiveMarkerPosePubSubType.Copy(other.poses[i2], newElement);
                        poses.Add(newElement);
                    }
                }
            }

            if (other.erases == null)
            {
                erases = null;
            }
            else
            {
                erases = new System.Collections.Generic.List <string>(other.erases.Count);
                for (int i3 = 0; i3 < other.erases.Count; i3++)
                {
                    erases.Add(other.erases[i3]);
                }
            }
        }
Пример #8
0
 public static void Copy(visualization_msgs.msg.InteractiveMarkerPose src, visualization_msgs.msg.InteractiveMarkerPose target)
 {
     target.Set(src);
 }
Пример #9
0
 public static int getCdrSerializedSize(visualization_msgs.msg.InteractiveMarkerPose data)
 {
     return(getCdrSerializedSize(data, 0));
 }