00001 """autogenerated by genpy from rosapi/ServiceResponseDetailsRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class ServiceResponseDetailsRequest(genpy.Message):
00009 _md5sum = "dc67331de85cf97091b7d45e5c64ab75"
00010 _type = "rosapi/ServiceResponseDetailsRequest"
00011 _has_header = False
00012 _full_text = """string type
00013
00014 """
00015 __slots__ = ['type']
00016 _slot_types = ['string']
00017
00018 def __init__(self, *args, **kwds):
00019 """
00020 Constructor. Any message fields that are implicitly/explicitly
00021 set to None will be assigned a default value. The recommend
00022 use is keyword arguments as this is more robust to future message
00023 changes. You cannot mix in-order arguments and keyword arguments.
00024
00025 The available fields are:
00026 type
00027
00028 :param args: complete set of field values, in .msg order
00029 :param kwds: use keyword arguments corresponding to message field names
00030 to set specific fields.
00031 """
00032 if args or kwds:
00033 super(ServiceResponseDetailsRequest, self).__init__(*args, **kwds)
00034
00035 if self.type is None:
00036 self.type = ''
00037 else:
00038 self.type = ''
00039
00040 def _get_types(self):
00041 """
00042 internal API method
00043 """
00044 return self._slot_types
00045
00046 def serialize(self, buff):
00047 """
00048 serialize message into buffer
00049 :param buff: buffer, ``StringIO``
00050 """
00051 try:
00052 _x = self.type
00053 length = len(_x)
00054 if python3 or type(_x) == unicode:
00055 _x = _x.encode('utf-8')
00056 length = len(_x)
00057 buff.write(struct.pack('<I%ss'%length, length, _x))
00058 except struct.error as se: self._check_types(se)
00059 except TypeError as te: self._check_types(te)
00060
00061 def deserialize(self, str):
00062 """
00063 unpack serialized message in str into this message instance
00064 :param str: byte array of serialized message, ``str``
00065 """
00066 try:
00067 end = 0
00068 start = end
00069 end += 4
00070 (length,) = _struct_I.unpack(str[start:end])
00071 start = end
00072 end += length
00073 if python3:
00074 self.type = str[start:end].decode('utf-8')
00075 else:
00076 self.type = str[start:end]
00077 return self
00078 except struct.error as e:
00079 raise genpy.DeserializationError(e)
00080
00081
00082 def serialize_numpy(self, buff, numpy):
00083 """
00084 serialize message with numpy array types into buffer
00085 :param buff: buffer, ``StringIO``
00086 :param numpy: numpy python module
00087 """
00088 try:
00089 _x = self.type
00090 length = len(_x)
00091 if python3 or type(_x) == unicode:
00092 _x = _x.encode('utf-8')
00093 length = len(_x)
00094 buff.write(struct.pack('<I%ss'%length, length, _x))
00095 except struct.error as se: self._check_types(se)
00096 except TypeError as te: self._check_types(te)
00097
00098 def deserialize_numpy(self, str, numpy):
00099 """
00100 unpack serialized message in str into this message instance using numpy for array types
00101 :param str: byte array of serialized message, ``str``
00102 :param numpy: numpy python module
00103 """
00104 try:
00105 end = 0
00106 start = end
00107 end += 4
00108 (length,) = _struct_I.unpack(str[start:end])
00109 start = end
00110 end += length
00111 if python3:
00112 self.type = str[start:end].decode('utf-8')
00113 else:
00114 self.type = str[start:end]
00115 return self
00116 except struct.error as e:
00117 raise genpy.DeserializationError(e)
00118
00119 _struct_I = genpy.struct_I
00120 """autogenerated by genpy from rosapi/ServiceResponseDetailsResponse.msg. Do not edit."""
00121 import sys
00122 python3 = True if sys.hexversion > 0x03000000 else False
00123 import genpy
00124 import struct
00125
00126 import rosapi.msg
00127
00128 class ServiceResponseDetailsResponse(genpy.Message):
00129 _md5sum = "d088db0da260a2cde072246a5f577519"
00130 _type = "rosapi/ServiceResponseDetailsResponse"
00131 _has_header = False
00132 _full_text = """TypeDef[] typedefs
00133
00134 ================================================================================
00135 MSG: rosapi/TypeDef
00136 string type
00137 string[] fieldnames
00138 string[] fieldtypes
00139 int32[] fieldarraylen
00140 string[] examples
00141
00142 """
00143 __slots__ = ['typedefs']
00144 _slot_types = ['rosapi/TypeDef[]']
00145
00146 def __init__(self, *args, **kwds):
00147 """
00148 Constructor. Any message fields that are implicitly/explicitly
00149 set to None will be assigned a default value. The recommend
00150 use is keyword arguments as this is more robust to future message
00151 changes. You cannot mix in-order arguments and keyword arguments.
00152
00153 The available fields are:
00154 typedefs
00155
00156 :param args: complete set of field values, in .msg order
00157 :param kwds: use keyword arguments corresponding to message field names
00158 to set specific fields.
00159 """
00160 if args or kwds:
00161 super(ServiceResponseDetailsResponse, self).__init__(*args, **kwds)
00162
00163 if self.typedefs is None:
00164 self.typedefs = []
00165 else:
00166 self.typedefs = []
00167
00168 def _get_types(self):
00169 """
00170 internal API method
00171 """
00172 return self._slot_types
00173
00174 def serialize(self, buff):
00175 """
00176 serialize message into buffer
00177 :param buff: buffer, ``StringIO``
00178 """
00179 try:
00180 length = len(self.typedefs)
00181 buff.write(_struct_I.pack(length))
00182 for val1 in self.typedefs:
00183 _x = val1.type
00184 length = len(_x)
00185 if python3 or type(_x) == unicode:
00186 _x = _x.encode('utf-8')
00187 length = len(_x)
00188 buff.write(struct.pack('<I%ss'%length, length, _x))
00189 length = len(val1.fieldnames)
00190 buff.write(_struct_I.pack(length))
00191 for val2 in val1.fieldnames:
00192 length = len(val2)
00193 if python3 or type(val2) == unicode:
00194 val2 = val2.encode('utf-8')
00195 length = len(val2)
00196 buff.write(struct.pack('<I%ss'%length, length, val2))
00197 length = len(val1.fieldtypes)
00198 buff.write(_struct_I.pack(length))
00199 for val2 in val1.fieldtypes:
00200 length = len(val2)
00201 if python3 or type(val2) == unicode:
00202 val2 = val2.encode('utf-8')
00203 length = len(val2)
00204 buff.write(struct.pack('<I%ss'%length, length, val2))
00205 length = len(val1.fieldarraylen)
00206 buff.write(_struct_I.pack(length))
00207 pattern = '<%si'%length
00208 buff.write(struct.pack(pattern, *val1.fieldarraylen))
00209 length = len(val1.examples)
00210 buff.write(_struct_I.pack(length))
00211 for val2 in val1.examples:
00212 length = len(val2)
00213 if python3 or type(val2) == unicode:
00214 val2 = val2.encode('utf-8')
00215 length = len(val2)
00216 buff.write(struct.pack('<I%ss'%length, length, val2))
00217 except struct.error as se: self._check_types(se)
00218 except TypeError as te: self._check_types(te)
00219
00220 def deserialize(self, str):
00221 """
00222 unpack serialized message in str into this message instance
00223 :param str: byte array of serialized message, ``str``
00224 """
00225 try:
00226 if self.typedefs is None:
00227 self.typedefs = None
00228 end = 0
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 self.typedefs = []
00233 for i in range(0, length):
00234 val1 = rosapi.msg.TypeDef()
00235 start = end
00236 end += 4
00237 (length,) = _struct_I.unpack(str[start:end])
00238 start = end
00239 end += length
00240 if python3:
00241 val1.type = str[start:end].decode('utf-8')
00242 else:
00243 val1.type = str[start:end]
00244 start = end
00245 end += 4
00246 (length,) = _struct_I.unpack(str[start:end])
00247 val1.fieldnames = []
00248 for i in range(0, length):
00249 start = end
00250 end += 4
00251 (length,) = _struct_I.unpack(str[start:end])
00252 start = end
00253 end += length
00254 if python3:
00255 val2 = str[start:end].decode('utf-8')
00256 else:
00257 val2 = str[start:end]
00258 val1.fieldnames.append(val2)
00259 start = end
00260 end += 4
00261 (length,) = _struct_I.unpack(str[start:end])
00262 val1.fieldtypes = []
00263 for i in range(0, length):
00264 start = end
00265 end += 4
00266 (length,) = _struct_I.unpack(str[start:end])
00267 start = end
00268 end += length
00269 if python3:
00270 val2 = str[start:end].decode('utf-8')
00271 else:
00272 val2 = str[start:end]
00273 val1.fieldtypes.append(val2)
00274 start = end
00275 end += 4
00276 (length,) = _struct_I.unpack(str[start:end])
00277 pattern = '<%si'%length
00278 start = end
00279 end += struct.calcsize(pattern)
00280 val1.fieldarraylen = struct.unpack(pattern, str[start:end])
00281 start = end
00282 end += 4
00283 (length,) = _struct_I.unpack(str[start:end])
00284 val1.examples = []
00285 for i in range(0, length):
00286 start = end
00287 end += 4
00288 (length,) = _struct_I.unpack(str[start:end])
00289 start = end
00290 end += length
00291 if python3:
00292 val2 = str[start:end].decode('utf-8')
00293 else:
00294 val2 = str[start:end]
00295 val1.examples.append(val2)
00296 self.typedefs.append(val1)
00297 return self
00298 except struct.error as e:
00299 raise genpy.DeserializationError(e)
00300
00301
00302 def serialize_numpy(self, buff, numpy):
00303 """
00304 serialize message with numpy array types into buffer
00305 :param buff: buffer, ``StringIO``
00306 :param numpy: numpy python module
00307 """
00308 try:
00309 length = len(self.typedefs)
00310 buff.write(_struct_I.pack(length))
00311 for val1 in self.typedefs:
00312 _x = val1.type
00313 length = len(_x)
00314 if python3 or type(_x) == unicode:
00315 _x = _x.encode('utf-8')
00316 length = len(_x)
00317 buff.write(struct.pack('<I%ss'%length, length, _x))
00318 length = len(val1.fieldnames)
00319 buff.write(_struct_I.pack(length))
00320 for val2 in val1.fieldnames:
00321 length = len(val2)
00322 if python3 or type(val2) == unicode:
00323 val2 = val2.encode('utf-8')
00324 length = len(val2)
00325 buff.write(struct.pack('<I%ss'%length, length, val2))
00326 length = len(val1.fieldtypes)
00327 buff.write(_struct_I.pack(length))
00328 for val2 in val1.fieldtypes:
00329 length = len(val2)
00330 if python3 or type(val2) == unicode:
00331 val2 = val2.encode('utf-8')
00332 length = len(val2)
00333 buff.write(struct.pack('<I%ss'%length, length, val2))
00334 length = len(val1.fieldarraylen)
00335 buff.write(_struct_I.pack(length))
00336 pattern = '<%si'%length
00337 buff.write(val1.fieldarraylen.tostring())
00338 length = len(val1.examples)
00339 buff.write(_struct_I.pack(length))
00340 for val2 in val1.examples:
00341 length = len(val2)
00342 if python3 or type(val2) == unicode:
00343 val2 = val2.encode('utf-8')
00344 length = len(val2)
00345 buff.write(struct.pack('<I%ss'%length, length, val2))
00346 except struct.error as se: self._check_types(se)
00347 except TypeError as te: self._check_types(te)
00348
00349 def deserialize_numpy(self, str, numpy):
00350 """
00351 unpack serialized message in str into this message instance using numpy for array types
00352 :param str: byte array of serialized message, ``str``
00353 :param numpy: numpy python module
00354 """
00355 try:
00356 if self.typedefs is None:
00357 self.typedefs = None
00358 end = 0
00359 start = end
00360 end += 4
00361 (length,) = _struct_I.unpack(str[start:end])
00362 self.typedefs = []
00363 for i in range(0, length):
00364 val1 = rosapi.msg.TypeDef()
00365 start = end
00366 end += 4
00367 (length,) = _struct_I.unpack(str[start:end])
00368 start = end
00369 end += length
00370 if python3:
00371 val1.type = str[start:end].decode('utf-8')
00372 else:
00373 val1.type = str[start:end]
00374 start = end
00375 end += 4
00376 (length,) = _struct_I.unpack(str[start:end])
00377 val1.fieldnames = []
00378 for i in range(0, length):
00379 start = end
00380 end += 4
00381 (length,) = _struct_I.unpack(str[start:end])
00382 start = end
00383 end += length
00384 if python3:
00385 val2 = str[start:end].decode('utf-8')
00386 else:
00387 val2 = str[start:end]
00388 val1.fieldnames.append(val2)
00389 start = end
00390 end += 4
00391 (length,) = _struct_I.unpack(str[start:end])
00392 val1.fieldtypes = []
00393 for i in range(0, length):
00394 start = end
00395 end += 4
00396 (length,) = _struct_I.unpack(str[start:end])
00397 start = end
00398 end += length
00399 if python3:
00400 val2 = str[start:end].decode('utf-8')
00401 else:
00402 val2 = str[start:end]
00403 val1.fieldtypes.append(val2)
00404 start = end
00405 end += 4
00406 (length,) = _struct_I.unpack(str[start:end])
00407 pattern = '<%si'%length
00408 start = end
00409 end += struct.calcsize(pattern)
00410 val1.fieldarraylen = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00411 start = end
00412 end += 4
00413 (length,) = _struct_I.unpack(str[start:end])
00414 val1.examples = []
00415 for i in range(0, length):
00416 start = end
00417 end += 4
00418 (length,) = _struct_I.unpack(str[start:end])
00419 start = end
00420 end += length
00421 if python3:
00422 val2 = str[start:end].decode('utf-8')
00423 else:
00424 val2 = str[start:end]
00425 val1.examples.append(val2)
00426 self.typedefs.append(val1)
00427 return self
00428 except struct.error as e:
00429 raise genpy.DeserializationError(e)
00430
00431 _struct_I = genpy.struct_I
00432 class ServiceResponseDetails(object):
00433 _type = 'rosapi/ServiceResponseDetails'
00434 _md5sum = 'bdbf5d5ad601e3c2244ad2f8692bd791'
00435 _request_class = ServiceResponseDetailsRequest
00436 _response_class = ServiceResponseDetailsResponse