コード例 #1
0
 public override void deserialize(MemoryStream stream, std_msgs.msg.UInt64MultiArray data)
 {
     using (BinaryReader reader = new BinaryReader(stream))
     {
         Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader);
         read(data, cdr);
     }
 }
コード例 #2
0
 public override void serialize(std_msgs.msg.UInt64MultiArray data, MemoryStream stream)
 {
     using (BinaryWriter writer = new BinaryWriter(stream))
     {
         Halodi.CDR.CDRSerializer cdr = new Halodi.CDR.CDRSerializer(writer);
         write(data, cdr);
     }
 }
コード例 #3
0
        public static int getCdrSerializedSize(std_msgs.msg.UInt64MultiArray data, int current_alignment)
        {
            int initial_alignment = current_alignment;

            current_alignment += std_msgs.msg.MultiArrayLayoutPubSubType.getCdrSerializedSize(data.layout, current_alignment);

            current_alignment += 4 + Halodi.CDR.CDRCommon.alignment(current_alignment, 4);
            current_alignment += (data.data.Count * 8) + Halodi.CDR.CDRCommon.alignment(current_alignment, 8);



            return(current_alignment - initial_alignment);
        }
コード例 #4
0
        public static void read(std_msgs.msg.UInt64MultiArray data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.layout = std_msgs.msg.MultiArrayLayoutPubSubType.Create();
            std_msgs.msg.MultiArrayLayoutPubSubType.read(data.layout, cdr);


            int data_length = cdr.read_type_2();

            data.data = new System.Collections.Generic.List <ulong>(data_length);
            for (int i = 0; i < data_length; i++)
            {
                data.data.Add(cdr.read_type_12());
            }
        }
コード例 #5
0
        public static void write(std_msgs.msg.UInt64MultiArray data, Halodi.CDR.CDRSerializer cdr)
        {
            std_msgs.msg.MultiArrayLayoutPubSubType.write(data.layout, cdr);

            if (data.data == null)
            {
                cdr.write_type_2(0);
            }
            else
            {
                int data_length = data.data.Count;
                cdr.write_type_2(data_length);
                for (int i0 = 0; i0 < data_length; i0++)
                {
                    cdr.write_type_12(data.data[i0]);
                }
            }
        }
コード例 #6
0
 public static void Copy(std_msgs.msg.UInt64MultiArray src, std_msgs.msg.UInt64MultiArray target)
 {
     target.Set(src);
 }
コード例 #7
0
 public static int getCdrSerializedSize(std_msgs.msg.UInt64MultiArray data)
 {
     return(getCdrSerializedSize(data, 0));
 }