_cop_get_methods_list.py
Go to the documentation of this file.
00001 """autogenerated by genpy from vision_srvs/cop_get_methods_listRequest.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 cop_get_methods_listRequest(genpy.Message):
00009   _md5sum = "9771833f2c32d57f27ce31a3ac1aee18"
00010   _type = "vision_srvs/cop_get_methods_listRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 uint64 algorithmtype
00015 
00016 """
00017   __slots__ = ['algorithmtype']
00018   _slot_types = ['uint64']
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        algorithmtype
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(cop_get_methods_listRequest, self).__init__(*args, **kwds)
00036       #message fields cannot be None, assign default values for those that are
00037       if self.algorithmtype is None:
00038         self.algorithmtype = 0
00039     else:
00040       self.algorithmtype = 0
00041 
00042   def _get_types(self):
00043     """
00044     internal API method
00045     """
00046     return self._slot_types
00047 
00048   def serialize(self, buff):
00049     """
00050     serialize message into buffer
00051     :param buff: buffer, ``StringIO``
00052     """
00053     try:
00054       buff.write(_struct_Q.pack(self.algorithmtype))
00055     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00056     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00057 
00058   def deserialize(self, str):
00059     """
00060     unpack serialized message in str into this message instance
00061     :param str: byte array of serialized message, ``str``
00062     """
00063     try:
00064       end = 0
00065       start = end
00066       end += 8
00067       (self.algorithmtype,) = _struct_Q.unpack(str[start:end])
00068       return self
00069     except struct.error as e:
00070       raise genpy.DeserializationError(e) #most likely buffer underfill
00071 
00072 
00073   def serialize_numpy(self, buff, numpy):
00074     """
00075     serialize message with numpy array types into buffer
00076     :param buff: buffer, ``StringIO``
00077     :param numpy: numpy python module
00078     """
00079     try:
00080       buff.write(_struct_Q.pack(self.algorithmtype))
00081     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00082     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00083 
00084   def deserialize_numpy(self, str, numpy):
00085     """
00086     unpack serialized message in str into this message instance using numpy for array types
00087     :param str: byte array of serialized message, ``str``
00088     :param numpy: numpy python module
00089     """
00090     try:
00091       end = 0
00092       start = end
00093       end += 8
00094       (self.algorithmtype,) = _struct_Q.unpack(str[start:end])
00095       return self
00096     except struct.error as e:
00097       raise genpy.DeserializationError(e) #most likely buffer underfill
00098 
00099 _struct_I = genpy.struct_I
00100 _struct_Q = struct.Struct("<Q")
00101 """autogenerated by genpy from vision_srvs/cop_get_methods_listResponse.msg. Do not edit."""
00102 import sys
00103 python3 = True if sys.hexversion > 0x03000000 else False
00104 import genpy
00105 import struct
00106 
00107 import vision_msgs.msg
00108 
00109 class cop_get_methods_listResponse(genpy.Message):
00110   _md5sum = "29050bd853f52e655a64046a89bf0b56"
00111   _type = "vision_srvs/cop_get_methods_listResponse"
00112   _has_header = False #flag to mark the presence of a Header object
00113   _full_text = """vision_msgs/algorithm_evaluation[] method
00114 
00115 
00116 ================================================================================
00117 MSG: vision_msgs/algorithm_evaluation
00118 #Message that contains basic information regarding an algorithm  U. Klank klank@in.tum.de
00119 string                      plugin_name                  # Perception primitive that caused this answer
00120 float64                     basic_evaluation             # A score describing the basic score of this algorithm, should reflect the significance of the results
00121 object_algorithm_relation[] objects                      # All objects that were executed with this algotihm and their results
00122 
00123 ================================================================================
00124 MSG: vision_msgs/object_algorithm_relation
00125 #Message that contains basic information regarding the evaluation of an algorithm and its objects  U. Klank klank@in.tum.de
00126 uint64                      object_id
00127 float64                     basic_evaluation     
00128 
00129 """
00130   __slots__ = ['method']
00131   _slot_types = ['vision_msgs/algorithm_evaluation[]']
00132 
00133   def __init__(self, *args, **kwds):
00134     """
00135     Constructor. Any message fields that are implicitly/explicitly
00136     set to None will be assigned a default value. The recommend
00137     use is keyword arguments as this is more robust to future message
00138     changes.  You cannot mix in-order arguments and keyword arguments.
00139 
00140     The available fields are:
00141        method
00142 
00143     :param args: complete set of field values, in .msg order
00144     :param kwds: use keyword arguments corresponding to message field names
00145     to set specific fields.
00146     """
00147     if args or kwds:
00148       super(cop_get_methods_listResponse, self).__init__(*args, **kwds)
00149       #message fields cannot be None, assign default values for those that are
00150       if self.method is None:
00151         self.method = []
00152     else:
00153       self.method = []
00154 
00155   def _get_types(self):
00156     """
00157     internal API method
00158     """
00159     return self._slot_types
00160 
00161   def serialize(self, buff):
00162     """
00163     serialize message into buffer
00164     :param buff: buffer, ``StringIO``
00165     """
00166     try:
00167       length = len(self.method)
00168       buff.write(_struct_I.pack(length))
00169       for val1 in self.method:
00170         _x = val1.plugin_name
00171         length = len(_x)
00172         if python3 or type(_x) == unicode:
00173           _x = _x.encode('utf-8')
00174           length = len(_x)
00175         buff.write(struct.pack('<I%ss'%length, length, _x))
00176         buff.write(_struct_d.pack(val1.basic_evaluation))
00177         length = len(val1.objects)
00178         buff.write(_struct_I.pack(length))
00179         for val2 in val1.objects:
00180           _x = val2
00181           buff.write(_struct_Qd.pack(_x.object_id, _x.basic_evaluation))
00182     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00183     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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.method is None:
00192         self.method = None
00193       end = 0
00194       start = end
00195       end += 4
00196       (length,) = _struct_I.unpack(str[start:end])
00197       self.method = []
00198       for i in range(0, length):
00199         val1 = vision_msgs.msg.algorithm_evaluation()
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.plugin_name = str[start:end].decode('utf-8')
00207         else:
00208           val1.plugin_name = str[start:end]
00209         start = end
00210         end += 8
00211         (val1.basic_evaluation,) = _struct_d.unpack(str[start:end])
00212         start = end
00213         end += 4
00214         (length,) = _struct_I.unpack(str[start:end])
00215         val1.objects = []
00216         for i in range(0, length):
00217           val2 = vision_msgs.msg.object_algorithm_relation()
00218           _x = val2
00219           start = end
00220           end += 16
00221           (_x.object_id, _x.basic_evaluation,) = _struct_Qd.unpack(str[start:end])
00222           val1.objects.append(val2)
00223         self.method.append(val1)
00224       return self
00225     except struct.error as e:
00226       raise genpy.DeserializationError(e) #most likely buffer underfill
00227 
00228 
00229   def serialize_numpy(self, buff, numpy):
00230     """
00231     serialize message with numpy array types into buffer
00232     :param buff: buffer, ``StringIO``
00233     :param numpy: numpy python module
00234     """
00235     try:
00236       length = len(self.method)
00237       buff.write(_struct_I.pack(length))
00238       for val1 in self.method:
00239         _x = val1.plugin_name
00240         length = len(_x)
00241         if python3 or type(_x) == unicode:
00242           _x = _x.encode('utf-8')
00243           length = len(_x)
00244         buff.write(struct.pack('<I%ss'%length, length, _x))
00245         buff.write(_struct_d.pack(val1.basic_evaluation))
00246         length = len(val1.objects)
00247         buff.write(_struct_I.pack(length))
00248         for val2 in val1.objects:
00249           _x = val2
00250           buff.write(_struct_Qd.pack(_x.object_id, _x.basic_evaluation))
00251     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00252     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00253 
00254   def deserialize_numpy(self, str, numpy):
00255     """
00256     unpack serialized message in str into this message instance using numpy for array types
00257     :param str: byte array of serialized message, ``str``
00258     :param numpy: numpy python module
00259     """
00260     try:
00261       if self.method is None:
00262         self.method = None
00263       end = 0
00264       start = end
00265       end += 4
00266       (length,) = _struct_I.unpack(str[start:end])
00267       self.method = []
00268       for i in range(0, length):
00269         val1 = vision_msgs.msg.algorithm_evaluation()
00270         start = end
00271         end += 4
00272         (length,) = _struct_I.unpack(str[start:end])
00273         start = end
00274         end += length
00275         if python3:
00276           val1.plugin_name = str[start:end].decode('utf-8')
00277         else:
00278           val1.plugin_name = str[start:end]
00279         start = end
00280         end += 8
00281         (val1.basic_evaluation,) = _struct_d.unpack(str[start:end])
00282         start = end
00283         end += 4
00284         (length,) = _struct_I.unpack(str[start:end])
00285         val1.objects = []
00286         for i in range(0, length):
00287           val2 = vision_msgs.msg.object_algorithm_relation()
00288           _x = val2
00289           start = end
00290           end += 16
00291           (_x.object_id, _x.basic_evaluation,) = _struct_Qd.unpack(str[start:end])
00292           val1.objects.append(val2)
00293         self.method.append(val1)
00294       return self
00295     except struct.error as e:
00296       raise genpy.DeserializationError(e) #most likely buffer underfill
00297 
00298 _struct_I = genpy.struct_I
00299 _struct_d = struct.Struct("<d")
00300 _struct_Qd = struct.Struct("<Qd")
00301 class cop_get_methods_list(object):
00302   _type          = 'vision_srvs/cop_get_methods_list'
00303   _md5sum = '53c8c94190c8c2dfb2174d3427ac0057'
00304   _request_class  = cop_get_methods_listRequest
00305   _response_class = cop_get_methods_listResponse


vision_srvs
Author(s): Ulrich F Klank
autogenerated on Mon Oct 6 2014 00:48:11