_ContinualPlanningStatus.py
Go to the documentation of this file.
00001 """autogenerated by genpy from continual_planning_executive/ContinualPlanningStatus.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 ContinualPlanningStatus(genpy.Message):
00009   _md5sum = "7c0eff5f5a1a3551df35a190be9ce7ed"
00010   _type = "continual_planning_executive/ContinualPlanningStatus"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# 0/uninitialized is invalid
00013 int32 INACTIVE=1
00014 int32 ACTIVE=2
00015 int32 SUCCESS=3
00016 int32 FAILURE=4
00017 
00018 int32 STATE_ESTIMATION=1
00019 int32 MONITORING=2
00020 int32 PLANNING=3
00021 int32 EXECUTION=4
00022 int32 CURRENT_PLAN=5
00023 int32 CONTINUAL_PLANNING_FINISHED=6
00024 
00025 int32 component
00026 int32 status
00027 string description
00028 
00029 
00030 """
00031   # Pseudo-constants
00032   INACTIVE = 1
00033   ACTIVE = 2
00034   SUCCESS = 3
00035   FAILURE = 4
00036   STATE_ESTIMATION = 1
00037   MONITORING = 2
00038   PLANNING = 3
00039   EXECUTION = 4
00040   CURRENT_PLAN = 5
00041   CONTINUAL_PLANNING_FINISHED = 6
00042 
00043   __slots__ = ['component','status','description']
00044   _slot_types = ['int32','int32','string']
00045 
00046   def __init__(self, *args, **kwds):
00047     """
00048     Constructor. Any message fields that are implicitly/explicitly
00049     set to None will be assigned a default value. The recommend
00050     use is keyword arguments as this is more robust to future message
00051     changes.  You cannot mix in-order arguments and keyword arguments.
00052 
00053     The available fields are:
00054        component,status,description
00055 
00056     :param args: complete set of field values, in .msg order
00057     :param kwds: use keyword arguments corresponding to message field names
00058     to set specific fields.
00059     """
00060     if args or kwds:
00061       super(ContinualPlanningStatus, self).__init__(*args, **kwds)
00062       #message fields cannot be None, assign default values for those that are
00063       if self.component is None:
00064         self.component = 0
00065       if self.status is None:
00066         self.status = 0
00067       if self.description is None:
00068         self.description = ''
00069     else:
00070       self.component = 0
00071       self.status = 0
00072       self.description = ''
00073 
00074   def _get_types(self):
00075     """
00076     internal API method
00077     """
00078     return self._slot_types
00079 
00080   def serialize(self, buff):
00081     """
00082     serialize message into buffer
00083     :param buff: buffer, ``StringIO``
00084     """
00085     try:
00086       _x = self
00087       buff.write(_struct_2i.pack(_x.component, _x.status))
00088       _x = self.description
00089       length = len(_x)
00090       if python3 or type(_x) == unicode:
00091         _x = _x.encode('utf-8')
00092         length = len(_x)
00093       buff.write(struct.pack('<I%ss'%length, length, _x))
00094     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00095     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00096 
00097   def deserialize(self, str):
00098     """
00099     unpack serialized message in str into this message instance
00100     :param str: byte array of serialized message, ``str``
00101     """
00102     try:
00103       end = 0
00104       _x = self
00105       start = end
00106       end += 8
00107       (_x.component, _x.status,) = _struct_2i.unpack(str[start:end])
00108       start = end
00109       end += 4
00110       (length,) = _struct_I.unpack(str[start:end])
00111       start = end
00112       end += length
00113       if python3:
00114         self.description = str[start:end].decode('utf-8')
00115       else:
00116         self.description = str[start:end]
00117       return self
00118     except struct.error as e:
00119       raise genpy.DeserializationError(e) #most likely buffer underfill
00120 
00121 
00122   def serialize_numpy(self, buff, numpy):
00123     """
00124     serialize message with numpy array types into buffer
00125     :param buff: buffer, ``StringIO``
00126     :param numpy: numpy python module
00127     """
00128     try:
00129       _x = self
00130       buff.write(_struct_2i.pack(_x.component, _x.status))
00131       _x = self.description
00132       length = len(_x)
00133       if python3 or type(_x) == unicode:
00134         _x = _x.encode('utf-8')
00135         length = len(_x)
00136       buff.write(struct.pack('<I%ss'%length, length, _x))
00137     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00138     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00139 
00140   def deserialize_numpy(self, str, numpy):
00141     """
00142     unpack serialized message in str into this message instance using numpy for array types
00143     :param str: byte array of serialized message, ``str``
00144     :param numpy: numpy python module
00145     """
00146     try:
00147       end = 0
00148       _x = self
00149       start = end
00150       end += 8
00151       (_x.component, _x.status,) = _struct_2i.unpack(str[start:end])
00152       start = end
00153       end += 4
00154       (length,) = _struct_I.unpack(str[start:end])
00155       start = end
00156       end += length
00157       if python3:
00158         self.description = str[start:end].decode('utf-8')
00159       else:
00160         self.description = str[start:end]
00161       return self
00162     except struct.error as e:
00163       raise genpy.DeserializationError(e) #most likely buffer underfill
00164 
00165 _struct_I = genpy.struct_I
00166 _struct_2i = struct.Struct("<2i")


continual_planning_executive
Author(s): Christian Dornhege
autogenerated on Mon Oct 6 2014 07:51:56