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