_SetDefaultVel.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cob_srvs/SetDefaultVelRequest.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 SetDefaultVelRequest(genpy.Message):
00009   _md5sum = "06408962e6bcadda2e07880ad9dedbec"
00010   _type = "cob_srvs/SetDefaultVelRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """float32 default_vel
00013 
00014 """
00015   __slots__ = ['default_vel']
00016   _slot_types = ['float32']
00017 
00018   def __init__(self, *args, **kwds):
00019     """
00020     Constructor. Any message fields that are implicitly/explicitly
00021     set to None will be assigned a default value. The recommend
00022     use is keyword arguments as this is more robust to future message
00023     changes.  You cannot mix in-order arguments and keyword arguments.
00024 
00025     The available fields are:
00026        default_vel
00027 
00028     :param args: complete set of field values, in .msg order
00029     :param kwds: use keyword arguments corresponding to message field names
00030     to set specific fields.
00031     """
00032     if args or kwds:
00033       super(SetDefaultVelRequest, self).__init__(*args, **kwds)
00034       #message fields cannot be None, assign default values for those that are
00035       if self.default_vel is None:
00036         self.default_vel = 0.
00037     else:
00038       self.default_vel = 0.
00039 
00040   def _get_types(self):
00041     """
00042     internal API method
00043     """
00044     return self._slot_types
00045 
00046   def serialize(self, buff):
00047     """
00048     serialize message into buffer
00049     :param buff: buffer, ``StringIO``
00050     """
00051     try:
00052       buff.write(_struct_f.pack(self.default_vel))
00053     except struct.error as se: self._check_types(se)
00054     except TypeError as te: self._check_types(te)
00055 
00056   def deserialize(self, str):
00057     """
00058     unpack serialized message in str into this message instance
00059     :param str: byte array of serialized message, ``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 as e:
00068       raise genpy.DeserializationError(e) #most likely buffer underfill
00069 
00070 
00071   def serialize_numpy(self, buff, numpy):
00072     """
00073     serialize message with numpy array types into buffer
00074     :param buff: buffer, ``StringIO``
00075     :param numpy: numpy python module
00076     """
00077     try:
00078       buff.write(_struct_f.pack(self.default_vel))
00079     except struct.error as se: self._check_types(se)
00080     except TypeError as te: self._check_types(te)
00081 
00082   def deserialize_numpy(self, str, numpy):
00083     """
00084     unpack serialized message in str into this message instance using numpy for array types
00085     :param str: byte array of serialized message, ``str``
00086     :param numpy: numpy python module
00087     """
00088     try:
00089       end = 0
00090       start = end
00091       end += 4
00092       (self.default_vel,) = _struct_f.unpack(str[start:end])
00093       return self
00094     except struct.error as e:
00095       raise genpy.DeserializationError(e) #most likely buffer underfill
00096 
00097 _struct_I = genpy.struct_I
00098 _struct_f = struct.Struct("<f")
00099 """autogenerated by genpy from cob_srvs/SetDefaultVelResponse.msg. Do not edit."""
00100 import sys
00101 python3 = True if sys.hexversion > 0x03000000 else False
00102 import genpy
00103 import struct
00104 
00105 import std_msgs.msg
00106 
00107 class SetDefaultVelResponse(genpy.Message):
00108   _md5sum = "bdad515e8f4c013bd650d3407753d2b8"
00109   _type = "cob_srvs/SetDefaultVelResponse"
00110   _has_header = False #flag to mark the presence of a Header object
00111   _full_text = """std_msgs/Bool success
00112 std_msgs/String error_message
00113 
00114 
00115 ================================================================================
00116 MSG: std_msgs/Bool
00117 bool data
00118 ================================================================================
00119 MSG: std_msgs/String
00120 string data
00121 
00122 """
00123   __slots__ = ['success','error_message']
00124   _slot_types = ['std_msgs/Bool','std_msgs/String']
00125 
00126   def __init__(self, *args, **kwds):
00127     """
00128     Constructor. Any message fields that are implicitly/explicitly
00129     set to None will be assigned a default value. The recommend
00130     use is keyword arguments as this is more robust to future message
00131     changes.  You cannot mix in-order arguments and keyword arguments.
00132 
00133     The available fields are:
00134        success,error_message
00135 
00136     :param args: complete set of field values, in .msg order
00137     :param kwds: use keyword arguments corresponding to message field names
00138     to set specific fields.
00139     """
00140     if args or kwds:
00141       super(SetDefaultVelResponse, self).__init__(*args, **kwds)
00142       #message fields cannot be None, assign default values for those that are
00143       if self.success is None:
00144         self.success = std_msgs.msg.Bool()
00145       if self.error_message is None:
00146         self.error_message = std_msgs.msg.String()
00147     else:
00148       self.success = std_msgs.msg.Bool()
00149       self.error_message = std_msgs.msg.String()
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       buff.write(_struct_B.pack(self.success.data))
00164       _x = self.error_message.data
00165       length = len(_x)
00166       if python3 or type(_x) == unicode:
00167         _x = _x.encode('utf-8')
00168         length = len(_x)
00169       buff.write(struct.pack('<I%ss'%length, length, _x))
00170     except struct.error as se: self._check_types(se)
00171     except TypeError as 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, ``str``
00177     """
00178     try:
00179       if self.success is None:
00180         self.success = std_msgs.msg.Bool()
00181       if self.error_message is None:
00182         self.error_message = std_msgs.msg.String()
00183       end = 0
00184       start = end
00185       end += 1
00186       (self.success.data,) = _struct_B.unpack(str[start:end])
00187       self.success.data = bool(self.success.data)
00188       start = end
00189       end += 4
00190       (length,) = _struct_I.unpack(str[start:end])
00191       start = end
00192       end += length
00193       if python3:
00194         self.error_message.data = str[start:end].decode('utf-8')
00195       else:
00196         self.error_message.data = str[start:end]
00197       return self
00198     except struct.error as e:
00199       raise genpy.DeserializationError(e) #most likely buffer underfill
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       buff.write(_struct_B.pack(self.success.data))
00210       _x = self.error_message.data
00211       length = len(_x)
00212       if python3 or type(_x) == unicode:
00213         _x = _x.encode('utf-8')
00214         length = len(_x)
00215       buff.write(struct.pack('<I%ss'%length, length, _x))
00216     except struct.error as se: self._check_types(se)
00217     except TypeError as te: self._check_types(te)
00218 
00219   def deserialize_numpy(self, str, numpy):
00220     """
00221     unpack serialized message in str into this message instance using numpy for array types
00222     :param str: byte array of serialized message, ``str``
00223     :param numpy: numpy python module
00224     """
00225     try:
00226       if self.success is None:
00227         self.success = std_msgs.msg.Bool()
00228       if self.error_message is None:
00229         self.error_message = std_msgs.msg.String()
00230       end = 0
00231       start = end
00232       end += 1
00233       (self.success.data,) = _struct_B.unpack(str[start:end])
00234       self.success.data = bool(self.success.data)
00235       start = end
00236       end += 4
00237       (length,) = _struct_I.unpack(str[start:end])
00238       start = end
00239       end += length
00240       if python3:
00241         self.error_message.data = str[start:end].decode('utf-8')
00242       else:
00243         self.error_message.data = str[start:end]
00244       return self
00245     except struct.error as e:
00246       raise genpy.DeserializationError(e) #most likely buffer underfill
00247 
00248 _struct_I = genpy.struct_I
00249 _struct_B = struct.Struct("<B")
00250 class SetDefaultVel(object):
00251   _type          = 'cob_srvs/SetDefaultVel'
00252   _md5sum = 'a7159156625f755343070ad39bfaf3a3'
00253   _request_class  = SetDefaultVelRequest
00254   _response_class = SetDefaultVelResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


cob_srvs
Author(s): Florian Weisshardt
autogenerated on Fri Mar 1 2013 17:46:00