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