_ActionMsgMapperActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from turtlebot_actions/ActionMsgMapperActionGoal.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 turtlebot_actions.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011 
00012 class ActionMsgMapperActionGoal(genpy.Message):
00013   _md5sum = "10050ee576c29a2c373416dcd9499fb9"
00014   _type = "turtlebot_actions/ActionMsgMapperActionGoal"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017 
00018 Header header
00019 actionlib_msgs/GoalID goal_id
00020 ActionMsgMapperGoal goal
00021 
00022 ================================================================================
00023 MSG: std_msgs/Header
00024 # Standard metadata for higher-level stamped data types.
00025 # This is generally used to communicate timestamped data 
00026 # in a particular coordinate frame.
00027 # 
00028 # sequence ID: consecutively increasing ID 
00029 uint32 seq
00030 #Two-integer timestamp that is expressed as:
00031 # * stamp.secs: seconds (stamp_secs) since epoch
00032 # * stamp.nsecs: nanoseconds since stamp_secs
00033 # time-handling sugar is provided by the client library
00034 time stamp
00035 #Frame this data is associated with
00036 # 0: no frame
00037 # 1: global frame
00038 string frame_id
00039 
00040 ================================================================================
00041 MSG: actionlib_msgs/GoalID
00042 # The stamp should store the time at which this goal was requested.
00043 # It is used by an action server when it tries to preempt all
00044 # goals that were requested before a certain time
00045 time stamp
00046 
00047 # The id provides a way to associate feedback and
00048 # result message with specific goal requests. The id
00049 # specified must be unique.
00050 string id
00051 
00052 
00053 ================================================================================
00054 MSG: turtlebot_actions/ActionMsgMapperGoal
00055 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00056 #goal definition
00057 string    input_topic      
00058 string    output_topic      
00059 string    input_type      
00060 string    output_type      
00061 string[]   input_list
00062 string[]   output_list
00063 
00064 
00065 
00066 """
00067   __slots__ = ['header','goal_id','goal']
00068   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','turtlebot_actions/ActionMsgMapperGoal']
00069 
00070   def __init__(self, *args, **kwds):
00071     """
00072     Constructor. Any message fields that are implicitly/explicitly
00073     set to None will be assigned a default value. The recommend
00074     use is keyword arguments as this is more robust to future message
00075     changes.  You cannot mix in-order arguments and keyword arguments.
00076 
00077     The available fields are:
00078        header,goal_id,goal
00079 
00080     :param args: complete set of field values, in .msg order
00081     :param kwds: use keyword arguments corresponding to message field names
00082     to set specific fields.
00083     """
00084     if args or kwds:
00085       super(ActionMsgMapperActionGoal, self).__init__(*args, **kwds)
00086       #message fields cannot be None, assign default values for those that are
00087       if self.header is None:
00088         self.header = std_msgs.msg.Header()
00089       if self.goal_id is None:
00090         self.goal_id = actionlib_msgs.msg.GoalID()
00091       if self.goal is None:
00092         self.goal = turtlebot_actions.msg.ActionMsgMapperGoal()
00093     else:
00094       self.header = std_msgs.msg.Header()
00095       self.goal_id = actionlib_msgs.msg.GoalID()
00096       self.goal = turtlebot_actions.msg.ActionMsgMapperGoal()
00097 
00098   def _get_types(self):
00099     """
00100     internal API method
00101     """
00102     return self._slot_types
00103 
00104   def serialize(self, buff):
00105     """
00106     serialize message into buffer
00107     :param buff: buffer, ``StringIO``
00108     """
00109     try:
00110       _x = self
00111       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00112       _x = self.header.frame_id
00113       length = len(_x)
00114       if python3 or type(_x) == unicode:
00115         _x = _x.encode('utf-8')
00116         length = len(_x)
00117       buff.write(struct.pack('<I%ss'%length, length, _x))
00118       _x = self
00119       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00120       _x = self.goal_id.id
00121       length = len(_x)
00122       if python3 or type(_x) == unicode:
00123         _x = _x.encode('utf-8')
00124         length = len(_x)
00125       buff.write(struct.pack('<I%ss'%length, length, _x))
00126       _x = self.goal.input_topic
00127       length = len(_x)
00128       if python3 or type(_x) == unicode:
00129         _x = _x.encode('utf-8')
00130         length = len(_x)
00131       buff.write(struct.pack('<I%ss'%length, length, _x))
00132       _x = self.goal.output_topic
00133       length = len(_x)
00134       if python3 or type(_x) == unicode:
00135         _x = _x.encode('utf-8')
00136         length = len(_x)
00137       buff.write(struct.pack('<I%ss'%length, length, _x))
00138       _x = self.goal.input_type
00139       length = len(_x)
00140       if python3 or type(_x) == unicode:
00141         _x = _x.encode('utf-8')
00142         length = len(_x)
00143       buff.write(struct.pack('<I%ss'%length, length, _x))
00144       _x = self.goal.output_type
00145       length = len(_x)
00146       if python3 or type(_x) == unicode:
00147         _x = _x.encode('utf-8')
00148         length = len(_x)
00149       buff.write(struct.pack('<I%ss'%length, length, _x))
00150       length = len(self.goal.input_list)
00151       buff.write(_struct_I.pack(length))
00152       for val1 in self.goal.input_list:
00153         length = len(val1)
00154         if python3 or type(val1) == unicode:
00155           val1 = val1.encode('utf-8')
00156           length = len(val1)
00157         buff.write(struct.pack('<I%ss'%length, length, val1))
00158       length = len(self.goal.output_list)
00159       buff.write(_struct_I.pack(length))
00160       for val1 in self.goal.output_list:
00161         length = len(val1)
00162         if python3 or type(val1) == unicode:
00163           val1 = val1.encode('utf-8')
00164           length = len(val1)
00165         buff.write(struct.pack('<I%ss'%length, length, val1))
00166     except struct.error as se: self._check_types(se)
00167     except TypeError as te: self._check_types(te)
00168 
00169   def deserialize(self, str):
00170     """
00171     unpack serialized message in str into this message instance
00172     :param str: byte array of serialized message, ``str``
00173     """
00174     try:
00175       if self.header is None:
00176         self.header = std_msgs.msg.Header()
00177       if self.goal_id is None:
00178         self.goal_id = actionlib_msgs.msg.GoalID()
00179       if self.goal is None:
00180         self.goal = turtlebot_actions.msg.ActionMsgMapperGoal()
00181       end = 0
00182       _x = self
00183       start = end
00184       end += 12
00185       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00186       start = end
00187       end += 4
00188       (length,) = _struct_I.unpack(str[start:end])
00189       start = end
00190       end += length
00191       if python3:
00192         self.header.frame_id = str[start:end].decode('utf-8')
00193       else:
00194         self.header.frame_id = str[start:end]
00195       _x = self
00196       start = end
00197       end += 8
00198       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00199       start = end
00200       end += 4
00201       (length,) = _struct_I.unpack(str[start:end])
00202       start = end
00203       end += length
00204       if python3:
00205         self.goal_id.id = str[start:end].decode('utf-8')
00206       else:
00207         self.goal_id.id = str[start:end]
00208       start = end
00209       end += 4
00210       (length,) = _struct_I.unpack(str[start:end])
00211       start = end
00212       end += length
00213       if python3:
00214         self.goal.input_topic = str[start:end].decode('utf-8')
00215       else:
00216         self.goal.input_topic = str[start:end]
00217       start = end
00218       end += 4
00219       (length,) = _struct_I.unpack(str[start:end])
00220       start = end
00221       end += length
00222       if python3:
00223         self.goal.output_topic = str[start:end].decode('utf-8')
00224       else:
00225         self.goal.output_topic = str[start:end]
00226       start = end
00227       end += 4
00228       (length,) = _struct_I.unpack(str[start:end])
00229       start = end
00230       end += length
00231       if python3:
00232         self.goal.input_type = str[start:end].decode('utf-8')
00233       else:
00234         self.goal.input_type = str[start:end]
00235       start = end
00236       end += 4
00237       (length,) = _struct_I.unpack(str[start:end])
00238       start = end
00239       end += length
00240       if python3:
00241         self.goal.output_type = str[start:end].decode('utf-8')
00242       else:
00243         self.goal.output_type = str[start:end]
00244       start = end
00245       end += 4
00246       (length,) = _struct_I.unpack(str[start:end])
00247       self.goal.input_list = []
00248       for i in range(0, length):
00249         start = end
00250         end += 4
00251         (length,) = _struct_I.unpack(str[start:end])
00252         start = end
00253         end += length
00254         if python3:
00255           val1 = str[start:end].decode('utf-8')
00256         else:
00257           val1 = str[start:end]
00258         self.goal.input_list.append(val1)
00259       start = end
00260       end += 4
00261       (length,) = _struct_I.unpack(str[start:end])
00262       self.goal.output_list = []
00263       for i in range(0, length):
00264         start = end
00265         end += 4
00266         (length,) = _struct_I.unpack(str[start:end])
00267         start = end
00268         end += length
00269         if python3:
00270           val1 = str[start:end].decode('utf-8')
00271         else:
00272           val1 = str[start:end]
00273         self.goal.output_list.append(val1)
00274       return self
00275     except struct.error as e:
00276       raise genpy.DeserializationError(e) #most likely buffer underfill
00277 
00278 
00279   def serialize_numpy(self, buff, numpy):
00280     """
00281     serialize message with numpy array types into buffer
00282     :param buff: buffer, ``StringIO``
00283     :param numpy: numpy python module
00284     """
00285     try:
00286       _x = self
00287       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00288       _x = self.header.frame_id
00289       length = len(_x)
00290       if python3 or type(_x) == unicode:
00291         _x = _x.encode('utf-8')
00292         length = len(_x)
00293       buff.write(struct.pack('<I%ss'%length, length, _x))
00294       _x = self
00295       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00296       _x = self.goal_id.id
00297       length = len(_x)
00298       if python3 or type(_x) == unicode:
00299         _x = _x.encode('utf-8')
00300         length = len(_x)
00301       buff.write(struct.pack('<I%ss'%length, length, _x))
00302       _x = self.goal.input_topic
00303       length = len(_x)
00304       if python3 or type(_x) == unicode:
00305         _x = _x.encode('utf-8')
00306         length = len(_x)
00307       buff.write(struct.pack('<I%ss'%length, length, _x))
00308       _x = self.goal.output_topic
00309       length = len(_x)
00310       if python3 or type(_x) == unicode:
00311         _x = _x.encode('utf-8')
00312         length = len(_x)
00313       buff.write(struct.pack('<I%ss'%length, length, _x))
00314       _x = self.goal.input_type
00315       length = len(_x)
00316       if python3 or type(_x) == unicode:
00317         _x = _x.encode('utf-8')
00318         length = len(_x)
00319       buff.write(struct.pack('<I%ss'%length, length, _x))
00320       _x = self.goal.output_type
00321       length = len(_x)
00322       if python3 or type(_x) == unicode:
00323         _x = _x.encode('utf-8')
00324         length = len(_x)
00325       buff.write(struct.pack('<I%ss'%length, length, _x))
00326       length = len(self.goal.input_list)
00327       buff.write(_struct_I.pack(length))
00328       for val1 in self.goal.input_list:
00329         length = len(val1)
00330         if python3 or type(val1) == unicode:
00331           val1 = val1.encode('utf-8')
00332           length = len(val1)
00333         buff.write(struct.pack('<I%ss'%length, length, val1))
00334       length = len(self.goal.output_list)
00335       buff.write(_struct_I.pack(length))
00336       for val1 in self.goal.output_list:
00337         length = len(val1)
00338         if python3 or type(val1) == unicode:
00339           val1 = val1.encode('utf-8')
00340           length = len(val1)
00341         buff.write(struct.pack('<I%ss'%length, length, val1))
00342     except struct.error as se: self._check_types(se)
00343     except TypeError as te: self._check_types(te)
00344 
00345   def deserialize_numpy(self, str, numpy):
00346     """
00347     unpack serialized message in str into this message instance using numpy for array types
00348     :param str: byte array of serialized message, ``str``
00349     :param numpy: numpy python module
00350     """
00351     try:
00352       if self.header is None:
00353         self.header = std_msgs.msg.Header()
00354       if self.goal_id is None:
00355         self.goal_id = actionlib_msgs.msg.GoalID()
00356       if self.goal is None:
00357         self.goal = turtlebot_actions.msg.ActionMsgMapperGoal()
00358       end = 0
00359       _x = self
00360       start = end
00361       end += 12
00362       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00363       start = end
00364       end += 4
00365       (length,) = _struct_I.unpack(str[start:end])
00366       start = end
00367       end += length
00368       if python3:
00369         self.header.frame_id = str[start:end].decode('utf-8')
00370       else:
00371         self.header.frame_id = str[start:end]
00372       _x = self
00373       start = end
00374       end += 8
00375       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00376       start = end
00377       end += 4
00378       (length,) = _struct_I.unpack(str[start:end])
00379       start = end
00380       end += length
00381       if python3:
00382         self.goal_id.id = str[start:end].decode('utf-8')
00383       else:
00384         self.goal_id.id = str[start:end]
00385       start = end
00386       end += 4
00387       (length,) = _struct_I.unpack(str[start:end])
00388       start = end
00389       end += length
00390       if python3:
00391         self.goal.input_topic = str[start:end].decode('utf-8')
00392       else:
00393         self.goal.input_topic = str[start:end]
00394       start = end
00395       end += 4
00396       (length,) = _struct_I.unpack(str[start:end])
00397       start = end
00398       end += length
00399       if python3:
00400         self.goal.output_topic = str[start:end].decode('utf-8')
00401       else:
00402         self.goal.output_topic = str[start:end]
00403       start = end
00404       end += 4
00405       (length,) = _struct_I.unpack(str[start:end])
00406       start = end
00407       end += length
00408       if python3:
00409         self.goal.input_type = str[start:end].decode('utf-8')
00410       else:
00411         self.goal.input_type = str[start:end]
00412       start = end
00413       end += 4
00414       (length,) = _struct_I.unpack(str[start:end])
00415       start = end
00416       end += length
00417       if python3:
00418         self.goal.output_type = str[start:end].decode('utf-8')
00419       else:
00420         self.goal.output_type = str[start:end]
00421       start = end
00422       end += 4
00423       (length,) = _struct_I.unpack(str[start:end])
00424       self.goal.input_list = []
00425       for i in range(0, length):
00426         start = end
00427         end += 4
00428         (length,) = _struct_I.unpack(str[start:end])
00429         start = end
00430         end += length
00431         if python3:
00432           val1 = str[start:end].decode('utf-8')
00433         else:
00434           val1 = str[start:end]
00435         self.goal.input_list.append(val1)
00436       start = end
00437       end += 4
00438       (length,) = _struct_I.unpack(str[start:end])
00439       self.goal.output_list = []
00440       for i in range(0, length):
00441         start = end
00442         end += 4
00443         (length,) = _struct_I.unpack(str[start:end])
00444         start = end
00445         end += length
00446         if python3:
00447           val1 = str[start:end].decode('utf-8')
00448         else:
00449           val1 = str[start:end]
00450         self.goal.output_list.append(val1)
00451       return self
00452     except struct.error as e:
00453       raise genpy.DeserializationError(e) #most likely buffer underfill
00454 
00455 _struct_I = genpy.struct_I
00456 _struct_3I = struct.Struct("<3I")
00457 _struct_2I = struct.Struct("<2I")


turtlebot_actions
Author(s): Helen Oleynikova, Melonee Wise
autogenerated on Fri Dec 6 2013 20:51:35