_StateAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cob_script_server/StateAction.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 import cob_script_server.msg
00010 import std_msgs.msg
00011 
00012 class StateAction(genpy.Message):
00013   _md5sum = "8053233aa3e0dd581f127cd6e23e3f9a"
00014   _type = "cob_script_server/StateAction"
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 StateActionGoal action_goal
00019 StateActionResult action_result
00020 StateActionFeedback action_feedback
00021 
00022 ================================================================================
00023 MSG: cob_script_server/StateActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025 
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 StateGoal 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: cob_script_server/StateGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 #goal definition
00065 cob_script_server/ScriptState state
00066 
00067 ================================================================================
00068 MSG: cob_script_server/ScriptState
00069 Header header
00070 int16 number
00071 string function_name
00072 string component_name
00073 string parameter_name
00074 string full_graph_name
00075 
00076 # Possible execution states
00077 byte UNKNOWN=0
00078 byte ACTIVE=1
00079 byte SUCCEEDED=2
00080 byte FAILED=3
00081 byte PAUSED=4
00082 
00083 byte state # state of execution
00084 int16 error_code # current error_code for state
00085 
00086 ================================================================================
00087 MSG: cob_script_server/StateActionResult
00088 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00089 
00090 Header header
00091 actionlib_msgs/GoalStatus status
00092 StateResult result
00093 
00094 ================================================================================
00095 MSG: actionlib_msgs/GoalStatus
00096 GoalID goal_id
00097 uint8 status
00098 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00099 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00100 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00101                             #   and has since completed its execution (Terminal State)
00102 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00103 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00104                             #    to some failure (Terminal State)
00105 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00106                             #    because the goal was unattainable or invalid (Terminal State)
00107 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00108                             #    and has not yet completed execution
00109 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00110                             #    but the action server has not yet confirmed that the goal is canceled
00111 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00112                             #    and was successfully cancelled (Terminal State)
00113 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00114                             #    sent over the wire by an action server
00115 
00116 #Allow for the user to associate a string with GoalStatus for debugging
00117 string text
00118 
00119 
00120 ================================================================================
00121 MSG: cob_script_server/StateResult
00122 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00123 #result definition
00124 int16 return_value
00125 
00126 ================================================================================
00127 MSG: cob_script_server/StateActionFeedback
00128 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00129 
00130 Header header
00131 actionlib_msgs/GoalStatus status
00132 StateFeedback feedback
00133 
00134 ================================================================================
00135 MSG: cob_script_server/StateFeedback
00136 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00137 #feedback definition
00138 
00139 
00140 """
00141   __slots__ = ['action_goal','action_result','action_feedback']
00142   _slot_types = ['cob_script_server/StateActionGoal','cob_script_server/StateActionResult','cob_script_server/StateActionFeedback']
00143 
00144   def __init__(self, *args, **kwds):
00145     """
00146     Constructor. Any message fields that are implicitly/explicitly
00147     set to None will be assigned a default value. The recommend
00148     use is keyword arguments as this is more robust to future message
00149     changes.  You cannot mix in-order arguments and keyword arguments.
00150 
00151     The available fields are:
00152        action_goal,action_result,action_feedback
00153 
00154     :param args: complete set of field values, in .msg order
00155     :param kwds: use keyword arguments corresponding to message field names
00156     to set specific fields.
00157     """
00158     if args or kwds:
00159       super(StateAction, self).__init__(*args, **kwds)
00160       #message fields cannot be None, assign default values for those that are
00161       if self.action_goal is None:
00162         self.action_goal = cob_script_server.msg.StateActionGoal()
00163       if self.action_result is None:
00164         self.action_result = cob_script_server.msg.StateActionResult()
00165       if self.action_feedback is None:
00166         self.action_feedback = cob_script_server.msg.StateActionFeedback()
00167     else:
00168       self.action_goal = cob_script_server.msg.StateActionGoal()
00169       self.action_result = cob_script_server.msg.StateActionResult()
00170       self.action_feedback = cob_script_server.msg.StateActionFeedback()
00171 
00172   def _get_types(self):
00173     """
00174     internal API method
00175     """
00176     return self._slot_types
00177 
00178   def serialize(self, buff):
00179     """
00180     serialize message into buffer
00181     :param buff: buffer, ``StringIO``
00182     """
00183     try:
00184       _x = self
00185       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00186       _x = self.action_goal.header.frame_id
00187       length = len(_x)
00188       if python3 or type(_x) == unicode:
00189         _x = _x.encode('utf-8')
00190         length = len(_x)
00191       buff.write(struct.pack('<I%ss'%length, length, _x))
00192       _x = self
00193       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00194       _x = self.action_goal.goal_id.id
00195       length = len(_x)
00196       if python3 or type(_x) == unicode:
00197         _x = _x.encode('utf-8')
00198         length = len(_x)
00199       buff.write(struct.pack('<I%ss'%length, length, _x))
00200       _x = self
00201       buff.write(_struct_3I.pack(_x.action_goal.goal.state.header.seq, _x.action_goal.goal.state.header.stamp.secs, _x.action_goal.goal.state.header.stamp.nsecs))
00202       _x = self.action_goal.goal.state.header.frame_id
00203       length = len(_x)
00204       if python3 or type(_x) == unicode:
00205         _x = _x.encode('utf-8')
00206         length = len(_x)
00207       buff.write(struct.pack('<I%ss'%length, length, _x))
00208       buff.write(_struct_h.pack(self.action_goal.goal.state.number))
00209       _x = self.action_goal.goal.state.function_name
00210       length = len(_x)
00211       if python3 or type(_x) == unicode:
00212         _x = _x.encode('utf-8')
00213         length = len(_x)
00214       buff.write(struct.pack('<I%ss'%length, length, _x))
00215       _x = self.action_goal.goal.state.component_name
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       _x = self.action_goal.goal.state.parameter_name
00222       length = len(_x)
00223       if python3 or type(_x) == unicode:
00224         _x = _x.encode('utf-8')
00225         length = len(_x)
00226       buff.write(struct.pack('<I%ss'%length, length, _x))
00227       _x = self.action_goal.goal.state.full_graph_name
00228       length = len(_x)
00229       if python3 or type(_x) == unicode:
00230         _x = _x.encode('utf-8')
00231         length = len(_x)
00232       buff.write(struct.pack('<I%ss'%length, length, _x))
00233       _x = self
00234       buff.write(_struct_bh3I.pack(_x.action_goal.goal.state.state, _x.action_goal.goal.state.error_code, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00235       _x = self.action_result.header.frame_id
00236       length = len(_x)
00237       if python3 or type(_x) == unicode:
00238         _x = _x.encode('utf-8')
00239         length = len(_x)
00240       buff.write(struct.pack('<I%ss'%length, length, _x))
00241       _x = self
00242       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00243       _x = self.action_result.status.goal_id.id
00244       length = len(_x)
00245       if python3 or type(_x) == unicode:
00246         _x = _x.encode('utf-8')
00247         length = len(_x)
00248       buff.write(struct.pack('<I%ss'%length, length, _x))
00249       buff.write(_struct_B.pack(self.action_result.status.status))
00250       _x = self.action_result.status.text
00251       length = len(_x)
00252       if python3 or type(_x) == unicode:
00253         _x = _x.encode('utf-8')
00254         length = len(_x)
00255       buff.write(struct.pack('<I%ss'%length, length, _x))
00256       _x = self
00257       buff.write(_struct_h3I.pack(_x.action_result.result.return_value, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00258       _x = self.action_feedback.header.frame_id
00259       length = len(_x)
00260       if python3 or type(_x) == unicode:
00261         _x = _x.encode('utf-8')
00262         length = len(_x)
00263       buff.write(struct.pack('<I%ss'%length, length, _x))
00264       _x = self
00265       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00266       _x = self.action_feedback.status.goal_id.id
00267       length = len(_x)
00268       if python3 or type(_x) == unicode:
00269         _x = _x.encode('utf-8')
00270         length = len(_x)
00271       buff.write(struct.pack('<I%ss'%length, length, _x))
00272       buff.write(_struct_B.pack(self.action_feedback.status.status))
00273       _x = self.action_feedback.status.text
00274       length = len(_x)
00275       if python3 or type(_x) == unicode:
00276         _x = _x.encode('utf-8')
00277         length = len(_x)
00278       buff.write(struct.pack('<I%ss'%length, length, _x))
00279     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00280     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00281 
00282   def deserialize(self, str):
00283     """
00284     unpack serialized message in str into this message instance
00285     :param str: byte array of serialized message, ``str``
00286     """
00287     try:
00288       if self.action_goal is None:
00289         self.action_goal = cob_script_server.msg.StateActionGoal()
00290       if self.action_result is None:
00291         self.action_result = cob_script_server.msg.StateActionResult()
00292       if self.action_feedback is None:
00293         self.action_feedback = cob_script_server.msg.StateActionFeedback()
00294       end = 0
00295       _x = self
00296       start = end
00297       end += 12
00298       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00299       start = end
00300       end += 4
00301       (length,) = _struct_I.unpack(str[start:end])
00302       start = end
00303       end += length
00304       if python3:
00305         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00306       else:
00307         self.action_goal.header.frame_id = str[start:end]
00308       _x = self
00309       start = end
00310       end += 8
00311       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00312       start = end
00313       end += 4
00314       (length,) = _struct_I.unpack(str[start:end])
00315       start = end
00316       end += length
00317       if python3:
00318         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00319       else:
00320         self.action_goal.goal_id.id = str[start:end]
00321       _x = self
00322       start = end
00323       end += 12
00324       (_x.action_goal.goal.state.header.seq, _x.action_goal.goal.state.header.stamp.secs, _x.action_goal.goal.state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00325       start = end
00326       end += 4
00327       (length,) = _struct_I.unpack(str[start:end])
00328       start = end
00329       end += length
00330       if python3:
00331         self.action_goal.goal.state.header.frame_id = str[start:end].decode('utf-8')
00332       else:
00333         self.action_goal.goal.state.header.frame_id = str[start:end]
00334       start = end
00335       end += 2
00336       (self.action_goal.goal.state.number,) = _struct_h.unpack(str[start:end])
00337       start = end
00338       end += 4
00339       (length,) = _struct_I.unpack(str[start:end])
00340       start = end
00341       end += length
00342       if python3:
00343         self.action_goal.goal.state.function_name = str[start:end].decode('utf-8')
00344       else:
00345         self.action_goal.goal.state.function_name = str[start:end]
00346       start = end
00347       end += 4
00348       (length,) = _struct_I.unpack(str[start:end])
00349       start = end
00350       end += length
00351       if python3:
00352         self.action_goal.goal.state.component_name = str[start:end].decode('utf-8')
00353       else:
00354         self.action_goal.goal.state.component_name = str[start:end]
00355       start = end
00356       end += 4
00357       (length,) = _struct_I.unpack(str[start:end])
00358       start = end
00359       end += length
00360       if python3:
00361         self.action_goal.goal.state.parameter_name = str[start:end].decode('utf-8')
00362       else:
00363         self.action_goal.goal.state.parameter_name = str[start:end]
00364       start = end
00365       end += 4
00366       (length,) = _struct_I.unpack(str[start:end])
00367       start = end
00368       end += length
00369       if python3:
00370         self.action_goal.goal.state.full_graph_name = str[start:end].decode('utf-8')
00371       else:
00372         self.action_goal.goal.state.full_graph_name = str[start:end]
00373       _x = self
00374       start = end
00375       end += 15
00376       (_x.action_goal.goal.state.state, _x.action_goal.goal.state.error_code, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_bh3I.unpack(str[start:end])
00377       start = end
00378       end += 4
00379       (length,) = _struct_I.unpack(str[start:end])
00380       start = end
00381       end += length
00382       if python3:
00383         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00384       else:
00385         self.action_result.header.frame_id = str[start:end]
00386       _x = self
00387       start = end
00388       end += 8
00389       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00390       start = end
00391       end += 4
00392       (length,) = _struct_I.unpack(str[start:end])
00393       start = end
00394       end += length
00395       if python3:
00396         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00397       else:
00398         self.action_result.status.goal_id.id = str[start:end]
00399       start = end
00400       end += 1
00401       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00402       start = end
00403       end += 4
00404       (length,) = _struct_I.unpack(str[start:end])
00405       start = end
00406       end += length
00407       if python3:
00408         self.action_result.status.text = str[start:end].decode('utf-8')
00409       else:
00410         self.action_result.status.text = str[start:end]
00411       _x = self
00412       start = end
00413       end += 14
00414       (_x.action_result.result.return_value, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_h3I.unpack(str[start:end])
00415       start = end
00416       end += 4
00417       (length,) = _struct_I.unpack(str[start:end])
00418       start = end
00419       end += length
00420       if python3:
00421         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00422       else:
00423         self.action_feedback.header.frame_id = str[start:end]
00424       _x = self
00425       start = end
00426       end += 8
00427       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00428       start = end
00429       end += 4
00430       (length,) = _struct_I.unpack(str[start:end])
00431       start = end
00432       end += length
00433       if python3:
00434         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00435       else:
00436         self.action_feedback.status.goal_id.id = str[start:end]
00437       start = end
00438       end += 1
00439       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00440       start = end
00441       end += 4
00442       (length,) = _struct_I.unpack(str[start:end])
00443       start = end
00444       end += length
00445       if python3:
00446         self.action_feedback.status.text = str[start:end].decode('utf-8')
00447       else:
00448         self.action_feedback.status.text = str[start:end]
00449       return self
00450     except struct.error as e:
00451       raise genpy.DeserializationError(e) #most likely buffer underfill
00452 
00453 
00454   def serialize_numpy(self, buff, numpy):
00455     """
00456     serialize message with numpy array types into buffer
00457     :param buff: buffer, ``StringIO``
00458     :param numpy: numpy python module
00459     """
00460     try:
00461       _x = self
00462       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00463       _x = self.action_goal.header.frame_id
00464       length = len(_x)
00465       if python3 or type(_x) == unicode:
00466         _x = _x.encode('utf-8')
00467         length = len(_x)
00468       buff.write(struct.pack('<I%ss'%length, length, _x))
00469       _x = self
00470       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00471       _x = self.action_goal.goal_id.id
00472       length = len(_x)
00473       if python3 or type(_x) == unicode:
00474         _x = _x.encode('utf-8')
00475         length = len(_x)
00476       buff.write(struct.pack('<I%ss'%length, length, _x))
00477       _x = self
00478       buff.write(_struct_3I.pack(_x.action_goal.goal.state.header.seq, _x.action_goal.goal.state.header.stamp.secs, _x.action_goal.goal.state.header.stamp.nsecs))
00479       _x = self.action_goal.goal.state.header.frame_id
00480       length = len(_x)
00481       if python3 or type(_x) == unicode:
00482         _x = _x.encode('utf-8')
00483         length = len(_x)
00484       buff.write(struct.pack('<I%ss'%length, length, _x))
00485       buff.write(_struct_h.pack(self.action_goal.goal.state.number))
00486       _x = self.action_goal.goal.state.function_name
00487       length = len(_x)
00488       if python3 or type(_x) == unicode:
00489         _x = _x.encode('utf-8')
00490         length = len(_x)
00491       buff.write(struct.pack('<I%ss'%length, length, _x))
00492       _x = self.action_goal.goal.state.component_name
00493       length = len(_x)
00494       if python3 or type(_x) == unicode:
00495         _x = _x.encode('utf-8')
00496         length = len(_x)
00497       buff.write(struct.pack('<I%ss'%length, length, _x))
00498       _x = self.action_goal.goal.state.parameter_name
00499       length = len(_x)
00500       if python3 or type(_x) == unicode:
00501         _x = _x.encode('utf-8')
00502         length = len(_x)
00503       buff.write(struct.pack('<I%ss'%length, length, _x))
00504       _x = self.action_goal.goal.state.full_graph_name
00505       length = len(_x)
00506       if python3 or type(_x) == unicode:
00507         _x = _x.encode('utf-8')
00508         length = len(_x)
00509       buff.write(struct.pack('<I%ss'%length, length, _x))
00510       _x = self
00511       buff.write(_struct_bh3I.pack(_x.action_goal.goal.state.state, _x.action_goal.goal.state.error_code, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00512       _x = self.action_result.header.frame_id
00513       length = len(_x)
00514       if python3 or type(_x) == unicode:
00515         _x = _x.encode('utf-8')
00516         length = len(_x)
00517       buff.write(struct.pack('<I%ss'%length, length, _x))
00518       _x = self
00519       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00520       _x = self.action_result.status.goal_id.id
00521       length = len(_x)
00522       if python3 or type(_x) == unicode:
00523         _x = _x.encode('utf-8')
00524         length = len(_x)
00525       buff.write(struct.pack('<I%ss'%length, length, _x))
00526       buff.write(_struct_B.pack(self.action_result.status.status))
00527       _x = self.action_result.status.text
00528       length = len(_x)
00529       if python3 or type(_x) == unicode:
00530         _x = _x.encode('utf-8')
00531         length = len(_x)
00532       buff.write(struct.pack('<I%ss'%length, length, _x))
00533       _x = self
00534       buff.write(_struct_h3I.pack(_x.action_result.result.return_value, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00535       _x = self.action_feedback.header.frame_id
00536       length = len(_x)
00537       if python3 or type(_x) == unicode:
00538         _x = _x.encode('utf-8')
00539         length = len(_x)
00540       buff.write(struct.pack('<I%ss'%length, length, _x))
00541       _x = self
00542       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00543       _x = self.action_feedback.status.goal_id.id
00544       length = len(_x)
00545       if python3 or type(_x) == unicode:
00546         _x = _x.encode('utf-8')
00547         length = len(_x)
00548       buff.write(struct.pack('<I%ss'%length, length, _x))
00549       buff.write(_struct_B.pack(self.action_feedback.status.status))
00550       _x = self.action_feedback.status.text
00551       length = len(_x)
00552       if python3 or type(_x) == unicode:
00553         _x = _x.encode('utf-8')
00554         length = len(_x)
00555       buff.write(struct.pack('<I%ss'%length, length, _x))
00556     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00557     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00558 
00559   def deserialize_numpy(self, str, numpy):
00560     """
00561     unpack serialized message in str into this message instance using numpy for array types
00562     :param str: byte array of serialized message, ``str``
00563     :param numpy: numpy python module
00564     """
00565     try:
00566       if self.action_goal is None:
00567         self.action_goal = cob_script_server.msg.StateActionGoal()
00568       if self.action_result is None:
00569         self.action_result = cob_script_server.msg.StateActionResult()
00570       if self.action_feedback is None:
00571         self.action_feedback = cob_script_server.msg.StateActionFeedback()
00572       end = 0
00573       _x = self
00574       start = end
00575       end += 12
00576       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00577       start = end
00578       end += 4
00579       (length,) = _struct_I.unpack(str[start:end])
00580       start = end
00581       end += length
00582       if python3:
00583         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00584       else:
00585         self.action_goal.header.frame_id = str[start:end]
00586       _x = self
00587       start = end
00588       end += 8
00589       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00590       start = end
00591       end += 4
00592       (length,) = _struct_I.unpack(str[start:end])
00593       start = end
00594       end += length
00595       if python3:
00596         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00597       else:
00598         self.action_goal.goal_id.id = str[start:end]
00599       _x = self
00600       start = end
00601       end += 12
00602       (_x.action_goal.goal.state.header.seq, _x.action_goal.goal.state.header.stamp.secs, _x.action_goal.goal.state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00603       start = end
00604       end += 4
00605       (length,) = _struct_I.unpack(str[start:end])
00606       start = end
00607       end += length
00608       if python3:
00609         self.action_goal.goal.state.header.frame_id = str[start:end].decode('utf-8')
00610       else:
00611         self.action_goal.goal.state.header.frame_id = str[start:end]
00612       start = end
00613       end += 2
00614       (self.action_goal.goal.state.number,) = _struct_h.unpack(str[start:end])
00615       start = end
00616       end += 4
00617       (length,) = _struct_I.unpack(str[start:end])
00618       start = end
00619       end += length
00620       if python3:
00621         self.action_goal.goal.state.function_name = str[start:end].decode('utf-8')
00622       else:
00623         self.action_goal.goal.state.function_name = str[start:end]
00624       start = end
00625       end += 4
00626       (length,) = _struct_I.unpack(str[start:end])
00627       start = end
00628       end += length
00629       if python3:
00630         self.action_goal.goal.state.component_name = str[start:end].decode('utf-8')
00631       else:
00632         self.action_goal.goal.state.component_name = str[start:end]
00633       start = end
00634       end += 4
00635       (length,) = _struct_I.unpack(str[start:end])
00636       start = end
00637       end += length
00638       if python3:
00639         self.action_goal.goal.state.parameter_name = str[start:end].decode('utf-8')
00640       else:
00641         self.action_goal.goal.state.parameter_name = str[start:end]
00642       start = end
00643       end += 4
00644       (length,) = _struct_I.unpack(str[start:end])
00645       start = end
00646       end += length
00647       if python3:
00648         self.action_goal.goal.state.full_graph_name = str[start:end].decode('utf-8')
00649       else:
00650         self.action_goal.goal.state.full_graph_name = str[start:end]
00651       _x = self
00652       start = end
00653       end += 15
00654       (_x.action_goal.goal.state.state, _x.action_goal.goal.state.error_code, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_bh3I.unpack(str[start:end])
00655       start = end
00656       end += 4
00657       (length,) = _struct_I.unpack(str[start:end])
00658       start = end
00659       end += length
00660       if python3:
00661         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00662       else:
00663         self.action_result.header.frame_id = str[start:end]
00664       _x = self
00665       start = end
00666       end += 8
00667       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00668       start = end
00669       end += 4
00670       (length,) = _struct_I.unpack(str[start:end])
00671       start = end
00672       end += length
00673       if python3:
00674         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00675       else:
00676         self.action_result.status.goal_id.id = str[start:end]
00677       start = end
00678       end += 1
00679       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00680       start = end
00681       end += 4
00682       (length,) = _struct_I.unpack(str[start:end])
00683       start = end
00684       end += length
00685       if python3:
00686         self.action_result.status.text = str[start:end].decode('utf-8')
00687       else:
00688         self.action_result.status.text = str[start:end]
00689       _x = self
00690       start = end
00691       end += 14
00692       (_x.action_result.result.return_value, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_h3I.unpack(str[start:end])
00693       start = end
00694       end += 4
00695       (length,) = _struct_I.unpack(str[start:end])
00696       start = end
00697       end += length
00698       if python3:
00699         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00700       else:
00701         self.action_feedback.header.frame_id = str[start:end]
00702       _x = self
00703       start = end
00704       end += 8
00705       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00706       start = end
00707       end += 4
00708       (length,) = _struct_I.unpack(str[start:end])
00709       start = end
00710       end += length
00711       if python3:
00712         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00713       else:
00714         self.action_feedback.status.goal_id.id = str[start:end]
00715       start = end
00716       end += 1
00717       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00718       start = end
00719       end += 4
00720       (length,) = _struct_I.unpack(str[start:end])
00721       start = end
00722       end += length
00723       if python3:
00724         self.action_feedback.status.text = str[start:end].decode('utf-8')
00725       else:
00726         self.action_feedback.status.text = str[start:end]
00727       return self
00728     except struct.error as e:
00729       raise genpy.DeserializationError(e) #most likely buffer underfill
00730 
00731 _struct_I = genpy.struct_I
00732 _struct_B = struct.Struct("<B")
00733 _struct_bh3I = struct.Struct("<bh3I")
00734 _struct_h = struct.Struct("<h")
00735 _struct_h3I = struct.Struct("<h3I")
00736 _struct_3I = struct.Struct("<3I")
00737 _struct_2I = struct.Struct("<2I")


cob_script_server
Author(s): Florian Weisshardt
autogenerated on Sun Oct 5 2014 22:59:42