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


smach_msgs
Author(s): Jonathan Bohren
autogenerated on Tue Mar 5 2013 13:11:28