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