_GetSerialNumber.py
Go to the documentation of this file.
00001 """autogenerated by genpy from PhidgetServo/GetSerialNumberRequest.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 GetSerialNumberRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "PhidgetServo/GetSerialNumberRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 """
00023   __slots__ = []
00024   _slot_types = []
00025 
00026   def __init__(self, *args, **kwds):
00027     """
00028     Constructor. Any message fields that are implicitly/explicitly
00029     set to None will be assigned a default value. The recommend
00030     use is keyword arguments as this is more robust to future message
00031     changes.  You cannot mix in-order arguments and keyword arguments.
00032 
00033     The available fields are:
00034        
00035 
00036     :param args: complete set of field values, in .msg order
00037     :param kwds: use keyword arguments corresponding to message field names
00038     to set specific fields.
00039     """
00040     if args or kwds:
00041       super(GetSerialNumberRequest, self).__init__(*args, **kwds)
00042 
00043   def _get_types(self):
00044     """
00045     internal API method
00046     """
00047     return self._slot_types
00048 
00049   def serialize(self, buff):
00050     """
00051     serialize message into buffer
00052     :param buff: buffer, ``StringIO``
00053     """
00054     try:
00055       pass
00056     except struct.error as se: self._check_types(se)
00057     except TypeError as te: self._check_types(te)
00058 
00059   def deserialize(self, str):
00060     """
00061     unpack serialized message in str into this message instance
00062     :param str: byte array of serialized message, ``str``
00063     """
00064     try:
00065       end = 0
00066       return self
00067     except struct.error as e:
00068       raise genpy.DeserializationError(e) #most likely buffer underfill
00069 
00070 
00071   def serialize_numpy(self, buff, numpy):
00072     """
00073     serialize message with numpy array types into buffer
00074     :param buff: buffer, ``StringIO``
00075     :param numpy: numpy python module
00076     """
00077     try:
00078       pass
00079     except struct.error as se: self._check_types(se)
00080     except TypeError as te: self._check_types(te)
00081 
00082   def deserialize_numpy(self, str, numpy):
00083     """
00084     unpack serialized message in str into this message instance using numpy for array types
00085     :param str: byte array of serialized message, ``str``
00086     :param numpy: numpy python module
00087     """
00088     try:
00089       end = 0
00090       return self
00091     except struct.error as e:
00092       raise genpy.DeserializationError(e) #most likely buffer underfill
00093 
00094 _struct_I = genpy.struct_I
00095 """autogenerated by genpy from PhidgetServo/GetSerialNumberResponse.msg. Do not edit."""
00096 import sys
00097 python3 = True if sys.hexversion > 0x03000000 else False
00098 import genpy
00099 import struct
00100 
00101 
00102 class GetSerialNumberResponse(genpy.Message):
00103   _md5sum = "cfaceb90a5d2bcce65c527a346ecb23f"
00104   _type = "PhidgetServo/GetSerialNumberResponse"
00105   _has_header = False #flag to mark the presence of a Header object
00106   _full_text = """
00107 int8 serialNumber
00108 
00109 
00110 """
00111   __slots__ = ['serialNumber']
00112   _slot_types = ['int8']
00113 
00114   def __init__(self, *args, **kwds):
00115     """
00116     Constructor. Any message fields that are implicitly/explicitly
00117     set to None will be assigned a default value. The recommend
00118     use is keyword arguments as this is more robust to future message
00119     changes.  You cannot mix in-order arguments and keyword arguments.
00120 
00121     The available fields are:
00122        serialNumber
00123 
00124     :param args: complete set of field values, in .msg order
00125     :param kwds: use keyword arguments corresponding to message field names
00126     to set specific fields.
00127     """
00128     if args or kwds:
00129       super(GetSerialNumberResponse, self).__init__(*args, **kwds)
00130       #message fields cannot be None, assign default values for those that are
00131       if self.serialNumber is None:
00132         self.serialNumber = 0
00133     else:
00134       self.serialNumber = 0
00135 
00136   def _get_types(self):
00137     """
00138     internal API method
00139     """
00140     return self._slot_types
00141 
00142   def serialize(self, buff):
00143     """
00144     serialize message into buffer
00145     :param buff: buffer, ``StringIO``
00146     """
00147     try:
00148       buff.write(_struct_b.pack(self.serialNumber))
00149     except struct.error as se: self._check_types(se)
00150     except TypeError as te: self._check_types(te)
00151 
00152   def deserialize(self, str):
00153     """
00154     unpack serialized message in str into this message instance
00155     :param str: byte array of serialized message, ``str``
00156     """
00157     try:
00158       end = 0
00159       start = end
00160       end += 1
00161       (self.serialNumber,) = _struct_b.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       buff.write(_struct_b.pack(self.serialNumber))
00175     except struct.error as se: self._check_types(se)
00176     except TypeError as te: self._check_types(te)
00177 
00178   def deserialize_numpy(self, str, numpy):
00179     """
00180     unpack serialized message in str into this message instance using numpy for array types
00181     :param str: byte array of serialized message, ``str``
00182     :param numpy: numpy python module
00183     """
00184     try:
00185       end = 0
00186       start = end
00187       end += 1
00188       (self.serialNumber,) = _struct_b.unpack(str[start:end])
00189       return self
00190     except struct.error as e:
00191       raise genpy.DeserializationError(e) #most likely buffer underfill
00192 
00193 _struct_I = genpy.struct_I
00194 _struct_b = struct.Struct("<b")
00195 class GetSerialNumber(object):
00196   _type          = 'PhidgetServo/GetSerialNumber'
00197   _md5sum = 'cfaceb90a5d2bcce65c527a346ecb23f'
00198   _request_class  = GetSerialNumberRequest
00199   _response_class = GetSerialNumberResponse


phidget_servo
Author(s):
autogenerated on Wed Aug 26 2015 11:09:46