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