_SaveMap.py
Go to the documentation of this file.
00001 """autogenerated by genpy from mapping_msgs/SaveMapRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import std_msgs.msg
00008 
00009 class SaveMapRequest(genpy.Message):
00010   _md5sum = "716e25f9d9dc76ceba197f93cbf05dc7"
00011   _type = "mapping_msgs/SaveMapRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """
00014 std_msgs/String filename
00015 
00016 
00017 ================================================================================
00018 MSG: std_msgs/String
00019 string data
00020 
00021 """
00022   __slots__ = ['filename']
00023   _slot_types = ['std_msgs/String']
00024 
00025   def __init__(self, *args, **kwds):
00026     """
00027     Constructor. Any message fields that are implicitly/explicitly
00028     set to None will be assigned a default value. The recommend
00029     use is keyword arguments as this is more robust to future message
00030     changes.  You cannot mix in-order arguments and keyword arguments.
00031 
00032     The available fields are:
00033        filename
00034 
00035     :param args: complete set of field values, in .msg order
00036     :param kwds: use keyword arguments corresponding to message field names
00037     to set specific fields.
00038     """
00039     if args or kwds:
00040       super(SaveMapRequest, self).__init__(*args, **kwds)
00041       #message fields cannot be None, assign default values for those that are
00042       if self.filename is None:
00043         self.filename = std_msgs.msg.String()
00044     else:
00045       self.filename = std_msgs.msg.String()
00046 
00047   def _get_types(self):
00048     """
00049     internal API method
00050     """
00051     return self._slot_types
00052 
00053   def serialize(self, buff):
00054     """
00055     serialize message into buffer
00056     :param buff: buffer, ``StringIO``
00057     """
00058     try:
00059       _x = self.filename.data
00060       length = len(_x)
00061       if python3 or type(_x) == unicode:
00062         _x = _x.encode('utf-8')
00063         length = len(_x)
00064       buff.write(struct.pack('<I%ss'%length, length, _x))
00065     except struct.error as se: self._check_types(se)
00066     except TypeError as te: self._check_types(te)
00067 
00068   def deserialize(self, str):
00069     """
00070     unpack serialized message in str into this message instance
00071     :param str: byte array of serialized message, ``str``
00072     """
00073     try:
00074       if self.filename is None:
00075         self.filename = std_msgs.msg.String()
00076       end = 0
00077       start = end
00078       end += 4
00079       (length,) = _struct_I.unpack(str[start:end])
00080       start = end
00081       end += length
00082       if python3:
00083         self.filename.data = str[start:end].decode('utf-8')
00084       else:
00085         self.filename.data = str[start:end]
00086       return self
00087     except struct.error as e:
00088       raise genpy.DeserializationError(e) #most likely buffer underfill
00089 
00090 
00091   def serialize_numpy(self, buff, numpy):
00092     """
00093     serialize message with numpy array types into buffer
00094     :param buff: buffer, ``StringIO``
00095     :param numpy: numpy python module
00096     """
00097     try:
00098       _x = self.filename.data
00099       length = len(_x)
00100       if python3 or type(_x) == unicode:
00101         _x = _x.encode('utf-8')
00102         length = len(_x)
00103       buff.write(struct.pack('<I%ss'%length, length, _x))
00104     except struct.error as se: self._check_types(se)
00105     except TypeError as te: self._check_types(te)
00106 
00107   def deserialize_numpy(self, str, numpy):
00108     """
00109     unpack serialized message in str into this message instance using numpy for array types
00110     :param str: byte array of serialized message, ``str``
00111     :param numpy: numpy python module
00112     """
00113     try:
00114       if self.filename is None:
00115         self.filename = std_msgs.msg.String()
00116       end = 0
00117       start = end
00118       end += 4
00119       (length,) = _struct_I.unpack(str[start:end])
00120       start = end
00121       end += length
00122       if python3:
00123         self.filename.data = str[start:end].decode('utf-8')
00124       else:
00125         self.filename.data = str[start:end]
00126       return self
00127     except struct.error as e:
00128       raise genpy.DeserializationError(e) #most likely buffer underfill
00129 
00130 _struct_I = genpy.struct_I
00131 """autogenerated by genpy from mapping_msgs/SaveMapResponse.msg. Do not edit."""
00132 import sys
00133 python3 = True if sys.hexversion > 0x03000000 else False
00134 import genpy
00135 import struct
00136 
00137 
00138 class SaveMapResponse(genpy.Message):
00139   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00140   _type = "mapping_msgs/SaveMapResponse"
00141   _has_header = False #flag to mark the presence of a Header object
00142   _full_text = """
00143 """
00144   __slots__ = []
00145   _slot_types = []
00146 
00147   def __init__(self, *args, **kwds):
00148     """
00149     Constructor. Any message fields that are implicitly/explicitly
00150     set to None will be assigned a default value. The recommend
00151     use is keyword arguments as this is more robust to future message
00152     changes.  You cannot mix in-order arguments and keyword arguments.
00153 
00154     The available fields are:
00155        
00156 
00157     :param args: complete set of field values, in .msg order
00158     :param kwds: use keyword arguments corresponding to message field names
00159     to set specific fields.
00160     """
00161     if args or kwds:
00162       super(SaveMapResponse, self).__init__(*args, **kwds)
00163 
00164   def _get_types(self):
00165     """
00166     internal API method
00167     """
00168     return self._slot_types
00169 
00170   def serialize(self, buff):
00171     """
00172     serialize message into buffer
00173     :param buff: buffer, ``StringIO``
00174     """
00175     try:
00176       pass
00177     except struct.error as se: self._check_types(se)
00178     except TypeError as te: self._check_types(te)
00179 
00180   def deserialize(self, str):
00181     """
00182     unpack serialized message in str into this message instance
00183     :param str: byte array of serialized message, ``str``
00184     """
00185     try:
00186       end = 0
00187       return self
00188     except struct.error as e:
00189       raise genpy.DeserializationError(e) #most likely buffer underfill
00190 
00191 
00192   def serialize_numpy(self, buff, numpy):
00193     """
00194     serialize message with numpy array types into buffer
00195     :param buff: buffer, ``StringIO``
00196     :param numpy: numpy python module
00197     """
00198     try:
00199       pass
00200     except struct.error as se: self._check_types(se)
00201     except TypeError as te: self._check_types(te)
00202 
00203   def deserialize_numpy(self, str, numpy):
00204     """
00205     unpack serialized message in str into this message instance using numpy for array types
00206     :param str: byte array of serialized message, ``str``
00207     :param numpy: numpy python module
00208     """
00209     try:
00210       end = 0
00211       return self
00212     except struct.error as e:
00213       raise genpy.DeserializationError(e) #most likely buffer underfill
00214 
00215 _struct_I = genpy.struct_I
00216 class SaveMap(object):
00217   _type          = 'mapping_msgs/SaveMap'
00218   _md5sum = '716e25f9d9dc76ceba197f93cbf05dc7'
00219   _request_class  = SaveMapRequest
00220   _response_class = SaveMapResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


mapping_msgs
Author(s): Stéphane Magnenat
autogenerated on Wed Nov 14 2012 12:12:16