_HeadMonitorStatus.py
Go to the documentation of this file.
00001 """autogenerated by genpy from head_monitor_msgs/HeadMonitorStatus.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 HeadMonitorStatus(genpy.Message):
00009   _md5sum = "54a93e9786200851b9612cbfdcbbf36b"
00010   _type = "head_monitor_msgs/HeadMonitorStatus"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """int32 status
00013 
00014 int32 IDLE = 1 
00015 int32 PREPLAN_SCAN = 2
00016 int32 PAUSED = 3
00017 int32 MONITOR_BEFORE_EXECUTION = 4
00018 int32 EXECUTING = 5
00019 int32 PAUSE_TIMEOUT = 6
00020 int32 COMPLETED = 7
00021 int32 PREEMPTED = 8
00022 
00023 """
00024   # Pseudo-constants
00025   IDLE = 1
00026   PREPLAN_SCAN = 2
00027   PAUSED = 3
00028   MONITOR_BEFORE_EXECUTION = 4
00029   EXECUTING = 5
00030   PAUSE_TIMEOUT = 6
00031   COMPLETED = 7
00032   PREEMPTED = 8
00033 
00034   __slots__ = ['status']
00035   _slot_types = ['int32']
00036 
00037   def __init__(self, *args, **kwds):
00038     """
00039     Constructor. Any message fields that are implicitly/explicitly
00040     set to None will be assigned a default value. The recommend
00041     use is keyword arguments as this is more robust to future message
00042     changes.  You cannot mix in-order arguments and keyword arguments.
00043 
00044     The available fields are:
00045        status
00046 
00047     :param args: complete set of field values, in .msg order
00048     :param kwds: use keyword arguments corresponding to message field names
00049     to set specific fields.
00050     """
00051     if args or kwds:
00052       super(HeadMonitorStatus, self).__init__(*args, **kwds)
00053       #message fields cannot be None, assign default values for those that are
00054       if self.status is None:
00055         self.status = 0
00056     else:
00057       self.status = 0
00058 
00059   def _get_types(self):
00060     """
00061     internal API method
00062     """
00063     return self._slot_types
00064 
00065   def serialize(self, buff):
00066     """
00067     serialize message into buffer
00068     :param buff: buffer, ``StringIO``
00069     """
00070     try:
00071       buff.write(_struct_i.pack(self.status))
00072     except struct.error as se: self._check_types(se)
00073     except TypeError as te: self._check_types(te)
00074 
00075   def deserialize(self, str):
00076     """
00077     unpack serialized message in str into this message instance
00078     :param str: byte array of serialized message, ``str``
00079     """
00080     try:
00081       end = 0
00082       start = end
00083       end += 4
00084       (self.status,) = _struct_i.unpack(str[start:end])
00085       return self
00086     except struct.error as e:
00087       raise genpy.DeserializationError(e) #most likely buffer underfill
00088 
00089 
00090   def serialize_numpy(self, buff, numpy):
00091     """
00092     serialize message with numpy array types into buffer
00093     :param buff: buffer, ``StringIO``
00094     :param numpy: numpy python module
00095     """
00096     try:
00097       buff.write(_struct_i.pack(self.status))
00098     except struct.error as se: self._check_types(se)
00099     except TypeError as te: self._check_types(te)
00100 
00101   def deserialize_numpy(self, str, numpy):
00102     """
00103     unpack serialized message in str into this message instance using numpy for array types
00104     :param str: byte array of serialized message, ``str``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       end = 0
00109       start = end
00110       end += 4
00111       (self.status,) = _struct_i.unpack(str[start:end])
00112       return self
00113     except struct.error as e:
00114       raise genpy.DeserializationError(e) #most likely buffer underfill
00115 
00116 _struct_I = genpy.struct_I
00117 _struct_i = struct.Struct("<i")


head_monitor_msgs
Author(s): Gil Jones
autogenerated on Thu Dec 12 2013 11:07:23