_TaskAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from continuous_ops_msgs/TaskAction.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 actionlib_msgs.msg
00008 import genpy
00009 import continuous_ops_msgs.msg
00010 import std_msgs.msg
00011 
00012 class TaskAction(genpy.Message):
00013   _md5sum = "d5a016b49f278075666fbc901debbd08"
00014   _type = "continuous_ops_msgs/TaskAction"
00015   _has_header = False #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 
00018 TaskActionGoal action_goal
00019 TaskActionResult action_result
00020 TaskActionFeedback action_feedback
00021 
00022 ================================================================================
00023 MSG: continuous_ops_msgs/TaskActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025 
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 TaskGoal goal
00029 
00030 ================================================================================
00031 MSG: std_msgs/Header
00032 # Standard metadata for higher-level stamped data types.
00033 # This is generally used to communicate timestamped data 
00034 # in a particular coordinate frame.
00035 # 
00036 # sequence ID: consecutively increasing ID 
00037 uint32 seq
00038 #Two-integer timestamp that is expressed as:
00039 # * stamp.secs: seconds (stamp_secs) since epoch
00040 # * stamp.nsecs: nanoseconds since stamp_secs
00041 # time-handling sugar is provided by the client library
00042 time stamp
00043 #Frame this data is associated with
00044 # 0: no frame
00045 # 1: global frame
00046 string frame_id
00047 
00048 ================================================================================
00049 MSG: actionlib_msgs/GoalID
00050 # The stamp should store the time at which this goal was requested.
00051 # It is used by an action server when it tries to preempt all
00052 # goals that were requested before a certain time
00053 time stamp
00054 
00055 # The id provides a way to associate feedback and
00056 # result message with specific goal requests. The id
00057 # specified must be unique.
00058 string id
00059 
00060 
00061 ================================================================================
00062 MSG: continuous_ops_msgs/TaskGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 
00065 ================================================================================
00066 MSG: continuous_ops_msgs/TaskActionResult
00067 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00068 
00069 Header header
00070 actionlib_msgs/GoalStatus status
00071 TaskResult result
00072 
00073 ================================================================================
00074 MSG: actionlib_msgs/GoalStatus
00075 GoalID goal_id
00076 uint8 status
00077 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00078 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00079 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00080                             #   and has since completed its execution (Terminal State)
00081 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00082 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00083                             #    to some failure (Terminal State)
00084 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00085                             #    because the goal was unattainable or invalid (Terminal State)
00086 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00087                             #    and has not yet completed execution
00088 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00089                             #    but the action server has not yet confirmed that the goal is canceled
00090 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00091                             #    and was successfully cancelled (Terminal State)
00092 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00093                             #    sent over the wire by an action server
00094 
00095 #Allow for the user to associate a string with GoalStatus for debugging
00096 string text
00097 
00098 
00099 ================================================================================
00100 MSG: continuous_ops_msgs/TaskResult
00101 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00102 
00103 ================================================================================
00104 MSG: continuous_ops_msgs/TaskActionFeedback
00105 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00106 
00107 Header header
00108 actionlib_msgs/GoalStatus status
00109 TaskFeedback feedback
00110 
00111 ================================================================================
00112 MSG: continuous_ops_msgs/TaskFeedback
00113 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00114 
00115 """
00116   __slots__ = ['action_goal','action_result','action_feedback']
00117   _slot_types = ['continuous_ops_msgs/TaskActionGoal','continuous_ops_msgs/TaskActionResult','continuous_ops_msgs/TaskActionFeedback']
00118 
00119   def __init__(self, *args, **kwds):
00120     """
00121     Constructor. Any message fields that are implicitly/explicitly
00122     set to None will be assigned a default value. The recommend
00123     use is keyword arguments as this is more robust to future message
00124     changes.  You cannot mix in-order arguments and keyword arguments.
00125 
00126     The available fields are:
00127        action_goal,action_result,action_feedback
00128 
00129     :param args: complete set of field values, in .msg order
00130     :param kwds: use keyword arguments corresponding to message field names
00131     to set specific fields.
00132     """
00133     if args or kwds:
00134       super(TaskAction, self).__init__(*args, **kwds)
00135       #message fields cannot be None, assign default values for those that are
00136       if self.action_goal is None:
00137         self.action_goal = continuous_ops_msgs.msg.TaskActionGoal()
00138       if self.action_result is None:
00139         self.action_result = continuous_ops_msgs.msg.TaskActionResult()
00140       if self.action_feedback is None:
00141         self.action_feedback = continuous_ops_msgs.msg.TaskActionFeedback()
00142     else:
00143       self.action_goal = continuous_ops_msgs.msg.TaskActionGoal()
00144       self.action_result = continuous_ops_msgs.msg.TaskActionResult()
00145       self.action_feedback = continuous_ops_msgs.msg.TaskActionFeedback()
00146 
00147   def _get_types(self):
00148     """
00149     internal API method
00150     """
00151     return self._slot_types
00152 
00153   def serialize(self, buff):
00154     """
00155     serialize message into buffer
00156     :param buff: buffer, ``StringIO``
00157     """
00158     try:
00159       _x = self
00160       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00161       _x = self.action_goal.header.frame_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       _x = self
00168       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00169       _x = self.action_goal.goal_id.id
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       _x = self
00176       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00177       _x = self.action_result.header.frame_id
00178       length = len(_x)
00179       if python3 or type(_x) == unicode:
00180         _x = _x.encode('utf-8')
00181         length = len(_x)
00182       buff.write(struct.pack('<I%ss'%length, length, _x))
00183       _x = self
00184       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00185       _x = self.action_result.status.goal_id.id
00186       length = len(_x)
00187       if python3 or type(_x) == unicode:
00188         _x = _x.encode('utf-8')
00189         length = len(_x)
00190       buff.write(struct.pack('<I%ss'%length, length, _x))
00191       buff.write(_struct_B.pack(self.action_result.status.status))
00192       _x = self.action_result.status.text
00193       length = len(_x)
00194       if python3 or type(_x) == unicode:
00195         _x = _x.encode('utf-8')
00196         length = len(_x)
00197       buff.write(struct.pack('<I%ss'%length, length, _x))
00198       _x = self
00199       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00200       _x = self.action_feedback.header.frame_id
00201       length = len(_x)
00202       if python3 or type(_x) == unicode:
00203         _x = _x.encode('utf-8')
00204         length = len(_x)
00205       buff.write(struct.pack('<I%ss'%length, length, _x))
00206       _x = self
00207       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00208       _x = self.action_feedback.status.goal_id.id
00209       length = len(_x)
00210       if python3 or type(_x) == unicode:
00211         _x = _x.encode('utf-8')
00212         length = len(_x)
00213       buff.write(struct.pack('<I%ss'%length, length, _x))
00214       buff.write(_struct_B.pack(self.action_feedback.status.status))
00215       _x = self.action_feedback.status.text
00216       length = len(_x)
00217       if python3 or type(_x) == unicode:
00218         _x = _x.encode('utf-8')
00219         length = len(_x)
00220       buff.write(struct.pack('<I%ss'%length, length, _x))
00221     except struct.error as se: self._check_types(se)
00222     except TypeError as te: self._check_types(te)
00223 
00224   def deserialize(self, str):
00225     """
00226     unpack serialized message in str into this message instance
00227     :param str: byte array of serialized message, ``str``
00228     """
00229     try:
00230       if self.action_goal is None:
00231         self.action_goal = continuous_ops_msgs.msg.TaskActionGoal()
00232       if self.action_result is None:
00233         self.action_result = continuous_ops_msgs.msg.TaskActionResult()
00234       if self.action_feedback is None:
00235         self.action_feedback = continuous_ops_msgs.msg.TaskActionFeedback()
00236       end = 0
00237       _x = self
00238       start = end
00239       end += 12
00240       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00241       start = end
00242       end += 4
00243       (length,) = _struct_I.unpack(str[start:end])
00244       start = end
00245       end += length
00246       if python3:
00247         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00248       else:
00249         self.action_goal.header.frame_id = str[start:end]
00250       _x = self
00251       start = end
00252       end += 8
00253       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00254       start = end
00255       end += 4
00256       (length,) = _struct_I.unpack(str[start:end])
00257       start = end
00258       end += length
00259       if python3:
00260         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00261       else:
00262         self.action_goal.goal_id.id = str[start:end]
00263       _x = self
00264       start = end
00265       end += 12
00266       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00267       start = end
00268       end += 4
00269       (length,) = _struct_I.unpack(str[start:end])
00270       start = end
00271       end += length
00272       if python3:
00273         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00274       else:
00275         self.action_result.header.frame_id = str[start:end]
00276       _x = self
00277       start = end
00278       end += 8
00279       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00280       start = end
00281       end += 4
00282       (length,) = _struct_I.unpack(str[start:end])
00283       start = end
00284       end += length
00285       if python3:
00286         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00287       else:
00288         self.action_result.status.goal_id.id = str[start:end]
00289       start = end
00290       end += 1
00291       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       start = end
00296       end += length
00297       if python3:
00298         self.action_result.status.text = str[start:end].decode('utf-8')
00299       else:
00300         self.action_result.status.text = str[start:end]
00301       _x = self
00302       start = end
00303       end += 12
00304       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00305       start = end
00306       end += 4
00307       (length,) = _struct_I.unpack(str[start:end])
00308       start = end
00309       end += length
00310       if python3:
00311         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00312       else:
00313         self.action_feedback.header.frame_id = str[start:end]
00314       _x = self
00315       start = end
00316       end += 8
00317       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00318       start = end
00319       end += 4
00320       (length,) = _struct_I.unpack(str[start:end])
00321       start = end
00322       end += length
00323       if python3:
00324         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00325       else:
00326         self.action_feedback.status.goal_id.id = str[start:end]
00327       start = end
00328       end += 1
00329       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00330       start = end
00331       end += 4
00332       (length,) = _struct_I.unpack(str[start:end])
00333       start = end
00334       end += length
00335       if python3:
00336         self.action_feedback.status.text = str[start:end].decode('utf-8')
00337       else:
00338         self.action_feedback.status.text = str[start:end]
00339       return self
00340     except struct.error as e:
00341       raise genpy.DeserializationError(e) #most likely buffer underfill
00342 
00343 
00344   def serialize_numpy(self, buff, numpy):
00345     """
00346     serialize message with numpy array types into buffer
00347     :param buff: buffer, ``StringIO``
00348     :param numpy: numpy python module
00349     """
00350     try:
00351       _x = self
00352       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00353       _x = self.action_goal.header.frame_id
00354       length = len(_x)
00355       if python3 or type(_x) == unicode:
00356         _x = _x.encode('utf-8')
00357         length = len(_x)
00358       buff.write(struct.pack('<I%ss'%length, length, _x))
00359       _x = self
00360       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00361       _x = self.action_goal.goal_id.id
00362       length = len(_x)
00363       if python3 or type(_x) == unicode:
00364         _x = _x.encode('utf-8')
00365         length = len(_x)
00366       buff.write(struct.pack('<I%ss'%length, length, _x))
00367       _x = self
00368       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00369       _x = self.action_result.header.frame_id
00370       length = len(_x)
00371       if python3 or type(_x) == unicode:
00372         _x = _x.encode('utf-8')
00373         length = len(_x)
00374       buff.write(struct.pack('<I%ss'%length, length, _x))
00375       _x = self
00376       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00377       _x = self.action_result.status.goal_id.id
00378       length = len(_x)
00379       if python3 or type(_x) == unicode:
00380         _x = _x.encode('utf-8')
00381         length = len(_x)
00382       buff.write(struct.pack('<I%ss'%length, length, _x))
00383       buff.write(_struct_B.pack(self.action_result.status.status))
00384       _x = self.action_result.status.text
00385       length = len(_x)
00386       if python3 or type(_x) == unicode:
00387         _x = _x.encode('utf-8')
00388         length = len(_x)
00389       buff.write(struct.pack('<I%ss'%length, length, _x))
00390       _x = self
00391       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00392       _x = self.action_feedback.header.frame_id
00393       length = len(_x)
00394       if python3 or type(_x) == unicode:
00395         _x = _x.encode('utf-8')
00396         length = len(_x)
00397       buff.write(struct.pack('<I%ss'%length, length, _x))
00398       _x = self
00399       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00400       _x = self.action_feedback.status.goal_id.id
00401       length = len(_x)
00402       if python3 or type(_x) == unicode:
00403         _x = _x.encode('utf-8')
00404         length = len(_x)
00405       buff.write(struct.pack('<I%ss'%length, length, _x))
00406       buff.write(_struct_B.pack(self.action_feedback.status.status))
00407       _x = self.action_feedback.status.text
00408       length = len(_x)
00409       if python3 or type(_x) == unicode:
00410         _x = _x.encode('utf-8')
00411         length = len(_x)
00412       buff.write(struct.pack('<I%ss'%length, length, _x))
00413     except struct.error as se: self._check_types(se)
00414     except TypeError as te: self._check_types(te)
00415 
00416   def deserialize_numpy(self, str, numpy):
00417     """
00418     unpack serialized message in str into this message instance using numpy for array types
00419     :param str: byte array of serialized message, ``str``
00420     :param numpy: numpy python module
00421     """
00422     try:
00423       if self.action_goal is None:
00424         self.action_goal = continuous_ops_msgs.msg.TaskActionGoal()
00425       if self.action_result is None:
00426         self.action_result = continuous_ops_msgs.msg.TaskActionResult()
00427       if self.action_feedback is None:
00428         self.action_feedback = continuous_ops_msgs.msg.TaskActionFeedback()
00429       end = 0
00430       _x = self
00431       start = end
00432       end += 12
00433       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00434       start = end
00435       end += 4
00436       (length,) = _struct_I.unpack(str[start:end])
00437       start = end
00438       end += length
00439       if python3:
00440         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00441       else:
00442         self.action_goal.header.frame_id = str[start:end]
00443       _x = self
00444       start = end
00445       end += 8
00446       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00447       start = end
00448       end += 4
00449       (length,) = _struct_I.unpack(str[start:end])
00450       start = end
00451       end += length
00452       if python3:
00453         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00454       else:
00455         self.action_goal.goal_id.id = str[start:end]
00456       _x = self
00457       start = end
00458       end += 12
00459       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00460       start = end
00461       end += 4
00462       (length,) = _struct_I.unpack(str[start:end])
00463       start = end
00464       end += length
00465       if python3:
00466         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00467       else:
00468         self.action_result.header.frame_id = str[start:end]
00469       _x = self
00470       start = end
00471       end += 8
00472       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00473       start = end
00474       end += 4
00475       (length,) = _struct_I.unpack(str[start:end])
00476       start = end
00477       end += length
00478       if python3:
00479         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00480       else:
00481         self.action_result.status.goal_id.id = str[start:end]
00482       start = end
00483       end += 1
00484       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00485       start = end
00486       end += 4
00487       (length,) = _struct_I.unpack(str[start:end])
00488       start = end
00489       end += length
00490       if python3:
00491         self.action_result.status.text = str[start:end].decode('utf-8')
00492       else:
00493         self.action_result.status.text = str[start:end]
00494       _x = self
00495       start = end
00496       end += 12
00497       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00498       start = end
00499       end += 4
00500       (length,) = _struct_I.unpack(str[start:end])
00501       start = end
00502       end += length
00503       if python3:
00504         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00505       else:
00506         self.action_feedback.header.frame_id = str[start:end]
00507       _x = self
00508       start = end
00509       end += 8
00510       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00511       start = end
00512       end += 4
00513       (length,) = _struct_I.unpack(str[start:end])
00514       start = end
00515       end += length
00516       if python3:
00517         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00518       else:
00519         self.action_feedback.status.goal_id.id = str[start:end]
00520       start = end
00521       end += 1
00522       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00523       start = end
00524       end += 4
00525       (length,) = _struct_I.unpack(str[start:end])
00526       start = end
00527       end += length
00528       if python3:
00529         self.action_feedback.status.text = str[start:end].decode('utf-8')
00530       else:
00531         self.action_feedback.status.text = str[start:end]
00532       return self
00533     except struct.error as e:
00534       raise genpy.DeserializationError(e) #most likely buffer underfill
00535 
00536 _struct_I = genpy.struct_I
00537 _struct_3I = struct.Struct("<3I")
00538 _struct_B = struct.Struct("<B")
00539 _struct_2I = struct.Struct("<2I")


continuous_ops_msgs
Author(s): Wim Meeussen
autogenerated on Fri Dec 6 2013 19:57:52