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