00001 """autogenerated by genmsg_py from TestRequestAction.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import actionlib_msgs.msg
00006 import roslib.rostime
00007 import actionlib.msg
00008 import std_msgs.msg
00009
00010 class TestRequestAction(roslib.message.Message):
00011 _md5sum = "dc44b1f4045dbf0d1db54423b3b86b30"
00012 _type = "actionlib/TestRequestAction"
00013 _has_header = False
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 TestRequestActionGoal action_goal
00017 TestRequestActionResult action_result
00018 TestRequestActionFeedback action_feedback
00019
00020 ================================================================================
00021 MSG: actionlib/TestRequestActionGoal
00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00023
00024 Header header
00025 actionlib_msgs/GoalID goal_id
00026 TestRequestGoal 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/TestRequestGoal
00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00062 int32 TERMINATE_SUCCESS = 0
00063 int32 TERMINATE_ABORTED = 1
00064 int32 TERMINATE_REJECTED = 2
00065 int32 TERMINATE_LOSE = 3
00066 int32 TERMINATE_DROP = 4
00067 int32 TERMINATE_EXCEPTION = 5
00068 int32 terminate_status
00069 bool ignore_cancel # If true, ignores requests to cancel
00070 string result_text
00071 int32 the_result # Desired value for the_result in the Result
00072 bool is_simple_client
00073 duration delay_accept # Delays accepting the goal by this amount of time
00074 duration delay_terminate # Delays terminating for this amount of time
00075 duration pause_status # Pauses the status messages for this amount of time
00076
00077 ================================================================================
00078 MSG: actionlib/TestRequestActionResult
00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00080
00081 Header header
00082 actionlib_msgs/GoalStatus status
00083 TestRequestResult result
00084
00085 ================================================================================
00086 MSG: actionlib_msgs/GoalStatus
00087 GoalID goal_id
00088 uint8 status
00089 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00090 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00091 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00092 # and has since completed its execution (Terminal State)
00093 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00094 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00095 # to some failure (Terminal State)
00096 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00097 # because the goal was unattainable or invalid (Terminal State)
00098 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00099 # and has not yet completed execution
00100 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00101 # but the action server has not yet confirmed that the goal is canceled
00102 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00103 # and was successfully cancelled (Terminal State)
00104 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00105 # sent over the wire by an action server
00106
00107 #Allow for the user to associate a string with GoalStatus for debugging
00108 string text
00109
00110
00111 ================================================================================
00112 MSG: actionlib/TestRequestResult
00113 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00114 int32 the_result
00115 bool is_simple_server
00116
00117 ================================================================================
00118 MSG: actionlib/TestRequestActionFeedback
00119 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00120
00121 Header header
00122 actionlib_msgs/GoalStatus status
00123 TestRequestFeedback feedback
00124
00125 ================================================================================
00126 MSG: actionlib/TestRequestFeedback
00127 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00128
00129
00130 """
00131 __slots__ = ['action_goal','action_result','action_feedback']
00132 _slot_types = ['actionlib/TestRequestActionGoal','actionlib/TestRequestActionResult','actionlib/TestRequestActionFeedback']
00133
00134 def __init__(self, *args, **kwds):
00135 """
00136 Constructor. Any message fields that are implicitly/explicitly
00137 set to None will be assigned a default value. The recommend
00138 use is keyword arguments as this is more robust to future message
00139 changes. You cannot mix in-order arguments and keyword arguments.
00140
00141 The available fields are:
00142 action_goal,action_result,action_feedback
00143
00144 @param args: complete set of field values, in .msg order
00145 @param kwds: use keyword arguments corresponding to message field names
00146 to set specific fields.
00147 """
00148 if args or kwds:
00149 super(TestRequestAction, self).__init__(*args, **kwds)
00150
00151 if self.action_goal is None:
00152 self.action_goal = actionlib.msg.TestRequestActionGoal()
00153 if self.action_result is None:
00154 self.action_result = actionlib.msg.TestRequestActionResult()
00155 if self.action_feedback is None:
00156 self.action_feedback = actionlib.msg.TestRequestActionFeedback()
00157 else:
00158 self.action_goal = actionlib.msg.TestRequestActionGoal()
00159 self.action_result = actionlib.msg.TestRequestActionResult()
00160 self.action_feedback = actionlib.msg.TestRequestActionFeedback()
00161
00162 def _get_types(self):
00163 """
00164 internal API method
00165 """
00166 return self._slot_types
00167
00168 def serialize(self, buff):
00169 """
00170 serialize message into buffer
00171 @param buff: buffer
00172 @type buff: StringIO
00173 """
00174 try:
00175 _x = self
00176 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00177 _x = self.action_goal.header.frame_id
00178 length = len(_x)
00179 buff.write(struct.pack('<I%ss'%length, length, _x))
00180 _x = self
00181 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00182 _x = self.action_goal.goal_id.id
00183 length = len(_x)
00184 buff.write(struct.pack('<I%ss'%length, length, _x))
00185 _x = self
00186 buff.write(_struct_iB.pack(_x.action_goal.goal.terminate_status, _x.action_goal.goal.ignore_cancel))
00187 _x = self.action_goal.goal.result_text
00188 length = len(_x)
00189 buff.write(struct.pack('<I%ss'%length, length, _x))
00190 _x = self
00191 buff.write(_struct_iB6i3I.pack(_x.action_goal.goal.the_result, _x.action_goal.goal.is_simple_client, _x.action_goal.goal.delay_accept.secs, _x.action_goal.goal.delay_accept.nsecs, _x.action_goal.goal.delay_terminate.secs, _x.action_goal.goal.delay_terminate.nsecs, _x.action_goal.goal.pause_status.secs, _x.action_goal.goal.pause_status.nsecs, _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 buff.write(struct.pack('<I%ss'%length, length, _x))
00195 _x = self
00196 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00197 _x = self.action_result.status.goal_id.id
00198 length = len(_x)
00199 buff.write(struct.pack('<I%ss'%length, length, _x))
00200 buff.write(_struct_B.pack(self.action_result.status.status))
00201 _x = self.action_result.status.text
00202 length = len(_x)
00203 buff.write(struct.pack('<I%ss'%length, length, _x))
00204 _x = self
00205 buff.write(_struct_iB3I.pack(_x.action_result.result.the_result, _x.action_result.result.is_simple_server, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00206 _x = self.action_feedback.header.frame_id
00207 length = len(_x)
00208 buff.write(struct.pack('<I%ss'%length, length, _x))
00209 _x = self
00210 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00211 _x = self.action_feedback.status.goal_id.id
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 buff.write(struct.pack('<I%ss'%length, length, _x))
00218 except struct.error, se: self._check_types(se)
00219 except TypeError, te: self._check_types(te)
00220
00221 def deserialize(self, str):
00222 """
00223 unpack serialized message in str into this message instance
00224 @param str: byte array of serialized message
00225 @type str: str
00226 """
00227 try:
00228 if self.action_goal is None:
00229 self.action_goal = actionlib.msg.TestRequestActionGoal()
00230 if self.action_result is None:
00231 self.action_result = actionlib.msg.TestRequestActionResult()
00232 if self.action_feedback is None:
00233 self.action_feedback = actionlib.msg.TestRequestActionFeedback()
00234 end = 0
00235 _x = self
00236 start = end
00237 end += 12
00238 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00239 start = end
00240 end += 4
00241 (length,) = _struct_I.unpack(str[start:end])
00242 start = end
00243 end += length
00244 self.action_goal.header.frame_id = str[start:end]
00245 _x = self
00246 start = end
00247 end += 8
00248 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00249 start = end
00250 end += 4
00251 (length,) = _struct_I.unpack(str[start:end])
00252 start = end
00253 end += length
00254 self.action_goal.goal_id.id = str[start:end]
00255 _x = self
00256 start = end
00257 end += 5
00258 (_x.action_goal.goal.terminate_status, _x.action_goal.goal.ignore_cancel,) = _struct_iB.unpack(str[start:end])
00259 self.action_goal.goal.ignore_cancel = bool(self.action_goal.goal.ignore_cancel)
00260 start = end
00261 end += 4
00262 (length,) = _struct_I.unpack(str[start:end])
00263 start = end
00264 end += length
00265 self.action_goal.goal.result_text = str[start:end]
00266 _x = self
00267 start = end
00268 end += 41
00269 (_x.action_goal.goal.the_result, _x.action_goal.goal.is_simple_client, _x.action_goal.goal.delay_accept.secs, _x.action_goal.goal.delay_accept.nsecs, _x.action_goal.goal.delay_terminate.secs, _x.action_goal.goal.delay_terminate.nsecs, _x.action_goal.goal.pause_status.secs, _x.action_goal.goal.pause_status.nsecs, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_iB6i3I.unpack(str[start:end])
00270 self.action_goal.goal.is_simple_client = bool(self.action_goal.goal.is_simple_client)
00271 start = end
00272 end += 4
00273 (length,) = _struct_I.unpack(str[start:end])
00274 start = end
00275 end += length
00276 self.action_result.header.frame_id = str[start:end]
00277 _x = self
00278 start = end
00279 end += 8
00280 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00281 start = end
00282 end += 4
00283 (length,) = _struct_I.unpack(str[start:end])
00284 start = end
00285 end += length
00286 self.action_result.status.goal_id.id = str[start:end]
00287 start = end
00288 end += 1
00289 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00290 start = end
00291 end += 4
00292 (length,) = _struct_I.unpack(str[start:end])
00293 start = end
00294 end += length
00295 self.action_result.status.text = str[start:end]
00296 _x = self
00297 start = end
00298 end += 17
00299 (_x.action_result.result.the_result, _x.action_result.result.is_simple_server, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_iB3I.unpack(str[start:end])
00300 self.action_result.result.is_simple_server = bool(self.action_result.result.is_simple_server)
00301 start = end
00302 end += 4
00303 (length,) = _struct_I.unpack(str[start:end])
00304 start = end
00305 end += length
00306 self.action_feedback.header.frame_id = str[start:end]
00307 _x = self
00308 start = end
00309 end += 8
00310 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00311 start = end
00312 end += 4
00313 (length,) = _struct_I.unpack(str[start:end])
00314 start = end
00315 end += length
00316 self.action_feedback.status.goal_id.id = str[start:end]
00317 start = end
00318 end += 1
00319 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00320 start = end
00321 end += 4
00322 (length,) = _struct_I.unpack(str[start:end])
00323 start = end
00324 end += length
00325 self.action_feedback.status.text = str[start:end]
00326 return self
00327 except struct.error, e:
00328 raise roslib.message.DeserializationError(e)
00329
00330
00331 def serialize_numpy(self, buff, numpy):
00332 """
00333 serialize message with numpy array types into buffer
00334 @param buff: buffer
00335 @type buff: StringIO
00336 @param numpy: numpy python module
00337 @type numpy module
00338 """
00339 try:
00340 _x = self
00341 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00342 _x = self.action_goal.header.frame_id
00343 length = len(_x)
00344 buff.write(struct.pack('<I%ss'%length, length, _x))
00345 _x = self
00346 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00347 _x = self.action_goal.goal_id.id
00348 length = len(_x)
00349 buff.write(struct.pack('<I%ss'%length, length, _x))
00350 _x = self
00351 buff.write(_struct_iB.pack(_x.action_goal.goal.terminate_status, _x.action_goal.goal.ignore_cancel))
00352 _x = self.action_goal.goal.result_text
00353 length = len(_x)
00354 buff.write(struct.pack('<I%ss'%length, length, _x))
00355 _x = self
00356 buff.write(_struct_iB6i3I.pack(_x.action_goal.goal.the_result, _x.action_goal.goal.is_simple_client, _x.action_goal.goal.delay_accept.secs, _x.action_goal.goal.delay_accept.nsecs, _x.action_goal.goal.delay_terminate.secs, _x.action_goal.goal.delay_terminate.nsecs, _x.action_goal.goal.pause_status.secs, _x.action_goal.goal.pause_status.nsecs, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00357 _x = self.action_result.header.frame_id
00358 length = len(_x)
00359 buff.write(struct.pack('<I%ss'%length, length, _x))
00360 _x = self
00361 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00362 _x = self.action_result.status.goal_id.id
00363 length = len(_x)
00364 buff.write(struct.pack('<I%ss'%length, length, _x))
00365 buff.write(_struct_B.pack(self.action_result.status.status))
00366 _x = self.action_result.status.text
00367 length = len(_x)
00368 buff.write(struct.pack('<I%ss'%length, length, _x))
00369 _x = self
00370 buff.write(_struct_iB3I.pack(_x.action_result.result.the_result, _x.action_result.result.is_simple_server, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00371 _x = self.action_feedback.header.frame_id
00372 length = len(_x)
00373 buff.write(struct.pack('<I%ss'%length, length, _x))
00374 _x = self
00375 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00376 _x = self.action_feedback.status.goal_id.id
00377 length = len(_x)
00378 buff.write(struct.pack('<I%ss'%length, length, _x))
00379 buff.write(_struct_B.pack(self.action_feedback.status.status))
00380 _x = self.action_feedback.status.text
00381 length = len(_x)
00382 buff.write(struct.pack('<I%ss'%length, length, _x))
00383 except struct.error, se: self._check_types(se)
00384 except TypeError, te: self._check_types(te)
00385
00386 def deserialize_numpy(self, str, numpy):
00387 """
00388 unpack serialized message in str into this message instance using numpy for array types
00389 @param str: byte array of serialized message
00390 @type str: str
00391 @param numpy: numpy python module
00392 @type numpy: module
00393 """
00394 try:
00395 if self.action_goal is None:
00396 self.action_goal = actionlib.msg.TestRequestActionGoal()
00397 if self.action_result is None:
00398 self.action_result = actionlib.msg.TestRequestActionResult()
00399 if self.action_feedback is None:
00400 self.action_feedback = actionlib.msg.TestRequestActionFeedback()
00401 end = 0
00402 _x = self
00403 start = end
00404 end += 12
00405 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00406 start = end
00407 end += 4
00408 (length,) = _struct_I.unpack(str[start:end])
00409 start = end
00410 end += length
00411 self.action_goal.header.frame_id = str[start:end]
00412 _x = self
00413 start = end
00414 end += 8
00415 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00416 start = end
00417 end += 4
00418 (length,) = _struct_I.unpack(str[start:end])
00419 start = end
00420 end += length
00421 self.action_goal.goal_id.id = str[start:end]
00422 _x = self
00423 start = end
00424 end += 5
00425 (_x.action_goal.goal.terminate_status, _x.action_goal.goal.ignore_cancel,) = _struct_iB.unpack(str[start:end])
00426 self.action_goal.goal.ignore_cancel = bool(self.action_goal.goal.ignore_cancel)
00427 start = end
00428 end += 4
00429 (length,) = _struct_I.unpack(str[start:end])
00430 start = end
00431 end += length
00432 self.action_goal.goal.result_text = str[start:end]
00433 _x = self
00434 start = end
00435 end += 41
00436 (_x.action_goal.goal.the_result, _x.action_goal.goal.is_simple_client, _x.action_goal.goal.delay_accept.secs, _x.action_goal.goal.delay_accept.nsecs, _x.action_goal.goal.delay_terminate.secs, _x.action_goal.goal.delay_terminate.nsecs, _x.action_goal.goal.pause_status.secs, _x.action_goal.goal.pause_status.nsecs, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_iB6i3I.unpack(str[start:end])
00437 self.action_goal.goal.is_simple_client = bool(self.action_goal.goal.is_simple_client)
00438 start = end
00439 end += 4
00440 (length,) = _struct_I.unpack(str[start:end])
00441 start = end
00442 end += length
00443 self.action_result.header.frame_id = str[start:end]
00444 _x = self
00445 start = end
00446 end += 8
00447 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00448 start = end
00449 end += 4
00450 (length,) = _struct_I.unpack(str[start:end])
00451 start = end
00452 end += length
00453 self.action_result.status.goal_id.id = str[start:end]
00454 start = end
00455 end += 1
00456 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00457 start = end
00458 end += 4
00459 (length,) = _struct_I.unpack(str[start:end])
00460 start = end
00461 end += length
00462 self.action_result.status.text = str[start:end]
00463 _x = self
00464 start = end
00465 end += 17
00466 (_x.action_result.result.the_result, _x.action_result.result.is_simple_server, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_iB3I.unpack(str[start:end])
00467 self.action_result.result.is_simple_server = bool(self.action_result.result.is_simple_server)
00468 start = end
00469 end += 4
00470 (length,) = _struct_I.unpack(str[start:end])
00471 start = end
00472 end += length
00473 self.action_feedback.header.frame_id = str[start:end]
00474 _x = self
00475 start = end
00476 end += 8
00477 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00478 start = end
00479 end += 4
00480 (length,) = _struct_I.unpack(str[start:end])
00481 start = end
00482 end += length
00483 self.action_feedback.status.goal_id.id = str[start:end]
00484 start = end
00485 end += 1
00486 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00487 start = end
00488 end += 4
00489 (length,) = _struct_I.unpack(str[start:end])
00490 start = end
00491 end += length
00492 self.action_feedback.status.text = str[start:end]
00493 return self
00494 except struct.error, e:
00495 raise roslib.message.DeserializationError(e)
00496
00497 _struct_I = roslib.message.struct_I
00498 _struct_B = struct.Struct("<B")
00499 _struct_iB3I = struct.Struct("<iB3I")
00500 _struct_3I = struct.Struct("<3I")
00501 _struct_iB6i3I = struct.Struct("<iB6i3I")
00502 _struct_iB = struct.Struct("<iB")
00503 _struct_2I = struct.Struct("<2I")