00001 """autogenerated by genmsg_py from TestRequestActionGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import actionlib.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class TestRequestActionGoal(roslib.message.Message):
00011 _md5sum = "1889556d3fef88f821c7cb004e4251f3"
00012 _type = "actionlib/TestRequestActionGoal"
00013 _has_header = True
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 Header header
00017 actionlib_msgs/GoalID goal_id
00018 TestRequestGoal goal
00019
00020 ================================================================================
00021 MSG: std_msgs/Header
00022 # Standard metadata for higher-level stamped data types.
00023 # This is generally used to communicate timestamped data
00024 # in a particular coordinate frame.
00025 #
00026 # sequence ID: consecutively increasing ID
00027 uint32 seq
00028 #Two-integer timestamp that is expressed as:
00029 # * stamp.secs: seconds (stamp_secs) since epoch
00030 # * stamp.nsecs: nanoseconds since stamp_secs
00031 # time-handling sugar is provided by the client library
00032 time stamp
00033 #Frame this data is associated with
00034 # 0: no frame
00035 # 1: global frame
00036 string frame_id
00037
00038 ================================================================================
00039 MSG: actionlib_msgs/GoalID
00040 # The stamp should store the time at which this goal was requested.
00041 # It is used by an action server when it tries to preempt all
00042 # goals that were requested before a certain time
00043 time stamp
00044
00045 # The id provides a way to associate feedback and
00046 # result message with specific goal requests. The id
00047 # specified must be unique.
00048 string id
00049
00050
00051 ================================================================================
00052 MSG: actionlib/TestRequestGoal
00053 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00054 int32 TERMINATE_SUCCESS = 0
00055 int32 TERMINATE_ABORTED = 1
00056 int32 TERMINATE_REJECTED = 2
00057 int32 TERMINATE_LOSE = 3
00058 int32 TERMINATE_DROP = 4
00059 int32 TERMINATE_EXCEPTION = 5
00060 int32 terminate_status
00061 bool ignore_cancel # If true, ignores requests to cancel
00062 string result_text
00063 int32 the_result # Desired value for the_result in the Result
00064 bool is_simple_client
00065 duration delay_accept # Delays accepting the goal by this amount of time
00066 duration delay_terminate # Delays terminating for this amount of time
00067 duration pause_status # Pauses the status messages for this amount of time
00068
00069 """
00070 __slots__ = ['header','goal_id','goal']
00071 _slot_types = ['Header','actionlib_msgs/GoalID','actionlib/TestRequestGoal']
00072
00073 def __init__(self, *args, **kwds):
00074 """
00075 Constructor. Any message fields that are implicitly/explicitly
00076 set to None will be assigned a default value. The recommend
00077 use is keyword arguments as this is more robust to future message
00078 changes. You cannot mix in-order arguments and keyword arguments.
00079
00080 The available fields are:
00081 header,goal_id,goal
00082
00083 @param args: complete set of field values, in .msg order
00084 @param kwds: use keyword arguments corresponding to message field names
00085 to set specific fields.
00086 """
00087 if args or kwds:
00088 super(TestRequestActionGoal, self).__init__(*args, **kwds)
00089
00090 if self.header is None:
00091 self.header = std_msgs.msg._Header.Header()
00092 if self.goal_id is None:
00093 self.goal_id = actionlib_msgs.msg.GoalID()
00094 if self.goal is None:
00095 self.goal = actionlib.msg.TestRequestGoal()
00096 else:
00097 self.header = std_msgs.msg._Header.Header()
00098 self.goal_id = actionlib_msgs.msg.GoalID()
00099 self.goal = actionlib.msg.TestRequestGoal()
00100
00101 def _get_types(self):
00102 """
00103 internal API method
00104 """
00105 return self._slot_types
00106
00107 def serialize(self, buff):
00108 """
00109 serialize message into buffer
00110 @param buff: buffer
00111 @type buff: StringIO
00112 """
00113 try:
00114 _x = self
00115 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00116 _x = self.header.frame_id
00117 length = len(_x)
00118 buff.write(struct.pack('<I%ss'%length, length, _x))
00119 _x = self
00120 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00121 _x = self.goal_id.id
00122 length = len(_x)
00123 buff.write(struct.pack('<I%ss'%length, length, _x))
00124 _x = self
00125 buff.write(_struct_iB.pack(_x.goal.terminate_status, _x.goal.ignore_cancel))
00126 _x = self.goal.result_text
00127 length = len(_x)
00128 buff.write(struct.pack('<I%ss'%length, length, _x))
00129 _x = self
00130 buff.write(_struct_iB6i.pack(_x.goal.the_result, _x.goal.is_simple_client, _x.goal.delay_accept.secs, _x.goal.delay_accept.nsecs, _x.goal.delay_terminate.secs, _x.goal.delay_terminate.nsecs, _x.goal.pause_status.secs, _x.goal.pause_status.nsecs))
00131 except struct.error, se: self._check_types(se)
00132 except TypeError, te: self._check_types(te)
00133
00134 def deserialize(self, str):
00135 """
00136 unpack serialized message in str into this message instance
00137 @param str: byte array of serialized message
00138 @type str: str
00139 """
00140 try:
00141 if self.header is None:
00142 self.header = std_msgs.msg._Header.Header()
00143 if self.goal_id is None:
00144 self.goal_id = actionlib_msgs.msg.GoalID()
00145 if self.goal is None:
00146 self.goal = actionlib.msg.TestRequestGoal()
00147 end = 0
00148 _x = self
00149 start = end
00150 end += 12
00151 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00152 start = end
00153 end += 4
00154 (length,) = _struct_I.unpack(str[start:end])
00155 start = end
00156 end += length
00157 self.header.frame_id = str[start:end]
00158 _x = self
00159 start = end
00160 end += 8
00161 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00162 start = end
00163 end += 4
00164 (length,) = _struct_I.unpack(str[start:end])
00165 start = end
00166 end += length
00167 self.goal_id.id = str[start:end]
00168 _x = self
00169 start = end
00170 end += 5
00171 (_x.goal.terminate_status, _x.goal.ignore_cancel,) = _struct_iB.unpack(str[start:end])
00172 self.goal.ignore_cancel = bool(self.goal.ignore_cancel)
00173 start = end
00174 end += 4
00175 (length,) = _struct_I.unpack(str[start:end])
00176 start = end
00177 end += length
00178 self.goal.result_text = str[start:end]
00179 _x = self
00180 start = end
00181 end += 29
00182 (_x.goal.the_result, _x.goal.is_simple_client, _x.goal.delay_accept.secs, _x.goal.delay_accept.nsecs, _x.goal.delay_terminate.secs, _x.goal.delay_terminate.nsecs, _x.goal.pause_status.secs, _x.goal.pause_status.nsecs,) = _struct_iB6i.unpack(str[start:end])
00183 self.goal.is_simple_client = bool(self.goal.is_simple_client)
00184 return self
00185 except struct.error, e:
00186 raise roslib.message.DeserializationError(e)
00187
00188
00189 def serialize_numpy(self, buff, numpy):
00190 """
00191 serialize message with numpy array types into buffer
00192 @param buff: buffer
00193 @type buff: StringIO
00194 @param numpy: numpy python module
00195 @type numpy module
00196 """
00197 try:
00198 _x = self
00199 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00200 _x = self.header.frame_id
00201 length = len(_x)
00202 buff.write(struct.pack('<I%ss'%length, length, _x))
00203 _x = self
00204 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00205 _x = self.goal_id.id
00206 length = len(_x)
00207 buff.write(struct.pack('<I%ss'%length, length, _x))
00208 _x = self
00209 buff.write(_struct_iB.pack(_x.goal.terminate_status, _x.goal.ignore_cancel))
00210 _x = self.goal.result_text
00211 length = len(_x)
00212 buff.write(struct.pack('<I%ss'%length, length, _x))
00213 _x = self
00214 buff.write(_struct_iB6i.pack(_x.goal.the_result, _x.goal.is_simple_client, _x.goal.delay_accept.secs, _x.goal.delay_accept.nsecs, _x.goal.delay_terminate.secs, _x.goal.delay_terminate.nsecs, _x.goal.pause_status.secs, _x.goal.pause_status.nsecs))
00215 except struct.error, se: self._check_types(se)
00216 except TypeError, te: self._check_types(te)
00217
00218 def deserialize_numpy(self, str, numpy):
00219 """
00220 unpack serialized message in str into this message instance using numpy for array types
00221 @param str: byte array of serialized message
00222 @type str: str
00223 @param numpy: numpy python module
00224 @type numpy: module
00225 """
00226 try:
00227 if self.header is None:
00228 self.header = std_msgs.msg._Header.Header()
00229 if self.goal_id is None:
00230 self.goal_id = actionlib_msgs.msg.GoalID()
00231 if self.goal is None:
00232 self.goal = actionlib.msg.TestRequestGoal()
00233 end = 0
00234 _x = self
00235 start = end
00236 end += 12
00237 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00238 start = end
00239 end += 4
00240 (length,) = _struct_I.unpack(str[start:end])
00241 start = end
00242 end += length
00243 self.header.frame_id = str[start:end]
00244 _x = self
00245 start = end
00246 end += 8
00247 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.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 self.goal_id.id = str[start:end]
00254 _x = self
00255 start = end
00256 end += 5
00257 (_x.goal.terminate_status, _x.goal.ignore_cancel,) = _struct_iB.unpack(str[start:end])
00258 self.goal.ignore_cancel = bool(self.goal.ignore_cancel)
00259 start = end
00260 end += 4
00261 (length,) = _struct_I.unpack(str[start:end])
00262 start = end
00263 end += length
00264 self.goal.result_text = str[start:end]
00265 _x = self
00266 start = end
00267 end += 29
00268 (_x.goal.the_result, _x.goal.is_simple_client, _x.goal.delay_accept.secs, _x.goal.delay_accept.nsecs, _x.goal.delay_terminate.secs, _x.goal.delay_terminate.nsecs, _x.goal.pause_status.secs, _x.goal.pause_status.nsecs,) = _struct_iB6i.unpack(str[start:end])
00269 self.goal.is_simple_client = bool(self.goal.is_simple_client)
00270 return self
00271 except struct.error, e:
00272 raise roslib.message.DeserializationError(e)
00273
00274 _struct_I = roslib.message.struct_I
00275 _struct_iB6i = struct.Struct("<iB6i")
00276 _struct_3I = struct.Struct("<3I")
00277 _struct_iB = struct.Struct("<iB")
00278 _struct_2I = struct.Struct("<2I")