00001 """autogenerated by genmsg_py from StateActionGoal.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 StateActionGoal(roslib.message.Message):
00011 _md5sum = "f58b9a5222bb93570e16f2c52ca3ec7b"
00012 _type = "cob_script_server/StateActionGoal"
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 StateGoal 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: cob_script_server/StateGoal
00053 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00054 #goal definition
00055 cob_script_server/ScriptState state
00056
00057 ================================================================================
00058 MSG: cob_script_server/ScriptState
00059 Header header
00060 int16 number
00061 string function_name
00062 string component_name
00063 string parameter_name
00064 string full_graph_name
00065
00066 # Possible execution states
00067 byte UNKNOWN=0
00068 byte ACTIVE=1
00069 byte SUCCEEDED=2
00070 byte FAILED=3
00071 byte PAUSED=4
00072
00073 byte state # state of execution
00074 int16 error_code # current error_code for state
00075
00076 """
00077 __slots__ = ['header','goal_id','goal']
00078 _slot_types = ['Header','actionlib_msgs/GoalID','cob_script_server/StateGoal']
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,goal_id,goal
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(StateActionGoal, self).__init__(*args, **kwds)
00096
00097 if self.header is None:
00098 self.header = std_msgs.msg._Header.Header()
00099 if self.goal_id is None:
00100 self.goal_id = actionlib_msgs.msg.GoalID()
00101 if self.goal is None:
00102 self.goal = cob_script_server.msg.StateGoal()
00103 else:
00104 self.header = std_msgs.msg._Header.Header()
00105 self.goal_id = actionlib_msgs.msg.GoalID()
00106 self.goal = cob_script_server.msg.StateGoal()
00107
00108 def _get_types(self):
00109 """
00110 internal API method
00111 """
00112 return self._slot_types
00113
00114 def serialize(self, buff):
00115 """
00116 serialize message into buffer
00117 @param buff: buffer
00118 @type buff: StringIO
00119 """
00120 try:
00121 _x = self
00122 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00123 _x = self.header.frame_id
00124 length = len(_x)
00125 buff.write(struct.pack('<I%ss'%length, length, _x))
00126 _x = self
00127 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00128 _x = self.goal_id.id
00129 length = len(_x)
00130 buff.write(struct.pack('<I%ss'%length, length, _x))
00131 _x = self
00132 buff.write(_struct_3I.pack(_x.goal.state.header.seq, _x.goal.state.header.stamp.secs, _x.goal.state.header.stamp.nsecs))
00133 _x = self.goal.state.header.frame_id
00134 length = len(_x)
00135 buff.write(struct.pack('<I%ss'%length, length, _x))
00136 buff.write(_struct_h.pack(self.goal.state.number))
00137 _x = self.goal.state.function_name
00138 length = len(_x)
00139 buff.write(struct.pack('<I%ss'%length, length, _x))
00140 _x = self.goal.state.component_name
00141 length = len(_x)
00142 buff.write(struct.pack('<I%ss'%length, length, _x))
00143 _x = self.goal.state.parameter_name
00144 length = len(_x)
00145 buff.write(struct.pack('<I%ss'%length, length, _x))
00146 _x = self.goal.state.full_graph_name
00147 length = len(_x)
00148 buff.write(struct.pack('<I%ss'%length, length, _x))
00149 _x = self
00150 buff.write(_struct_bh.pack(_x.goal.state.state, _x.goal.state.error_code))
00151 except struct.error, se: self._check_types(se)
00152 except TypeError, te: self._check_types(te)
00153
00154 def deserialize(self, str):
00155 """
00156 unpack serialized message in str into this message instance
00157 @param str: byte array of serialized message
00158 @type str: str
00159 """
00160 try:
00161 if self.header is None:
00162 self.header = std_msgs.msg._Header.Header()
00163 if self.goal_id is None:
00164 self.goal_id = actionlib_msgs.msg.GoalID()
00165 if self.goal is None:
00166 self.goal = cob_script_server.msg.StateGoal()
00167 end = 0
00168 _x = self
00169 start = end
00170 end += 12
00171 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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 self.header.frame_id = str[start:end]
00178 _x = self
00179 start = end
00180 end += 8
00181 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00182 start = end
00183 end += 4
00184 (length,) = _struct_I.unpack(str[start:end])
00185 start = end
00186 end += length
00187 self.goal_id.id = str[start:end]
00188 _x = self
00189 start = end
00190 end += 12
00191 (_x.goal.state.header.seq, _x.goal.state.header.stamp.secs, _x.goal.state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00192 start = end
00193 end += 4
00194 (length,) = _struct_I.unpack(str[start:end])
00195 start = end
00196 end += length
00197 self.goal.state.header.frame_id = str[start:end]
00198 start = end
00199 end += 2
00200 (self.goal.state.number,) = _struct_h.unpack(str[start:end])
00201 start = end
00202 end += 4
00203 (length,) = _struct_I.unpack(str[start:end])
00204 start = end
00205 end += length
00206 self.goal.state.function_name = str[start:end]
00207 start = end
00208 end += 4
00209 (length,) = _struct_I.unpack(str[start:end])
00210 start = end
00211 end += length
00212 self.goal.state.component_name = str[start:end]
00213 start = end
00214 end += 4
00215 (length,) = _struct_I.unpack(str[start:end])
00216 start = end
00217 end += length
00218 self.goal.state.parameter_name = str[start:end]
00219 start = end
00220 end += 4
00221 (length,) = _struct_I.unpack(str[start:end])
00222 start = end
00223 end += length
00224 self.goal.state.full_graph_name = str[start:end]
00225 _x = self
00226 start = end
00227 end += 3
00228 (_x.goal.state.state, _x.goal.state.error_code,) = _struct_bh.unpack(str[start:end])
00229 return self
00230 except struct.error, e:
00231 raise roslib.message.DeserializationError(e)
00232
00233
00234 def serialize_numpy(self, buff, numpy):
00235 """
00236 serialize message with numpy array types into buffer
00237 @param buff: buffer
00238 @type buff: StringIO
00239 @param numpy: numpy python module
00240 @type numpy module
00241 """
00242 try:
00243 _x = self
00244 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00245 _x = self.header.frame_id
00246 length = len(_x)
00247 buff.write(struct.pack('<I%ss'%length, length, _x))
00248 _x = self
00249 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00250 _x = self.goal_id.id
00251 length = len(_x)
00252 buff.write(struct.pack('<I%ss'%length, length, _x))
00253 _x = self
00254 buff.write(_struct_3I.pack(_x.goal.state.header.seq, _x.goal.state.header.stamp.secs, _x.goal.state.header.stamp.nsecs))
00255 _x = self.goal.state.header.frame_id
00256 length = len(_x)
00257 buff.write(struct.pack('<I%ss'%length, length, _x))
00258 buff.write(_struct_h.pack(self.goal.state.number))
00259 _x = self.goal.state.function_name
00260 length = len(_x)
00261 buff.write(struct.pack('<I%ss'%length, length, _x))
00262 _x = self.goal.state.component_name
00263 length = len(_x)
00264 buff.write(struct.pack('<I%ss'%length, length, _x))
00265 _x = self.goal.state.parameter_name
00266 length = len(_x)
00267 buff.write(struct.pack('<I%ss'%length, length, _x))
00268 _x = self.goal.state.full_graph_name
00269 length = len(_x)
00270 buff.write(struct.pack('<I%ss'%length, length, _x))
00271 _x = self
00272 buff.write(_struct_bh.pack(_x.goal.state.state, _x.goal.state.error_code))
00273 except struct.error, se: self._check_types(se)
00274 except TypeError, te: self._check_types(te)
00275
00276 def deserialize_numpy(self, str, numpy):
00277 """
00278 unpack serialized message in str into this message instance using numpy for array types
00279 @param str: byte array of serialized message
00280 @type str: str
00281 @param numpy: numpy python module
00282 @type numpy: module
00283 """
00284 try:
00285 if self.header is None:
00286 self.header = std_msgs.msg._Header.Header()
00287 if self.goal_id is None:
00288 self.goal_id = actionlib_msgs.msg.GoalID()
00289 if self.goal is None:
00290 self.goal = cob_script_server.msg.StateGoal()
00291 end = 0
00292 _x = self
00293 start = end
00294 end += 12
00295 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00296 start = end
00297 end += 4
00298 (length,) = _struct_I.unpack(str[start:end])
00299 start = end
00300 end += length
00301 self.header.frame_id = str[start:end]
00302 _x = self
00303 start = end
00304 end += 8
00305 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00306 start = end
00307 end += 4
00308 (length,) = _struct_I.unpack(str[start:end])
00309 start = end
00310 end += length
00311 self.goal_id.id = str[start:end]
00312 _x = self
00313 start = end
00314 end += 12
00315 (_x.goal.state.header.seq, _x.goal.state.header.stamp.secs, _x.goal.state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00316 start = end
00317 end += 4
00318 (length,) = _struct_I.unpack(str[start:end])
00319 start = end
00320 end += length
00321 self.goal.state.header.frame_id = str[start:end]
00322 start = end
00323 end += 2
00324 (self.goal.state.number,) = _struct_h.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 self.goal.state.function_name = str[start:end]
00331 start = end
00332 end += 4
00333 (length,) = _struct_I.unpack(str[start:end])
00334 start = end
00335 end += length
00336 self.goal.state.component_name = str[start:end]
00337 start = end
00338 end += 4
00339 (length,) = _struct_I.unpack(str[start:end])
00340 start = end
00341 end += length
00342 self.goal.state.parameter_name = str[start:end]
00343 start = end
00344 end += 4
00345 (length,) = _struct_I.unpack(str[start:end])
00346 start = end
00347 end += length
00348 self.goal.state.full_graph_name = str[start:end]
00349 _x = self
00350 start = end
00351 end += 3
00352 (_x.goal.state.state, _x.goal.state.error_code,) = _struct_bh.unpack(str[start:end])
00353 return self
00354 except struct.error, e:
00355 raise roslib.message.DeserializationError(e)
00356
00357 _struct_I = roslib.message.struct_I
00358 _struct_h = struct.Struct("<h")
00359 _struct_3I = struct.Struct("<3I")
00360 _struct_bh = struct.Struct("<bh")
00361 _struct_2I = struct.Struct("<2I")