$search
00001 """autogenerated by genmsg_py from GoalStatusArray.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import actionlib_msgs.msg 00007 import std_msgs.msg 00008 00009 class GoalStatusArray(roslib.message.Message): 00010 _md5sum = "8b2b82f13216d0a8ea88bd3af735e619" 00011 _type = "actionlib_msgs/GoalStatusArray" 00012 _has_header = True #flag to mark the presence of a Header object 00013 _full_text = """# Stores the statuses for goals that are currently being tracked 00014 # by an action server 00015 Header header 00016 GoalStatus[] status_list 00017 00018 00019 ================================================================================ 00020 MSG: std_msgs/Header 00021 # Standard metadata for higher-level stamped data types. 00022 # This is generally used to communicate timestamped data 00023 # in a particular coordinate frame. 00024 # 00025 # sequence ID: consecutively increasing ID 00026 uint32 seq 00027 #Two-integer timestamp that is expressed as: 00028 # * stamp.secs: seconds (stamp_secs) since epoch 00029 # * stamp.nsecs: nanoseconds since stamp_secs 00030 # time-handling sugar is provided by the client library 00031 time stamp 00032 #Frame this data is associated with 00033 # 0: no frame 00034 # 1: global frame 00035 string frame_id 00036 00037 ================================================================================ 00038 MSG: actionlib_msgs/GoalStatus 00039 GoalID goal_id 00040 uint8 status 00041 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00042 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00043 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00044 # and has since completed its execution (Terminal State) 00045 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00046 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00047 # to some failure (Terminal State) 00048 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00049 # because the goal was unattainable or invalid (Terminal State) 00050 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00051 # and has not yet completed execution 00052 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00053 # but the action server has not yet confirmed that the goal is canceled 00054 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00055 # and was successfully cancelled (Terminal State) 00056 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00057 # sent over the wire by an action server 00058 00059 #Allow for the user to associate a string with GoalStatus for debugging 00060 string text 00061 00062 00063 ================================================================================ 00064 MSG: actionlib_msgs/GoalID 00065 # The stamp should store the time at which this goal was requested. 00066 # It is used by an action server when it tries to preempt all 00067 # goals that were requested before a certain time 00068 time stamp 00069 00070 # The id provides a way to associate feedback and 00071 # result message with specific goal requests. The id 00072 # specified must be unique. 00073 string id 00074 00075 00076 """ 00077 __slots__ = ['header','status_list'] 00078 _slot_types = ['Header','actionlib_msgs/GoalStatus[]'] 00079 00080 def __init__(self, *args, **kwds): 00081 """ 00082 Constructor. Any message fields that are implicitly/explicitly 00083 set to None will be assigned a default value. The recommend 00084 use is keyword arguments as this is more robust to future message 00085 changes. You cannot mix in-order arguments and keyword arguments. 00086 00087 The available fields are: 00088 header,status_list 00089 00090 @param args: complete set of field values, in .msg order 00091 @param kwds: use keyword arguments corresponding to message field names 00092 to set specific fields. 00093 """ 00094 if args or kwds: 00095 super(GoalStatusArray, self).__init__(*args, **kwds) 00096 #message fields cannot be None, assign default values for those that are 00097 if self.header is None: 00098 self.header = std_msgs.msg._Header.Header() 00099 if self.status_list is None: 00100 self.status_list = [] 00101 else: 00102 self.header = std_msgs.msg._Header.Header() 00103 self.status_list = [] 00104 00105 def _get_types(self): 00106 """ 00107 internal API method 00108 """ 00109 return self._slot_types 00110 00111 def serialize(self, buff): 00112 """ 00113 serialize message into buffer 00114 @param buff: buffer 00115 @type buff: StringIO 00116 """ 00117 try: 00118 _x = self 00119 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00120 _x = self.header.frame_id 00121 length = len(_x) 00122 buff.write(struct.pack('<I%ss'%length, length, _x)) 00123 length = len(self.status_list) 00124 buff.write(_struct_I.pack(length)) 00125 for val1 in self.status_list: 00126 _v1 = val1.goal_id 00127 _v2 = _v1.stamp 00128 _x = _v2 00129 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00130 _x = _v1.id 00131 length = len(_x) 00132 buff.write(struct.pack('<I%ss'%length, length, _x)) 00133 buff.write(_struct_B.pack(val1.status)) 00134 _x = val1.text 00135 length = len(_x) 00136 buff.write(struct.pack('<I%ss'%length, length, _x)) 00137 except struct.error as se: self._check_types(se) 00138 except TypeError as te: self._check_types(te) 00139 00140 def deserialize(self, str): 00141 """ 00142 unpack serialized message in str into this message instance 00143 @param str: byte array of serialized message 00144 @type str: str 00145 """ 00146 try: 00147 if self.header is None: 00148 self.header = std_msgs.msg._Header.Header() 00149 end = 0 00150 _x = self 00151 start = end 00152 end += 12 00153 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00154 start = end 00155 end += 4 00156 (length,) = _struct_I.unpack(str[start:end]) 00157 start = end 00158 end += length 00159 self.header.frame_id = str[start:end] 00160 start = end 00161 end += 4 00162 (length,) = _struct_I.unpack(str[start:end]) 00163 self.status_list = [] 00164 for i in range(0, length): 00165 val1 = actionlib_msgs.msg.GoalStatus() 00166 _v3 = val1.goal_id 00167 _v4 = _v3.stamp 00168 _x = _v4 00169 start = end 00170 end += 8 00171 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00172 start = end 00173 end += 4 00174 (length,) = _struct_I.unpack(str[start:end]) 00175 start = end 00176 end += length 00177 _v3.id = str[start:end] 00178 start = end 00179 end += 1 00180 (val1.status,) = _struct_B.unpack(str[start:end]) 00181 start = end 00182 end += 4 00183 (length,) = _struct_I.unpack(str[start:end]) 00184 start = end 00185 end += length 00186 val1.text = str[start:end] 00187 self.status_list.append(val1) 00188 return self 00189 except struct.error as e: 00190 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00191 00192 00193 def serialize_numpy(self, buff, numpy): 00194 """ 00195 serialize message with numpy array types into buffer 00196 @param buff: buffer 00197 @type buff: StringIO 00198 @param numpy: numpy python module 00199 @type numpy module 00200 """ 00201 try: 00202 _x = self 00203 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00204 _x = self.header.frame_id 00205 length = len(_x) 00206 buff.write(struct.pack('<I%ss'%length, length, _x)) 00207 length = len(self.status_list) 00208 buff.write(_struct_I.pack(length)) 00209 for val1 in self.status_list: 00210 _v5 = val1.goal_id 00211 _v6 = _v5.stamp 00212 _x = _v6 00213 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00214 _x = _v5.id 00215 length = len(_x) 00216 buff.write(struct.pack('<I%ss'%length, length, _x)) 00217 buff.write(_struct_B.pack(val1.status)) 00218 _x = val1.text 00219 length = len(_x) 00220 buff.write(struct.pack('<I%ss'%length, length, _x)) 00221 except struct.error as se: self._check_types(se) 00222 except TypeError as te: self._check_types(te) 00223 00224 def deserialize_numpy(self, str, numpy): 00225 """ 00226 unpack serialized message in str into this message instance using numpy for array types 00227 @param str: byte array of serialized message 00228 @type str: str 00229 @param numpy: numpy python module 00230 @type numpy: module 00231 """ 00232 try: 00233 if self.header is None: 00234 self.header = std_msgs.msg._Header.Header() 00235 end = 0 00236 _x = self 00237 start = end 00238 end += 12 00239 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00240 start = end 00241 end += 4 00242 (length,) = _struct_I.unpack(str[start:end]) 00243 start = end 00244 end += length 00245 self.header.frame_id = str[start:end] 00246 start = end 00247 end += 4 00248 (length,) = _struct_I.unpack(str[start:end]) 00249 self.status_list = [] 00250 for i in range(0, length): 00251 val1 = actionlib_msgs.msg.GoalStatus() 00252 _v7 = val1.goal_id 00253 _v8 = _v7.stamp 00254 _x = _v8 00255 start = end 00256 end += 8 00257 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00258 start = end 00259 end += 4 00260 (length,) = _struct_I.unpack(str[start:end]) 00261 start = end 00262 end += length 00263 _v7.id = str[start:end] 00264 start = end 00265 end += 1 00266 (val1.status,) = _struct_B.unpack(str[start:end]) 00267 start = end 00268 end += 4 00269 (length,) = _struct_I.unpack(str[start:end]) 00270 start = end 00271 end += length 00272 val1.text = str[start:end] 00273 self.status_list.append(val1) 00274 return self 00275 except struct.error as e: 00276 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00277 00278 _struct_I = roslib.message.struct_I 00279 _struct_3I = struct.Struct("<3I") 00280 _struct_B = struct.Struct("<B") 00281 _struct_2I = struct.Struct("<2I")