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


move_arm_head_monitor
Author(s): Adam Harmat
autogenerated on Fri Dec 6 2013 21:09:57