00001
00002
00003 package ros.pkg.test_rosjava_jni.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class TestBadDataTypes extends ros.communication.Message {
00008
00009 public ros.pkg.std_msgs.msg.Byte[] Byte_f = new ros.pkg.std_msgs.msg.Byte[2];
00010 public ros.pkg.std_msgs.msg.ByteMultiArray[] ByteMultiArray_f = new ros.pkg.std_msgs.msg.ByteMultiArray[1];
00011
00012 public TestBadDataTypes() {
00013
00014 for(int __i=0; __i<2; __i++) {
00015 Byte_f[__i] = new ros.pkg.std_msgs.msg.Byte();
00016 }
00017
00018 for(int __i=0; __i<1; __i++) {
00019 ByteMultiArray_f[__i] = new ros.pkg.std_msgs.msg.ByteMultiArray();
00020 }
00021 }
00022
00023 public static java.lang.String __s_getDataType() { return "test_rosjava_jni/TestBadDataTypes"; }
00024 public java.lang.String getDataType() { return __s_getDataType(); }
00025 public static java.lang.String __s_getMD5Sum() { return "f0fea41d38f14ed745582d619f53bcd0"; }
00026 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00027 public static java.lang.String __s_getMessageDefinition() { return "# Unfortunately, can't test these fully because roscpp message generation\n" +
00028 "# is broken. \n" +
00029 "\n" +
00030 "std_msgs/Byte[2] Byte_f\n" +
00031 "std_msgs/ByteMultiArray[1] ByteMultiArray_f\n" +
00032 "\n" +
00033 "================================================================================\n" +
00034 "MSG: std_msgs/Byte\n" +
00035 "byte data\n" +
00036 "\n" +
00037 "================================================================================\n" +
00038 "MSG: std_msgs/ByteMultiArray\n" +
00039 "# Please look at the MultiArrayLayout message definition for\n" +
00040 "# documentation on all multiarrays.\n" +
00041 "\n" +
00042 "MultiArrayLayout layout # specification of data layout\n" +
00043 "byte[] data # array of data\n" +
00044 "\n" +
00045 "\n" +
00046 "================================================================================\n" +
00047 "MSG: std_msgs/MultiArrayLayout\n" +
00048 "# The multiarray declares a generic multi-dimensional array of a\n" +
00049 "# particular data type. Dimensions are ordered from outer most\n" +
00050 "# to inner most.\n" +
00051 "\n" +
00052 "MultiArrayDimension[] dim # Array of dimension properties\n" +
00053 "uint32 data_offset # padding bytes at front of data\n" +
00054 "\n" +
00055 "# Accessors should ALWAYS be written in terms of dimension stride\n" +
00056 "# and specified outer-most dimension first.\n" +
00057 "# \n" +
00058 "# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]\n" +
00059 "#\n" +
00060 "# A standard, 3-channel 640x480 image with interleaved color channels\n" +
00061 "# would be specified as:\n" +
00062 "#\n" +
00063 "# dim[0].label = \"height\"\n" +
00064 "# dim[0].size = 480\n" +
00065 "# dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)\n" +
00066 "# dim[1].label = \"width\"\n" +
00067 "# dim[1].size = 640\n" +
00068 "# dim[1].stride = 3*640 = 1920\n" +
00069 "# dim[2].label = \"channel\"\n" +
00070 "# dim[2].size = 3\n" +
00071 "# dim[2].stride = 3\n" +
00072 "#\n" +
00073 "# multiarray(i,j,k) refers to the ith row, jth column, and kth channel.\n" +
00074 "================================================================================\n" +
00075 "MSG: std_msgs/MultiArrayDimension\n" +
00076 "string label # label of given dimension\n" +
00077 "uint32 size # size of given dimension (in type units)\n" +
00078 "uint32 stride # stride of given dimension\n" +
00079 ""; }
00080 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00081
00082 public TestBadDataTypes clone() {
00083 TestBadDataTypes c = new TestBadDataTypes();
00084 c.deserialize(serialize(0));
00085 return c;
00086 }
00087
00088 public void setTo(ros.communication.Message m) {
00089 deserialize(m.serialize(0));
00090 }
00091
00092 public int serializationLength() {
00093 int __l = 0;
00094
00095 for(ros.pkg.std_msgs.msg.Byte val : Byte_f) {
00096 __l += val.serializationLength();
00097 }
00098
00099 for(ros.pkg.std_msgs.msg.ByteMultiArray val : ByteMultiArray_f) {
00100 __l += val.serializationLength();
00101 }
00102 return __l;
00103 }
00104
00105 public void serialize(ByteBuffer bb, int seq) {
00106
00107 for(ros.pkg.std_msgs.msg.Byte val : Byte_f) {
00108 val.serialize(bb, seq);
00109 }
00110
00111 for(ros.pkg.std_msgs.msg.ByteMultiArray val : ByteMultiArray_f) {
00112 val.serialize(bb, seq);
00113 }
00114 }
00115
00116 public void deserialize(ByteBuffer bb) {
00117
00118 int __Byte_f_len = Byte_f.length;;
00119 Byte_f = new ros.pkg.std_msgs.msg.Byte[__Byte_f_len];
00120 for(int __i=0; __i<__Byte_f_len; __i++) {
00121 ros.pkg.std_msgs.msg.Byte __tmp = new ros.pkg.std_msgs.msg.Byte();
00122 __tmp.deserialize(bb);
00123 Byte_f[__i] = __tmp;
00124 }
00125
00126 int __ByteMultiArray_f_len = ByteMultiArray_f.length;;
00127 ByteMultiArray_f = new ros.pkg.std_msgs.msg.ByteMultiArray[__ByteMultiArray_f_len];
00128 for(int __i=0; __i<__ByteMultiArray_f_len; __i++) {
00129 ros.pkg.std_msgs.msg.ByteMultiArray __tmp = new ros.pkg.std_msgs.msg.ByteMultiArray();
00130 __tmp.deserialize(bb);
00131 ByteMultiArray_f[__i] = __tmp;
00132 }
00133 }
00134
00135 @SuppressWarnings("all")
00136 public boolean equals(Object o) {
00137 if(!(o instanceof TestBadDataTypes))
00138 return false;
00139 TestBadDataTypes other = (TestBadDataTypes) o;
00140 return
00141 java.util.Arrays.equals(Byte_f, other.Byte_f) &&
00142 java.util.Arrays.equals(ByteMultiArray_f, other.ByteMultiArray_f) &&
00143 true;
00144 }
00145
00146 @SuppressWarnings("all")
00147 public int hashCode() {
00148 final int prime = 31;
00149 int result = 1;
00150 long tmp;
00151 result = prime * result + java.util.Arrays.hashCode(this.Byte_f);
00152 result = prime * result + java.util.Arrays.hashCode(this.ByteMultiArray_f);
00153 return result;
00154 }
00155 }
00156