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


map_msgs
Author(s): Stéphane Magnenat
autogenerated on Fri May 31 2013 08:22:01