Exemplo n.º 1
0
 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     System.UInt32 dim_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(dim_len).Length;
     for (int i = 0; i < (int)dim_len; i++)
     {
         std_msgs.MultiArrayDimension element = new std_msgs.MultiArrayDimension();
         curIndex += element.Deserialize(serialized, curIndex);
         dim.Add(element);
     }
     data_offset = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(data_offset).Length;
     return (curIndex - startIndex);
 }
            public override int Deserialize(System.Byte[] serialized, int startIndex)
            {
                int curIndex = startIndex;

                System.UInt32 dim_len = BitConverter.ToUInt32(serialized, curIndex);
                curIndex += BitConverter.GetBytes(dim_len).Length;
                for (int i = 0; i < (int)dim_len; i++)
                {
                    std_msgs.MultiArrayDimension element = new std_msgs.MultiArrayDimension();
                    curIndex += element.Deserialize(serialized, curIndex);
                    dim.Add(element);
                }
                data_offset = BitConverter.ToUInt32(serialized, curIndex);
                curIndex   += BitConverter.GetBytes(data_offset).Length;
                return(curIndex - startIndex);
            }
        public override bool Equals(IRosMessage ____other)
        {
            if (____other == null)
            {
                return(false);
            }
            bool ret = true;

            std_msgs.MultiArrayDimension other = (Messages.std_msgs.MultiArrayDimension)____other;

            ret &= label == other.label;
            ret &= size == other.size;
            ret &= stride == other.stride;
            // for each SingleType st:
            //    ret &= {st.Name} == other.{st.Name};
            return(ret);
        }