00001 """autogenerated by genmsg_py from ConfigActionGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006 import actionlib_msgs.msg
00007 import joint_states_settler.msg
00008 import std_msgs.msg
00009
00010 class ConfigActionGoal(roslib.message.Message):
00011 _md5sum = "f19566577bee3cc11a5cee78c14228fe"
00012 _type = "joint_states_settler/ConfigActionGoal"
00013 _has_header = True
00014 _full_text = """
00015 Header header
00016 actionlib_msgs/GoalID goal_id
00017 ConfigGoal goal
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/GoalID
00039 # The stamp should store the time at which this goal was requested.
00040 # It is used by an action server when it tries to preempt all
00041 # goals that were requested before a certain time
00042 time stamp
00043
00044 # The id provides a way to associate feedback and
00045 # result message with specific goal requests. The id
00046 # specified must be unique.
00047 string id
00048
00049
00050 ================================================================================
00051 MSG: joint_states_settler/ConfigGoal
00052 string[] joint_names # Names of the joints we're waiting to settle
00053 float64[] tolerances # Tolerance on each of the specified joints
00054 duration max_step # The maximum timestep between two elements in an interval
00055 uint32 cache_size # The size of our cache when searching for an interval
00056
00057 """
00058 __slots__ = ['header','goal_id','goal']
00059 _slot_types = ['Header','actionlib_msgs/GoalID','joint_states_settler/ConfigGoal']
00060
00061 def __init__(self, *args, **kwds):
00062 """
00063 Constructor. Any message fields that are implicitly/explicitly
00064 set to None will be assigned a default value. The recommend
00065 use is keyword arguments as this is more robust to future message
00066 changes. You cannot mix in-order arguments and keyword arguments.
00067
00068 The available fields are:
00069 header,goal_id,goal
00070
00071 @param args: complete set of field values, in .msg order
00072 @param kwds: use keyword arguments corresponding to message field names
00073 to set specific fields.
00074 """
00075 if args or kwds:
00076 super(ConfigActionGoal, self).__init__(*args, **kwds)
00077
00078 if self.header is None:
00079 self.header = std_msgs.msg._Header.Header()
00080 if self.goal_id is None:
00081 self.goal_id = actionlib_msgs.msg.GoalID()
00082 if self.goal is None:
00083 self.goal = joint_states_settler.msg.ConfigGoal()
00084 else:
00085 self.header = std_msgs.msg._Header.Header()
00086 self.goal_id = actionlib_msgs.msg.GoalID()
00087 self.goal = joint_states_settler.msg.ConfigGoal()
00088
00089 def _get_types(self):
00090 """
00091 internal API method
00092 """
00093 return self._slot_types
00094
00095 def serialize(self, buff):
00096 """
00097 serialize message into buffer
00098 @param buff: buffer
00099 @type buff: StringIO
00100 """
00101 try:
00102 _x = self
00103 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00104 _x = self.header.frame_id
00105 length = len(_x)
00106 buff.write(struct.pack('<I%ss'%length, length, _x))
00107 _x = self
00108 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00109 _x = self.goal_id.id
00110 length = len(_x)
00111 buff.write(struct.pack('<I%ss'%length, length, _x))
00112 length = len(self.goal.joint_names)
00113 buff.write(_struct_I.pack(length))
00114 for val1 in self.goal.joint_names:
00115 length = len(val1)
00116 buff.write(struct.pack('<I%ss'%length, length, val1))
00117 length = len(self.goal.tolerances)
00118 buff.write(_struct_I.pack(length))
00119 pattern = '<%sd'%length
00120 buff.write(struct.pack(pattern, *self.goal.tolerances))
00121 _x = self
00122 buff.write(_struct_2iI.pack(_x.goal.max_step.secs, _x.goal.max_step.nsecs, _x.goal.cache_size))
00123 except struct.error, se: self._check_types(se)
00124 except TypeError, te: self._check_types(te)
00125
00126 def deserialize(self, str):
00127 """
00128 unpack serialized message in str into this message instance
00129 @param str: byte array of serialized message
00130 @type str: str
00131 """
00132 try:
00133 if self.header is None:
00134 self.header = std_msgs.msg._Header.Header()
00135 if self.goal_id is None:
00136 self.goal_id = actionlib_msgs.msg.GoalID()
00137 if self.goal is None:
00138 self.goal = joint_states_settler.msg.ConfigGoal()
00139 end = 0
00140 _x = self
00141 start = end
00142 end += 12
00143 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00144 start = end
00145 end += 4
00146 (length,) = _struct_I.unpack(str[start:end])
00147 start = end
00148 end += length
00149 self.header.frame_id = str[start:end]
00150 _x = self
00151 start = end
00152 end += 8
00153 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.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.goal_id.id = str[start:end]
00160 start = end
00161 end += 4
00162 (length,) = _struct_I.unpack(str[start:end])
00163 self.goal.joint_names = []
00164 for i in xrange(0, length):
00165 start = end
00166 end += 4
00167 (length,) = _struct_I.unpack(str[start:end])
00168 start = end
00169 end += length
00170 val1 = str[start:end]
00171 self.goal.joint_names.append(val1)
00172 start = end
00173 end += 4
00174 (length,) = _struct_I.unpack(str[start:end])
00175 pattern = '<%sd'%length
00176 start = end
00177 end += struct.calcsize(pattern)
00178 self.goal.tolerances = struct.unpack(pattern, str[start:end])
00179 _x = self
00180 start = end
00181 end += 12
00182 (_x.goal.max_step.secs, _x.goal.max_step.nsecs, _x.goal.cache_size,) = _struct_2iI.unpack(str[start:end])
00183 return self
00184 except struct.error, e:
00185 raise roslib.message.DeserializationError(e)
00186
00187
00188 def serialize_numpy(self, buff, numpy):
00189 """
00190 serialize message with numpy array types into buffer
00191 @param buff: buffer
00192 @type buff: StringIO
00193 @param numpy: numpy python module
00194 @type numpy module
00195 """
00196 try:
00197 _x = self
00198 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00199 _x = self.header.frame_id
00200 length = len(_x)
00201 buff.write(struct.pack('<I%ss'%length, length, _x))
00202 _x = self
00203 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00204 _x = self.goal_id.id
00205 length = len(_x)
00206 buff.write(struct.pack('<I%ss'%length, length, _x))
00207 length = len(self.goal.joint_names)
00208 buff.write(_struct_I.pack(length))
00209 for val1 in self.goal.joint_names:
00210 length = len(val1)
00211 buff.write(struct.pack('<I%ss'%length, length, val1))
00212 length = len(self.goal.tolerances)
00213 buff.write(_struct_I.pack(length))
00214 pattern = '<%sd'%length
00215 buff.write(self.goal.tolerances.tostring())
00216 _x = self
00217 buff.write(_struct_2iI.pack(_x.goal.max_step.secs, _x.goal.max_step.nsecs, _x.goal.cache_size))
00218 except struct.error, se: self._check_types(se)
00219 except TypeError, te: self._check_types(te)
00220
00221 def deserialize_numpy(self, str, numpy):
00222 """
00223 unpack serialized message in str into this message instance using numpy for array types
00224 @param str: byte array of serialized message
00225 @type str: str
00226 @param numpy: numpy python module
00227 @type numpy: module
00228 """
00229 try:
00230 if self.header is None:
00231 self.header = std_msgs.msg._Header.Header()
00232 if self.goal_id is None:
00233 self.goal_id = actionlib_msgs.msg.GoalID()
00234 if self.goal is None:
00235 self.goal = joint_states_settler.msg.ConfigGoal()
00236 end = 0
00237 _x = self
00238 start = end
00239 end += 12
00240 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00241 start = end
00242 end += 4
00243 (length,) = _struct_I.unpack(str[start:end])
00244 start = end
00245 end += length
00246 self.header.frame_id = str[start:end]
00247 _x = self
00248 start = end
00249 end += 8
00250 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00251 start = end
00252 end += 4
00253 (length,) = _struct_I.unpack(str[start:end])
00254 start = end
00255 end += length
00256 self.goal_id.id = str[start:end]
00257 start = end
00258 end += 4
00259 (length,) = _struct_I.unpack(str[start:end])
00260 self.goal.joint_names = []
00261 for i in xrange(0, length):
00262 start = end
00263 end += 4
00264 (length,) = _struct_I.unpack(str[start:end])
00265 start = end
00266 end += length
00267 val1 = str[start:end]
00268 self.goal.joint_names.append(val1)
00269 start = end
00270 end += 4
00271 (length,) = _struct_I.unpack(str[start:end])
00272 pattern = '<%sd'%length
00273 start = end
00274 end += struct.calcsize(pattern)
00275 self.goal.tolerances = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00276 _x = self
00277 start = end
00278 end += 12
00279 (_x.goal.max_step.secs, _x.goal.max_step.nsecs, _x.goal.cache_size,) = _struct_2iI.unpack(str[start:end])
00280 return self
00281 except struct.error, e:
00282 raise roslib.message.DeserializationError(e)
00283
00284 _struct_I = roslib.message.struct_I
00285 _struct_3I = struct.Struct("<3I")
00286 _struct_2I = struct.Struct("<2I")
00287 _struct_2iI = struct.Struct("<2iI")