Esempio n. 1
0
        public void Set(GoalStatusArray other)
        {
            std_msgs.msg.HeaderPubSubType.Copy(other.header, header);


            if (other.status_list == null)
            {
                status_list = null;
            }
            else
            {
                status_list = new System.Collections.Generic.List <actionlib_msgs.msg.GoalStatus>(other.status_list.Count);
                for (int i1 = 0; i1 < other.status_list.Count; i1++)
                {
                    if (other.status_list[i1] == null)
                    {
                        status_list.Add(null);
                    }
                    else
                    {
                        actionlib_msgs.msg.GoalStatus newElement = actionlib_msgs.msg.GoalStatusPubSubType.Create();
                        actionlib_msgs.msg.GoalStatusPubSubType.Copy(other.status_list[i1], newElement);
                        status_list.Add(newElement);
                    }
                }
            }
        }
        public static void write(actionlib_msgs.msg.GoalStatus data, Halodi.CDR.CDRSerializer cdr)
        {
            actionlib_msgs.msg.GoalIDPubSubType.write(data.goal_id, cdr);

            cdr.write_type_9(data.status);

            cdr.write_type_d(data.text);
        }
 public override void deserialize(MemoryStream stream, actionlib_msgs.msg.GoalStatus data)
 {
     using (BinaryReader reader = new BinaryReader(stream))
     {
         Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader);
         read(data, cdr);
     }
 }
 public override void serialize(actionlib_msgs.msg.GoalStatus 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(actionlib_msgs.msg.GoalStatus data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.goal_id = actionlib_msgs.msg.GoalIDPubSubType.Create();
            actionlib_msgs.msg.GoalIDPubSubType.read(data.goal_id, cdr);

            data.status = cdr.read_type_9();

            data.text = cdr.read_type_d();
        }
        public static int getCdrSerializedSize(actionlib_msgs.msg.GoalStatus data, int current_alignment)
        {
            int initial_alignment = current_alignment;

            current_alignment += actionlib_msgs.msg.GoalIDPubSubType.getCdrSerializedSize(data.goal_id, current_alignment);

            current_alignment += 1 + Halodi.CDR.CDRCommon.alignment(current_alignment, 1);


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


            return(current_alignment - initial_alignment);
        }
        public static void read(actionlib_msgs.msg.GoalStatusArray data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.header = std_msgs.msg.HeaderPubSubType.Create();
            std_msgs.msg.HeaderPubSubType.read(data.header, cdr);


            int status_list_length = cdr.read_type_2();

            data.status_list = new System.Collections.Generic.List <actionlib_msgs.msg.GoalStatus>(status_list_length);
            for (int i = 0; i < status_list_length; i++)
            {
                actionlib_msgs.msg.GoalStatus new_status_list = actionlib_msgs.msg.GoalStatusPubSubType.Create();
                actionlib_msgs.msg.GoalStatusPubSubType.read(new_status_list, cdr);
                data.status_list.Add(new_status_list);
            }
        }
 public static void Copy(actionlib_msgs.msg.GoalStatus src, actionlib_msgs.msg.GoalStatus target)
 {
     target.Set(src);
 }
 public static int getCdrSerializedSize(actionlib_msgs.msg.GoalStatus data)
 {
     return(getCdrSerializedSize(data, 0));
 }