00001 """autogenerated by genmsg_py from SetDefaultVelRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class SetDefaultVelRequest(roslib.message.Message):
00007 _md5sum = "06408962e6bcadda2e07880ad9dedbec"
00008 _type = "cob_srvs/SetDefaultVelRequest"
00009 _has_header = False
00010 _full_text = """float32 default_vel
00011
00012 """
00013 __slots__ = ['default_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 default_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(SetDefaultVelRequest, self).__init__(*args, **kwds)
00032
00033 if self.default_vel is None:
00034 self.default_vel = 0.
00035 else:
00036 self.default_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.default_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.default_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.default_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.default_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 SetDefaultVelResponse.msg. Do not edit."""
00104 import roslib.message
00105 import struct
00106
00107 import std_msgs.msg
00108
00109 class SetDefaultVelResponse(roslib.message.Message):
00110 _md5sum = "bdad515e8f4c013bd650d3407753d2b8"
00111 _type = "cob_srvs/SetDefaultVelResponse"
00112 _has_header = False
00113 _full_text = """std_msgs/Bool success
00114 std_msgs/String error_message
00115
00116
00117 ================================================================================
00118 MSG: std_msgs/Bool
00119 bool data
00120 ================================================================================
00121 MSG: std_msgs/String
00122 string data
00123
00124 """
00125 __slots__ = ['success','error_message']
00126 _slot_types = ['std_msgs/Bool','std_msgs/String']
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,error_message
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(SetDefaultVelResponse, self).__init__(*args, **kwds)
00144
00145 if self.success is None:
00146 self.success = std_msgs.msg.Bool()
00147 if self.error_message is None:
00148 self.error_message = std_msgs.msg.String()
00149 else:
00150 self.success = std_msgs.msg.Bool()
00151 self.error_message = std_msgs.msg.String()
00152
00153 def _get_types(self):
00154 """
00155 internal API method
00156 """
00157 return self._slot_types
00158
00159 def serialize(self, buff):
00160 """
00161 serialize message into buffer
00162 @param buff: buffer
00163 @type buff: StringIO
00164 """
00165 try:
00166 buff.write(_struct_B.pack(self.success.data))
00167 _x = self.error_message.data
00168 length = len(_x)
00169 buff.write(struct.pack('<I%ss'%length, length, _x))
00170 except struct.error, se: self._check_types(se)
00171 except TypeError, te: self._check_types(te)
00172
00173 def deserialize(self, str):
00174 """
00175 unpack serialized message in str into this message instance
00176 @param str: byte array of serialized message
00177 @type str: str
00178 """
00179 try:
00180 if self.success is None:
00181 self.success = std_msgs.msg.Bool()
00182 if self.error_message is None:
00183 self.error_message = std_msgs.msg.String()
00184 end = 0
00185 start = end
00186 end += 1
00187 (self.success.data,) = _struct_B.unpack(str[start:end])
00188 self.success.data = bool(self.success.data)
00189 start = end
00190 end += 4
00191 (length,) = _struct_I.unpack(str[start:end])
00192 start = end
00193 end += length
00194 self.error_message.data = str[start:end]
00195 return self
00196 except struct.error, e:
00197 raise roslib.message.DeserializationError(e)
00198
00199
00200 def serialize_numpy(self, buff, numpy):
00201 """
00202 serialize message with numpy array types into buffer
00203 @param buff: buffer
00204 @type buff: StringIO
00205 @param numpy: numpy python module
00206 @type numpy module
00207 """
00208 try:
00209 buff.write(_struct_B.pack(self.success.data))
00210 _x = self.error_message.data
00211 length = len(_x)
00212 buff.write(struct.pack('<I%ss'%length, length, _x))
00213 except struct.error, se: self._check_types(se)
00214 except TypeError, te: self._check_types(te)
00215
00216 def deserialize_numpy(self, str, numpy):
00217 """
00218 unpack serialized message in str into this message instance using numpy for array types
00219 @param str: byte array of serialized message
00220 @type str: str
00221 @param numpy: numpy python module
00222 @type numpy: module
00223 """
00224 try:
00225 if self.success is None:
00226 self.success = std_msgs.msg.Bool()
00227 if self.error_message is None:
00228 self.error_message = std_msgs.msg.String()
00229 end = 0
00230 start = end
00231 end += 1
00232 (self.success.data,) = _struct_B.unpack(str[start:end])
00233 self.success.data = bool(self.success.data)
00234 start = end
00235 end += 4
00236 (length,) = _struct_I.unpack(str[start:end])
00237 start = end
00238 end += length
00239 self.error_message.data = str[start:end]
00240 return self
00241 except struct.error, e:
00242 raise roslib.message.DeserializationError(e)
00243
00244 _struct_I = roslib.message.struct_I
00245 _struct_B = struct.Struct("<B")
00246 class SetDefaultVel(roslib.message.ServiceDefinition):
00247 _type = 'cob_srvs/SetDefaultVel'
00248 _md5sum = 'a7159156625f755343070ad39bfaf3a3'
00249 _request_class = SetDefaultVelRequest
00250 _response_class = SetDefaultVelResponse