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