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


corobot_teleop
Author(s):
autogenerated on Wed Aug 26 2015 11:09:59