00001 """autogenerated by genmsg_py from FibonacciAction.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import actionlib_tutorials.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class FibonacciAction(roslib.message.Message):
00011 _md5sum = "f59df5767bf7634684781c92598b2406"
00012 _type = "actionlib_tutorials/FibonacciAction"
00013 _has_header = False
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 FibonacciActionGoal action_goal
00017 FibonacciActionResult action_result
00018 FibonacciActionFeedback action_feedback
00019
00020 ================================================================================
00021 MSG: actionlib_tutorials/FibonacciActionGoal
00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00023
00024 Header header
00025 actionlib_msgs/GoalID goal_id
00026 FibonacciGoal goal
00027
00028 ================================================================================
00029 MSG: std_msgs/Header
00030 # Standard metadata for higher-level stamped data types.
00031 # This is generally used to communicate timestamped data
00032 # in a particular coordinate frame.
00033 #
00034 # sequence ID: consecutively increasing ID
00035 uint32 seq
00036 #Two-integer timestamp that is expressed as:
00037 # * stamp.secs: seconds (stamp_secs) since epoch
00038 # * stamp.nsecs: nanoseconds since stamp_secs
00039 # time-handling sugar is provided by the client library
00040 time stamp
00041 #Frame this data is associated with
00042 # 0: no frame
00043 # 1: global frame
00044 string frame_id
00045
00046 ================================================================================
00047 MSG: actionlib_msgs/GoalID
00048 # The stamp should store the time at which this goal was requested.
00049 # It is used by an action server when it tries to preempt all
00050 # goals that were requested before a certain time
00051 time stamp
00052
00053 # The id provides a way to associate feedback and
00054 # result message with specific goal requests. The id
00055 # specified must be unique.
00056 string id
00057
00058
00059 ================================================================================
00060 MSG: actionlib_tutorials/FibonacciGoal
00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00062 #goal definition
00063 int32 order
00064
00065 ================================================================================
00066 MSG: actionlib_tutorials/FibonacciActionResult
00067 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00068
00069 Header header
00070 actionlib_msgs/GoalStatus status
00071 FibonacciResult 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: actionlib_tutorials/FibonacciResult
00101 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00102 #result definition
00103 int32[] sequence
00104
00105 ================================================================================
00106 MSG: actionlib_tutorials/FibonacciActionFeedback
00107 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00108
00109 Header header
00110 actionlib_msgs/GoalStatus status
00111 FibonacciFeedback feedback
00112
00113 ================================================================================
00114 MSG: actionlib_tutorials/FibonacciFeedback
00115 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00116 #feedback
00117 int32[] sequence
00118
00119
00120
00121 """
00122 __slots__ = ['action_goal','action_result','action_feedback']
00123 _slot_types = ['actionlib_tutorials/FibonacciActionGoal','actionlib_tutorials/FibonacciActionResult','actionlib_tutorials/FibonacciActionFeedback']
00124
00125 def __init__(self, *args, **kwds):
00126 """
00127 Constructor. Any message fields that are implicitly/explicitly
00128 set to None will be assigned a default value. The recommend
00129 use is keyword arguments as this is more robust to future message
00130 changes. You cannot mix in-order arguments and keyword arguments.
00131
00132 The available fields are:
00133 action_goal,action_result,action_feedback
00134
00135 @param args: complete set of field values, in .msg order
00136 @param kwds: use keyword arguments corresponding to message field names
00137 to set specific fields.
00138 """
00139 if args or kwds:
00140 super(FibonacciAction, self).__init__(*args, **kwds)
00141
00142 if self.action_goal is None:
00143 self.action_goal = actionlib_tutorials.msg.FibonacciActionGoal()
00144 if self.action_result is None:
00145 self.action_result = actionlib_tutorials.msg.FibonacciActionResult()
00146 if self.action_feedback is None:
00147 self.action_feedback = actionlib_tutorials.msg.FibonacciActionFeedback()
00148 else:
00149 self.action_goal = actionlib_tutorials.msg.FibonacciActionGoal()
00150 self.action_result = actionlib_tutorials.msg.FibonacciActionResult()
00151 self.action_feedback = actionlib_tutorials.msg.FibonacciActionFeedback()
00152
00153 def _get_types(self):
00154 """
00155 internal API method
00156 """
00157 return self._slot_types
00158
00159 def serialize(self, buff):
00160 """
00161 serialize message into buffer
00162 @param buff: buffer
00163 @type buff: StringIO
00164 """
00165 try:
00166 _x = self
00167 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00168 _x = self.action_goal.header.frame_id
00169 length = len(_x)
00170 buff.write(struct.pack('<I%ss'%length, length, _x))
00171 _x = self
00172 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00173 _x = self.action_goal.goal_id.id
00174 length = len(_x)
00175 buff.write(struct.pack('<I%ss'%length, length, _x))
00176 _x = self
00177 buff.write(_struct_i3I.pack(_x.action_goal.goal.order, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00178 _x = self.action_result.header.frame_id
00179 length = len(_x)
00180 buff.write(struct.pack('<I%ss'%length, length, _x))
00181 _x = self
00182 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00183 _x = self.action_result.status.goal_id.id
00184 length = len(_x)
00185 buff.write(struct.pack('<I%ss'%length, length, _x))
00186 buff.write(_struct_B.pack(self.action_result.status.status))
00187 _x = self.action_result.status.text
00188 length = len(_x)
00189 buff.write(struct.pack('<I%ss'%length, length, _x))
00190 length = len(self.action_result.result.sequence)
00191 buff.write(_struct_I.pack(length))
00192 pattern = '<%si'%length
00193 buff.write(struct.pack(pattern, *self.action_result.result.sequence))
00194 _x = self
00195 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00196 _x = self.action_feedback.header.frame_id
00197 length = len(_x)
00198 buff.write(struct.pack('<I%ss'%length, length, _x))
00199 _x = self
00200 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00201 _x = self.action_feedback.status.goal_id.id
00202 length = len(_x)
00203 buff.write(struct.pack('<I%ss'%length, length, _x))
00204 buff.write(_struct_B.pack(self.action_feedback.status.status))
00205 _x = self.action_feedback.status.text
00206 length = len(_x)
00207 buff.write(struct.pack('<I%ss'%length, length, _x))
00208 length = len(self.action_feedback.feedback.sequence)
00209 buff.write(_struct_I.pack(length))
00210 pattern = '<%si'%length
00211 buff.write(struct.pack(pattern, *self.action_feedback.feedback.sequence))
00212 except struct.error, se: self._check_types(se)
00213 except TypeError, te: self._check_types(te)
00214
00215 def deserialize(self, str):
00216 """
00217 unpack serialized message in str into this message instance
00218 @param str: byte array of serialized message
00219 @type str: str
00220 """
00221 try:
00222 if self.action_goal is None:
00223 self.action_goal = actionlib_tutorials.msg.FibonacciActionGoal()
00224 if self.action_result is None:
00225 self.action_result = actionlib_tutorials.msg.FibonacciActionResult()
00226 if self.action_feedback is None:
00227 self.action_feedback = actionlib_tutorials.msg.FibonacciActionFeedback()
00228 end = 0
00229 _x = self
00230 start = end
00231 end += 12
00232 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00233 start = end
00234 end += 4
00235 (length,) = _struct_I.unpack(str[start:end])
00236 start = end
00237 end += length
00238 self.action_goal.header.frame_id = str[start:end]
00239 _x = self
00240 start = end
00241 end += 8
00242 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00243 start = end
00244 end += 4
00245 (length,) = _struct_I.unpack(str[start:end])
00246 start = end
00247 end += length
00248 self.action_goal.goal_id.id = str[start:end]
00249 _x = self
00250 start = end
00251 end += 16
00252 (_x.action_goal.goal.order, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00253 start = end
00254 end += 4
00255 (length,) = _struct_I.unpack(str[start:end])
00256 start = end
00257 end += length
00258 self.action_result.header.frame_id = str[start:end]
00259 _x = self
00260 start = end
00261 end += 8
00262 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00263 start = end
00264 end += 4
00265 (length,) = _struct_I.unpack(str[start:end])
00266 start = end
00267 end += length
00268 self.action_result.status.goal_id.id = str[start:end]
00269 start = end
00270 end += 1
00271 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00272 start = end
00273 end += 4
00274 (length,) = _struct_I.unpack(str[start:end])
00275 start = end
00276 end += length
00277 self.action_result.status.text = str[start:end]
00278 start = end
00279 end += 4
00280 (length,) = _struct_I.unpack(str[start:end])
00281 pattern = '<%si'%length
00282 start = end
00283 end += struct.calcsize(pattern)
00284 self.action_result.result.sequence = struct.unpack(pattern, str[start:end])
00285 _x = self
00286 start = end
00287 end += 12
00288 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00289 start = end
00290 end += 4
00291 (length,) = _struct_I.unpack(str[start:end])
00292 start = end
00293 end += length
00294 self.action_feedback.header.frame_id = str[start:end]
00295 _x = self
00296 start = end
00297 end += 8
00298 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.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 self.action_feedback.status.goal_id.id = str[start:end]
00305 start = end
00306 end += 1
00307 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00308 start = end
00309 end += 4
00310 (length,) = _struct_I.unpack(str[start:end])
00311 start = end
00312 end += length
00313 self.action_feedback.status.text = str[start:end]
00314 start = end
00315 end += 4
00316 (length,) = _struct_I.unpack(str[start:end])
00317 pattern = '<%si'%length
00318 start = end
00319 end += struct.calcsize(pattern)
00320 self.action_feedback.feedback.sequence = struct.unpack(pattern, str[start:end])
00321 return self
00322 except struct.error, e:
00323 raise roslib.message.DeserializationError(e)
00324
00325
00326 def serialize_numpy(self, buff, numpy):
00327 """
00328 serialize message with numpy array types into buffer
00329 @param buff: buffer
00330 @type buff: StringIO
00331 @param numpy: numpy python module
00332 @type numpy module
00333 """
00334 try:
00335 _x = self
00336 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00337 _x = self.action_goal.header.frame_id
00338 length = len(_x)
00339 buff.write(struct.pack('<I%ss'%length, length, _x))
00340 _x = self
00341 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00342 _x = self.action_goal.goal_id.id
00343 length = len(_x)
00344 buff.write(struct.pack('<I%ss'%length, length, _x))
00345 _x = self
00346 buff.write(_struct_i3I.pack(_x.action_goal.goal.order, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00347 _x = self.action_result.header.frame_id
00348 length = len(_x)
00349 buff.write(struct.pack('<I%ss'%length, length, _x))
00350 _x = self
00351 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00352 _x = self.action_result.status.goal_id.id
00353 length = len(_x)
00354 buff.write(struct.pack('<I%ss'%length, length, _x))
00355 buff.write(_struct_B.pack(self.action_result.status.status))
00356 _x = self.action_result.status.text
00357 length = len(_x)
00358 buff.write(struct.pack('<I%ss'%length, length, _x))
00359 length = len(self.action_result.result.sequence)
00360 buff.write(_struct_I.pack(length))
00361 pattern = '<%si'%length
00362 buff.write(self.action_result.result.sequence.tostring())
00363 _x = self
00364 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00365 _x = self.action_feedback.header.frame_id
00366 length = len(_x)
00367 buff.write(struct.pack('<I%ss'%length, length, _x))
00368 _x = self
00369 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00370 _x = self.action_feedback.status.goal_id.id
00371 length = len(_x)
00372 buff.write(struct.pack('<I%ss'%length, length, _x))
00373 buff.write(_struct_B.pack(self.action_feedback.status.status))
00374 _x = self.action_feedback.status.text
00375 length = len(_x)
00376 buff.write(struct.pack('<I%ss'%length, length, _x))
00377 length = len(self.action_feedback.feedback.sequence)
00378 buff.write(_struct_I.pack(length))
00379 pattern = '<%si'%length
00380 buff.write(self.action_feedback.feedback.sequence.tostring())
00381 except struct.error, se: self._check_types(se)
00382 except TypeError, te: self._check_types(te)
00383
00384 def deserialize_numpy(self, str, numpy):
00385 """
00386 unpack serialized message in str into this message instance using numpy for array types
00387 @param str: byte array of serialized message
00388 @type str: str
00389 @param numpy: numpy python module
00390 @type numpy: module
00391 """
00392 try:
00393 if self.action_goal is None:
00394 self.action_goal = actionlib_tutorials.msg.FibonacciActionGoal()
00395 if self.action_result is None:
00396 self.action_result = actionlib_tutorials.msg.FibonacciActionResult()
00397 if self.action_feedback is None:
00398 self.action_feedback = actionlib_tutorials.msg.FibonacciActionFeedback()
00399 end = 0
00400 _x = self
00401 start = end
00402 end += 12
00403 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00404 start = end
00405 end += 4
00406 (length,) = _struct_I.unpack(str[start:end])
00407 start = end
00408 end += length
00409 self.action_goal.header.frame_id = str[start:end]
00410 _x = self
00411 start = end
00412 end += 8
00413 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00414 start = end
00415 end += 4
00416 (length,) = _struct_I.unpack(str[start:end])
00417 start = end
00418 end += length
00419 self.action_goal.goal_id.id = str[start:end]
00420 _x = self
00421 start = end
00422 end += 16
00423 (_x.action_goal.goal.order, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00424 start = end
00425 end += 4
00426 (length,) = _struct_I.unpack(str[start:end])
00427 start = end
00428 end += length
00429 self.action_result.header.frame_id = str[start:end]
00430 _x = self
00431 start = end
00432 end += 8
00433 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.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 self.action_result.status.goal_id.id = str[start:end]
00440 start = end
00441 end += 1
00442 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00443 start = end
00444 end += 4
00445 (length,) = _struct_I.unpack(str[start:end])
00446 start = end
00447 end += length
00448 self.action_result.status.text = str[start:end]
00449 start = end
00450 end += 4
00451 (length,) = _struct_I.unpack(str[start:end])
00452 pattern = '<%si'%length
00453 start = end
00454 end += struct.calcsize(pattern)
00455 self.action_result.result.sequence = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00456 _x = self
00457 start = end
00458 end += 12
00459 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.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 self.action_feedback.header.frame_id = str[start:end]
00466 _x = self
00467 start = end
00468 end += 8
00469 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00470 start = end
00471 end += 4
00472 (length,) = _struct_I.unpack(str[start:end])
00473 start = end
00474 end += length
00475 self.action_feedback.status.goal_id.id = str[start:end]
00476 start = end
00477 end += 1
00478 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00479 start = end
00480 end += 4
00481 (length,) = _struct_I.unpack(str[start:end])
00482 start = end
00483 end += length
00484 self.action_feedback.status.text = str[start:end]
00485 start = end
00486 end += 4
00487 (length,) = _struct_I.unpack(str[start:end])
00488 pattern = '<%si'%length
00489 start = end
00490 end += struct.calcsize(pattern)
00491 self.action_feedback.feedback.sequence = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00492 return self
00493 except struct.error, e:
00494 raise roslib.message.DeserializationError(e)
00495
00496 _struct_I = roslib.message.struct_I
00497 _struct_3I = struct.Struct("<3I")
00498 _struct_B = struct.Struct("<B")
00499 _struct_2I = struct.Struct("<2I")
00500 _struct_i3I = struct.Struct("<i3I")