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