00001 """autogenerated by genmsg_py from ScriptAction.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006 import actionlib_msgs.msg
00007 import cob_script_server.msg
00008 import std_msgs.msg
00009
00010 class ScriptAction(roslib.message.Message):
00011 _md5sum = "b6da056b2e02898ae1775c33c046489b"
00012 _type = "cob_script_server/ScriptAction"
00013 _has_header = False
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 ScriptActionGoal action_goal
00017 ScriptActionResult action_result
00018 ScriptActionFeedback action_feedback
00019
00020 ================================================================================
00021 MSG: cob_script_server/ScriptActionGoal
00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00023
00024 Header header
00025 actionlib_msgs/GoalID goal_id
00026 ScriptGoal 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: cob_script_server/ScriptGoal
00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00062 #goal definition
00063 string function_name
00064 string component_name
00065 string parameter_name
00066
00067 ================================================================================
00068 MSG: cob_script_server/ScriptActionResult
00069 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00070
00071 Header header
00072 actionlib_msgs/GoalStatus status
00073 ScriptResult 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: cob_script_server/ScriptResult
00103 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00104 #result definition
00105 int16 return_value
00106
00107 ================================================================================
00108 MSG: cob_script_server/ScriptActionFeedback
00109 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00110
00111 Header header
00112 actionlib_msgs/GoalStatus status
00113 ScriptFeedback feedback
00114
00115 ================================================================================
00116 MSG: cob_script_server/ScriptFeedback
00117 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00118 #feedback definition
00119
00120
00121 """
00122 __slots__ = ['action_goal','action_result','action_feedback']
00123 _slot_types = ['cob_script_server/ScriptActionGoal','cob_script_server/ScriptActionResult','cob_script_server/ScriptActionFeedback']
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(ScriptAction, self).__init__(*args, **kwds)
00141
00142 if self.action_goal is None:
00143 self.action_goal = cob_script_server.msg.ScriptActionGoal()
00144 if self.action_result is None:
00145 self.action_result = cob_script_server.msg.ScriptActionResult()
00146 if self.action_feedback is None:
00147 self.action_feedback = cob_script_server.msg.ScriptActionFeedback()
00148 else:
00149 self.action_goal = cob_script_server.msg.ScriptActionGoal()
00150 self.action_result = cob_script_server.msg.ScriptActionResult()
00151 self.action_feedback = cob_script_server.msg.ScriptActionFeedback()
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
00163 @type buff: StringIO
00164 """
00165 try:
00166 _x = self
00167 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00168 _x = self.action_goal.header.frame_id
00169 length = len(_x)
00170 buff.write(struct.pack('<I%ss'%length, length, _x))
00171 _x = self
00172 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00173 _x = self.action_goal.goal_id.id
00174 length = len(_x)
00175 buff.write(struct.pack('<I%ss'%length, length, _x))
00176 _x = self.action_goal.goal.function_name
00177 length = len(_x)
00178 buff.write(struct.pack('<I%ss'%length, length, _x))
00179 _x = self.action_goal.goal.component_name
00180 length = len(_x)
00181 buff.write(struct.pack('<I%ss'%length, length, _x))
00182 _x = self.action_goal.goal.parameter_name
00183 length = len(_x)
00184 buff.write(struct.pack('<I%ss'%length, length, _x))
00185 _x = self
00186 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00187 _x = self.action_result.header.frame_id
00188 length = len(_x)
00189 buff.write(struct.pack('<I%ss'%length, length, _x))
00190 _x = self
00191 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00192 _x = self.action_result.status.goal_id.id
00193 length = len(_x)
00194 buff.write(struct.pack('<I%ss'%length, length, _x))
00195 buff.write(_struct_B.pack(self.action_result.status.status))
00196 _x = self.action_result.status.text
00197 length = len(_x)
00198 buff.write(struct.pack('<I%ss'%length, length, _x))
00199 _x = self
00200 buff.write(_struct_h3I.pack(_x.action_result.result.return_value, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00201 _x = self.action_feedback.header.frame_id
00202 length = len(_x)
00203 buff.write(struct.pack('<I%ss'%length, length, _x))
00204 _x = self
00205 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00206 _x = self.action_feedback.status.goal_id.id
00207 length = len(_x)
00208 buff.write(struct.pack('<I%ss'%length, length, _x))
00209 buff.write(_struct_B.pack(self.action_feedback.status.status))
00210 _x = self.action_feedback.status.text
00211 length = len(_x)
00212 buff.write(struct.pack('<I%ss'%length, length, _x))
00213 except struct.error, se: self._check_types(se)
00214 except TypeError, te: self._check_types(te)
00215
00216 def deserialize(self, str):
00217 """
00218 unpack serialized message in str into this message instance
00219 @param str: byte array of serialized message
00220 @type str: str
00221 """
00222 try:
00223 if self.action_goal is None:
00224 self.action_goal = cob_script_server.msg.ScriptActionGoal()
00225 if self.action_result is None:
00226 self.action_result = cob_script_server.msg.ScriptActionResult()
00227 if self.action_feedback is None:
00228 self.action_feedback = cob_script_server.msg.ScriptActionFeedback()
00229 end = 0
00230 _x = self
00231 start = end
00232 end += 12
00233 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00234 start = end
00235 end += 4
00236 (length,) = _struct_I.unpack(str[start:end])
00237 start = end
00238 end += length
00239 self.action_goal.header.frame_id = str[start:end]
00240 _x = self
00241 start = end
00242 end += 8
00243 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.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.goal_id.id = str[start:end]
00250 start = end
00251 end += 4
00252 (length,) = _struct_I.unpack(str[start:end])
00253 start = end
00254 end += length
00255 self.action_goal.goal.function_name = str[start:end]
00256 start = end
00257 end += 4
00258 (length,) = _struct_I.unpack(str[start:end])
00259 start = end
00260 end += length
00261 self.action_goal.goal.component_name = str[start:end]
00262 start = end
00263 end += 4
00264 (length,) = _struct_I.unpack(str[start:end])
00265 start = end
00266 end += length
00267 self.action_goal.goal.parameter_name = str[start:end]
00268 _x = self
00269 start = end
00270 end += 12
00271 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00272 start = end
00273 end += 4
00274 (length,) = _struct_I.unpack(str[start:end])
00275 start = end
00276 end += length
00277 self.action_result.header.frame_id = str[start:end]
00278 _x = self
00279 start = end
00280 end += 8
00281 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00282 start = end
00283 end += 4
00284 (length,) = _struct_I.unpack(str[start:end])
00285 start = end
00286 end += length
00287 self.action_result.status.goal_id.id = str[start:end]
00288 start = end
00289 end += 1
00290 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 self.action_result.status.text = str[start:end]
00297 _x = self
00298 start = end
00299 end += 14
00300 (_x.action_result.result.return_value, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_h3I.unpack(str[start:end])
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.action_goal.goal.function_name
00351 length = len(_x)
00352 buff.write(struct.pack('<I%ss'%length, length, _x))
00353 _x = self.action_goal.goal.component_name
00354 length = len(_x)
00355 buff.write(struct.pack('<I%ss'%length, length, _x))
00356 _x = self.action_goal.goal.parameter_name
00357 length = len(_x)
00358 buff.write(struct.pack('<I%ss'%length, length, _x))
00359 _x = self
00360 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00361 _x = self.action_result.header.frame_id
00362 length = len(_x)
00363 buff.write(struct.pack('<I%ss'%length, length, _x))
00364 _x = self
00365 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00366 _x = self.action_result.status.goal_id.id
00367 length = len(_x)
00368 buff.write(struct.pack('<I%ss'%length, length, _x))
00369 buff.write(_struct_B.pack(self.action_result.status.status))
00370 _x = self.action_result.status.text
00371 length = len(_x)
00372 buff.write(struct.pack('<I%ss'%length, length, _x))
00373 _x = self
00374 buff.write(_struct_h3I.pack(_x.action_result.result.return_value, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00375 _x = self.action_feedback.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_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00380 _x = self.action_feedback.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_feedback.status.status))
00384 _x = self.action_feedback.status.text
00385 length = len(_x)
00386 buff.write(struct.pack('<I%ss'%length, length, _x))
00387 except struct.error, se: self._check_types(se)
00388 except TypeError, te: self._check_types(te)
00389
00390 def deserialize_numpy(self, str, numpy):
00391 """
00392 unpack serialized message in str into this message instance using numpy for array types
00393 @param str: byte array of serialized message
00394 @type str: str
00395 @param numpy: numpy python module
00396 @type numpy: module
00397 """
00398 try:
00399 if self.action_goal is None:
00400 self.action_goal = cob_script_server.msg.ScriptActionGoal()
00401 if self.action_result is None:
00402 self.action_result = cob_script_server.msg.ScriptActionResult()
00403 if self.action_feedback is None:
00404 self.action_feedback = cob_script_server.msg.ScriptActionFeedback()
00405 end = 0
00406 _x = self
00407 start = end
00408 end += 12
00409 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00410 start = end
00411 end += 4
00412 (length,) = _struct_I.unpack(str[start:end])
00413 start = end
00414 end += length
00415 self.action_goal.header.frame_id = str[start:end]
00416 _x = self
00417 start = end
00418 end += 8
00419 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00420 start = end
00421 end += 4
00422 (length,) = _struct_I.unpack(str[start:end])
00423 start = end
00424 end += length
00425 self.action_goal.goal_id.id = str[start:end]
00426 start = end
00427 end += 4
00428 (length,) = _struct_I.unpack(str[start:end])
00429 start = end
00430 end += length
00431 self.action_goal.goal.function_name = str[start:end]
00432 start = end
00433 end += 4
00434 (length,) = _struct_I.unpack(str[start:end])
00435 start = end
00436 end += length
00437 self.action_goal.goal.component_name = str[start:end]
00438 start = end
00439 end += 4
00440 (length,) = _struct_I.unpack(str[start:end])
00441 start = end
00442 end += length
00443 self.action_goal.goal.parameter_name = str[start:end]
00444 _x = self
00445 start = end
00446 end += 12
00447 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end]
00454 _x = self
00455 start = end
00456 end += 8
00457 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.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 self.action_result.status.goal_id.id = str[start:end]
00464 start = end
00465 end += 1
00466 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00467 start = end
00468 end += 4
00469 (length,) = _struct_I.unpack(str[start:end])
00470 start = end
00471 end += length
00472 self.action_result.status.text = str[start:end]
00473 _x = self
00474 start = end
00475 end += 14
00476 (_x.action_result.result.return_value, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_h3I.unpack(str[start:end])
00477 start = end
00478 end += 4
00479 (length,) = _struct_I.unpack(str[start:end])
00480 start = end
00481 end += length
00482 self.action_feedback.header.frame_id = str[start:end]
00483 _x = self
00484 start = end
00485 end += 8
00486 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.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.goal_id.id = str[start:end]
00493 start = end
00494 end += 1
00495 (self.action_feedback.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 self.action_feedback.status.text = str[start:end]
00502 return self
00503 except struct.error, e:
00504 raise roslib.message.DeserializationError(e)
00505
00506 _struct_I = roslib.message.struct_I
00507 _struct_3I = struct.Struct("<3I")
00508 _struct_B = struct.Struct("<B")
00509 _struct_2I = struct.Struct("<2I")
00510 _struct_h3I = struct.Struct("<h3I")