_FilledSemanticFrameActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from roboframenet_msgs/FilledSemanticFrameActionGoal.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 roboframenet_msgs.msg
00008 import genpy
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011 
00012 class FilledSemanticFrameActionGoal(genpy.Message):
00013   _md5sum = "65caa87abbeb0410eeb158b7bae4b172"
00014   _type = "roboframenet_msgs/FilledSemanticFrameActionGoal"
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 FilledSemanticFrameGoal 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: roboframenet_msgs/FilledSemanticFrameGoal
00055 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00056 # goal
00057 FilledSemanticFrame frame
00058 
00059 ================================================================================
00060 MSG: roboframenet_msgs/FilledSemanticFrame
00061 string name
00062 FilledFrameElement[] frame_elements
00063 string[] action_server_topics
00064 
00065 ================================================================================
00066 MSG: roboframenet_msgs/FilledFrameElement
00067 string name   # eg object, recipient
00068 string argument   # eg apple, bob
00069 
00070 """
00071   __slots__ = ['header','goal_id','goal']
00072   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','roboframenet_msgs/FilledSemanticFrameGoal']
00073 
00074   def __init__(self, *args, **kwds):
00075     """
00076     Constructor. Any message fields that are implicitly/explicitly
00077     set to None will be assigned a default value. The recommend
00078     use is keyword arguments as this is more robust to future message
00079     changes.  You cannot mix in-order arguments and keyword arguments.
00080 
00081     The available fields are:
00082        header,goal_id,goal
00083 
00084     :param args: complete set of field values, in .msg order
00085     :param kwds: use keyword arguments corresponding to message field names
00086     to set specific fields.
00087     """
00088     if args or kwds:
00089       super(FilledSemanticFrameActionGoal, self).__init__(*args, **kwds)
00090       #message fields cannot be None, assign default values for those that are
00091       if self.header is None:
00092         self.header = std_msgs.msg.Header()
00093       if self.goal_id is None:
00094         self.goal_id = actionlib_msgs.msg.GoalID()
00095       if self.goal is None:
00096         self.goal = roboframenet_msgs.msg.FilledSemanticFrameGoal()
00097     else:
00098       self.header = std_msgs.msg.Header()
00099       self.goal_id = actionlib_msgs.msg.GoalID()
00100       self.goal = roboframenet_msgs.msg.FilledSemanticFrameGoal()
00101 
00102   def _get_types(self):
00103     """
00104     internal API method
00105     """
00106     return self._slot_types
00107 
00108   def serialize(self, buff):
00109     """
00110     serialize message into buffer
00111     :param buff: buffer, ``StringIO``
00112     """
00113     try:
00114       _x = self
00115       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00116       _x = self.header.frame_id
00117       length = len(_x)
00118       if python3 or type(_x) == unicode:
00119         _x = _x.encode('utf-8')
00120         length = len(_x)
00121       buff.write(struct.pack('<I%ss'%length, length, _x))
00122       _x = self
00123       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00124       _x = self.goal_id.id
00125       length = len(_x)
00126       if python3 or type(_x) == unicode:
00127         _x = _x.encode('utf-8')
00128         length = len(_x)
00129       buff.write(struct.pack('<I%ss'%length, length, _x))
00130       _x = self.goal.frame.name
00131       length = len(_x)
00132       if python3 or type(_x) == unicode:
00133         _x = _x.encode('utf-8')
00134         length = len(_x)
00135       buff.write(struct.pack('<I%ss'%length, length, _x))
00136       length = len(self.goal.frame.frame_elements)
00137       buff.write(_struct_I.pack(length))
00138       for val1 in self.goal.frame.frame_elements:
00139         _x = val1.name
00140         length = len(_x)
00141         if python3 or type(_x) == unicode:
00142           _x = _x.encode('utf-8')
00143           length = len(_x)
00144         buff.write(struct.pack('<I%ss'%length, length, _x))
00145         _x = val1.argument
00146         length = len(_x)
00147         if python3 or type(_x) == unicode:
00148           _x = _x.encode('utf-8')
00149           length = len(_x)
00150         buff.write(struct.pack('<I%ss'%length, length, _x))
00151       length = len(self.goal.frame.action_server_topics)
00152       buff.write(_struct_I.pack(length))
00153       for val1 in self.goal.frame.action_server_topics:
00154         length = len(val1)
00155         if python3 or type(val1) == unicode:
00156           val1 = val1.encode('utf-8')
00157           length = len(val1)
00158         buff.write(struct.pack('<I%ss'%length, length, val1))
00159     except struct.error as se: self._check_types(se)
00160     except TypeError as te: self._check_types(te)
00161 
00162   def deserialize(self, str):
00163     """
00164     unpack serialized message in str into this message instance
00165     :param str: byte array of serialized message, ``str``
00166     """
00167     try:
00168       if self.header is None:
00169         self.header = std_msgs.msg.Header()
00170       if self.goal_id is None:
00171         self.goal_id = actionlib_msgs.msg.GoalID()
00172       if self.goal is None:
00173         self.goal = roboframenet_msgs.msg.FilledSemanticFrameGoal()
00174       end = 0
00175       _x = self
00176       start = end
00177       end += 12
00178       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00179       start = end
00180       end += 4
00181       (length,) = _struct_I.unpack(str[start:end])
00182       start = end
00183       end += length
00184       if python3:
00185         self.header.frame_id = str[start:end].decode('utf-8')
00186       else:
00187         self.header.frame_id = str[start:end]
00188       _x = self
00189       start = end
00190       end += 8
00191       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.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       if python3:
00198         self.goal_id.id = str[start:end].decode('utf-8')
00199       else:
00200         self.goal_id.id = str[start:end]
00201       start = end
00202       end += 4
00203       (length,) = _struct_I.unpack(str[start:end])
00204       start = end
00205       end += length
00206       if python3:
00207         self.goal.frame.name = str[start:end].decode('utf-8')
00208       else:
00209         self.goal.frame.name = str[start:end]
00210       start = end
00211       end += 4
00212       (length,) = _struct_I.unpack(str[start:end])
00213       self.goal.frame.frame_elements = []
00214       for i in range(0, length):
00215         val1 = roboframenet_msgs.msg.FilledFrameElement()
00216         start = end
00217         end += 4
00218         (length,) = _struct_I.unpack(str[start:end])
00219         start = end
00220         end += length
00221         if python3:
00222           val1.name = str[start:end].decode('utf-8')
00223         else:
00224           val1.name = str[start:end]
00225         start = end
00226         end += 4
00227         (length,) = _struct_I.unpack(str[start:end])
00228         start = end
00229         end += length
00230         if python3:
00231           val1.argument = str[start:end].decode('utf-8')
00232         else:
00233           val1.argument = str[start:end]
00234         self.goal.frame.frame_elements.append(val1)
00235       start = end
00236       end += 4
00237       (length,) = _struct_I.unpack(str[start:end])
00238       self.goal.frame.action_server_topics = []
00239       for i in range(0, length):
00240         start = end
00241         end += 4
00242         (length,) = _struct_I.unpack(str[start:end])
00243         start = end
00244         end += length
00245         if python3:
00246           val1 = str[start:end].decode('utf-8')
00247         else:
00248           val1 = str[start:end]
00249         self.goal.frame.action_server_topics.append(val1)
00250       return self
00251     except struct.error as e:
00252       raise genpy.DeserializationError(e) #most likely buffer underfill
00253 
00254 
00255   def serialize_numpy(self, buff, numpy):
00256     """
00257     serialize message with numpy array types into buffer
00258     :param buff: buffer, ``StringIO``
00259     :param numpy: numpy python module
00260     """
00261     try:
00262       _x = self
00263       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00264       _x = self.header.frame_id
00265       length = len(_x)
00266       if python3 or type(_x) == unicode:
00267         _x = _x.encode('utf-8')
00268         length = len(_x)
00269       buff.write(struct.pack('<I%ss'%length, length, _x))
00270       _x = self
00271       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00272       _x = self.goal_id.id
00273       length = len(_x)
00274       if python3 or type(_x) == unicode:
00275         _x = _x.encode('utf-8')
00276         length = len(_x)
00277       buff.write(struct.pack('<I%ss'%length, length, _x))
00278       _x = self.goal.frame.name
00279       length = len(_x)
00280       if python3 or type(_x) == unicode:
00281         _x = _x.encode('utf-8')
00282         length = len(_x)
00283       buff.write(struct.pack('<I%ss'%length, length, _x))
00284       length = len(self.goal.frame.frame_elements)
00285       buff.write(_struct_I.pack(length))
00286       for val1 in self.goal.frame.frame_elements:
00287         _x = val1.name
00288         length = len(_x)
00289         if python3 or type(_x) == unicode:
00290           _x = _x.encode('utf-8')
00291           length = len(_x)
00292         buff.write(struct.pack('<I%ss'%length, length, _x))
00293         _x = val1.argument
00294         length = len(_x)
00295         if python3 or type(_x) == unicode:
00296           _x = _x.encode('utf-8')
00297           length = len(_x)
00298         buff.write(struct.pack('<I%ss'%length, length, _x))
00299       length = len(self.goal.frame.action_server_topics)
00300       buff.write(_struct_I.pack(length))
00301       for val1 in self.goal.frame.action_server_topics:
00302         length = len(val1)
00303         if python3 or type(val1) == unicode:
00304           val1 = val1.encode('utf-8')
00305           length = len(val1)
00306         buff.write(struct.pack('<I%ss'%length, length, val1))
00307     except struct.error as se: self._check_types(se)
00308     except TypeError as te: self._check_types(te)
00309 
00310   def deserialize_numpy(self, str, numpy):
00311     """
00312     unpack serialized message in str into this message instance using numpy for array types
00313     :param str: byte array of serialized message, ``str``
00314     :param numpy: numpy python module
00315     """
00316     try:
00317       if self.header is None:
00318         self.header = std_msgs.msg.Header()
00319       if self.goal_id is None:
00320         self.goal_id = actionlib_msgs.msg.GoalID()
00321       if self.goal is None:
00322         self.goal = roboframenet_msgs.msg.FilledSemanticFrameGoal()
00323       end = 0
00324       _x = self
00325       start = end
00326       end += 12
00327       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00328       start = end
00329       end += 4
00330       (length,) = _struct_I.unpack(str[start:end])
00331       start = end
00332       end += length
00333       if python3:
00334         self.header.frame_id = str[start:end].decode('utf-8')
00335       else:
00336         self.header.frame_id = str[start:end]
00337       _x = self
00338       start = end
00339       end += 8
00340       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00341       start = end
00342       end += 4
00343       (length,) = _struct_I.unpack(str[start:end])
00344       start = end
00345       end += length
00346       if python3:
00347         self.goal_id.id = str[start:end].decode('utf-8')
00348       else:
00349         self.goal_id.id = str[start:end]
00350       start = end
00351       end += 4
00352       (length,) = _struct_I.unpack(str[start:end])
00353       start = end
00354       end += length
00355       if python3:
00356         self.goal.frame.name = str[start:end].decode('utf-8')
00357       else:
00358         self.goal.frame.name = str[start:end]
00359       start = end
00360       end += 4
00361       (length,) = _struct_I.unpack(str[start:end])
00362       self.goal.frame.frame_elements = []
00363       for i in range(0, length):
00364         val1 = roboframenet_msgs.msg.FilledFrameElement()
00365         start = end
00366         end += 4
00367         (length,) = _struct_I.unpack(str[start:end])
00368         start = end
00369         end += length
00370         if python3:
00371           val1.name = str[start:end].decode('utf-8')
00372         else:
00373           val1.name = str[start:end]
00374         start = end
00375         end += 4
00376         (length,) = _struct_I.unpack(str[start:end])
00377         start = end
00378         end += length
00379         if python3:
00380           val1.argument = str[start:end].decode('utf-8')
00381         else:
00382           val1.argument = str[start:end]
00383         self.goal.frame.frame_elements.append(val1)
00384       start = end
00385       end += 4
00386       (length,) = _struct_I.unpack(str[start:end])
00387       self.goal.frame.action_server_topics = []
00388       for i in range(0, length):
00389         start = end
00390         end += 4
00391         (length,) = _struct_I.unpack(str[start:end])
00392         start = end
00393         end += length
00394         if python3:
00395           val1 = str[start:end].decode('utf-8')
00396         else:
00397           val1 = str[start:end]
00398         self.goal.frame.action_server_topics.append(val1)
00399       return self
00400     except struct.error as e:
00401       raise genpy.DeserializationError(e) #most likely buffer underfill
00402 
00403 _struct_I = genpy.struct_I
00404 _struct_3I = struct.Struct("<3I")
00405 _struct_2I = struct.Struct("<2I")


roboframenet_msgs
Author(s): Brian Thomas
autogenerated on Fri Dec 6 2013 20:32:43