_SmachContainerStatus.py
Go to the documentation of this file.
00001 """autogenerated by genpy from smach_msgs/SmachContainerStatus.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 SmachContainerStatus(genpy.Message):
00010   _md5sum = "5ba2bb79ac19e3842d562a191f2a675b"
00011   _type = "smach_msgs/SmachContainerStatus"
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 initial state description
00019 string[] initial_states
00020 
00021 # The current state description
00022 string[] active_states
00023 
00024 # A pickled user data structure
00025 string local_data
00026 
00027 # Debugging info string
00028 string info
00029 
00030 ================================================================================
00031 MSG: std_msgs/Header
00032 # Standard metadata for higher-level stamped data types.
00033 # This is generally used to communicate timestamped data 
00034 # in a particular coordinate frame.
00035 # 
00036 # sequence ID: consecutively increasing ID 
00037 uint32 seq
00038 #Two-integer timestamp that is expressed as:
00039 # * stamp.secs: seconds (stamp_secs) since epoch
00040 # * stamp.nsecs: nanoseconds since stamp_secs
00041 # time-handling sugar is provided by the client library
00042 time stamp
00043 #Frame this data is associated with
00044 # 0: no frame
00045 # 1: global frame
00046 string frame_id
00047 
00048 """
00049   __slots__ = ['header','path','initial_states','active_states','local_data','info']
00050   _slot_types = ['std_msgs/Header','string','string[]','string[]','string','string']
00051 
00052   def __init__(self, *args, **kwds):
00053     """
00054     Constructor. Any message fields that are implicitly/explicitly
00055     set to None will be assigned a default value. The recommend
00056     use is keyword arguments as this is more robust to future message
00057     changes.  You cannot mix in-order arguments and keyword arguments.
00058 
00059     The available fields are:
00060        header,path,initial_states,active_states,local_data,info
00061 
00062     :param args: complete set of field values, in .msg order
00063     :param kwds: use keyword arguments corresponding to message field names
00064     to set specific fields.
00065     """
00066     if args or kwds:
00067       super(SmachContainerStatus, self).__init__(*args, **kwds)
00068       #message fields cannot be None, assign default values for those that are
00069       if self.header is None:
00070         self.header = std_msgs.msg.Header()
00071       if self.path is None:
00072         self.path = ''
00073       if self.initial_states is None:
00074         self.initial_states = []
00075       if self.active_states is None:
00076         self.active_states = []
00077       if self.local_data is None:
00078         self.local_data = ''
00079       if self.info is None:
00080         self.info = ''
00081     else:
00082       self.header = std_msgs.msg.Header()
00083       self.path = ''
00084       self.initial_states = []
00085       self.active_states = []
00086       self.local_data = ''
00087       self.info = ''
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, ``StringIO``
00099     """
00100     try:
00101       _x = self
00102       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00103       _x = self.header.frame_id
00104       length = len(_x)
00105       if python3 or type(_x) == unicode:
00106         _x = _x.encode('utf-8')
00107         length = len(_x)
00108       buff.write(struct.pack('<I%ss'%length, length, _x))
00109       _x = self.path
00110       length = len(_x)
00111       if python3 or type(_x) == unicode:
00112         _x = _x.encode('utf-8')
00113         length = len(_x)
00114       buff.write(struct.pack('<I%ss'%length, length, _x))
00115       length = len(self.initial_states)
00116       buff.write(_struct_I.pack(length))
00117       for val1 in self.initial_states:
00118         length = len(val1)
00119         if python3 or type(val1) == unicode:
00120           val1 = val1.encode('utf-8')
00121           length = len(val1)
00122         buff.write(struct.pack('<I%ss'%length, length, val1))
00123       length = len(self.active_states)
00124       buff.write(_struct_I.pack(length))
00125       for val1 in self.active_states:
00126         length = len(val1)
00127         if python3 or type(val1) == unicode:
00128           val1 = val1.encode('utf-8')
00129           length = len(val1)
00130         buff.write(struct.pack('<I%ss'%length, length, val1))
00131       _x = self.local_data
00132       length = len(_x)
00133       if python3 or type(_x) == unicode:
00134         _x = _x.encode('utf-8')
00135         length = len(_x)
00136       buff.write(struct.pack('<I%ss'%length, length, _x))
00137       _x = self.info
00138       length = len(_x)
00139       if python3 or type(_x) == unicode:
00140         _x = _x.encode('utf-8')
00141         length = len(_x)
00142       buff.write(struct.pack('<I%ss'%length, length, _x))
00143     except struct.error as se: self._check_types(se)
00144     except TypeError as te: self._check_types(te)
00145 
00146   def deserialize(self, str):
00147     """
00148     unpack serialized message in str into this message instance
00149     :param str: byte array of serialized message, ``str``
00150     """
00151     try:
00152       if self.header is None:
00153         self.header = std_msgs.msg.Header()
00154       end = 0
00155       _x = self
00156       start = end
00157       end += 12
00158       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00159       start = end
00160       end += 4
00161       (length,) = _struct_I.unpack(str[start:end])
00162       start = end
00163       end += length
00164       if python3:
00165         self.header.frame_id = str[start:end].decode('utf-8')
00166       else:
00167         self.header.frame_id = str[start:end]
00168       start = end
00169       end += 4
00170       (length,) = _struct_I.unpack(str[start:end])
00171       start = end
00172       end += length
00173       if python3:
00174         self.path = str[start:end].decode('utf-8')
00175       else:
00176         self.path = str[start:end]
00177       start = end
00178       end += 4
00179       (length,) = _struct_I.unpack(str[start:end])
00180       self.initial_states = []
00181       for i in range(0, length):
00182         start = end
00183         end += 4
00184         (length,) = _struct_I.unpack(str[start:end])
00185         start = end
00186         end += length
00187         if python3:
00188           val1 = str[start:end].decode('utf-8')
00189         else:
00190           val1 = str[start:end]
00191         self.initial_states.append(val1)
00192       start = end
00193       end += 4
00194       (length,) = _struct_I.unpack(str[start:end])
00195       self.active_states = []
00196       for i in range(0, length):
00197         start = end
00198         end += 4
00199         (length,) = _struct_I.unpack(str[start:end])
00200         start = end
00201         end += length
00202         if python3:
00203           val1 = str[start:end].decode('utf-8')
00204         else:
00205           val1 = str[start:end]
00206         self.active_states.append(val1)
00207       start = end
00208       end += 4
00209       (length,) = _struct_I.unpack(str[start:end])
00210       start = end
00211       end += length
00212       if python3:
00213         self.local_data = str[start:end].decode('utf-8')
00214       else:
00215         self.local_data = str[start:end]
00216       start = end
00217       end += 4
00218       (length,) = _struct_I.unpack(str[start:end])
00219       start = end
00220       end += length
00221       if python3:
00222         self.info = str[start:end].decode('utf-8')
00223       else:
00224         self.info = str[start:end]
00225       return self
00226     except struct.error as e:
00227       raise genpy.DeserializationError(e) #most likely buffer underfill
00228 
00229 
00230   def serialize_numpy(self, buff, numpy):
00231     """
00232     serialize message with numpy array types into buffer
00233     :param buff: buffer, ``StringIO``
00234     :param numpy: numpy python module
00235     """
00236     try:
00237       _x = self
00238       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00239       _x = self.header.frame_id
00240       length = len(_x)
00241       if python3 or type(_x) == unicode:
00242         _x = _x.encode('utf-8')
00243         length = len(_x)
00244       buff.write(struct.pack('<I%ss'%length, length, _x))
00245       _x = self.path
00246       length = len(_x)
00247       if python3 or type(_x) == unicode:
00248         _x = _x.encode('utf-8')
00249         length = len(_x)
00250       buff.write(struct.pack('<I%ss'%length, length, _x))
00251       length = len(self.initial_states)
00252       buff.write(_struct_I.pack(length))
00253       for val1 in self.initial_states:
00254         length = len(val1)
00255         if python3 or type(val1) == unicode:
00256           val1 = val1.encode('utf-8')
00257           length = len(val1)
00258         buff.write(struct.pack('<I%ss'%length, length, val1))
00259       length = len(self.active_states)
00260       buff.write(_struct_I.pack(length))
00261       for val1 in self.active_states:
00262         length = len(val1)
00263         if python3 or type(val1) == unicode:
00264           val1 = val1.encode('utf-8')
00265           length = len(val1)
00266         buff.write(struct.pack('<I%ss'%length, length, val1))
00267       _x = self.local_data
00268       length = len(_x)
00269       if python3 or type(_x) == unicode:
00270         _x = _x.encode('utf-8')
00271         length = len(_x)
00272       buff.write(struct.pack('<I%ss'%length, length, _x))
00273       _x = self.info
00274       length = len(_x)
00275       if python3 or type(_x) == unicode:
00276         _x = _x.encode('utf-8')
00277         length = len(_x)
00278       buff.write(struct.pack('<I%ss'%length, length, _x))
00279     except struct.error as se: self._check_types(se)
00280     except TypeError as te: self._check_types(te)
00281 
00282   def deserialize_numpy(self, str, numpy):
00283     """
00284     unpack serialized message in str into this message instance using numpy for array types
00285     :param str: byte array of serialized message, ``str``
00286     :param numpy: numpy python module
00287     """
00288     try:
00289       if self.header is None:
00290         self.header = std_msgs.msg.Header()
00291       end = 0
00292       _x = self
00293       start = end
00294       end += 12
00295       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00296       start = end
00297       end += 4
00298       (length,) = _struct_I.unpack(str[start:end])
00299       start = end
00300       end += length
00301       if python3:
00302         self.header.frame_id = str[start:end].decode('utf-8')
00303       else:
00304         self.header.frame_id = str[start:end]
00305       start = end
00306       end += 4
00307       (length,) = _struct_I.unpack(str[start:end])
00308       start = end
00309       end += length
00310       if python3:
00311         self.path = str[start:end].decode('utf-8')
00312       else:
00313         self.path = str[start:end]
00314       start = end
00315       end += 4
00316       (length,) = _struct_I.unpack(str[start:end])
00317       self.initial_states = []
00318       for i in range(0, length):
00319         start = end
00320         end += 4
00321         (length,) = _struct_I.unpack(str[start:end])
00322         start = end
00323         end += length
00324         if python3:
00325           val1 = str[start:end].decode('utf-8')
00326         else:
00327           val1 = str[start:end]
00328         self.initial_states.append(val1)
00329       start = end
00330       end += 4
00331       (length,) = _struct_I.unpack(str[start:end])
00332       self.active_states = []
00333       for i in range(0, length):
00334         start = end
00335         end += 4
00336         (length,) = _struct_I.unpack(str[start:end])
00337         start = end
00338         end += length
00339         if python3:
00340           val1 = str[start:end].decode('utf-8')
00341         else:
00342           val1 = str[start:end]
00343         self.active_states.append(val1)
00344       start = end
00345       end += 4
00346       (length,) = _struct_I.unpack(str[start:end])
00347       start = end
00348       end += length
00349       if python3:
00350         self.local_data = str[start:end].decode('utf-8')
00351       else:
00352         self.local_data = str[start:end]
00353       start = end
00354       end += 4
00355       (length,) = _struct_I.unpack(str[start:end])
00356       start = end
00357       end += length
00358       if python3:
00359         self.info = str[start:end].decode('utf-8')
00360       else:
00361         self.info = str[start:end]
00362       return self
00363     except struct.error as e:
00364       raise genpy.DeserializationError(e) #most likely buffer underfill
00365 
00366 _struct_I = genpy.struct_I
00367 _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