コード例 #1
0
        public static void write(sensor_msgs.msg.JoyFeedback data, Halodi.CDR.CDRSerializer cdr)
        {
            cdr.write_type_9(data.type);

            cdr.write_type_9(data.id);

            cdr.write_type_5(data.intensity);
        }
コード例 #2
0
        public static void read(sensor_msgs.msg.JoyFeedback data, Halodi.CDR.CDRDeserializer cdr)
        {
            data.type = cdr.read_type_9();

            data.id = cdr.read_type_9();

            data.intensity = cdr.read_type_5();
        }
コード例 #3
0
 public override void deserialize(MemoryStream stream, sensor_msgs.msg.JoyFeedback data)
 {
     using (BinaryReader reader = new BinaryReader(stream))
     {
         Halodi.CDR.CDRDeserializer cdr = new Halodi.CDR.CDRDeserializer(reader);
         read(data, cdr);
     }
 }
コード例 #4
0
 public override void serialize(sensor_msgs.msg.JoyFeedback data, MemoryStream stream)
 {
     using (BinaryWriter writer = new BinaryWriter(stream))
     {
         Halodi.CDR.CDRSerializer cdr = new Halodi.CDR.CDRSerializer(writer);
         write(data, cdr);
     }
 }
コード例 #5
0
        public static void read(sensor_msgs.msg.JoyFeedbackArray data, Halodi.CDR.CDRDeserializer cdr)
        {
            int array_length = cdr.read_type_2();

            data.array = new System.Collections.Generic.List <sensor_msgs.msg.JoyFeedback>(array_length);
            for (int i = 0; i < array_length; i++)
            {
                sensor_msgs.msg.JoyFeedback new_array = sensor_msgs.msg.JoyFeedbackPubSubType.Create();
                sensor_msgs.msg.JoyFeedbackPubSubType.read(new_array, cdr);
                data.array.Add(new_array);
            }
        }
コード例 #6
0
        public static int getCdrSerializedSize(sensor_msgs.msg.JoyFeedback data, int current_alignment)
        {
            int initial_alignment = current_alignment;

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


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


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



            return(current_alignment - initial_alignment);
        }
コード例 #7
0
 public void Set(JoyFeedbackArray other)
 {
     if (other.array == null)
     {
         array = null;
     }
     else
     {
         array = new System.Collections.Generic.List <sensor_msgs.msg.JoyFeedback>(other.array.Count);
         for (int i1 = 0; i1 < other.array.Count; i1++)
         {
             if (other.array[i1] == null)
             {
                 array.Add(null);
             }
             else
             {
                 sensor_msgs.msg.JoyFeedback newElement = sensor_msgs.msg.JoyFeedbackPubSubType.Create();
                 sensor_msgs.msg.JoyFeedbackPubSubType.Copy(other.array[i1], newElement);
                 array.Add(newElement);
             }
         }
     }
 }
コード例 #8
0
 public static void Copy(sensor_msgs.msg.JoyFeedback src, sensor_msgs.msg.JoyFeedback target)
 {
     target.Set(src);
 }
コード例 #9
0
 public static int getCdrSerializedSize(sensor_msgs.msg.JoyFeedback data)
 {
     return(getCdrSerializedSize(data, 0));
 }