$search
00001 """autogenerated by genmsg_py from ShellCommandAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import actionlib_msgs.msg 00007 import shell_execution_action_server.msg 00008 import std_msgs.msg 00009 00010 class ShellCommandAction(roslib.message.Message): 00011 _md5sum = "e47151c393c91a946601934b650d608b" 00012 _type = "shell_execution_action_server/ShellCommandAction" 00013 _has_header = False #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 ShellCommandActionGoal action_goal 00017 ShellCommandActionResult action_result 00018 ShellCommandActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: shell_execution_action_server/ShellCommandActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 ShellCommandGoal 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: shell_execution_action_server/ShellCommandGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 #Goal definition (e.g. "sleep 3; echo hello; ls /nonexisting23") 00063 string command 00064 00065 ================================================================================ 00066 MSG: shell_execution_action_server/ShellCommandActionResult 00067 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00068 00069 Header header 00070 actionlib_msgs/GoalStatus status 00071 ShellCommandResult 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: shell_execution_action_server/ShellCommandResult 00101 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00102 #Result (accumulated output from start to end) 00103 string stdout 00104 string stderr 00105 uint8 exit_code 00106 00107 ================================================================================ 00108 MSG: shell_execution_action_server/ShellCommandActionFeedback 00109 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00110 00111 Header header 00112 actionlib_msgs/GoalStatus status 00113 ShellCommandFeedback feedback 00114 00115 ================================================================================ 00116 MSG: shell_execution_action_server/ShellCommandFeedback 00117 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00118 #Feedback (current output) 00119 string stdout 00120 string stderr 00121 00122 00123 """ 00124 __slots__ = ['action_goal','action_result','action_feedback'] 00125 _slot_types = ['shell_execution_action_server/ShellCommandActionGoal','shell_execution_action_server/ShellCommandActionResult','shell_execution_action_server/ShellCommandActionFeedback'] 00126 00127 def __init__(self, *args, **kwds): 00128 """ 00129 Constructor. Any message fields that are implicitly/explicitly 00130 set to None will be assigned a default value. The recommend 00131 use is keyword arguments as this is more robust to future message 00132 changes. You cannot mix in-order arguments and keyword arguments. 00133 00134 The available fields are: 00135 action_goal,action_result,action_feedback 00136 00137 @param args: complete set of field values, in .msg order 00138 @param kwds: use keyword arguments corresponding to message field names 00139 to set specific fields. 00140 """ 00141 if args or kwds: 00142 super(ShellCommandAction, self).__init__(*args, **kwds) 00143 #message fields cannot be None, assign default values for those that are 00144 if self.action_goal is None: 00145 self.action_goal = shell_execution_action_server.msg.ShellCommandActionGoal() 00146 if self.action_result is None: 00147 self.action_result = shell_execution_action_server.msg.ShellCommandActionResult() 00148 if self.action_feedback is None: 00149 self.action_feedback = shell_execution_action_server.msg.ShellCommandActionFeedback() 00150 else: 00151 self.action_goal = shell_execution_action_server.msg.ShellCommandActionGoal() 00152 self.action_result = shell_execution_action_server.msg.ShellCommandActionResult() 00153 self.action_feedback = shell_execution_action_server.msg.ShellCommandActionFeedback() 00154 00155 def _get_types(self): 00156 """ 00157 internal API method 00158 """ 00159 return self._slot_types 00160 00161 def serialize(self, buff): 00162 """ 00163 serialize message into buffer 00164 @param buff: buffer 00165 @type buff: 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 buff.write(struct.pack('<I%ss'%length, length, _x)) 00173 _x = self 00174 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00175 _x = self.action_goal.goal_id.id 00176 length = len(_x) 00177 buff.write(struct.pack('<I%ss'%length, length, _x)) 00178 _x = self.action_goal.goal.command 00179 length = len(_x) 00180 buff.write(struct.pack('<I%ss'%length, length, _x)) 00181 _x = self 00182 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00183 _x = self.action_result.header.frame_id 00184 length = len(_x) 00185 buff.write(struct.pack('<I%ss'%length, length, _x)) 00186 _x = self 00187 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00188 _x = self.action_result.status.goal_id.id 00189 length = len(_x) 00190 buff.write(struct.pack('<I%ss'%length, length, _x)) 00191 buff.write(_struct_B.pack(self.action_result.status.status)) 00192 _x = self.action_result.status.text 00193 length = len(_x) 00194 buff.write(struct.pack('<I%ss'%length, length, _x)) 00195 _x = self.action_result.result.stdout 00196 length = len(_x) 00197 buff.write(struct.pack('<I%ss'%length, length, _x)) 00198 _x = self.action_result.result.stderr 00199 length = len(_x) 00200 buff.write(struct.pack('<I%ss'%length, length, _x)) 00201 _x = self 00202 buff.write(_struct_B3I.pack(_x.action_result.result.exit_code, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00203 _x = self.action_feedback.header.frame_id 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 _x = self 00207 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00208 _x = self.action_feedback.status.goal_id.id 00209 length = len(_x) 00210 buff.write(struct.pack('<I%ss'%length, length, _x)) 00211 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00212 _x = self.action_feedback.status.text 00213 length = len(_x) 00214 buff.write(struct.pack('<I%ss'%length, length, _x)) 00215 _x = self.action_feedback.feedback.stdout 00216 length = len(_x) 00217 buff.write(struct.pack('<I%ss'%length, length, _x)) 00218 _x = self.action_feedback.feedback.stderr 00219 length = len(_x) 00220 buff.write(struct.pack('<I%ss'%length, length, _x)) 00221 except struct.error as se: self._check_types(se) 00222 except TypeError as te: self._check_types(te) 00223 00224 def deserialize(self, str): 00225 """ 00226 unpack serialized message in str into this message instance 00227 @param str: byte array of serialized message 00228 @type str: str 00229 """ 00230 try: 00231 if self.action_goal is None: 00232 self.action_goal = shell_execution_action_server.msg.ShellCommandActionGoal() 00233 if self.action_result is None: 00234 self.action_result = shell_execution_action_server.msg.ShellCommandActionResult() 00235 if self.action_feedback is None: 00236 self.action_feedback = shell_execution_action_server.msg.ShellCommandActionFeedback() 00237 end = 0 00238 _x = self 00239 start = end 00240 end += 12 00241 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00242 start = end 00243 end += 4 00244 (length,) = _struct_I.unpack(str[start:end]) 00245 start = end 00246 end += length 00247 self.action_goal.header.frame_id = str[start:end] 00248 _x = self 00249 start = end 00250 end += 8 00251 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00252 start = end 00253 end += 4 00254 (length,) = _struct_I.unpack(str[start:end]) 00255 start = end 00256 end += length 00257 self.action_goal.goal_id.id = str[start:end] 00258 start = end 00259 end += 4 00260 (length,) = _struct_I.unpack(str[start:end]) 00261 start = end 00262 end += length 00263 self.action_goal.goal.command = str[start:end] 00264 _x = self 00265 start = end 00266 end += 12 00267 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00268 start = end 00269 end += 4 00270 (length,) = _struct_I.unpack(str[start:end]) 00271 start = end 00272 end += length 00273 self.action_result.header.frame_id = str[start:end] 00274 _x = self 00275 start = end 00276 end += 8 00277 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 start = end 00282 end += length 00283 self.action_result.status.goal_id.id = str[start:end] 00284 start = end 00285 end += 1 00286 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00287 start = end 00288 end += 4 00289 (length,) = _struct_I.unpack(str[start:end]) 00290 start = end 00291 end += length 00292 self.action_result.status.text = str[start:end] 00293 start = end 00294 end += 4 00295 (length,) = _struct_I.unpack(str[start:end]) 00296 start = end 00297 end += length 00298 self.action_result.result.stdout = 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_result.result.stderr = str[start:end] 00305 _x = self 00306 start = end 00307 end += 13 00308 (_x.action_result.result.exit_code, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00309 start = end 00310 end += 4 00311 (length,) = _struct_I.unpack(str[start:end]) 00312 start = end 00313 end += length 00314 self.action_feedback.header.frame_id = str[start:end] 00315 _x = self 00316 start = end 00317 end += 8 00318 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00319 start = end 00320 end += 4 00321 (length,) = _struct_I.unpack(str[start:end]) 00322 start = end 00323 end += length 00324 self.action_feedback.status.goal_id.id = str[start:end] 00325 start = end 00326 end += 1 00327 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00328 start = end 00329 end += 4 00330 (length,) = _struct_I.unpack(str[start:end]) 00331 start = end 00332 end += length 00333 self.action_feedback.status.text = str[start:end] 00334 start = end 00335 end += 4 00336 (length,) = _struct_I.unpack(str[start:end]) 00337 start = end 00338 end += length 00339 self.action_feedback.feedback.stdout = str[start:end] 00340 start = end 00341 end += 4 00342 (length,) = _struct_I.unpack(str[start:end]) 00343 start = end 00344 end += length 00345 self.action_feedback.feedback.stderr = str[start:end] 00346 return self 00347 except struct.error as e: 00348 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00349 00350 00351 def serialize_numpy(self, buff, numpy): 00352 """ 00353 serialize message with numpy array types into buffer 00354 @param buff: buffer 00355 @type buff: StringIO 00356 @param numpy: numpy python module 00357 @type numpy module 00358 """ 00359 try: 00360 _x = self 00361 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00362 _x = self.action_goal.header.frame_id 00363 length = len(_x) 00364 buff.write(struct.pack('<I%ss'%length, length, _x)) 00365 _x = self 00366 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00367 _x = self.action_goal.goal_id.id 00368 length = len(_x) 00369 buff.write(struct.pack('<I%ss'%length, length, _x)) 00370 _x = self.action_goal.goal.command 00371 length = len(_x) 00372 buff.write(struct.pack('<I%ss'%length, length, _x)) 00373 _x = self 00374 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00375 _x = self.action_result.header.frame_id 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_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00380 _x = self.action_result.status.goal_id.id 00381 length = len(_x) 00382 buff.write(struct.pack('<I%ss'%length, length, _x)) 00383 buff.write(_struct_B.pack(self.action_result.status.status)) 00384 _x = self.action_result.status.text 00385 length = len(_x) 00386 buff.write(struct.pack('<I%ss'%length, length, _x)) 00387 _x = self.action_result.result.stdout 00388 length = len(_x) 00389 buff.write(struct.pack('<I%ss'%length, length, _x)) 00390 _x = self.action_result.result.stderr 00391 length = len(_x) 00392 buff.write(struct.pack('<I%ss'%length, length, _x)) 00393 _x = self 00394 buff.write(_struct_B3I.pack(_x.action_result.result.exit_code, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00395 _x = self.action_feedback.header.frame_id 00396 length = len(_x) 00397 buff.write(struct.pack('<I%ss'%length, length, _x)) 00398 _x = self 00399 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00400 _x = self.action_feedback.status.goal_id.id 00401 length = len(_x) 00402 buff.write(struct.pack('<I%ss'%length, length, _x)) 00403 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00404 _x = self.action_feedback.status.text 00405 length = len(_x) 00406 buff.write(struct.pack('<I%ss'%length, length, _x)) 00407 _x = self.action_feedback.feedback.stdout 00408 length = len(_x) 00409 buff.write(struct.pack('<I%ss'%length, length, _x)) 00410 _x = self.action_feedback.feedback.stderr 00411 length = len(_x) 00412 buff.write(struct.pack('<I%ss'%length, length, _x)) 00413 except struct.error as se: self._check_types(se) 00414 except TypeError as te: self._check_types(te) 00415 00416 def deserialize_numpy(self, str, numpy): 00417 """ 00418 unpack serialized message in str into this message instance using numpy for array types 00419 @param str: byte array of serialized message 00420 @type str: str 00421 @param numpy: numpy python module 00422 @type numpy: module 00423 """ 00424 try: 00425 if self.action_goal is None: 00426 self.action_goal = shell_execution_action_server.msg.ShellCommandActionGoal() 00427 if self.action_result is None: 00428 self.action_result = shell_execution_action_server.msg.ShellCommandActionResult() 00429 if self.action_feedback is None: 00430 self.action_feedback = shell_execution_action_server.msg.ShellCommandActionFeedback() 00431 end = 0 00432 _x = self 00433 start = end 00434 end += 12 00435 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00436 start = end 00437 end += 4 00438 (length,) = _struct_I.unpack(str[start:end]) 00439 start = end 00440 end += length 00441 self.action_goal.header.frame_id = str[start:end] 00442 _x = self 00443 start = end 00444 end += 8 00445 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00446 start = end 00447 end += 4 00448 (length,) = _struct_I.unpack(str[start:end]) 00449 start = end 00450 end += length 00451 self.action_goal.goal_id.id = str[start:end] 00452 start = end 00453 end += 4 00454 (length,) = _struct_I.unpack(str[start:end]) 00455 start = end 00456 end += length 00457 self.action_goal.goal.command = str[start:end] 00458 _x = self 00459 start = end 00460 end += 12 00461 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00462 start = end 00463 end += 4 00464 (length,) = _struct_I.unpack(str[start:end]) 00465 start = end 00466 end += length 00467 self.action_result.header.frame_id = str[start:end] 00468 _x = self 00469 start = end 00470 end += 8 00471 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.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 self.action_result.status.goal_id.id = str[start:end] 00478 start = end 00479 end += 1 00480 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00481 start = end 00482 end += 4 00483 (length,) = _struct_I.unpack(str[start:end]) 00484 start = end 00485 end += length 00486 self.action_result.status.text = 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_result.result.stdout = str[start:end] 00493 start = end 00494 end += 4 00495 (length,) = _struct_I.unpack(str[start:end]) 00496 start = end 00497 end += length 00498 self.action_result.result.stderr = str[start:end] 00499 _x = self 00500 start = end 00501 end += 13 00502 (_x.action_result.result.exit_code, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00503 start = end 00504 end += 4 00505 (length,) = _struct_I.unpack(str[start:end]) 00506 start = end 00507 end += length 00508 self.action_feedback.header.frame_id = str[start:end] 00509 _x = self 00510 start = end 00511 end += 8 00512 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00513 start = end 00514 end += 4 00515 (length,) = _struct_I.unpack(str[start:end]) 00516 start = end 00517 end += length 00518 self.action_feedback.status.goal_id.id = str[start:end] 00519 start = end 00520 end += 1 00521 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00522 start = end 00523 end += 4 00524 (length,) = _struct_I.unpack(str[start:end]) 00525 start = end 00526 end += length 00527 self.action_feedback.status.text = str[start:end] 00528 start = end 00529 end += 4 00530 (length,) = _struct_I.unpack(str[start:end]) 00531 start = end 00532 end += length 00533 self.action_feedback.feedback.stdout = str[start:end] 00534 start = end 00535 end += 4 00536 (length,) = _struct_I.unpack(str[start:end]) 00537 start = end 00538 end += length 00539 self.action_feedback.feedback.stderr = str[start:end] 00540 return self 00541 except struct.error as e: 00542 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00543 00544 _struct_I = roslib.message.struct_I 00545 _struct_3I = struct.Struct("<3I") 00546 _struct_B = struct.Struct("<B") 00547 _struct_2I = struct.Struct("<2I") 00548 _struct_B3I = struct.Struct("<B3I")