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


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