00001 /* Auto-generated by genmsg_java.py for file /opt/ros/diamondback/stacks/ros_comm/messages/std_msgs/msg/MultiArrayDimension.msg */ 00002 00003 package ros.pkg.std_msgs.msg; 00004 00005 import java.nio.ByteBuffer; 00006 00007 public class MultiArrayDimension extends ros.communication.Message { 00008 00009 public java.lang.String label = new java.lang.String(); 00010 public long size; 00011 public long stride; 00012 00013 public MultiArrayDimension() { 00014 } 00015 00016 public static java.lang.String __s_getDataType() { return "std_msgs/MultiArrayDimension"; } 00017 public java.lang.String getDataType() { return __s_getDataType(); } 00018 public static java.lang.String __s_getMD5Sum() { return "4cd0c83a8683deae40ecdac60e53bfa8"; } 00019 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); } 00020 public static java.lang.String __s_getMessageDefinition() { return "string label # label of given dimension\n" + 00021 "uint32 size # size of given dimension (in type units)\n" + 00022 "uint32 stride # stride of given dimension\n" + 00023 ""; } 00024 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); } 00025 00026 public MultiArrayDimension clone() { 00027 MultiArrayDimension c = new MultiArrayDimension(); 00028 c.deserialize(serialize(0)); 00029 return c; 00030 } 00031 00032 public void setTo(ros.communication.Message m) { 00033 deserialize(m.serialize(0)); 00034 } 00035 00036 public int serializationLength() { 00037 int __l = 0; 00038 __l += 4 + label.length(); 00039 __l += 4; // size 00040 __l += 4; // stride 00041 return __l; 00042 } 00043 00044 public void serialize(ByteBuffer bb, int seq) { 00045 Serialization.writeString(bb, label); 00046 bb.putInt((int)size); 00047 bb.putInt((int)stride); 00048 } 00049 00050 public void deserialize(ByteBuffer bb) { 00051 label = Serialization.readString(bb); 00052 size = (long)(bb.getInt() & 0xffffffff); 00053 stride = (long)(bb.getInt() & 0xffffffff); 00054 } 00055 00056 @SuppressWarnings("all") 00057 public boolean equals(Object o) { 00058 if(!(o instanceof MultiArrayDimension)) 00059 return false; 00060 MultiArrayDimension other = (MultiArrayDimension) o; 00061 return 00062 label.equals(other.label) && 00063 size == other.size && 00064 stride == other.stride && 00065 true; 00066 } 00067 00068 @SuppressWarnings("all") 00069 public int hashCode() { 00070 final int prime = 31; 00071 int result = 1; 00072 long tmp; 00073 result = prime * result + (this.label == null ? 0 : this.label.hashCode()); 00074 result = prime * result + (int)(this.size ^ (this.size >>> 32)); 00075 result = prime * result + (int)(this.stride ^ (this.stride >>> 32)); 00076 return result; 00077 } 00078 } // class MultiArrayDimension 00079