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