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


cob_object_detection_msgs
Author(s): Florian Weisshardt
autogenerated on Fri Mar 8 2013 15:04:09