_control.py
Go to the documentation of this file.
00001 """autogenerated by genpy from corobot_camera/controlRequest.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 controlRequest(genpy.Message):
00009   _md5sum = "309d4b30834b338cced19e5622a97a03"
00010   _type = "corobot_camera/controlRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 uint32 id
00015 
00016 """
00017   __slots__ = ['id']
00018   _slot_types = ['uint32']
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        id
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(controlRequest, self).__init__(*args, **kwds)
00036       #message fields cannot be None, assign default values for those that are
00037       if self.id is None:
00038         self.id = 0
00039     else:
00040       self.id = 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_I.pack(self.id))
00055     except struct.error as se: self._check_types(se)
00056     except TypeError as te: self._check_types(te)
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 += 4
00067       (self.id,) = _struct_I.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_I.pack(self.id))
00081     except struct.error as se: self._check_types(se)
00082     except TypeError as te: self._check_types(te)
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 += 4
00094       (self.id,) = _struct_I.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 """autogenerated by genpy from corobot_camera/controlResponse.msg. Do not edit."""
00101 import sys
00102 python3 = True if sys.hexversion > 0x03000000 else False
00103 import genpy
00104 import struct
00105 
00106 
00107 class controlResponse(genpy.Message):
00108   _md5sum = "b3087778e93fcd34cc8d65bc54e850d1"
00109   _type = "corobot_camera/controlResponse"
00110   _has_header = False #flag to mark the presence of a Header object
00111   _full_text = """int32  value
00112 
00113 
00114 """
00115   __slots__ = ['value']
00116   _slot_types = ['int32']
00117 
00118   def __init__(self, *args, **kwds):
00119     """
00120     Constructor. Any message fields that are implicitly/explicitly
00121     set to None will be assigned a default value. The recommend
00122     use is keyword arguments as this is more robust to future message
00123     changes.  You cannot mix in-order arguments and keyword arguments.
00124 
00125     The available fields are:
00126        value
00127 
00128     :param args: complete set of field values, in .msg order
00129     :param kwds: use keyword arguments corresponding to message field names
00130     to set specific fields.
00131     """
00132     if args or kwds:
00133       super(controlResponse, self).__init__(*args, **kwds)
00134       #message fields cannot be None, assign default values for those that are
00135       if self.value is None:
00136         self.value = 0
00137     else:
00138       self.value = 0
00139 
00140   def _get_types(self):
00141     """
00142     internal API method
00143     """
00144     return self._slot_types
00145 
00146   def serialize(self, buff):
00147     """
00148     serialize message into buffer
00149     :param buff: buffer, ``StringIO``
00150     """
00151     try:
00152       buff.write(_struct_i.pack(self.value))
00153     except struct.error as se: self._check_types(se)
00154     except TypeError as te: self._check_types(te)
00155 
00156   def deserialize(self, str):
00157     """
00158     unpack serialized message in str into this message instance
00159     :param str: byte array of serialized message, ``str``
00160     """
00161     try:
00162       end = 0
00163       start = end
00164       end += 4
00165       (self.value,) = _struct_i.unpack(str[start:end])
00166       return self
00167     except struct.error as e:
00168       raise genpy.DeserializationError(e) #most likely buffer underfill
00169 
00170 
00171   def serialize_numpy(self, buff, numpy):
00172     """
00173     serialize message with numpy array types into buffer
00174     :param buff: buffer, ``StringIO``
00175     :param numpy: numpy python module
00176     """
00177     try:
00178       buff.write(_struct_i.pack(self.value))
00179     except struct.error as se: self._check_types(se)
00180     except TypeError as te: self._check_types(te)
00181 
00182   def deserialize_numpy(self, str, numpy):
00183     """
00184     unpack serialized message in str into this message instance using numpy for array types
00185     :param str: byte array of serialized message, ``str``
00186     :param numpy: numpy python module
00187     """
00188     try:
00189       end = 0
00190       start = end
00191       end += 4
00192       (self.value,) = _struct_i.unpack(str[start:end])
00193       return self
00194     except struct.error as e:
00195       raise genpy.DeserializationError(e) #most likely buffer underfill
00196 
00197 _struct_I = genpy.struct_I
00198 _struct_i = struct.Struct("<i")
00199 class control(object):
00200   _type          = 'corobot_camera/control'
00201   _md5sum = 'f44cbebfce70ccd056ebb4116ce986da'
00202   _request_class  = controlRequest
00203   _response_class = controlResponse


corobot_camera
Author(s):
autogenerated on Wed Aug 26 2015 11:09:42