_SayAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cob_sound/SayAction.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 cob_sound.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011 
00012 class SayAction(genpy.Message):
00013   _md5sum = "831241a2715cf9dd9da50b7c065ff283"
00014   _type = "cob_sound/SayAction"
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 SayActionGoal action_goal
00019 SayActionResult action_result
00020 SayActionFeedback action_feedback
00021 
00022 ================================================================================
00023 MSG: cob_sound/SayActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025 
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 SayGoal 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_sound/SayGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 # goal
00065 std_msgs/String text
00066 
00067 ================================================================================
00068 MSG: std_msgs/String
00069 string data
00070 
00071 ================================================================================
00072 MSG: cob_sound/SayActionResult
00073 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00074 
00075 Header header
00076 actionlib_msgs/GoalStatus status
00077 SayResult result
00078 
00079 ================================================================================
00080 MSG: actionlib_msgs/GoalStatus
00081 GoalID goal_id
00082 uint8 status
00083 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00084 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00085 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00086                             #   and has since completed its execution (Terminal State)
00087 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00088 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00089                             #    to some failure (Terminal State)
00090 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00091                             #    because the goal was unattainable or invalid (Terminal State)
00092 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00093                             #    and has not yet completed execution
00094 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00095                             #    but the action server has not yet confirmed that the goal is canceled
00096 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00097                             #    and was successfully cancelled (Terminal State)
00098 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00099                             #    sent over the wire by an action server
00100 
00101 #Allow for the user to associate a string with GoalStatus for debugging
00102 string text
00103 
00104 
00105 ================================================================================
00106 MSG: cob_sound/SayResult
00107 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00108 #result
00109 
00110 ================================================================================
00111 MSG: cob_sound/SayActionFeedback
00112 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00113 
00114 Header header
00115 actionlib_msgs/GoalStatus status
00116 SayFeedback feedback
00117 
00118 ================================================================================
00119 MSG: cob_sound/SayFeedback
00120 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00121 #feedback
00122 
00123 
00124 """
00125   __slots__ = ['action_goal','action_result','action_feedback']
00126   _slot_types = ['cob_sound/SayActionGoal','cob_sound/SayActionResult','cob_sound/SayActionFeedback']
00127 
00128   def __init__(self, *args, **kwds):
00129     """
00130     Constructor. Any message fields that are implicitly/explicitly
00131     set to None will be assigned a default value. The recommend
00132     use is keyword arguments as this is more robust to future message
00133     changes.  You cannot mix in-order arguments and keyword arguments.
00134 
00135     The available fields are:
00136        action_goal,action_result,action_feedback
00137 
00138     :param args: complete set of field values, in .msg order
00139     :param kwds: use keyword arguments corresponding to message field names
00140     to set specific fields.
00141     """
00142     if args or kwds:
00143       super(SayAction, self).__init__(*args, **kwds)
00144       #message fields cannot be None, assign default values for those that are
00145       if self.action_goal is None:
00146         self.action_goal = cob_sound.msg.SayActionGoal()
00147       if self.action_result is None:
00148         self.action_result = cob_sound.msg.SayActionResult()
00149       if self.action_feedback is None:
00150         self.action_feedback = cob_sound.msg.SayActionFeedback()
00151     else:
00152       self.action_goal = cob_sound.msg.SayActionGoal()
00153       self.action_result = cob_sound.msg.SayActionResult()
00154       self.action_feedback = cob_sound.msg.SayActionFeedback()
00155 
00156   def _get_types(self):
00157     """
00158     internal API method
00159     """
00160     return self._slot_types
00161 
00162   def serialize(self, buff):
00163     """
00164     serialize message into buffer
00165     :param buff: buffer, ``StringIO``
00166     """
00167     try:
00168       _x = self
00169       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00170       _x = self.action_goal.header.frame_id
00171       length = len(_x)
00172       if python3 or type(_x) == unicode:
00173         _x = _x.encode('utf-8')
00174         length = len(_x)
00175       buff.write(struct.pack('<I%ss'%length, length, _x))
00176       _x = self
00177       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00178       _x = self.action_goal.goal_id.id
00179       length = len(_x)
00180       if python3 or type(_x) == unicode:
00181         _x = _x.encode('utf-8')
00182         length = len(_x)
00183       buff.write(struct.pack('<I%ss'%length, length, _x))
00184       _x = self.action_goal.goal.text.data
00185       length = len(_x)
00186       if python3 or type(_x) == unicode:
00187         _x = _x.encode('utf-8')
00188         length = len(_x)
00189       buff.write(struct.pack('<I%ss'%length, length, _x))
00190       _x = self
00191       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00192       _x = self.action_result.header.frame_id
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_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00200       _x = self.action_result.status.goal_id.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       buff.write(_struct_B.pack(self.action_result.status.status))
00207       _x = self.action_result.status.text
00208       length = len(_x)
00209       if python3 or type(_x) == unicode:
00210         _x = _x.encode('utf-8')
00211         length = len(_x)
00212       buff.write(struct.pack('<I%ss'%length, length, _x))
00213       _x = self
00214       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00215       _x = self.action_feedback.header.frame_id
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
00222       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00223       _x = self.action_feedback.status.goal_id.id
00224       length = len(_x)
00225       if python3 or type(_x) == unicode:
00226         _x = _x.encode('utf-8')
00227         length = len(_x)
00228       buff.write(struct.pack('<I%ss'%length, length, _x))
00229       buff.write(_struct_B.pack(self.action_feedback.status.status))
00230       _x = self.action_feedback.status.text
00231       length = len(_x)
00232       if python3 or type(_x) == unicode:
00233         _x = _x.encode('utf-8')
00234         length = len(_x)
00235       buff.write(struct.pack('<I%ss'%length, length, _x))
00236     except struct.error as se: self._check_types(se)
00237     except TypeError as te: self._check_types(te)
00238 
00239   def deserialize(self, str):
00240     """
00241     unpack serialized message in str into this message instance
00242     :param str: byte array of serialized message, ``str``
00243     """
00244     try:
00245       if self.action_goal is None:
00246         self.action_goal = cob_sound.msg.SayActionGoal()
00247       if self.action_result is None:
00248         self.action_result = cob_sound.msg.SayActionResult()
00249       if self.action_feedback is None:
00250         self.action_feedback = cob_sound.msg.SayActionFeedback()
00251       end = 0
00252       _x = self
00253       start = end
00254       end += 12
00255       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00256       start = end
00257       end += 4
00258       (length,) = _struct_I.unpack(str[start:end])
00259       start = end
00260       end += length
00261       if python3:
00262         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00263       else:
00264         self.action_goal.header.frame_id = str[start:end]
00265       _x = self
00266       start = end
00267       end += 8
00268       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00269       start = end
00270       end += 4
00271       (length,) = _struct_I.unpack(str[start:end])
00272       start = end
00273       end += length
00274       if python3:
00275         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00276       else:
00277         self.action_goal.goal_id.id = str[start:end]
00278       start = end
00279       end += 4
00280       (length,) = _struct_I.unpack(str[start:end])
00281       start = end
00282       end += length
00283       if python3:
00284         self.action_goal.goal.text.data = str[start:end].decode('utf-8')
00285       else:
00286         self.action_goal.goal.text.data = str[start:end]
00287       _x = self
00288       start = end
00289       end += 12
00290       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00291       start = end
00292       end += 4
00293       (length,) = _struct_I.unpack(str[start:end])
00294       start = end
00295       end += length
00296       if python3:
00297         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00298       else:
00299         self.action_result.header.frame_id = str[start:end]
00300       _x = self
00301       start = end
00302       end += 8
00303       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00304       start = end
00305       end += 4
00306       (length,) = _struct_I.unpack(str[start:end])
00307       start = end
00308       end += length
00309       if python3:
00310         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00311       else:
00312         self.action_result.status.goal_id.id = str[start:end]
00313       start = end
00314       end += 1
00315       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00316       start = end
00317       end += 4
00318       (length,) = _struct_I.unpack(str[start:end])
00319       start = end
00320       end += length
00321       if python3:
00322         self.action_result.status.text = str[start:end].decode('utf-8')
00323       else:
00324         self.action_result.status.text = str[start:end]
00325       _x = self
00326       start = end
00327       end += 12
00328       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00329       start = end
00330       end += 4
00331       (length,) = _struct_I.unpack(str[start:end])
00332       start = end
00333       end += length
00334       if python3:
00335         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00336       else:
00337         self.action_feedback.header.frame_id = str[start:end]
00338       _x = self
00339       start = end
00340       end += 8
00341       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00342       start = end
00343       end += 4
00344       (length,) = _struct_I.unpack(str[start:end])
00345       start = end
00346       end += length
00347       if python3:
00348         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00349       else:
00350         self.action_feedback.status.goal_id.id = str[start:end]
00351       start = end
00352       end += 1
00353       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00354       start = end
00355       end += 4
00356       (length,) = _struct_I.unpack(str[start:end])
00357       start = end
00358       end += length
00359       if python3:
00360         self.action_feedback.status.text = str[start:end].decode('utf-8')
00361       else:
00362         self.action_feedback.status.text = str[start:end]
00363       return self
00364     except struct.error as e:
00365       raise genpy.DeserializationError(e) #most likely buffer underfill
00366 
00367 
00368   def serialize_numpy(self, buff, numpy):
00369     """
00370     serialize message with numpy array types into buffer
00371     :param buff: buffer, ``StringIO``
00372     :param numpy: numpy python module
00373     """
00374     try:
00375       _x = self
00376       buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00377       _x = self.action_goal.header.frame_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       _x = self
00384       buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00385       _x = self.action_goal.goal_id.id
00386       length = len(_x)
00387       if python3 or type(_x) == unicode:
00388         _x = _x.encode('utf-8')
00389         length = len(_x)
00390       buff.write(struct.pack('<I%ss'%length, length, _x))
00391       _x = self.action_goal.goal.text.data
00392       length = len(_x)
00393       if python3 or type(_x) == unicode:
00394         _x = _x.encode('utf-8')
00395         length = len(_x)
00396       buff.write(struct.pack('<I%ss'%length, length, _x))
00397       _x = self
00398       buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00399       _x = self.action_result.header.frame_id
00400       length = len(_x)
00401       if python3 or type(_x) == unicode:
00402         _x = _x.encode('utf-8')
00403         length = len(_x)
00404       buff.write(struct.pack('<I%ss'%length, length, _x))
00405       _x = self
00406       buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00407       _x = self.action_result.status.goal_id.id
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       buff.write(_struct_B.pack(self.action_result.status.status))
00414       _x = self.action_result.status.text
00415       length = len(_x)
00416       if python3 or type(_x) == unicode:
00417         _x = _x.encode('utf-8')
00418         length = len(_x)
00419       buff.write(struct.pack('<I%ss'%length, length, _x))
00420       _x = self
00421       buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00422       _x = self.action_feedback.header.frame_id
00423       length = len(_x)
00424       if python3 or type(_x) == unicode:
00425         _x = _x.encode('utf-8')
00426         length = len(_x)
00427       buff.write(struct.pack('<I%ss'%length, length, _x))
00428       _x = self
00429       buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00430       _x = self.action_feedback.status.goal_id.id
00431       length = len(_x)
00432       if python3 or type(_x) == unicode:
00433         _x = _x.encode('utf-8')
00434         length = len(_x)
00435       buff.write(struct.pack('<I%ss'%length, length, _x))
00436       buff.write(_struct_B.pack(self.action_feedback.status.status))
00437       _x = self.action_feedback.status.text
00438       length = len(_x)
00439       if python3 or type(_x) == unicode:
00440         _x = _x.encode('utf-8')
00441         length = len(_x)
00442       buff.write(struct.pack('<I%ss'%length, length, _x))
00443     except struct.error as se: self._check_types(se)
00444     except TypeError as te: self._check_types(te)
00445 
00446   def deserialize_numpy(self, str, numpy):
00447     """
00448     unpack serialized message in str into this message instance using numpy for array types
00449     :param str: byte array of serialized message, ``str``
00450     :param numpy: numpy python module
00451     """
00452     try:
00453       if self.action_goal is None:
00454         self.action_goal = cob_sound.msg.SayActionGoal()
00455       if self.action_result is None:
00456         self.action_result = cob_sound.msg.SayActionResult()
00457       if self.action_feedback is None:
00458         self.action_feedback = cob_sound.msg.SayActionFeedback()
00459       end = 0
00460       _x = self
00461       start = end
00462       end += 12
00463       (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00464       start = end
00465       end += 4
00466       (length,) = _struct_I.unpack(str[start:end])
00467       start = end
00468       end += length
00469       if python3:
00470         self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00471       else:
00472         self.action_goal.header.frame_id = str[start:end]
00473       _x = self
00474       start = end
00475       end += 8
00476       (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00477       start = end
00478       end += 4
00479       (length,) = _struct_I.unpack(str[start:end])
00480       start = end
00481       end += length
00482       if python3:
00483         self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00484       else:
00485         self.action_goal.goal_id.id = str[start:end]
00486       start = end
00487       end += 4
00488       (length,) = _struct_I.unpack(str[start:end])
00489       start = end
00490       end += length
00491       if python3:
00492         self.action_goal.goal.text.data = str[start:end].decode('utf-8')
00493       else:
00494         self.action_goal.goal.text.data = str[start:end]
00495       _x = self
00496       start = end
00497       end += 12
00498       (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00499       start = end
00500       end += 4
00501       (length,) = _struct_I.unpack(str[start:end])
00502       start = end
00503       end += length
00504       if python3:
00505         self.action_result.header.frame_id = str[start:end].decode('utf-8')
00506       else:
00507         self.action_result.header.frame_id = str[start:end]
00508       _x = self
00509       start = end
00510       end += 8
00511       (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00512       start = end
00513       end += 4
00514       (length,) = _struct_I.unpack(str[start:end])
00515       start = end
00516       end += length
00517       if python3:
00518         self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00519       else:
00520         self.action_result.status.goal_id.id = str[start:end]
00521       start = end
00522       end += 1
00523       (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00524       start = end
00525       end += 4
00526       (length,) = _struct_I.unpack(str[start:end])
00527       start = end
00528       end += length
00529       if python3:
00530         self.action_result.status.text = str[start:end].decode('utf-8')
00531       else:
00532         self.action_result.status.text = str[start:end]
00533       _x = self
00534       start = end
00535       end += 12
00536       (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00537       start = end
00538       end += 4
00539       (length,) = _struct_I.unpack(str[start:end])
00540       start = end
00541       end += length
00542       if python3:
00543         self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00544       else:
00545         self.action_feedback.header.frame_id = str[start:end]
00546       _x = self
00547       start = end
00548       end += 8
00549       (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00550       start = end
00551       end += 4
00552       (length,) = _struct_I.unpack(str[start:end])
00553       start = end
00554       end += length
00555       if python3:
00556         self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00557       else:
00558         self.action_feedback.status.goal_id.id = str[start:end]
00559       start = end
00560       end += 1
00561       (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00562       start = end
00563       end += 4
00564       (length,) = _struct_I.unpack(str[start:end])
00565       start = end
00566       end += length
00567       if python3:
00568         self.action_feedback.status.text = str[start:end].decode('utf-8')
00569       else:
00570         self.action_feedback.status.text = str[start:end]
00571       return self
00572     except struct.error as e:
00573       raise genpy.DeserializationError(e) #most likely buffer underfill
00574 
00575 _struct_I = genpy.struct_I
00576 _struct_3I = struct.Struct("<3I")
00577 _struct_B = struct.Struct("<B")
00578 _struct_2I = struct.Struct("<2I")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


cob_sound
Author(s): Florian Weisshardt
autogenerated on Fri Mar 1 2013 17:46:58