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


re_srvs
Author(s): Alexander Perzylo
autogenerated on Sun Jan 5 2014 11:28:42