_phidget_info.py
Go to the documentation of this file.
00001 """autogenerated by genpy from corobot_phidgetIK/phidget_info.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 phidget_info(genpy.Message):
00009   _md5sum = "9b8f5b9c5e5ec5f3c7ec7ce71c35ad19"
00010   _type = "corobot_phidgetIK/phidget_info"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """#Deprecated. Prefer to use the one in corobot_msgs package, which is exactly the same
00013 
00014 uint8 phidget888_connected
00015 uint8 phidget_encoder_connected
00016 uint8 info
00017 
00018 """
00019   __slots__ = ['phidget888_connected','phidget_encoder_connected','info']
00020   _slot_types = ['uint8','uint8','uint8']
00021 
00022   def __init__(self, *args, **kwds):
00023     """
00024     Constructor. Any message fields that are implicitly/explicitly
00025     set to None will be assigned a default value. The recommend
00026     use is keyword arguments as this is more robust to future message
00027     changes.  You cannot mix in-order arguments and keyword arguments.
00028 
00029     The available fields are:
00030        phidget888_connected,phidget_encoder_connected,info
00031 
00032     :param args: complete set of field values, in .msg order
00033     :param kwds: use keyword arguments corresponding to message field names
00034     to set specific fields.
00035     """
00036     if args or kwds:
00037       super(phidget_info, self).__init__(*args, **kwds)
00038       #message fields cannot be None, assign default values for those that are
00039       if self.phidget888_connected is None:
00040         self.phidget888_connected = 0
00041       if self.phidget_encoder_connected is None:
00042         self.phidget_encoder_connected = 0
00043       if self.info is None:
00044         self.info = 0
00045     else:
00046       self.phidget888_connected = 0
00047       self.phidget_encoder_connected = 0
00048       self.info = 0
00049 
00050   def _get_types(self):
00051     """
00052     internal API method
00053     """
00054     return self._slot_types
00055 
00056   def serialize(self, buff):
00057     """
00058     serialize message into buffer
00059     :param buff: buffer, ``StringIO``
00060     """
00061     try:
00062       _x = self
00063       buff.write(_struct_3B.pack(_x.phidget888_connected, _x.phidget_encoder_connected, _x.info))
00064     except struct.error as se: self._check_types(se)
00065     except TypeError as te: self._check_types(te)
00066 
00067   def deserialize(self, str):
00068     """
00069     unpack serialized message in str into this message instance
00070     :param str: byte array of serialized message, ``str``
00071     """
00072     try:
00073       end = 0
00074       _x = self
00075       start = end
00076       end += 3
00077       (_x.phidget888_connected, _x.phidget_encoder_connected, _x.info,) = _struct_3B.unpack(str[start:end])
00078       return self
00079     except struct.error as e:
00080       raise genpy.DeserializationError(e) #most likely buffer underfill
00081 
00082 
00083   def serialize_numpy(self, buff, numpy):
00084     """
00085     serialize message with numpy array types into buffer
00086     :param buff: buffer, ``StringIO``
00087     :param numpy: numpy python module
00088     """
00089     try:
00090       _x = self
00091       buff.write(_struct_3B.pack(_x.phidget888_connected, _x.phidget_encoder_connected, _x.info))
00092     except struct.error as se: self._check_types(se)
00093     except TypeError as te: self._check_types(te)
00094 
00095   def deserialize_numpy(self, str, numpy):
00096     """
00097     unpack serialized message in str into this message instance using numpy for array types
00098     :param str: byte array of serialized message, ``str``
00099     :param numpy: numpy python module
00100     """
00101     try:
00102       end = 0
00103       _x = self
00104       start = end
00105       end += 3
00106       (_x.phidget888_connected, _x.phidget_encoder_connected, _x.info,) = _struct_3B.unpack(str[start:end])
00107       return self
00108     except struct.error as e:
00109       raise genpy.DeserializationError(e) #most likely buffer underfill
00110 
00111 _struct_I = genpy.struct_I
00112 _struct_3B = struct.Struct("<3B")


corobot_phidget_ik
Author(s):
autogenerated on Wed Aug 26 2015 11:09:50