00001 """autogenerated by genmsg_py from TestDataTypes.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006 import std_msgs.msg
00007
00008 class TestDataTypes(roslib.message.Message):
00009 _md5sum = "25bc379e8ef2913896f76e9ef8bedbdc"
00010 _type = "test_rosjava/TestDataTypes"
00011 _has_header = False
00012 _full_text = """# Test all primitive types
00013 byte byte_
00014 char char_
00015 uint8 uint8_
00016 int8 int8_
00017 uint16 uint16_
00018 int16 int16_
00019 uint32 uint32_
00020 int32 int32_
00021 uint64 uint64_
00022 int64 int64_
00023 float32 float32_
00024 float64 float64_
00025 string string_
00026 time time_
00027 duration duration_
00028
00029 # Test a smattering of array types
00030 byte[] byte_v
00031 byte[2] byte_f
00032 float64[] float64_v
00033 float64[2] float64_f
00034 string[] string_v
00035 string[2] string_f
00036 time[] time_v
00037 time[2] time_f
00038
00039 # Test submsgs, including both fixed and var length
00040 std_msgs/Byte Byte_
00041 std_msgs/Byte[] Byte_v
00042
00043 std_msgs/ByteMultiArray ByteMultiArray_
00044 std_msgs/ByteMultiArray[] ByteMultiArray_v
00045
00046 # Unfortunately, can't test these because roscpp message generation
00047 # is broken. Hopefully rosjava works correctly ...
00048 # TODO: put these back in.
00049
00050 # std_msgs/Byte[2] Byte_f
00051 # std_msgs/ByteMultiArray[2] ByteMultiArray_f
00052
00053 ================================================================================
00054 MSG: std_msgs/Byte
00055 byte data
00056
00057 ================================================================================
00058 MSG: std_msgs/ByteMultiArray
00059 # Please look at the MultiArrayLayout message definition for
00060 # documentation on all multiarrays.
00061
00062 MultiArrayLayout layout # specification of data layout
00063 byte[] data # array of data
00064
00065
00066 ================================================================================
00067 MSG: std_msgs/MultiArrayLayout
00068 # The multiarray declares a generic multi-dimensional array of a
00069 # particular data type. Dimensions are ordered from outer most
00070 # to inner most.
00071
00072 MultiArrayDimension[] dim # Array of dimension properties
00073 uint32 data_offset # padding bytes at front of data
00074
00075 # Accessors should ALWAYS be written in terms of dimension stride
00076 # and specified outer-most dimension first.
00077 #
00078 # multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
00079 #
00080 # A standard, 3-channel 640x480 image with interleaved color channels
00081 # would be specified as:
00082 #
00083 # dim[0].label = "height"
00084 # dim[0].size = 480
00085 # dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)
00086 # dim[1].label = "width"
00087 # dim[1].size = 640
00088 # dim[1].stride = 3*640 = 1920
00089 # dim[2].label = "channel"
00090 # dim[2].size = 3
00091 # dim[2].stride = 3
00092 #
00093 # multiarray(i,j,k) refers to the ith row, jth column, and kth channel.
00094 ================================================================================
00095 MSG: std_msgs/MultiArrayDimension
00096 string label # label of given dimension
00097 uint32 size # size of given dimension (in type units)
00098 uint32 stride # stride of given dimension
00099 """
00100 __slots__ = ['byte_','char_','uint8_','int8_','uint16_','int16_','uint32_','int32_','uint64_','int64_','float32_','float64_','string_','time_','duration_','byte_v','byte_f','float64_v','float64_f','string_v','string_f','time_v','time_f','Byte_','Byte_v','ByteMultiArray_','ByteMultiArray_v']
00101 _slot_types = ['byte','char','uint8','int8','uint16','int16','uint32','int32','uint64','int64','float32','float64','string','time','duration','byte[]','byte[2]','float64[]','float64[2]','string[]','string[2]','time[]','time[2]','std_msgs/Byte','std_msgs/Byte[]','std_msgs/ByteMultiArray','std_msgs/ByteMultiArray[]']
00102
00103 def __init__(self, *args, **kwds):
00104 """
00105 Constructor. Any message fields that are implicitly/explicitly
00106 set to None will be assigned a default value. The recommend
00107 use is keyword arguments as this is more robust to future message
00108 changes. You cannot mix in-order arguments and keyword arguments.
00109
00110 The available fields are:
00111 byte_,char_,uint8_,int8_,uint16_,int16_,uint32_,int32_,uint64_,int64_,float32_,float64_,string_,time_,duration_,byte_v,byte_f,float64_v,float64_f,string_v,string_f,time_v,time_f,Byte_,Byte_v,ByteMultiArray_,ByteMultiArray_v
00112
00113 @param args: complete set of field values, in .msg order
00114 @param kwds: use keyword arguments corresponding to message field names
00115 to set specific fields.
00116 """
00117 if args or kwds:
00118 super(TestDataTypes, self).__init__(*args, **kwds)
00119
00120 if self.byte_ is None:
00121 self.byte_ = 0
00122 if self.char_ is None:
00123 self.char_ = 0
00124 if self.uint8_ is None:
00125 self.uint8_ = 0
00126 if self.int8_ is None:
00127 self.int8_ = 0
00128 if self.uint16_ is None:
00129 self.uint16_ = 0
00130 if self.int16_ is None:
00131 self.int16_ = 0
00132 if self.uint32_ is None:
00133 self.uint32_ = 0
00134 if self.int32_ is None:
00135 self.int32_ = 0
00136 if self.uint64_ is None:
00137 self.uint64_ = 0
00138 if self.int64_ is None:
00139 self.int64_ = 0
00140 if self.float32_ is None:
00141 self.float32_ = 0.
00142 if self.float64_ is None:
00143 self.float64_ = 0.
00144 if self.string_ is None:
00145 self.string_ = ''
00146 if self.time_ is None:
00147 self.time_ = roslib.rostime.Time()
00148 if self.duration_ is None:
00149 self.duration_ = roslib.rostime.Duration()
00150 if self.byte_v is None:
00151 self.byte_v = ''
00152 if self.byte_f is None:
00153 self.byte_f = chr(0)*2
00154 if self.float64_v is None:
00155 self.float64_v = []
00156 if self.float64_f is None:
00157 self.float64_f = [0.,0.]
00158 if self.string_v is None:
00159 self.string_v = []
00160 if self.string_f is None:
00161 self.string_f = ['','']
00162 if self.time_v is None:
00163 self.time_v = []
00164 if self.time_f is None:
00165 self.time_f = [roslib.rostime.Time(),roslib.rostime.Time()]
00166 if self.Byte_ is None:
00167 self.Byte_ = std_msgs.msg.Byte()
00168 if self.Byte_v is None:
00169 self.Byte_v = []
00170 if self.ByteMultiArray_ is None:
00171 self.ByteMultiArray_ = std_msgs.msg.ByteMultiArray()
00172 if self.ByteMultiArray_v is None:
00173 self.ByteMultiArray_v = []
00174 else:
00175 self.byte_ = 0
00176 self.char_ = 0
00177 self.uint8_ = 0
00178 self.int8_ = 0
00179 self.uint16_ = 0
00180 self.int16_ = 0
00181 self.uint32_ = 0
00182 self.int32_ = 0
00183 self.uint64_ = 0
00184 self.int64_ = 0
00185 self.float32_ = 0.
00186 self.float64_ = 0.
00187 self.string_ = ''
00188 self.time_ = roslib.rostime.Time()
00189 self.duration_ = roslib.rostime.Duration()
00190 self.byte_v = ''
00191 self.byte_f = chr(0)*2
00192 self.float64_v = []
00193 self.float64_f = [0.,0.]
00194 self.string_v = []
00195 self.string_f = ['','']
00196 self.time_v = []
00197 self.time_f = [roslib.rostime.Time(),roslib.rostime.Time()]
00198 self.Byte_ = std_msgs.msg.Byte()
00199 self.Byte_v = []
00200 self.ByteMultiArray_ = std_msgs.msg.ByteMultiArray()
00201 self.ByteMultiArray_v = []
00202
00203 def _get_types(self):
00204 """
00205 internal API method
00206 """
00207 return self._slot_types
00208
00209 def serialize(self, buff):
00210 """
00211 serialize message into buffer
00212 @param buff: buffer
00213 @type buff: StringIO
00214 """
00215 try:
00216 _x = self
00217 buff.write(_struct_b2BbHhIiQqfd.pack(_x.byte_, _x.char_, _x.uint8_, _x.int8_, _x.uint16_, _x.int16_, _x.uint32_, _x.int32_, _x.uint64_, _x.int64_, _x.float32_, _x.float64_))
00218 _x = self.string_
00219 length = len(_x)
00220 buff.write(struct.pack('<I%ss'%length, length, _x))
00221 _x = self
00222 buff.write(_struct_2I2i.pack(_x.time_.secs, _x.time_.nsecs, _x.duration_.secs, _x.duration_.nsecs))
00223 _x = self.byte_v
00224 length = len(_x)
00225
00226 if type(_x) in [list, tuple]:
00227 buff.write(struct.pack('<I%sB'%length, length, *_x))
00228 else:
00229 buff.write(struct.pack('<I%ss'%length, length, _x))
00230 _x = self.byte_f
00231
00232 if type(_x) in [list, tuple]:
00233 buff.write(_struct_2B.pack(*_x))
00234 else:
00235 buff.write(_struct_2s.pack(_x))
00236 length = len(self.float64_v)
00237 buff.write(_struct_I.pack(length))
00238 pattern = '<%sd'%length
00239 buff.write(struct.pack(pattern, *self.float64_v))
00240 buff.write(_struct_2d.pack(*self.float64_f))
00241 length = len(self.string_v)
00242 buff.write(_struct_I.pack(length))
00243 for val1 in self.string_v:
00244 length = len(val1)
00245 buff.write(struct.pack('<I%ss'%length, length, val1))
00246 for val1 in self.string_f:
00247 length = len(val1)
00248 buff.write(struct.pack('<I%ss'%length, length, val1))
00249 length = len(self.time_v)
00250 buff.write(_struct_I.pack(length))
00251 for val1 in self.time_v:
00252 _x = val1
00253 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00254 for val1 in self.time_f:
00255 _x = val1
00256 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00257 buff.write(_struct_b.pack(self.Byte_.data))
00258 length = len(self.Byte_v)
00259 buff.write(_struct_I.pack(length))
00260 for val1 in self.Byte_v:
00261 buff.write(_struct_b.pack(val1.data))
00262 length = len(self.ByteMultiArray_.layout.dim)
00263 buff.write(_struct_I.pack(length))
00264 for val1 in self.ByteMultiArray_.layout.dim:
00265 _x = val1.label
00266 length = len(_x)
00267 buff.write(struct.pack('<I%ss'%length, length, _x))
00268 _x = val1
00269 buff.write(_struct_2I.pack(_x.size, _x.stride))
00270 buff.write(_struct_I.pack(self.ByteMultiArray_.layout.data_offset))
00271 _x = self.ByteMultiArray_.data
00272 length = len(_x)
00273
00274 if type(_x) in [list, tuple]:
00275 buff.write(struct.pack('<I%sB'%length, length, *_x))
00276 else:
00277 buff.write(struct.pack('<I%ss'%length, length, _x))
00278 length = len(self.ByteMultiArray_v)
00279 buff.write(_struct_I.pack(length))
00280 for val1 in self.ByteMultiArray_v:
00281 _v1 = val1.layout
00282 length = len(_v1.dim)
00283 buff.write(_struct_I.pack(length))
00284 for val3 in _v1.dim:
00285 _x = val3.label
00286 length = len(_x)
00287 buff.write(struct.pack('<I%ss'%length, length, _x))
00288 _x = val3
00289 buff.write(_struct_2I.pack(_x.size, _x.stride))
00290 buff.write(_struct_I.pack(_v1.data_offset))
00291 _x = val1.data
00292 length = len(_x)
00293
00294 if type(_x) in [list, tuple]:
00295 buff.write(struct.pack('<I%sB'%length, length, *_x))
00296 else:
00297 buff.write(struct.pack('<I%ss'%length, length, _x))
00298 except struct.error, se: self._check_types(se)
00299 except TypeError, te: self._check_types(te)
00300
00301 def deserialize(self, str):
00302 """
00303 unpack serialized message in str into this message instance
00304 @param str: byte array of serialized message
00305 @type str: str
00306 """
00307 try:
00308 if self.time_ is None:
00309 self.time_ = roslib.rostime.Time()
00310 if self.duration_ is None:
00311 self.duration_ = roslib.rostime.Duration()
00312 if self.Byte_ is None:
00313 self.Byte_ = std_msgs.msg.Byte()
00314 if self.ByteMultiArray_ is None:
00315 self.ByteMultiArray_ = std_msgs.msg.ByteMultiArray()
00316 end = 0
00317 _x = self
00318 start = end
00319 end += 44
00320 (_x.byte_, _x.char_, _x.uint8_, _x.int8_, _x.uint16_, _x.int16_, _x.uint32_, _x.int32_, _x.uint64_, _x.int64_, _x.float32_, _x.float64_,) = _struct_b2BbHhIiQqfd.unpack(str[start:end])
00321 start = end
00322 end += 4
00323 (length,) = _struct_I.unpack(str[start:end])
00324 start = end
00325 end += length
00326 self.string_ = str[start:end]
00327 _x = self
00328 start = end
00329 end += 16
00330 (_x.time_.secs, _x.time_.nsecs, _x.duration_.secs, _x.duration_.nsecs,) = _struct_2I2i.unpack(str[start:end])
00331 start = end
00332 end += 4
00333 (length,) = _struct_I.unpack(str[start:end])
00334 start = end
00335 end += length
00336 self.byte_v = str[start:end]
00337 start = end
00338 end += 2
00339 self.byte_f = str[start:end]
00340 start = end
00341 end += 4
00342 (length,) = _struct_I.unpack(str[start:end])
00343 pattern = '<%sd'%length
00344 start = end
00345 end += struct.calcsize(pattern)
00346 self.float64_v = struct.unpack(pattern, str[start:end])
00347 start = end
00348 end += 16
00349 self.float64_f = _struct_2d.unpack(str[start:end])
00350 start = end
00351 end += 4
00352 (length,) = _struct_I.unpack(str[start:end])
00353 self.string_v = []
00354 for i in xrange(0, length):
00355 start = end
00356 end += 4
00357 (length,) = _struct_I.unpack(str[start:end])
00358 start = end
00359 end += length
00360 val1 = str[start:end]
00361 self.string_v.append(val1)
00362 self.string_f = []
00363 for i in xrange(0, 2):
00364 start = end
00365 end += 4
00366 (length,) = _struct_I.unpack(str[start:end])
00367 start = end
00368 end += length
00369 val1 = str[start:end]
00370 self.string_f.append(val1)
00371 start = end
00372 end += 4
00373 (length,) = _struct_I.unpack(str[start:end])
00374 self.time_v = []
00375 for i in xrange(0, length):
00376 val1 = roslib.rostime.Time()
00377 _x = val1
00378 start = end
00379 end += 8
00380 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00381 self.time_v.append(val1)
00382 self.time_f = []
00383 for i in xrange(0, 2):
00384 val1 = roslib.rostime.Time()
00385 _x = val1
00386 start = end
00387 end += 8
00388 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00389 self.time_f.append(val1)
00390 start = end
00391 end += 1
00392 (self.Byte_.data,) = _struct_b.unpack(str[start:end])
00393 start = end
00394 end += 4
00395 (length,) = _struct_I.unpack(str[start:end])
00396 self.Byte_v = []
00397 for i in xrange(0, length):
00398 val1 = std_msgs.msg.Byte()
00399 start = end
00400 end += 1
00401 (val1.data,) = _struct_b.unpack(str[start:end])
00402 self.Byte_v.append(val1)
00403 start = end
00404 end += 4
00405 (length,) = _struct_I.unpack(str[start:end])
00406 self.ByteMultiArray_.layout.dim = []
00407 for i in xrange(0, length):
00408 val1 = std_msgs.msg.MultiArrayDimension()
00409 start = end
00410 end += 4
00411 (length,) = _struct_I.unpack(str[start:end])
00412 start = end
00413 end += length
00414 val1.label = str[start:end]
00415 _x = val1
00416 start = end
00417 end += 8
00418 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00419 self.ByteMultiArray_.layout.dim.append(val1)
00420 start = end
00421 end += 4
00422 (self.ByteMultiArray_.layout.data_offset,) = _struct_I.unpack(str[start:end])
00423 start = end
00424 end += 4
00425 (length,) = _struct_I.unpack(str[start:end])
00426 start = end
00427 end += length
00428 self.ByteMultiArray_.data = str[start:end]
00429 start = end
00430 end += 4
00431 (length,) = _struct_I.unpack(str[start:end])
00432 self.ByteMultiArray_v = []
00433 for i in xrange(0, length):
00434 val1 = std_msgs.msg.ByteMultiArray()
00435 _v2 = val1.layout
00436 start = end
00437 end += 4
00438 (length,) = _struct_I.unpack(str[start:end])
00439 _v2.dim = []
00440 for i in xrange(0, length):
00441 val3 = std_msgs.msg.MultiArrayDimension()
00442 start = end
00443 end += 4
00444 (length,) = _struct_I.unpack(str[start:end])
00445 start = end
00446 end += length
00447 val3.label = str[start:end]
00448 _x = val3
00449 start = end
00450 end += 8
00451 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00452 _v2.dim.append(val3)
00453 start = end
00454 end += 4
00455 (_v2.data_offset,) = _struct_I.unpack(str[start:end])
00456 start = end
00457 end += 4
00458 (length,) = _struct_I.unpack(str[start:end])
00459 start = end
00460 end += length
00461 val1.data = str[start:end]
00462 self.ByteMultiArray_v.append(val1)
00463 self.time_.canon()
00464 self.duration_.canon()
00465 return self
00466 except struct.error, e:
00467 raise roslib.message.DeserializationError(e)
00468
00469
00470 def serialize_numpy(self, buff, numpy):
00471 """
00472 serialize message with numpy array types into buffer
00473 @param buff: buffer
00474 @type buff: StringIO
00475 @param numpy: numpy python module
00476 @type numpy module
00477 """
00478 try:
00479 _x = self
00480 buff.write(_struct_b2BbHhIiQqfd.pack(_x.byte_, _x.char_, _x.uint8_, _x.int8_, _x.uint16_, _x.int16_, _x.uint32_, _x.int32_, _x.uint64_, _x.int64_, _x.float32_, _x.float64_))
00481 _x = self.string_
00482 length = len(_x)
00483 buff.write(struct.pack('<I%ss'%length, length, _x))
00484 _x = self
00485 buff.write(_struct_2I2i.pack(_x.time_.secs, _x.time_.nsecs, _x.duration_.secs, _x.duration_.nsecs))
00486 _x = self.byte_v
00487 length = len(_x)
00488
00489 if type(_x) in [list, tuple]:
00490 buff.write(struct.pack('<I%sB'%length, length, *_x))
00491 else:
00492 buff.write(struct.pack('<I%ss'%length, length, _x))
00493 _x = self.byte_f
00494
00495 if type(_x) in [list, tuple]:
00496 buff.write(_struct_2B.pack(*_x))
00497 else:
00498 buff.write(_struct_2s.pack(_x))
00499 length = len(self.float64_v)
00500 buff.write(_struct_I.pack(length))
00501 pattern = '<%sd'%length
00502 buff.write(self.float64_v.tostring())
00503 buff.write(self.float64_f.tostring())
00504 length = len(self.string_v)
00505 buff.write(_struct_I.pack(length))
00506 for val1 in self.string_v:
00507 length = len(val1)
00508 buff.write(struct.pack('<I%ss'%length, length, val1))
00509 for val1 in self.string_f:
00510 length = len(val1)
00511 buff.write(struct.pack('<I%ss'%length, length, val1))
00512 length = len(self.time_v)
00513 buff.write(_struct_I.pack(length))
00514 for val1 in self.time_v:
00515 _x = val1
00516 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00517 for val1 in self.time_f:
00518 _x = val1
00519 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00520 buff.write(_struct_b.pack(self.Byte_.data))
00521 length = len(self.Byte_v)
00522 buff.write(_struct_I.pack(length))
00523 for val1 in self.Byte_v:
00524 buff.write(_struct_b.pack(val1.data))
00525 length = len(self.ByteMultiArray_.layout.dim)
00526 buff.write(_struct_I.pack(length))
00527 for val1 in self.ByteMultiArray_.layout.dim:
00528 _x = val1.label
00529 length = len(_x)
00530 buff.write(struct.pack('<I%ss'%length, length, _x))
00531 _x = val1
00532 buff.write(_struct_2I.pack(_x.size, _x.stride))
00533 buff.write(_struct_I.pack(self.ByteMultiArray_.layout.data_offset))
00534 _x = self.ByteMultiArray_.data
00535 length = len(_x)
00536
00537 if type(_x) in [list, tuple]:
00538 buff.write(struct.pack('<I%sB'%length, length, *_x))
00539 else:
00540 buff.write(struct.pack('<I%ss'%length, length, _x))
00541 length = len(self.ByteMultiArray_v)
00542 buff.write(_struct_I.pack(length))
00543 for val1 in self.ByteMultiArray_v:
00544 _v3 = val1.layout
00545 length = len(_v3.dim)
00546 buff.write(_struct_I.pack(length))
00547 for val3 in _v3.dim:
00548 _x = val3.label
00549 length = len(_x)
00550 buff.write(struct.pack('<I%ss'%length, length, _x))
00551 _x = val3
00552 buff.write(_struct_2I.pack(_x.size, _x.stride))
00553 buff.write(_struct_I.pack(_v3.data_offset))
00554 _x = val1.data
00555 length = len(_x)
00556
00557 if type(_x) in [list, tuple]:
00558 buff.write(struct.pack('<I%sB'%length, length, *_x))
00559 else:
00560 buff.write(struct.pack('<I%ss'%length, length, _x))
00561 except struct.error, se: self._check_types(se)
00562 except TypeError, te: self._check_types(te)
00563
00564 def deserialize_numpy(self, str, numpy):
00565 """
00566 unpack serialized message in str into this message instance using numpy for array types
00567 @param str: byte array of serialized message
00568 @type str: str
00569 @param numpy: numpy python module
00570 @type numpy: module
00571 """
00572 try:
00573 if self.time_ is None:
00574 self.time_ = roslib.rostime.Time()
00575 if self.duration_ is None:
00576 self.duration_ = roslib.rostime.Duration()
00577 if self.Byte_ is None:
00578 self.Byte_ = std_msgs.msg.Byte()
00579 if self.ByteMultiArray_ is None:
00580 self.ByteMultiArray_ = std_msgs.msg.ByteMultiArray()
00581 end = 0
00582 _x = self
00583 start = end
00584 end += 44
00585 (_x.byte_, _x.char_, _x.uint8_, _x.int8_, _x.uint16_, _x.int16_, _x.uint32_, _x.int32_, _x.uint64_, _x.int64_, _x.float32_, _x.float64_,) = _struct_b2BbHhIiQqfd.unpack(str[start:end])
00586 start = end
00587 end += 4
00588 (length,) = _struct_I.unpack(str[start:end])
00589 start = end
00590 end += length
00591 self.string_ = str[start:end]
00592 _x = self
00593 start = end
00594 end += 16
00595 (_x.time_.secs, _x.time_.nsecs, _x.duration_.secs, _x.duration_.nsecs,) = _struct_2I2i.unpack(str[start:end])
00596 start = end
00597 end += 4
00598 (length,) = _struct_I.unpack(str[start:end])
00599 start = end
00600 end += length
00601 self.byte_v = str[start:end]
00602 start = end
00603 end += 2
00604 self.byte_f = str[start:end]
00605 start = end
00606 end += 4
00607 (length,) = _struct_I.unpack(str[start:end])
00608 pattern = '<%sd'%length
00609 start = end
00610 end += struct.calcsize(pattern)
00611 self.float64_v = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00612 start = end
00613 end += 16
00614 self.float64_f = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=2)
00615 start = end
00616 end += 4
00617 (length,) = _struct_I.unpack(str[start:end])
00618 self.string_v = []
00619 for i in xrange(0, length):
00620 start = end
00621 end += 4
00622 (length,) = _struct_I.unpack(str[start:end])
00623 start = end
00624 end += length
00625 val1 = str[start:end]
00626 self.string_v.append(val1)
00627 self.string_f = []
00628 for i in xrange(0, 2):
00629 start = end
00630 end += 4
00631 (length,) = _struct_I.unpack(str[start:end])
00632 start = end
00633 end += length
00634 val1 = str[start:end]
00635 self.string_f.append(val1)
00636 start = end
00637 end += 4
00638 (length,) = _struct_I.unpack(str[start:end])
00639 self.time_v = []
00640 for i in xrange(0, length):
00641 val1 = roslib.rostime.Time()
00642 _x = val1
00643 start = end
00644 end += 8
00645 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00646 self.time_v.append(val1)
00647 self.time_f = []
00648 for i in xrange(0, 2):
00649 val1 = roslib.rostime.Time()
00650 _x = val1
00651 start = end
00652 end += 8
00653 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00654 self.time_f.append(val1)
00655 start = end
00656 end += 1
00657 (self.Byte_.data,) = _struct_b.unpack(str[start:end])
00658 start = end
00659 end += 4
00660 (length,) = _struct_I.unpack(str[start:end])
00661 self.Byte_v = []
00662 for i in xrange(0, length):
00663 val1 = std_msgs.msg.Byte()
00664 start = end
00665 end += 1
00666 (val1.data,) = _struct_b.unpack(str[start:end])
00667 self.Byte_v.append(val1)
00668 start = end
00669 end += 4
00670 (length,) = _struct_I.unpack(str[start:end])
00671 self.ByteMultiArray_.layout.dim = []
00672 for i in xrange(0, length):
00673 val1 = std_msgs.msg.MultiArrayDimension()
00674 start = end
00675 end += 4
00676 (length,) = _struct_I.unpack(str[start:end])
00677 start = end
00678 end += length
00679 val1.label = str[start:end]
00680 _x = val1
00681 start = end
00682 end += 8
00683 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00684 self.ByteMultiArray_.layout.dim.append(val1)
00685 start = end
00686 end += 4
00687 (self.ByteMultiArray_.layout.data_offset,) = _struct_I.unpack(str[start:end])
00688 start = end
00689 end += 4
00690 (length,) = _struct_I.unpack(str[start:end])
00691 start = end
00692 end += length
00693 self.ByteMultiArray_.data = str[start:end]
00694 start = end
00695 end += 4
00696 (length,) = _struct_I.unpack(str[start:end])
00697 self.ByteMultiArray_v = []
00698 for i in xrange(0, length):
00699 val1 = std_msgs.msg.ByteMultiArray()
00700 _v4 = val1.layout
00701 start = end
00702 end += 4
00703 (length,) = _struct_I.unpack(str[start:end])
00704 _v4.dim = []
00705 for i in xrange(0, length):
00706 val3 = std_msgs.msg.MultiArrayDimension()
00707 start = end
00708 end += 4
00709 (length,) = _struct_I.unpack(str[start:end])
00710 start = end
00711 end += length
00712 val3.label = str[start:end]
00713 _x = val3
00714 start = end
00715 end += 8
00716 (_x.size, _x.stride,) = _struct_2I.unpack(str[start:end])
00717 _v4.dim.append(val3)
00718 start = end
00719 end += 4
00720 (_v4.data_offset,) = _struct_I.unpack(str[start:end])
00721 start = end
00722 end += 4
00723 (length,) = _struct_I.unpack(str[start:end])
00724 start = end
00725 end += length
00726 val1.data = str[start:end]
00727 self.ByteMultiArray_v.append(val1)
00728 self.time_.canon()
00729 self.duration_.canon()
00730 return self
00731 except struct.error, e:
00732 raise roslib.message.DeserializationError(e)
00733
00734 _struct_I = roslib.message.struct_I
00735 _struct_2I2i = struct.Struct("<2I2i")
00736 _struct_b = struct.Struct("<b")
00737 _struct_2s = struct.Struct("<2s")
00738 _struct_b2BbHhIiQqfd = struct.Struct("<b2BbHhIiQqfd")
00739 _struct_2d = struct.Struct("<2d")
00740 _struct_2B = struct.Struct("<2B")
00741 _struct_2I = struct.Struct("<2I")