00001 """autogenerated by genpy from tug_ist_diagnosis_msgs/BoardAction.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 actionlib_msgs.msg
00008 import genpy
00009 import tug_ist_diagnosis_msgs.msg
00010 import std_msgs.msg
00011
00012 class BoardAction(genpy.Message):
00013 _md5sum = "3e87eb671ab9b0c11466064143912402"
00014 _type = "tug_ist_diagnosis_msgs/BoardAction"
00015 _has_header = False
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 BoardActionGoal action_goal
00019 BoardActionResult action_result
00020 BoardActionFeedback action_feedback
00021
00022 ================================================================================
00023 MSG: tug_ist_diagnosis_msgs/BoardActionGoal
00024 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00025
00026 Header header
00027 actionlib_msgs/GoalID goal_id
00028 BoardGoal 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: tug_ist_diagnosis_msgs/BoardGoal
00063 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00064 int32 command
00065 char arg1
00066 char arg2
00067
00068 ================================================================================
00069 MSG: tug_ist_diagnosis_msgs/BoardActionResult
00070 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00071
00072 Header header
00073 actionlib_msgs/GoalStatus status
00074 BoardResult result
00075
00076 ================================================================================
00077 MSG: actionlib_msgs/GoalStatus
00078 GoalID goal_id
00079 uint8 status
00080 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00081 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00082 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00083 # and has since completed its execution (Terminal State)
00084 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00085 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00086 # to some failure (Terminal State)
00087 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00088 # because the goal was unattainable or invalid (Terminal State)
00089 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00090 # and has not yet completed execution
00091 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00092 # but the action server has not yet confirmed that the goal is canceled
00093 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00094 # and was successfully cancelled (Terminal State)
00095 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00096 # sent over the wire by an action server
00097
00098 #Allow for the user to associate a string with GoalStatus for debugging
00099 string text
00100
00101
00102 ================================================================================
00103 MSG: tug_ist_diagnosis_msgs/BoardResult
00104 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00105 int32 resl
00106
00107 ================================================================================
00108 MSG: tug_ist_diagnosis_msgs/BoardActionFeedback
00109 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00110
00111 Header header
00112 actionlib_msgs/GoalStatus status
00113 BoardFeedback feedback
00114
00115 ================================================================================
00116 MSG: tug_ist_diagnosis_msgs/BoardFeedback
00117 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00118 int32 fedb
00119
00120
00121 """
00122 __slots__ = ['action_goal','action_result','action_feedback']
00123 _slot_types = ['tug_ist_diagnosis_msgs/BoardActionGoal','tug_ist_diagnosis_msgs/BoardActionResult','tug_ist_diagnosis_msgs/BoardActionFeedback']
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(BoardAction, self).__init__(*args, **kwds)
00141
00142 if self.action_goal is None:
00143 self.action_goal = tug_ist_diagnosis_msgs.msg.BoardActionGoal()
00144 if self.action_result is None:
00145 self.action_result = tug_ist_diagnosis_msgs.msg.BoardActionResult()
00146 if self.action_feedback is None:
00147 self.action_feedback = tug_ist_diagnosis_msgs.msg.BoardActionFeedback()
00148 else:
00149 self.action_goal = tug_ist_diagnosis_msgs.msg.BoardActionGoal()
00150 self.action_result = tug_ist_diagnosis_msgs.msg.BoardActionResult()
00151 self.action_feedback = tug_ist_diagnosis_msgs.msg.BoardActionFeedback()
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, ``StringIO``
00163 """
00164 try:
00165 _x = self
00166 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00167 _x = self.action_goal.header.frame_id
00168 length = len(_x)
00169 if python3 or type(_x) == unicode:
00170 _x = _x.encode('utf-8')
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 if python3 or type(_x) == unicode:
00178 _x = _x.encode('utf-8')
00179 length = len(_x)
00180 buff.write(struct.pack('<I%ss'%length, length, _x))
00181 _x = self
00182 buff.write(_struct_i2B3I.pack(_x.action_goal.goal.command, _x.action_goal.goal.arg1, _x.action_goal.goal.arg2, _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 if python3 or type(_x) == unicode:
00186 _x = _x.encode('utf-8')
00187 length = len(_x)
00188 buff.write(struct.pack('<I%ss'%length, length, _x))
00189 _x = self
00190 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00191 _x = self.action_result.status.goal_id.id
00192 length = len(_x)
00193 if python3 or type(_x) == unicode:
00194 _x = _x.encode('utf-8')
00195 length = len(_x)
00196 buff.write(struct.pack('<I%ss'%length, length, _x))
00197 buff.write(_struct_B.pack(self.action_result.status.status))
00198 _x = self.action_result.status.text
00199 length = len(_x)
00200 if python3 or type(_x) == unicode:
00201 _x = _x.encode('utf-8')
00202 length = len(_x)
00203 buff.write(struct.pack('<I%ss'%length, length, _x))
00204 _x = self
00205 buff.write(_struct_i3I.pack(_x.action_result.result.resl, _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 if python3 or type(_x) == unicode:
00209 _x = _x.encode('utf-8')
00210 length = len(_x)
00211 buff.write(struct.pack('<I%ss'%length, length, _x))
00212 _x = self
00213 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00214 _x = self.action_feedback.status.goal_id.id
00215 length = len(_x)
00216 if python3 or type(_x) == unicode:
00217 _x = _x.encode('utf-8')
00218 length = len(_x)
00219 buff.write(struct.pack('<I%ss'%length, length, _x))
00220 buff.write(_struct_B.pack(self.action_feedback.status.status))
00221 _x = self.action_feedback.status.text
00222 length = len(_x)
00223 if python3 or type(_x) == unicode:
00224 _x = _x.encode('utf-8')
00225 length = len(_x)
00226 buff.write(struct.pack('<I%ss'%length, length, _x))
00227 buff.write(_struct_i.pack(self.action_feedback.feedback.fedb))
00228 except struct.error as se: self._check_types(se)
00229 except TypeError as te: self._check_types(te)
00230
00231 def deserialize(self, str):
00232 """
00233 unpack serialized message in str into this message instance
00234 :param str: byte array of serialized message, ``str``
00235 """
00236 try:
00237 if self.action_goal is None:
00238 self.action_goal = tug_ist_diagnosis_msgs.msg.BoardActionGoal()
00239 if self.action_result is None:
00240 self.action_result = tug_ist_diagnosis_msgs.msg.BoardActionResult()
00241 if self.action_feedback is None:
00242 self.action_feedback = tug_ist_diagnosis_msgs.msg.BoardActionFeedback()
00243 end = 0
00244 _x = self
00245 start = end
00246 end += 12
00247 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00248 start = end
00249 end += 4
00250 (length,) = _struct_I.unpack(str[start:end])
00251 start = end
00252 end += length
00253 if python3:
00254 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00255 else:
00256 self.action_goal.header.frame_id = str[start:end]
00257 _x = self
00258 start = end
00259 end += 8
00260 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00261 start = end
00262 end += 4
00263 (length,) = _struct_I.unpack(str[start:end])
00264 start = end
00265 end += length
00266 if python3:
00267 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00268 else:
00269 self.action_goal.goal_id.id = str[start:end]
00270 _x = self
00271 start = end
00272 end += 18
00273 (_x.action_goal.goal.command, _x.action_goal.goal.arg1, _x.action_goal.goal.arg2, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_i2B3I.unpack(str[start:end])
00274 start = end
00275 end += 4
00276 (length,) = _struct_I.unpack(str[start:end])
00277 start = end
00278 end += length
00279 if python3:
00280 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00281 else:
00282 self.action_result.header.frame_id = str[start:end]
00283 _x = self
00284 start = end
00285 end += 8
00286 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.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 if python3:
00293 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00294 else:
00295 self.action_result.status.goal_id.id = str[start:end]
00296 start = end
00297 end += 1
00298 (self.action_result.status.status,) = _struct_B.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.text = str[start:end].decode('utf-8')
00306 else:
00307 self.action_result.status.text = str[start:end]
00308 _x = self
00309 start = end
00310 end += 16
00311 (_x.action_result.result.resl, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00312 start = end
00313 end += 4
00314 (length,) = _struct_I.unpack(str[start:end])
00315 start = end
00316 end += length
00317 if python3:
00318 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00319 else:
00320 self.action_feedback.header.frame_id = str[start:end]
00321 _x = self
00322 start = end
00323 end += 8
00324 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00325 start = end
00326 end += 4
00327 (length,) = _struct_I.unpack(str[start:end])
00328 start = end
00329 end += length
00330 if python3:
00331 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00332 else:
00333 self.action_feedback.status.goal_id.id = str[start:end]
00334 start = end
00335 end += 1
00336 (self.action_feedback.status.status,) = _struct_B.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.text = str[start:end].decode('utf-8')
00344 else:
00345 self.action_feedback.status.text = str[start:end]
00346 start = end
00347 end += 4
00348 (self.action_feedback.feedback.fedb,) = _struct_i.unpack(str[start:end])
00349 return self
00350 except struct.error as e:
00351 raise genpy.DeserializationError(e)
00352
00353
00354 def serialize_numpy(self, buff, numpy):
00355 """
00356 serialize message with numpy array types into buffer
00357 :param buff: buffer, ``StringIO``
00358 :param numpy: numpy python module
00359 """
00360 try:
00361 _x = self
00362 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00363 _x = self.action_goal.header.frame_id
00364 length = len(_x)
00365 if python3 or type(_x) == unicode:
00366 _x = _x.encode('utf-8')
00367 length = len(_x)
00368 buff.write(struct.pack('<I%ss'%length, length, _x))
00369 _x = self
00370 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00371 _x = self.action_goal.goal_id.id
00372 length = len(_x)
00373 if python3 or type(_x) == unicode:
00374 _x = _x.encode('utf-8')
00375 length = len(_x)
00376 buff.write(struct.pack('<I%ss'%length, length, _x))
00377 _x = self
00378 buff.write(_struct_i2B3I.pack(_x.action_goal.goal.command, _x.action_goal.goal.arg1, _x.action_goal.goal.arg2, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00379 _x = self.action_result.header.frame_id
00380 length = len(_x)
00381 if python3 or type(_x) == unicode:
00382 _x = _x.encode('utf-8')
00383 length = len(_x)
00384 buff.write(struct.pack('<I%ss'%length, length, _x))
00385 _x = self
00386 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00387 _x = self.action_result.status.goal_id.id
00388 length = len(_x)
00389 if python3 or type(_x) == unicode:
00390 _x = _x.encode('utf-8')
00391 length = len(_x)
00392 buff.write(struct.pack('<I%ss'%length, length, _x))
00393 buff.write(_struct_B.pack(self.action_result.status.status))
00394 _x = self.action_result.status.text
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_i3I.pack(_x.action_result.result.resl, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00402 _x = self.action_feedback.header.frame_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 _x = self
00409 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00410 _x = self.action_feedback.status.goal_id.id
00411 length = len(_x)
00412 if python3 or type(_x) == unicode:
00413 _x = _x.encode('utf-8')
00414 length = len(_x)
00415 buff.write(struct.pack('<I%ss'%length, length, _x))
00416 buff.write(_struct_B.pack(self.action_feedback.status.status))
00417 _x = self.action_feedback.status.text
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 buff.write(_struct_i.pack(self.action_feedback.feedback.fedb))
00424 except struct.error as se: self._check_types(se)
00425 except TypeError as te: self._check_types(te)
00426
00427 def deserialize_numpy(self, str, numpy):
00428 """
00429 unpack serialized message in str into this message instance using numpy for array types
00430 :param str: byte array of serialized message, ``str``
00431 :param numpy: numpy python module
00432 """
00433 try:
00434 if self.action_goal is None:
00435 self.action_goal = tug_ist_diagnosis_msgs.msg.BoardActionGoal()
00436 if self.action_result is None:
00437 self.action_result = tug_ist_diagnosis_msgs.msg.BoardActionResult()
00438 if self.action_feedback is None:
00439 self.action_feedback = tug_ist_diagnosis_msgs.msg.BoardActionFeedback()
00440 end = 0
00441 _x = self
00442 start = end
00443 end += 12
00444 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00445 start = end
00446 end += 4
00447 (length,) = _struct_I.unpack(str[start:end])
00448 start = end
00449 end += length
00450 if python3:
00451 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00452 else:
00453 self.action_goal.header.frame_id = str[start:end]
00454 _x = self
00455 start = end
00456 end += 8
00457 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00458 start = end
00459 end += 4
00460 (length,) = _struct_I.unpack(str[start:end])
00461 start = end
00462 end += length
00463 if python3:
00464 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00465 else:
00466 self.action_goal.goal_id.id = str[start:end]
00467 _x = self
00468 start = end
00469 end += 18
00470 (_x.action_goal.goal.command, _x.action_goal.goal.arg1, _x.action_goal.goal.arg2, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_i2B3I.unpack(str[start:end])
00471 start = end
00472 end += 4
00473 (length,) = _struct_I.unpack(str[start:end])
00474 start = end
00475 end += length
00476 if python3:
00477 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00478 else:
00479 self.action_result.header.frame_id = str[start:end]
00480 _x = self
00481 start = end
00482 end += 8
00483 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00484 start = end
00485 end += 4
00486 (length,) = _struct_I.unpack(str[start:end])
00487 start = end
00488 end += length
00489 if python3:
00490 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00491 else:
00492 self.action_result.status.goal_id.id = str[start:end]
00493 start = end
00494 end += 1
00495 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00496 start = end
00497 end += 4
00498 (length,) = _struct_I.unpack(str[start:end])
00499 start = end
00500 end += length
00501 if python3:
00502 self.action_result.status.text = str[start:end].decode('utf-8')
00503 else:
00504 self.action_result.status.text = str[start:end]
00505 _x = self
00506 start = end
00507 end += 16
00508 (_x.action_result.result.resl, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00509 start = end
00510 end += 4
00511 (length,) = _struct_I.unpack(str[start:end])
00512 start = end
00513 end += length
00514 if python3:
00515 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00516 else:
00517 self.action_feedback.header.frame_id = str[start:end]
00518 _x = self
00519 start = end
00520 end += 8
00521 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.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 if python3:
00528 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00529 else:
00530 self.action_feedback.status.goal_id.id = str[start:end]
00531 start = end
00532 end += 1
00533 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00534 start = end
00535 end += 4
00536 (length,) = _struct_I.unpack(str[start:end])
00537 start = end
00538 end += length
00539 if python3:
00540 self.action_feedback.status.text = str[start:end].decode('utf-8')
00541 else:
00542 self.action_feedback.status.text = str[start:end]
00543 start = end
00544 end += 4
00545 (self.action_feedback.feedback.fedb,) = _struct_i.unpack(str[start:end])
00546 return self
00547 except struct.error as e:
00548 raise genpy.DeserializationError(e)
00549
00550 _struct_I = genpy.struct_I
00551 _struct_B = struct.Struct("<B")
00552 _struct_i2B3I = struct.Struct("<i2B3I")
00553 _struct_i = struct.Struct("<i")
00554 _struct_i3I = struct.Struct("<i3I")
00555 _struct_3I = struct.Struct("<3I")
00556 _struct_2I = struct.Struct("<2I")