Project: engagement_generation License: BSD Dependencies:
Used by:
None |
engagement_generation/msg_gen/java/ros/pkg/std_msgs/msg/Int8MultiArray.javaGo to the documentation of this file.00001 /* Auto-generated by genmsg_java.py for file /opt/ros/diamondback/stacks/ros_comm/messages/std_msgs/msg/Int8MultiArray.msg */ 00002 00003 package ros.pkg.std_msgs.msg; 00004 00005 import java.nio.ByteBuffer; 00006 00007 public class Int8MultiArray extends ros.communication.Message { 00008 00009 public ros.pkg.std_msgs.msg.MultiArrayLayout layout = new ros.pkg.std_msgs.msg.MultiArrayLayout(); 00010 public byte[] data = new byte[0]; 00011 00012 public Int8MultiArray() { 00013 } 00014 00015 public static java.lang.String __s_getDataType() { return "std_msgs/Int8MultiArray"; } 00016 public java.lang.String getDataType() { return __s_getDataType(); } 00017 public static java.lang.String __s_getMD5Sum() { return "d7c1af35a1b4781bbe79e03dd94b7c13"; } 00018 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); } 00019 public static java.lang.String __s_getMessageDefinition() { return "# Please look at the MultiArrayLayout message definition for\n" + 00020 "# documentation on all multiarrays.\n" + 00021 "\n" + 00022 "MultiArrayLayout layout # specification of data layout\n" + 00023 "int8[] data # array of data\n" + 00024 "\n" + 00025 "\n" + 00026 "================================================================================\n" + 00027 "MSG: std_msgs/MultiArrayLayout\n" + 00028 "# The multiarray declares a generic multi-dimensional array of a\n" + 00029 "# particular data type. Dimensions are ordered from outer most\n" + 00030 "# to inner most.\n" + 00031 "\n" + 00032 "MultiArrayDimension[] dim # Array of dimension properties\n" + 00033 "uint32 data_offset # padding bytes at front of data\n" + 00034 "\n" + 00035 "# Accessors should ALWAYS be written in terms of dimension stride\n" + 00036 "# and specified outer-most dimension first.\n" + 00037 "# \n" + 00038 "# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]\n" + 00039 "#\n" + 00040 "# A standard, 3-channel 640x480 image with interleaved color channels\n" + 00041 "# would be specified as:\n" + 00042 "#\n" + 00043 "# dim[0].label = \"height\"\n" + 00044 "# dim[0].size = 480\n" + 00045 "# dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)\n" + 00046 "# dim[1].label = \"width\"\n" + 00047 "# dim[1].size = 640\n" + 00048 "# dim[1].stride = 3*640 = 1920\n" + 00049 "# dim[2].label = \"channel\"\n" + 00050 "# dim[2].size = 3\n" + 00051 "# dim[2].stride = 3\n" + 00052 "#\n" + 00053 "# multiarray(i,j,k) refers to the ith row, jth column, and kth channel.\n" + 00054 "================================================================================\n" + 00055 "MSG: std_msgs/MultiArrayDimension\n" + 00056 "string label # label of given dimension\n" + 00057 "uint32 size # size of given dimension (in type units)\n" + 00058 "uint32 stride # stride of given dimension\n" + 00059 ""; } 00060 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); } 00061 00062 public Int8MultiArray clone() { 00063 Int8MultiArray c = new Int8MultiArray(); 00064 c.deserialize(serialize(0)); 00065 return c; 00066 } 00067 00068 public void setTo(ros.communication.Message m) { 00069 deserialize(m.serialize(0)); 00070 } 00071 00072 public int serializationLength() { 00073 int __l = 0; 00074 __l += layout.serializationLength(); 00075 __l += 4 + data.length * 1; // data 00076 return __l; 00077 } 00078 00079 public void serialize(ByteBuffer bb, int seq) { 00080 layout.serialize(bb, seq); 00081 bb.putInt(data.length); 00082 for(byte val : data) { 00083 bb.put(val); 00084 } 00085 } 00086 00087 public void deserialize(ByteBuffer bb) { 00088 layout.deserialize(bb); 00089 00090 int __data_len = bb.getInt(); 00091 data = new byte[__data_len]; 00092 for(int __i=0; __i<__data_len; __i++) { 00093 data[__i] = bb.get(); 00094 } 00095 } 00096 00097 @SuppressWarnings("all") 00098 public boolean equals(Object o) { 00099 if(!(o instanceof Int8MultiArray)) 00100 return false; 00101 Int8MultiArray other = (Int8MultiArray) o; 00102 return 00103 layout.equals(other.layout) && 00104 java.util.Arrays.equals(data, other.data) && 00105 true; 00106 } 00107 00108 @SuppressWarnings("all") 00109 public int hashCode() { 00110 final int prime = 31; 00111 int result = 1; 00112 long tmp; 00113 result = prime * result + (this.layout == null ? 0 : this.layout.hashCode()); 00114 result = prime * result + java.util.Arrays.hashCode(this.data); 00115 return result; 00116 } 00117 } // class Int8MultiArray 00118 |