Go to the documentation of this file.00001 """autogenerated by genpy from PhidgetServo/GetMotorCountRequest.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 GetMotorCountRequest(genpy.Message):
00009 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010 _type = "PhidgetServo/GetMotorCountRequest"
00011 _has_header = False
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(GetMotorCountRequest, 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)
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)
00093
00094 _struct_I = genpy.struct_I
00095 """autogenerated by genpy from PhidgetServo/GetMotorCountResponse.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 GetMotorCountResponse(genpy.Message):
00103 _md5sum = "2e88b840cdbcfb5b1d4a03eb1bd78883"
00104 _type = "PhidgetServo/GetMotorCountResponse"
00105 _has_header = False
00106 _full_text = """int8 numberMotors
00107
00108
00109 """
00110 __slots__ = ['numberMotors']
00111 _slot_types = ['int8']
00112
00113 def __init__(self, *args, **kwds):
00114 """
00115 Constructor. Any message fields that are implicitly/explicitly
00116 set to None will be assigned a default value. The recommend
00117 use is keyword arguments as this is more robust to future message
00118 changes. You cannot mix in-order arguments and keyword arguments.
00119
00120 The available fields are:
00121 numberMotors
00122
00123 :param args: complete set of field values, in .msg order
00124 :param kwds: use keyword arguments corresponding to message field names
00125 to set specific fields.
00126 """
00127 if args or kwds:
00128 super(GetMotorCountResponse, self).__init__(*args, **kwds)
00129
00130 if self.numberMotors is None:
00131 self.numberMotors = 0
00132 else:
00133 self.numberMotors = 0
00134
00135 def _get_types(self):
00136 """
00137 internal API method
00138 """
00139 return self._slot_types
00140
00141 def serialize(self, buff):
00142 """
00143 serialize message into buffer
00144 :param buff: buffer, ``StringIO``
00145 """
00146 try:
00147 buff.write(_struct_b.pack(self.numberMotors))
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 start = end
00159 end += 1
00160 (self.numberMotors,) = _struct_b.unpack(str[start:end])
00161 return self
00162 except struct.error as e:
00163 raise genpy.DeserializationError(e)
00164
00165
00166 def serialize_numpy(self, buff, numpy):
00167 """
00168 serialize message with numpy array types into buffer
00169 :param buff: buffer, ``StringIO``
00170 :param numpy: numpy python module
00171 """
00172 try:
00173 buff.write(_struct_b.pack(self.numberMotors))
00174 except struct.error as se: self._check_types(se)
00175 except TypeError as te: self._check_types(te)
00176
00177 def deserialize_numpy(self, str, numpy):
00178 """
00179 unpack serialized message in str into this message instance using numpy for array types
00180 :param str: byte array of serialized message, ``str``
00181 :param numpy: numpy python module
00182 """
00183 try:
00184 end = 0
00185 start = end
00186 end += 1
00187 (self.numberMotors,) = _struct_b.unpack(str[start:end])
00188 return self
00189 except struct.error as e:
00190 raise genpy.DeserializationError(e)
00191
00192 _struct_I = genpy.struct_I
00193 _struct_b = struct.Struct("<b")
00194 class GetMotorCount(object):
00195 _type = 'PhidgetServo/GetMotorCount'
00196 _md5sum = '2e88b840cdbcfb5b1d4a03eb1bd78883'
00197 _request_class = GetMotorCountRequest
00198 _response_class = GetMotorCountResponse