_SimplePoseFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from iri_wam_arm_navigation/SimplePoseFeedback.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 SimplePoseFeedback(genpy.Message):
00009   _md5sum = "991d61848164a02d8ac6bb09a451538f"
00010   _type = "iri_wam_arm_navigation/SimplePoseFeedback"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 #Feedback Definition
00014 bool succesed
00015 string state
00016 
00017 
00018 """
00019   __slots__ = ['succesed','state']
00020   _slot_types = ['bool','string']
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        succesed,state
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(SimplePoseFeedback, self).__init__(*args, **kwds)
00038       #message fields cannot be None, assign default values for those that are
00039       if self.succesed is None:
00040         self.succesed = False
00041       if self.state is None:
00042         self.state = ''
00043     else:
00044       self.succesed = False
00045       self.state = ''
00046 
00047   def _get_types(self):
00048     """
00049     internal API method
00050     """
00051     return self._slot_types
00052 
00053   def serialize(self, buff):
00054     """
00055     serialize message into buffer
00056     :param buff: buffer, ``StringIO``
00057     """
00058     try:
00059       buff.write(_struct_B.pack(self.succesed))
00060       _x = self.state
00061       length = len(_x)
00062       if python3 or type(_x) == unicode:
00063         _x = _x.encode('utf-8')
00064         length = len(_x)
00065       buff.write(struct.pack('<I%ss'%length, length, _x))
00066     except struct.error as se: self._check_types(se)
00067     except TypeError as te: self._check_types(te)
00068 
00069   def deserialize(self, str):
00070     """
00071     unpack serialized message in str into this message instance
00072     :param str: byte array of serialized message, ``str``
00073     """
00074     try:
00075       end = 0
00076       start = end
00077       end += 1
00078       (self.succesed,) = _struct_B.unpack(str[start:end])
00079       self.succesed = bool(self.succesed)
00080       start = end
00081       end += 4
00082       (length,) = _struct_I.unpack(str[start:end])
00083       start = end
00084       end += length
00085       if python3:
00086         self.state = str[start:end].decode('utf-8')
00087       else:
00088         self.state = str[start:end]
00089       return self
00090     except struct.error as e:
00091       raise genpy.DeserializationError(e) #most likely buffer underfill
00092 
00093 
00094   def serialize_numpy(self, buff, numpy):
00095     """
00096     serialize message with numpy array types into buffer
00097     :param buff: buffer, ``StringIO``
00098     :param numpy: numpy python module
00099     """
00100     try:
00101       buff.write(_struct_B.pack(self.succesed))
00102       _x = self.state
00103       length = len(_x)
00104       if python3 or type(_x) == unicode:
00105         _x = _x.encode('utf-8')
00106         length = len(_x)
00107       buff.write(struct.pack('<I%ss'%length, length, _x))
00108     except struct.error as se: self._check_types(se)
00109     except TypeError as te: self._check_types(te)
00110 
00111   def deserialize_numpy(self, str, numpy):
00112     """
00113     unpack serialized message in str into this message instance using numpy for array types
00114     :param str: byte array of serialized message, ``str``
00115     :param numpy: numpy python module
00116     """
00117     try:
00118       end = 0
00119       start = end
00120       end += 1
00121       (self.succesed,) = _struct_B.unpack(str[start:end])
00122       self.succesed = bool(self.succesed)
00123       start = end
00124       end += 4
00125       (length,) = _struct_I.unpack(str[start:end])
00126       start = end
00127       end += length
00128       if python3:
00129         self.state = str[start:end].decode('utf-8')
00130       else:
00131         self.state = str[start:end]
00132       return self
00133     except struct.error as e:
00134       raise genpy.DeserializationError(e) #most likely buffer underfill
00135 
00136 _struct_I = genpy.struct_I
00137 _struct_B = struct.Struct("<B")


iri_wam_arm_navigation
Author(s): IRI Robotics Lab, Ivan Rojas (ivan.rojas.j@gmail.com)
autogenerated on Fri Dec 6 2013 22:32:00