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