_ListMaps.py
Go to the documentation of this file.
00001 """autogenerated by genpy from map_store/ListMapsRequest.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 ListMapsRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "map_store/ListMapsRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 """
00017   __slots__ = []
00018   _slot_types = []
00019 
00020   def __init__(self, *args, **kwds):
00021     """
00022     Constructor. Any message fields that are implicitly/explicitly
00023     set to None will be assigned a default value. The recommend
00024     use is keyword arguments as this is more robust to future message
00025     changes.  You cannot mix in-order arguments and keyword arguments.
00026 
00027     The available fields are:
00028        
00029 
00030     :param args: complete set of field values, in .msg order
00031     :param kwds: use keyword arguments corresponding to message field names
00032     to set specific fields.
00033     """
00034     if args or kwds:
00035       super(ListMapsRequest, self).__init__(*args, **kwds)
00036 
00037   def _get_types(self):
00038     """
00039     internal API method
00040     """
00041     return self._slot_types
00042 
00043   def serialize(self, buff):
00044     """
00045     serialize message into buffer
00046     :param buff: buffer, ``StringIO``
00047     """
00048     try:
00049       pass
00050     except struct.error as se: self._check_types(se)
00051     except TypeError as te: self._check_types(te)
00052 
00053   def deserialize(self, str):
00054     """
00055     unpack serialized message in str into this message instance
00056     :param str: byte array of serialized message, ``str``
00057     """
00058     try:
00059       end = 0
00060       return self
00061     except struct.error as e:
00062       raise genpy.DeserializationError(e) #most likely buffer underfill
00063 
00064 
00065   def serialize_numpy(self, buff, numpy):
00066     """
00067     serialize message with numpy array types into buffer
00068     :param buff: buffer, ``StringIO``
00069     :param numpy: numpy python module
00070     """
00071     try:
00072       pass
00073     except struct.error as se: self._check_types(se)
00074     except TypeError as te: self._check_types(te)
00075 
00076   def deserialize_numpy(self, str, numpy):
00077     """
00078     unpack serialized message in str into this message instance using numpy for array types
00079     :param str: byte array of serialized message, ``str``
00080     :param numpy: numpy python module
00081     """
00082     try:
00083       end = 0
00084       return self
00085     except struct.error as e:
00086       raise genpy.DeserializationError(e) #most likely buffer underfill
00087 
00088 _struct_I = genpy.struct_I
00089 """autogenerated by genpy from map_store/ListMapsResponse.msg. Do not edit."""
00090 import sys
00091 python3 = True if sys.hexversion > 0x03000000 else False
00092 import genpy
00093 import struct
00094 
00095 import map_store.msg
00096 
00097 class ListMapsResponse(genpy.Message):
00098   _md5sum = "ca5a33dd106a2c24cfd54c927d214957"
00099   _type = "map_store/ListMapsResponse"
00100   _has_header = False #flag to mark the presence of a Header object
00101   _full_text = """MapListEntry[] map_list
00102 
00103 
00104 ================================================================================
00105 MSG: map_store/MapListEntry
00106 # One entry in a list of maps.
00107 
00108 # Naming a map is optional.
00109 string name
00110 
00111 # Maps made by the make-a-map app are given a session ID, which is the
00112 # time when the map-making session was started, expressed as seconds
00113 # since the epoch and converted to a string.
00114 string session_id
00115 
00116 # Creation time of this map, in seconds since the epoch.
00117 int64 date
00118 
00119 # Unique ID of this map.
00120 string map_id
00121 
00122 """
00123   __slots__ = ['map_list']
00124   _slot_types = ['map_store/MapListEntry[]']
00125 
00126   def __init__(self, *args, **kwds):
00127     """
00128     Constructor. Any message fields that are implicitly/explicitly
00129     set to None will be assigned a default value. The recommend
00130     use is keyword arguments as this is more robust to future message
00131     changes.  You cannot mix in-order arguments and keyword arguments.
00132 
00133     The available fields are:
00134        map_list
00135 
00136     :param args: complete set of field values, in .msg order
00137     :param kwds: use keyword arguments corresponding to message field names
00138     to set specific fields.
00139     """
00140     if args or kwds:
00141       super(ListMapsResponse, self).__init__(*args, **kwds)
00142       #message fields cannot be None, assign default values for those that are
00143       if self.map_list is None:
00144         self.map_list = []
00145     else:
00146       self.map_list = []
00147 
00148   def _get_types(self):
00149     """
00150     internal API method
00151     """
00152     return self._slot_types
00153 
00154   def serialize(self, buff):
00155     """
00156     serialize message into buffer
00157     :param buff: buffer, ``StringIO``
00158     """
00159     try:
00160       length = len(self.map_list)
00161       buff.write(_struct_I.pack(length))
00162       for val1 in self.map_list:
00163         _x = val1.name
00164         length = len(_x)
00165         if python3 or type(_x) == unicode:
00166           _x = _x.encode('utf-8')
00167           length = len(_x)
00168         buff.write(struct.pack('<I%ss'%length, length, _x))
00169         _x = val1.session_id
00170         length = len(_x)
00171         if python3 or type(_x) == unicode:
00172           _x = _x.encode('utf-8')
00173           length = len(_x)
00174         buff.write(struct.pack('<I%ss'%length, length, _x))
00175         buff.write(_struct_q.pack(val1.date))
00176         _x = val1.map_id
00177         length = len(_x)
00178         if python3 or type(_x) == unicode:
00179           _x = _x.encode('utf-8')
00180           length = len(_x)
00181         buff.write(struct.pack('<I%ss'%length, length, _x))
00182     except struct.error as se: self._check_types(se)
00183     except TypeError as te: self._check_types(te)
00184 
00185   def deserialize(self, str):
00186     """
00187     unpack serialized message in str into this message instance
00188     :param str: byte array of serialized message, ``str``
00189     """
00190     try:
00191       if self.map_list is None:
00192         self.map_list = None
00193       end = 0
00194       start = end
00195       end += 4
00196       (length,) = _struct_I.unpack(str[start:end])
00197       self.map_list = []
00198       for i in range(0, length):
00199         val1 = map_store.msg.MapListEntry()
00200         start = end
00201         end += 4
00202         (length,) = _struct_I.unpack(str[start:end])
00203         start = end
00204         end += length
00205         if python3:
00206           val1.name = str[start:end].decode('utf-8')
00207         else:
00208           val1.name = str[start:end]
00209         start = end
00210         end += 4
00211         (length,) = _struct_I.unpack(str[start:end])
00212         start = end
00213         end += length
00214         if python3:
00215           val1.session_id = str[start:end].decode('utf-8')
00216         else:
00217           val1.session_id = str[start:end]
00218         start = end
00219         end += 8
00220         (val1.date,) = _struct_q.unpack(str[start:end])
00221         start = end
00222         end += 4
00223         (length,) = _struct_I.unpack(str[start:end])
00224         start = end
00225         end += length
00226         if python3:
00227           val1.map_id = str[start:end].decode('utf-8')
00228         else:
00229           val1.map_id = str[start:end]
00230         self.map_list.append(val1)
00231       return self
00232     except struct.error as e:
00233       raise genpy.DeserializationError(e) #most likely buffer underfill
00234 
00235 
00236   def serialize_numpy(self, buff, numpy):
00237     """
00238     serialize message with numpy array types into buffer
00239     :param buff: buffer, ``StringIO``
00240     :param numpy: numpy python module
00241     """
00242     try:
00243       length = len(self.map_list)
00244       buff.write(_struct_I.pack(length))
00245       for val1 in self.map_list:
00246         _x = val1.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         _x = val1.session_id
00253         length = len(_x)
00254         if python3 or type(_x) == unicode:
00255           _x = _x.encode('utf-8')
00256           length = len(_x)
00257         buff.write(struct.pack('<I%ss'%length, length, _x))
00258         buff.write(_struct_q.pack(val1.date))
00259         _x = val1.map_id
00260         length = len(_x)
00261         if python3 or type(_x) == unicode:
00262           _x = _x.encode('utf-8')
00263           length = len(_x)
00264         buff.write(struct.pack('<I%ss'%length, length, _x))
00265     except struct.error as se: self._check_types(se)
00266     except TypeError as te: self._check_types(te)
00267 
00268   def deserialize_numpy(self, str, numpy):
00269     """
00270     unpack serialized message in str into this message instance using numpy for array types
00271     :param str: byte array of serialized message, ``str``
00272     :param numpy: numpy python module
00273     """
00274     try:
00275       if self.map_list is None:
00276         self.map_list = None
00277       end = 0
00278       start = end
00279       end += 4
00280       (length,) = _struct_I.unpack(str[start:end])
00281       self.map_list = []
00282       for i in range(0, length):
00283         val1 = map_store.msg.MapListEntry()
00284         start = end
00285         end += 4
00286         (length,) = _struct_I.unpack(str[start:end])
00287         start = end
00288         end += length
00289         if python3:
00290           val1.name = str[start:end].decode('utf-8')
00291         else:
00292           val1.name = str[start:end]
00293         start = end
00294         end += 4
00295         (length,) = _struct_I.unpack(str[start:end])
00296         start = end
00297         end += length
00298         if python3:
00299           val1.session_id = str[start:end].decode('utf-8')
00300         else:
00301           val1.session_id = str[start:end]
00302         start = end
00303         end += 8
00304         (val1.date,) = _struct_q.unpack(str[start:end])
00305         start = end
00306         end += 4
00307         (length,) = _struct_I.unpack(str[start:end])
00308         start = end
00309         end += length
00310         if python3:
00311           val1.map_id = str[start:end].decode('utf-8')
00312         else:
00313           val1.map_id = str[start:end]
00314         self.map_list.append(val1)
00315       return self
00316     except struct.error as e:
00317       raise genpy.DeserializationError(e) #most likely buffer underfill
00318 
00319 _struct_I = genpy.struct_I
00320 _struct_q = struct.Struct("<q")
00321 class ListMaps(object):
00322   _type          = 'map_store/ListMaps'
00323   _md5sum = 'ca5a33dd106a2c24cfd54c927d214957'
00324   _request_class  = ListMapsRequest
00325   _response_class = ListMapsResponse


map_store
Author(s): Dave Hershberger
autogenerated on Sat Dec 28 2013 17:10:27