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