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