00001 """autogenerated by genmsg_py from HeadMonitorResult.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006 import actionlib_msgs.msg
00007
00008 class HeadMonitorResult(roslib.message.Message):
00009 _md5sum = "03a428e07fd6aedbd4227e0f8e12259f"
00010 _type = "move_arm_head_monitor/HeadMonitorResult"
00011 _has_header = False
00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 #result definition
00014 actionlib_msgs/GoalStatus resultStatus
00015
00016 ================================================================================
00017 MSG: actionlib_msgs/GoalStatus
00018 GoalID goal_id
00019 uint8 status
00020 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00021 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00022 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00023 # and has since completed its execution (Terminal State)
00024 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00025 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00026 # to some failure (Terminal State)
00027 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00028 # because the goal was unattainable or invalid (Terminal State)
00029 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00030 # and has not yet completed execution
00031 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00032 # but the action server has not yet confirmed that the goal is canceled
00033 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00034 # and was successfully cancelled (Terminal State)
00035 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00036 # sent over the wire by an action server
00037
00038 #Allow for the user to associate a string with GoalStatus for debugging
00039 string text
00040
00041
00042 ================================================================================
00043 MSG: actionlib_msgs/GoalID
00044 # The stamp should store the time at which this goal was requested.
00045 # It is used by an action server when it tries to preempt all
00046 # goals that were requested before a certain time
00047 time stamp
00048
00049 # The id provides a way to associate feedback and
00050 # result message with specific goal requests. The id
00051 # specified must be unique.
00052 string id
00053
00054
00055 """
00056 __slots__ = ['resultStatus']
00057 _slot_types = ['actionlib_msgs/GoalStatus']
00058
00059 def __init__(self, *args, **kwds):
00060 """
00061 Constructor. Any message fields that are implicitly/explicitly
00062 set to None will be assigned a default value. The recommend
00063 use is keyword arguments as this is more robust to future message
00064 changes. You cannot mix in-order arguments and keyword arguments.
00065
00066 The available fields are:
00067 resultStatus
00068
00069 @param args: complete set of field values, in .msg order
00070 @param kwds: use keyword arguments corresponding to message field names
00071 to set specific fields.
00072 """
00073 if args or kwds:
00074 super(HeadMonitorResult, self).__init__(*args, **kwds)
00075
00076 if self.resultStatus is None:
00077 self.resultStatus = actionlib_msgs.msg.GoalStatus()
00078 else:
00079 self.resultStatus = actionlib_msgs.msg.GoalStatus()
00080
00081 def _get_types(self):
00082 """
00083 internal API method
00084 """
00085 return self._slot_types
00086
00087 def serialize(self, buff):
00088 """
00089 serialize message into buffer
00090 @param buff: buffer
00091 @type buff: StringIO
00092 """
00093 try:
00094 _x = self
00095 buff.write(_struct_2I.pack(_x.resultStatus.goal_id.stamp.secs, _x.resultStatus.goal_id.stamp.nsecs))
00096 _x = self.resultStatus.goal_id.id
00097 length = len(_x)
00098 buff.write(struct.pack('<I%ss'%length, length, _x))
00099 buff.write(_struct_B.pack(self.resultStatus.status))
00100 _x = self.resultStatus.text
00101 length = len(_x)
00102 buff.write(struct.pack('<I%ss'%length, length, _x))
00103 except struct.error, se: self._check_types(se)
00104 except TypeError, te: self._check_types(te)
00105
00106 def deserialize(self, str):
00107 """
00108 unpack serialized message in str into this message instance
00109 @param str: byte array of serialized message
00110 @type str: str
00111 """
00112 try:
00113 if self.resultStatus is None:
00114 self.resultStatus = actionlib_msgs.msg.GoalStatus()
00115 end = 0
00116 _x = self
00117 start = end
00118 end += 8
00119 (_x.resultStatus.goal_id.stamp.secs, _x.resultStatus.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00120 start = end
00121 end += 4
00122 (length,) = _struct_I.unpack(str[start:end])
00123 start = end
00124 end += length
00125 self.resultStatus.goal_id.id = str[start:end]
00126 start = end
00127 end += 1
00128 (self.resultStatus.status,) = _struct_B.unpack(str[start:end])
00129 start = end
00130 end += 4
00131 (length,) = _struct_I.unpack(str[start:end])
00132 start = end
00133 end += length
00134 self.resultStatus.text = str[start:end]
00135 return self
00136 except struct.error, e:
00137 raise roslib.message.DeserializationError(e)
00138
00139
00140 def serialize_numpy(self, buff, numpy):
00141 """
00142 serialize message with numpy array types into buffer
00143 @param buff: buffer
00144 @type buff: StringIO
00145 @param numpy: numpy python module
00146 @type numpy module
00147 """
00148 try:
00149 _x = self
00150 buff.write(_struct_2I.pack(_x.resultStatus.goal_id.stamp.secs, _x.resultStatus.goal_id.stamp.nsecs))
00151 _x = self.resultStatus.goal_id.id
00152 length = len(_x)
00153 buff.write(struct.pack('<I%ss'%length, length, _x))
00154 buff.write(_struct_B.pack(self.resultStatus.status))
00155 _x = self.resultStatus.text
00156 length = len(_x)
00157 buff.write(struct.pack('<I%ss'%length, length, _x))
00158 except struct.error, se: self._check_types(se)
00159 except TypeError, te: self._check_types(te)
00160
00161 def deserialize_numpy(self, str, numpy):
00162 """
00163 unpack serialized message in str into this message instance using numpy for array types
00164 @param str: byte array of serialized message
00165 @type str: str
00166 @param numpy: numpy python module
00167 @type numpy: module
00168 """
00169 try:
00170 if self.resultStatus is None:
00171 self.resultStatus = actionlib_msgs.msg.GoalStatus()
00172 end = 0
00173 _x = self
00174 start = end
00175 end += 8
00176 (_x.resultStatus.goal_id.stamp.secs, _x.resultStatus.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00177 start = end
00178 end += 4
00179 (length,) = _struct_I.unpack(str[start:end])
00180 start = end
00181 end += length
00182 self.resultStatus.goal_id.id = str[start:end]
00183 start = end
00184 end += 1
00185 (self.resultStatus.status,) = _struct_B.unpack(str[start:end])
00186 start = end
00187 end += 4
00188 (length,) = _struct_I.unpack(str[start:end])
00189 start = end
00190 end += length
00191 self.resultStatus.text = str[start:end]
00192 return self
00193 except struct.error, e:
00194 raise roslib.message.DeserializationError(e)
00195
00196 _struct_I = roslib.message.struct_I
00197 _struct_B = struct.Struct("<B")
00198 _struct_2I = struct.Struct("<2I")