00001 """autogenerated by genmsg_py from StringsAction.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006 import cogman_msgs.msg
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class StringsAction(roslib.message.Message):
00011 _md5sum = "654d133fb4b63886eaa17ddc7bb08c11"
00012 _type = "cogman_msgs/StringsAction"
00013 _has_header = False
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 StringsActionGoal action_goal
00017 StringsActionResult action_result
00018 StringsActionFeedback action_feedback
00019
00020 ================================================================================
00021 MSG: cogman_msgs/StringsActionGoal
00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00023
00024 Header header
00025 actionlib_msgs/GoalID goal_id
00026 StringsGoal 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: cogman_msgs/StringsGoal
00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00062 #goal
00063 string command
00064
00065 ================================================================================
00066 MSG: cogman_msgs/StringsActionResult
00067 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00068
00069 Header header
00070 actionlib_msgs/GoalStatus status
00071 StringsResult 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: cogman_msgs/StringsResult
00101 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00102 #result
00103 string answer
00104
00105 ================================================================================
00106 MSG: cogman_msgs/StringsActionFeedback
00107 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00108
00109 Header header
00110 actionlib_msgs/GoalStatus status
00111 StringsFeedback feedback
00112
00113 ================================================================================
00114 MSG: cogman_msgs/StringsFeedback
00115 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00116 #feedback
00117 string rightnow
00118
00119
00120 """
00121 __slots__ = ['action_goal','action_result','action_feedback']
00122 _slot_types = ['cogman_msgs/StringsActionGoal','cogman_msgs/StringsActionResult','cogman_msgs/StringsActionFeedback']
00123
00124 def __init__(self, *args, **kwds):
00125 """
00126 Constructor. Any message fields that are implicitly/explicitly
00127 set to None will be assigned a default value. The recommend
00128 use is keyword arguments as this is more robust to future message
00129 changes. You cannot mix in-order arguments and keyword arguments.
00130
00131 The available fields are:
00132 action_goal,action_result,action_feedback
00133
00134 @param args: complete set of field values, in .msg order
00135 @param kwds: use keyword arguments corresponding to message field names
00136 to set specific fields.
00137 """
00138 if args or kwds:
00139 super(StringsAction, self).__init__(*args, **kwds)
00140
00141 if self.action_goal is None:
00142 self.action_goal = cogman_msgs.msg.StringsActionGoal()
00143 if self.action_result is None:
00144 self.action_result = cogman_msgs.msg.StringsActionResult()
00145 if self.action_feedback is None:
00146 self.action_feedback = cogman_msgs.msg.StringsActionFeedback()
00147 else:
00148 self.action_goal = cogman_msgs.msg.StringsActionGoal()
00149 self.action_result = cogman_msgs.msg.StringsActionResult()
00150 self.action_feedback = cogman_msgs.msg.StringsActionFeedback()
00151
00152 def _get_types(self):
00153 """
00154 internal API method
00155 """
00156 return self._slot_types
00157
00158 def serialize(self, buff):
00159 """
00160 serialize message into buffer
00161 @param buff: buffer
00162 @type buff: 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 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 buff.write(struct.pack('<I%ss'%length, length, _x))
00175 _x = self.action_goal.goal.command
00176 length = len(_x)
00177 buff.write(struct.pack('<I%ss'%length, length, _x))
00178 _x = self
00179 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00180 _x = self.action_result.header.frame_id
00181 length = len(_x)
00182 buff.write(struct.pack('<I%ss'%length, length, _x))
00183 _x = self
00184 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00185 _x = self.action_result.status.goal_id.id
00186 length = len(_x)
00187 buff.write(struct.pack('<I%ss'%length, length, _x))
00188 buff.write(_struct_B.pack(self.action_result.status.status))
00189 _x = self.action_result.status.text
00190 length = len(_x)
00191 buff.write(struct.pack('<I%ss'%length, length, _x))
00192 _x = self.action_result.result.answer
00193 length = len(_x)
00194 buff.write(struct.pack('<I%ss'%length, length, _x))
00195 _x = self
00196 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00197 _x = self.action_feedback.header.frame_id
00198 length = len(_x)
00199 buff.write(struct.pack('<I%ss'%length, length, _x))
00200 _x = self
00201 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00202 _x = self.action_feedback.status.goal_id.id
00203 length = len(_x)
00204 buff.write(struct.pack('<I%ss'%length, length, _x))
00205 buff.write(_struct_B.pack(self.action_feedback.status.status))
00206 _x = self.action_feedback.status.text
00207 length = len(_x)
00208 buff.write(struct.pack('<I%ss'%length, length, _x))
00209 _x = self.action_feedback.feedback.rightnow
00210 length = len(_x)
00211 buff.write(struct.pack('<I%ss'%length, length, _x))
00212 except struct.error, se: self._check_types(se)
00213 except TypeError, te: self._check_types(te)
00214
00215 def deserialize(self, str):
00216 """
00217 unpack serialized message in str into this message instance
00218 @param str: byte array of serialized message
00219 @type str: str
00220 """
00221 try:
00222 if self.action_goal is None:
00223 self.action_goal = cogman_msgs.msg.StringsActionGoal()
00224 if self.action_result is None:
00225 self.action_result = cogman_msgs.msg.StringsActionResult()
00226 if self.action_feedback is None:
00227 self.action_feedback = cogman_msgs.msg.StringsActionFeedback()
00228 end = 0
00229 _x = self
00230 start = end
00231 end += 12
00232 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00233 start = end
00234 end += 4
00235 (length,) = _struct_I.unpack(str[start:end])
00236 start = end
00237 end += length
00238 self.action_goal.header.frame_id = str[start:end]
00239 _x = self
00240 start = end
00241 end += 8
00242 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00243 start = end
00244 end += 4
00245 (length,) = _struct_I.unpack(str[start:end])
00246 start = end
00247 end += length
00248 self.action_goal.goal_id.id = str[start:end]
00249 start = end
00250 end += 4
00251 (length,) = _struct_I.unpack(str[start:end])
00252 start = end
00253 end += length
00254 self.action_goal.goal.command = str[start:end]
00255 _x = self
00256 start = end
00257 end += 12
00258 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00259 start = end
00260 end += 4
00261 (length,) = _struct_I.unpack(str[start:end])
00262 start = end
00263 end += length
00264 self.action_result.header.frame_id = str[start:end]
00265 _x = self
00266 start = end
00267 end += 8
00268 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00269 start = end
00270 end += 4
00271 (length,) = _struct_I.unpack(str[start:end])
00272 start = end
00273 end += length
00274 self.action_result.status.goal_id.id = str[start:end]
00275 start = end
00276 end += 1
00277 (self.action_result.status.status,) = _struct_B.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.text = str[start:end]
00284 start = end
00285 end += 4
00286 (length,) = _struct_I.unpack(str[start:end])
00287 start = end
00288 end += length
00289 self.action_result.result.answer = str[start:end]
00290 _x = self
00291 start = end
00292 end += 12
00293 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00294 start = end
00295 end += 4
00296 (length,) = _struct_I.unpack(str[start:end])
00297 start = end
00298 end += length
00299 self.action_feedback.header.frame_id = str[start:end]
00300 _x = self
00301 start = end
00302 end += 8
00303 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00304 start = end
00305 end += 4
00306 (length,) = _struct_I.unpack(str[start:end])
00307 start = end
00308 end += length
00309 self.action_feedback.status.goal_id.id = str[start:end]
00310 start = end
00311 end += 1
00312 (self.action_feedback.status.status,) = _struct_B.unpack(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_feedback.status.text = 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.feedback.rightnow = str[start:end]
00325 return self
00326 except struct.error, e:
00327 raise roslib.message.DeserializationError(e)
00328
00329
00330 def serialize_numpy(self, buff, numpy):
00331 """
00332 serialize message with numpy array types into buffer
00333 @param buff: buffer
00334 @type buff: StringIO
00335 @param numpy: numpy python module
00336 @type numpy module
00337 """
00338 try:
00339 _x = self
00340 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00341 _x = self.action_goal.header.frame_id
00342 length = len(_x)
00343 buff.write(struct.pack('<I%ss'%length, length, _x))
00344 _x = self
00345 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00346 _x = self.action_goal.goal_id.id
00347 length = len(_x)
00348 buff.write(struct.pack('<I%ss'%length, length, _x))
00349 _x = self.action_goal.goal.command
00350 length = len(_x)
00351 buff.write(struct.pack('<I%ss'%length, length, _x))
00352 _x = self
00353 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00354 _x = self.action_result.header.frame_id
00355 length = len(_x)
00356 buff.write(struct.pack('<I%ss'%length, length, _x))
00357 _x = self
00358 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00359 _x = self.action_result.status.goal_id.id
00360 length = len(_x)
00361 buff.write(struct.pack('<I%ss'%length, length, _x))
00362 buff.write(_struct_B.pack(self.action_result.status.status))
00363 _x = self.action_result.status.text
00364 length = len(_x)
00365 buff.write(struct.pack('<I%ss'%length, length, _x))
00366 _x = self.action_result.result.answer
00367 length = len(_x)
00368 buff.write(struct.pack('<I%ss'%length, length, _x))
00369 _x = self
00370 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00371 _x = self.action_feedback.header.frame_id
00372 length = len(_x)
00373 buff.write(struct.pack('<I%ss'%length, length, _x))
00374 _x = self
00375 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00376 _x = self.action_feedback.status.goal_id.id
00377 length = len(_x)
00378 buff.write(struct.pack('<I%ss'%length, length, _x))
00379 buff.write(_struct_B.pack(self.action_feedback.status.status))
00380 _x = self.action_feedback.status.text
00381 length = len(_x)
00382 buff.write(struct.pack('<I%ss'%length, length, _x))
00383 _x = self.action_feedback.feedback.rightnow
00384 length = len(_x)
00385 buff.write(struct.pack('<I%ss'%length, length, _x))
00386 except struct.error, se: self._check_types(se)
00387 except TypeError, te: self._check_types(te)
00388
00389 def deserialize_numpy(self, str, numpy):
00390 """
00391 unpack serialized message in str into this message instance using numpy for array types
00392 @param str: byte array of serialized message
00393 @type str: str
00394 @param numpy: numpy python module
00395 @type numpy: module
00396 """
00397 try:
00398 if self.action_goal is None:
00399 self.action_goal = cogman_msgs.msg.StringsActionGoal()
00400 if self.action_result is None:
00401 self.action_result = cogman_msgs.msg.StringsActionResult()
00402 if self.action_feedback is None:
00403 self.action_feedback = cogman_msgs.msg.StringsActionFeedback()
00404 end = 0
00405 _x = self
00406 start = end
00407 end += 12
00408 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00409 start = end
00410 end += 4
00411 (length,) = _struct_I.unpack(str[start:end])
00412 start = end
00413 end += length
00414 self.action_goal.header.frame_id = str[start:end]
00415 _x = self
00416 start = end
00417 end += 8
00418 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00419 start = end
00420 end += 4
00421 (length,) = _struct_I.unpack(str[start:end])
00422 start = end
00423 end += length
00424 self.action_goal.goal_id.id = str[start:end]
00425 start = end
00426 end += 4
00427 (length,) = _struct_I.unpack(str[start:end])
00428 start = end
00429 end += length
00430 self.action_goal.goal.command = str[start:end]
00431 _x = self
00432 start = end
00433 end += 12
00434 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00435 start = end
00436 end += 4
00437 (length,) = _struct_I.unpack(str[start:end])
00438 start = end
00439 end += length
00440 self.action_result.header.frame_id = str[start:end]
00441 _x = self
00442 start = end
00443 end += 8
00444 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.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 self.action_result.status.goal_id.id = str[start:end]
00451 start = end
00452 end += 1
00453 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00454 start = end
00455 end += 4
00456 (length,) = _struct_I.unpack(str[start:end])
00457 start = end
00458 end += length
00459 self.action_result.status.text = 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_result.result.answer = str[start:end]
00466 _x = self
00467 start = end
00468 end += 12
00469 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00470 start = end
00471 end += 4
00472 (length,) = _struct_I.unpack(str[start:end])
00473 start = end
00474 end += length
00475 self.action_feedback.header.frame_id = str[start:end]
00476 _x = self
00477 start = end
00478 end += 8
00479 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00480 start = end
00481 end += 4
00482 (length,) = _struct_I.unpack(str[start:end])
00483 start = end
00484 end += length
00485 self.action_feedback.status.goal_id.id = str[start:end]
00486 start = end
00487 end += 1
00488 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00489 start = end
00490 end += 4
00491 (length,) = _struct_I.unpack(str[start:end])
00492 start = end
00493 end += length
00494 self.action_feedback.status.text = str[start:end]
00495 start = end
00496 end += 4
00497 (length,) = _struct_I.unpack(str[start:end])
00498 start = end
00499 end += length
00500 self.action_feedback.feedback.rightnow = str[start:end]
00501 return self
00502 except struct.error, e:
00503 raise roslib.message.DeserializationError(e)
00504
00505 _struct_I = roslib.message.struct_I
00506 _struct_3I = struct.Struct("<3I")
00507 _struct_B = struct.Struct("<B")
00508 _struct_2I = struct.Struct("<2I")