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