_GetAnnotatedPoints.py
Go to the documentation of this file.
00001 """autogenerated by genpy from map_annotation/GetAnnotatedPointsRequest.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 GetAnnotatedPointsRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "map_annotation/GetAnnotatedPointsRequest"
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(GetAnnotatedPointsRequest, 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_annotation/GetAnnotatedPointsResponse.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 geometry_msgs.msg
00093 
00094 class GetAnnotatedPointsResponse(genpy.Message):
00095   _md5sum = "84f6974f65d47c9aceaf9402e7f14494"
00096   _type = "map_annotation/GetAnnotatedPointsResponse"
00097   _has_header = False #flag to mark the presence of a Header object
00098   _full_text = """string[] labels
00099 geometry_msgs/Point[] points
00100 
00101 
00102 ================================================================================
00103 MSG: geometry_msgs/Point
00104 # This contains the position of a point in free space
00105 float64 x
00106 float64 y
00107 float64 z
00108 
00109 """
00110   __slots__ = ['labels','points']
00111   _slot_types = ['string[]','geometry_msgs/Point[]']
00112 
00113   def __init__(self, *args, **kwds):
00114     """
00115     Constructor. Any message fields that are implicitly/explicitly
00116     set to None will be assigned a default value. The recommend
00117     use is keyword arguments as this is more robust to future message
00118     changes.  You cannot mix in-order arguments and keyword arguments.
00119 
00120     The available fields are:
00121        labels,points
00122 
00123     :param args: complete set of field values, in .msg order
00124     :param kwds: use keyword arguments corresponding to message field names
00125     to set specific fields.
00126     """
00127     if args or kwds:
00128       super(GetAnnotatedPointsResponse, self).__init__(*args, **kwds)
00129       #message fields cannot be None, assign default values for those that are
00130       if self.labels is None:
00131         self.labels = []
00132       if self.points is None:
00133         self.points = []
00134     else:
00135       self.labels = []
00136       self.points = []
00137 
00138   def _get_types(self):
00139     """
00140     internal API method
00141     """
00142     return self._slot_types
00143 
00144   def serialize(self, buff):
00145     """
00146     serialize message into buffer
00147     :param buff: buffer, ``StringIO``
00148     """
00149     try:
00150       length = len(self.labels)
00151       buff.write(_struct_I.pack(length))
00152       for val1 in self.labels:
00153         length = len(val1)
00154         if python3 or type(val1) == unicode:
00155           val1 = val1.encode('utf-8')
00156           length = len(val1)
00157         buff.write(struct.pack('<I%ss'%length, length, val1))
00158       length = len(self.points)
00159       buff.write(_struct_I.pack(length))
00160       for val1 in self.points:
00161         _x = val1
00162         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00163     except struct.error as se: self._check_types(se)
00164     except TypeError as te: self._check_types(te)
00165 
00166   def deserialize(self, str):
00167     """
00168     unpack serialized message in str into this message instance
00169     :param str: byte array of serialized message, ``str``
00170     """
00171     try:
00172       if self.points is None:
00173         self.points = None
00174       end = 0
00175       start = end
00176       end += 4
00177       (length,) = _struct_I.unpack(str[start:end])
00178       self.labels = []
00179       for i in range(0, length):
00180         start = end
00181         end += 4
00182         (length,) = _struct_I.unpack(str[start:end])
00183         start = end
00184         end += length
00185         if python3:
00186           val1 = str[start:end].decode('utf-8')
00187         else:
00188           val1 = str[start:end]
00189         self.labels.append(val1)
00190       start = end
00191       end += 4
00192       (length,) = _struct_I.unpack(str[start:end])
00193       self.points = []
00194       for i in range(0, length):
00195         val1 = geometry_msgs.msg.Point()
00196         _x = val1
00197         start = end
00198         end += 24
00199         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00200         self.points.append(val1)
00201       return self
00202     except struct.error as e:
00203       raise genpy.DeserializationError(e) #most likely buffer underfill
00204 
00205 
00206   def serialize_numpy(self, buff, numpy):
00207     """
00208     serialize message with numpy array types into buffer
00209     :param buff: buffer, ``StringIO``
00210     :param numpy: numpy python module
00211     """
00212     try:
00213       length = len(self.labels)
00214       buff.write(_struct_I.pack(length))
00215       for val1 in self.labels:
00216         length = len(val1)
00217         if python3 or type(val1) == unicode:
00218           val1 = val1.encode('utf-8')
00219           length = len(val1)
00220         buff.write(struct.pack('<I%ss'%length, length, val1))
00221       length = len(self.points)
00222       buff.write(_struct_I.pack(length))
00223       for val1 in self.points:
00224         _x = val1
00225         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00226     except struct.error as se: self._check_types(se)
00227     except TypeError as te: self._check_types(te)
00228 
00229   def deserialize_numpy(self, str, numpy):
00230     """
00231     unpack serialized message in str into this message instance using numpy for array types
00232     :param str: byte array of serialized message, ``str``
00233     :param numpy: numpy python module
00234     """
00235     try:
00236       if self.points is None:
00237         self.points = None
00238       end = 0
00239       start = end
00240       end += 4
00241       (length,) = _struct_I.unpack(str[start:end])
00242       self.labels = []
00243       for i in range(0, length):
00244         start = end
00245         end += 4
00246         (length,) = _struct_I.unpack(str[start:end])
00247         start = end
00248         end += length
00249         if python3:
00250           val1 = str[start:end].decode('utf-8')
00251         else:
00252           val1 = str[start:end]
00253         self.labels.append(val1)
00254       start = end
00255       end += 4
00256       (length,) = _struct_I.unpack(str[start:end])
00257       self.points = []
00258       for i in range(0, length):
00259         val1 = geometry_msgs.msg.Point()
00260         _x = val1
00261         start = end
00262         end += 24
00263         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00264         self.points.append(val1)
00265       return self
00266     except struct.error as e:
00267       raise genpy.DeserializationError(e) #most likely buffer underfill
00268 
00269 _struct_I = genpy.struct_I
00270 _struct_3d = struct.Struct("<3d")
00271 class GetAnnotatedPoints(object):
00272   _type          = 'map_annotation/GetAnnotatedPoints'
00273   _md5sum = '84f6974f65d47c9aceaf9402e7f14494'
00274   _request_class  = GetAnnotatedPointsRequest
00275   _response_class = GetAnnotatedPointsResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


map_annotation
Author(s): Lorenz Moesenlechner
autogenerated on Thu May 23 2013 12:37:31