_ConfigActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from joint_states_settler/ConfigActionGoal.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import genpy
00008 import actionlib_msgs.msg
00009 import joint_states_settler.msg
00010 import std_msgs.msg
00011 
00012 class ConfigActionGoal(genpy.Message):
00013   _md5sum = "f19566577bee3cc11a5cee78c14228fe"
00014   _type = "joint_states_settler/ConfigActionGoal"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """
00017 Header header
00018 actionlib_msgs/GoalID goal_id
00019 ConfigGoal goal
00020 
00021 ================================================================================
00022 MSG: std_msgs/Header
00023 # Standard metadata for higher-level stamped data types.
00024 # This is generally used to communicate timestamped data 
00025 # in a particular coordinate frame.
00026 # 
00027 # sequence ID: consecutively increasing ID 
00028 uint32 seq
00029 #Two-integer timestamp that is expressed as:
00030 # * stamp.secs: seconds (stamp_secs) since epoch
00031 # * stamp.nsecs: nanoseconds since stamp_secs
00032 # time-handling sugar is provided by the client library
00033 time stamp
00034 #Frame this data is associated with
00035 # 0: no frame
00036 # 1: global frame
00037 string frame_id
00038 
00039 ================================================================================
00040 MSG: actionlib_msgs/GoalID
00041 # The stamp should store the time at which this goal was requested.
00042 # It is used by an action server when it tries to preempt all
00043 # goals that were requested before a certain time
00044 time stamp
00045 
00046 # The id provides a way to associate feedback and
00047 # result message with specific goal requests. The id
00048 # specified must be unique.
00049 string id
00050 
00051 
00052 ================================================================================
00053 MSG: joint_states_settler/ConfigGoal
00054 string[] joint_names   # Names of the joints we're waiting to settle
00055 float64[] tolerances   # Tolerance on each of the specified joints
00056 duration max_step      # The maximum timestep between two elements in an interval
00057 uint32 cache_size      # The size of our cache when searching for an interval
00058 
00059 """
00060   __slots__ = ['header','goal_id','goal']
00061   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','joint_states_settler/ConfigGoal']
00062 
00063   def __init__(self, *args, **kwds):
00064     """
00065     Constructor. Any message fields that are implicitly/explicitly
00066     set to None will be assigned a default value. The recommend
00067     use is keyword arguments as this is more robust to future message
00068     changes.  You cannot mix in-order arguments and keyword arguments.
00069 
00070     The available fields are:
00071        header,goal_id,goal
00072 
00073     :param args: complete set of field values, in .msg order
00074     :param kwds: use keyword arguments corresponding to message field names
00075     to set specific fields.
00076     """
00077     if args or kwds:
00078       super(ConfigActionGoal, self).__init__(*args, **kwds)
00079       #message fields cannot be None, assign default values for those that are
00080       if self.header is None:
00081         self.header = std_msgs.msg.Header()
00082       if self.goal_id is None:
00083         self.goal_id = actionlib_msgs.msg.GoalID()
00084       if self.goal is None:
00085         self.goal = joint_states_settler.msg.ConfigGoal()
00086     else:
00087       self.header = std_msgs.msg.Header()
00088       self.goal_id = actionlib_msgs.msg.GoalID()
00089       self.goal = joint_states_settler.msg.ConfigGoal()
00090 
00091   def _get_types(self):
00092     """
00093     internal API method
00094     """
00095     return self._slot_types
00096 
00097   def serialize(self, buff):
00098     """
00099     serialize message into buffer
00100     :param buff: buffer, ``StringIO``
00101     """
00102     try:
00103       _x = self
00104       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00105       _x = self.header.frame_id
00106       length = len(_x)
00107       if python3 or type(_x) == unicode:
00108         _x = _x.encode('utf-8')
00109         length = len(_x)
00110       buff.write(struct.pack('<I%ss'%length, length, _x))
00111       _x = self
00112       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00113       _x = self.goal_id.id
00114       length = len(_x)
00115       if python3 or type(_x) == unicode:
00116         _x = _x.encode('utf-8')
00117         length = len(_x)
00118       buff.write(struct.pack('<I%ss'%length, length, _x))
00119       length = len(self.goal.joint_names)
00120       buff.write(_struct_I.pack(length))
00121       for val1 in self.goal.joint_names:
00122         length = len(val1)
00123         if python3 or type(val1) == unicode:
00124           val1 = val1.encode('utf-8')
00125           length = len(val1)
00126         buff.write(struct.pack('<I%ss'%length, length, val1))
00127       length = len(self.goal.tolerances)
00128       buff.write(_struct_I.pack(length))
00129       pattern = '<%sd'%length
00130       buff.write(struct.pack(pattern, *self.goal.tolerances))
00131       _x = self
00132       buff.write(_struct_2iI.pack(_x.goal.max_step.secs, _x.goal.max_step.nsecs, _x.goal.cache_size))
00133     except struct.error as se: self._check_types(se)
00134     except TypeError as te: self._check_types(te)
00135 
00136   def deserialize(self, str):
00137     """
00138     unpack serialized message in str into this message instance
00139     :param str: byte array of serialized message, ``str``
00140     """
00141     try:
00142       if self.header is None:
00143         self.header = std_msgs.msg.Header()
00144       if self.goal_id is None:
00145         self.goal_id = actionlib_msgs.msg.GoalID()
00146       if self.goal is None:
00147         self.goal = joint_states_settler.msg.ConfigGoal()
00148       end = 0
00149       _x = self
00150       start = end
00151       end += 12
00152       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00153       start = end
00154       end += 4
00155       (length,) = _struct_I.unpack(str[start:end])
00156       start = end
00157       end += length
00158       if python3:
00159         self.header.frame_id = str[start:end].decode('utf-8')
00160       else:
00161         self.header.frame_id = str[start:end]
00162       _x = self
00163       start = end
00164       end += 8
00165       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00166       start = end
00167       end += 4
00168       (length,) = _struct_I.unpack(str[start:end])
00169       start = end
00170       end += length
00171       if python3:
00172         self.goal_id.id = str[start:end].decode('utf-8')
00173       else:
00174         self.goal_id.id = str[start:end]
00175       start = end
00176       end += 4
00177       (length,) = _struct_I.unpack(str[start:end])
00178       self.goal.joint_names = []
00179       for i in range(0, length):
00180         start = end
00181         end += 4
00182         (length,) = _struct_I.unpack(str[start:end])
00183         start = end
00184         end += length
00185         if python3:
00186           val1 = str[start:end].decode('utf-8')
00187         else:
00188           val1 = str[start:end]
00189         self.goal.joint_names.append(val1)
00190       start = end
00191       end += 4
00192       (length,) = _struct_I.unpack(str[start:end])
00193       pattern = '<%sd'%length
00194       start = end
00195       end += struct.calcsize(pattern)
00196       self.goal.tolerances = struct.unpack(pattern, str[start:end])
00197       _x = self
00198       start = end
00199       end += 12
00200       (_x.goal.max_step.secs, _x.goal.max_step.nsecs, _x.goal.cache_size,) = _struct_2iI.unpack(str[start:end])
00201       return self
00202     except struct.error as e:
00203       raise genpy.DeserializationError(e) #most likely buffer underfill
00204 
00205 
00206   def serialize_numpy(self, buff, numpy):
00207     """
00208     serialize message with numpy array types into buffer
00209     :param buff: buffer, ``StringIO``
00210     :param numpy: numpy python module
00211     """
00212     try:
00213       _x = self
00214       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00215       _x = self.header.frame_id
00216       length = len(_x)
00217       if python3 or type(_x) == unicode:
00218         _x = _x.encode('utf-8')
00219         length = len(_x)
00220       buff.write(struct.pack('<I%ss'%length, length, _x))
00221       _x = self
00222       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00223       _x = self.goal_id.id
00224       length = len(_x)
00225       if python3 or type(_x) == unicode:
00226         _x = _x.encode('utf-8')
00227         length = len(_x)
00228       buff.write(struct.pack('<I%ss'%length, length, _x))
00229       length = len(self.goal.joint_names)
00230       buff.write(_struct_I.pack(length))
00231       for val1 in self.goal.joint_names:
00232         length = len(val1)
00233         if python3 or type(val1) == unicode:
00234           val1 = val1.encode('utf-8')
00235           length = len(val1)
00236         buff.write(struct.pack('<I%ss'%length, length, val1))
00237       length = len(self.goal.tolerances)
00238       buff.write(_struct_I.pack(length))
00239       pattern = '<%sd'%length
00240       buff.write(self.goal.tolerances.tostring())
00241       _x = self
00242       buff.write(_struct_2iI.pack(_x.goal.max_step.secs, _x.goal.max_step.nsecs, _x.goal.cache_size))
00243     except struct.error as se: self._check_types(se)
00244     except TypeError as te: self._check_types(te)
00245 
00246   def deserialize_numpy(self, str, numpy):
00247     """
00248     unpack serialized message in str into this message instance using numpy for array types
00249     :param str: byte array of serialized message, ``str``
00250     :param numpy: numpy python module
00251     """
00252     try:
00253       if self.header is None:
00254         self.header = std_msgs.msg.Header()
00255       if self.goal_id is None:
00256         self.goal_id = actionlib_msgs.msg.GoalID()
00257       if self.goal is None:
00258         self.goal = joint_states_settler.msg.ConfigGoal()
00259       end = 0
00260       _x = self
00261       start = end
00262       end += 12
00263       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00264       start = end
00265       end += 4
00266       (length,) = _struct_I.unpack(str[start:end])
00267       start = end
00268       end += length
00269       if python3:
00270         self.header.frame_id = str[start:end].decode('utf-8')
00271       else:
00272         self.header.frame_id = str[start:end]
00273       _x = self
00274       start = end
00275       end += 8
00276       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00277       start = end
00278       end += 4
00279       (length,) = _struct_I.unpack(str[start:end])
00280       start = end
00281       end += length
00282       if python3:
00283         self.goal_id.id = str[start:end].decode('utf-8')
00284       else:
00285         self.goal_id.id = str[start:end]
00286       start = end
00287       end += 4
00288       (length,) = _struct_I.unpack(str[start:end])
00289       self.goal.joint_names = []
00290       for i in range(0, length):
00291         start = end
00292         end += 4
00293         (length,) = _struct_I.unpack(str[start:end])
00294         start = end
00295         end += length
00296         if python3:
00297           val1 = str[start:end].decode('utf-8')
00298         else:
00299           val1 = str[start:end]
00300         self.goal.joint_names.append(val1)
00301       start = end
00302       end += 4
00303       (length,) = _struct_I.unpack(str[start:end])
00304       pattern = '<%sd'%length
00305       start = end
00306       end += struct.calcsize(pattern)
00307       self.goal.tolerances = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00308       _x = self
00309       start = end
00310       end += 12
00311       (_x.goal.max_step.secs, _x.goal.max_step.nsecs, _x.goal.cache_size,) = _struct_2iI.unpack(str[start:end])
00312       return self
00313     except struct.error as e:
00314       raise genpy.DeserializationError(e) #most likely buffer underfill
00315 
00316 _struct_I = genpy.struct_I
00317 _struct_3I = struct.Struct("<3I")
00318 _struct_2I = struct.Struct("<2I")
00319 _struct_2iI = struct.Struct("<2iI")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


joint_states_settler
Author(s): Vijay Pradeep
autogenerated on Thu Aug 15 2013 10:16:04