00001 """autogenerated by genmsg_py from SmachContainerStatus.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import std_msgs.msg
00006
00007 class SmachContainerStatus(roslib.message.Message):
00008 _md5sum = "5ba2bb79ac19e3842d562a191f2a675b"
00009 _type = "smach_msgs/SmachContainerStatus"
00010 _has_header = True
00011 _full_text = """Header header
00012
00013 # The path to this node in the server
00014 string path
00015
00016 # The initial state description
00017 string[] initial_states
00018
00019 # The current state description
00020 string[] active_states
00021
00022 # A pickled user data structure
00023 string local_data
00024
00025 # Debugging info string
00026 string info
00027
00028 ================================================================================
00029 MSG: std_msgs/Header
00030 # Standard metadata for higher-level stamped data types.
00031 # This is generally used to communicate timestamped data
00032 # in a particular coordinate frame.
00033 #
00034 # sequence ID: consecutively increasing ID
00035 uint32 seq
00036 #Two-integer timestamp that is expressed as:
00037 # * stamp.secs: seconds (stamp_secs) since epoch
00038 # * stamp.nsecs: nanoseconds since stamp_secs
00039 # time-handling sugar is provided by the client library
00040 time stamp
00041 #Frame this data is associated with
00042 # 0: no frame
00043 # 1: global frame
00044 string frame_id
00045
00046 """
00047 __slots__ = ['header','path','initial_states','active_states','local_data','info']
00048 _slot_types = ['Header','string','string[]','string[]','string','string']
00049
00050 def __init__(self, *args, **kwds):
00051 """
00052 Constructor. Any message fields that are implicitly/explicitly
00053 set to None will be assigned a default value. The recommend
00054 use is keyword arguments as this is more robust to future message
00055 changes. You cannot mix in-order arguments and keyword arguments.
00056
00057 The available fields are:
00058 header,path,initial_states,active_states,local_data,info
00059
00060 @param args: complete set of field values, in .msg order
00061 @param kwds: use keyword arguments corresponding to message field names
00062 to set specific fields.
00063 """
00064 if args or kwds:
00065 super(SmachContainerStatus, self).__init__(*args, **kwds)
00066
00067 if self.header is None:
00068 self.header = std_msgs.msg._Header.Header()
00069 if self.path is None:
00070 self.path = ''
00071 if self.initial_states is None:
00072 self.initial_states = []
00073 if self.active_states is None:
00074 self.active_states = []
00075 if self.local_data is None:
00076 self.local_data = ''
00077 if self.info is None:
00078 self.info = ''
00079 else:
00080 self.header = std_msgs.msg._Header.Header()
00081 self.path = ''
00082 self.initial_states = []
00083 self.active_states = []
00084 self.local_data = ''
00085 self.info = ''
00086
00087 def _get_types(self):
00088 """
00089 internal API method
00090 """
00091 return self._slot_types
00092
00093 def serialize(self, buff):
00094 """
00095 serialize message into buffer
00096 @param buff: buffer
00097 @type buff: StringIO
00098 """
00099 try:
00100 _x = self
00101 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00102 _x = self.header.frame_id
00103 length = len(_x)
00104 buff.write(struct.pack('<I%ss'%length, length, _x))
00105 _x = self.path
00106 length = len(_x)
00107 buff.write(struct.pack('<I%ss'%length, length, _x))
00108 length = len(self.initial_states)
00109 buff.write(_struct_I.pack(length))
00110 for val1 in self.initial_states:
00111 length = len(val1)
00112 buff.write(struct.pack('<I%ss'%length, length, val1))
00113 length = len(self.active_states)
00114 buff.write(_struct_I.pack(length))
00115 for val1 in self.active_states:
00116 length = len(val1)
00117 buff.write(struct.pack('<I%ss'%length, length, val1))
00118 _x = self.local_data
00119 length = len(_x)
00120 buff.write(struct.pack('<I%ss'%length, length, _x))
00121 _x = self.info
00122 length = len(_x)
00123 buff.write(struct.pack('<I%ss'%length, length, _x))
00124 except struct.error as se: self._check_types(se)
00125 except TypeError as te: self._check_types(te)
00126
00127 def deserialize(self, str):
00128 """
00129 unpack serialized message in str into this message instance
00130 @param str: byte array of serialized message
00131 @type str: str
00132 """
00133 try:
00134 if self.header is None:
00135 self.header = std_msgs.msg._Header.Header()
00136 end = 0
00137 _x = self
00138 start = end
00139 end += 12
00140 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00141 start = end
00142 end += 4
00143 (length,) = _struct_I.unpack(str[start:end])
00144 start = end
00145 end += length
00146 self.header.frame_id = str[start:end]
00147 start = end
00148 end += 4
00149 (length,) = _struct_I.unpack(str[start:end])
00150 start = end
00151 end += length
00152 self.path = str[start:end]
00153 start = end
00154 end += 4
00155 (length,) = _struct_I.unpack(str[start:end])
00156 self.initial_states = []
00157 for i in range(0, length):
00158 start = end
00159 end += 4
00160 (length,) = _struct_I.unpack(str[start:end])
00161 start = end
00162 end += length
00163 val1 = str[start:end]
00164 self.initial_states.append(val1)
00165 start = end
00166 end += 4
00167 (length,) = _struct_I.unpack(str[start:end])
00168 self.active_states = []
00169 for i in range(0, length):
00170 start = end
00171 end += 4
00172 (length,) = _struct_I.unpack(str[start:end])
00173 start = end
00174 end += length
00175 val1 = str[start:end]
00176 self.active_states.append(val1)
00177 start = end
00178 end += 4
00179 (length,) = _struct_I.unpack(str[start:end])
00180 start = end
00181 end += length
00182 self.local_data = str[start:end]
00183 start = end
00184 end += 4
00185 (length,) = _struct_I.unpack(str[start:end])
00186 start = end
00187 end += length
00188 self.info = str[start:end]
00189 return self
00190 except struct.error as e:
00191 raise roslib.message.DeserializationError(e)
00192
00193
00194 def serialize_numpy(self, buff, numpy):
00195 """
00196 serialize message with numpy array types into buffer
00197 @param buff: buffer
00198 @type buff: StringIO
00199 @param numpy: numpy python module
00200 @type numpy module
00201 """
00202 try:
00203 _x = self
00204 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00205 _x = self.header.frame_id
00206 length = len(_x)
00207 buff.write(struct.pack('<I%ss'%length, length, _x))
00208 _x = self.path
00209 length = len(_x)
00210 buff.write(struct.pack('<I%ss'%length, length, _x))
00211 length = len(self.initial_states)
00212 buff.write(_struct_I.pack(length))
00213 for val1 in self.initial_states:
00214 length = len(val1)
00215 buff.write(struct.pack('<I%ss'%length, length, val1))
00216 length = len(self.active_states)
00217 buff.write(_struct_I.pack(length))
00218 for val1 in self.active_states:
00219 length = len(val1)
00220 buff.write(struct.pack('<I%ss'%length, length, val1))
00221 _x = self.local_data
00222 length = len(_x)
00223 buff.write(struct.pack('<I%ss'%length, length, _x))
00224 _x = self.info
00225 length = len(_x)
00226 buff.write(struct.pack('<I%ss'%length, length, _x))
00227 except struct.error as se: self._check_types(se)
00228 except TypeError as te: self._check_types(te)
00229
00230 def deserialize_numpy(self, str, numpy):
00231 """
00232 unpack serialized message in str into this message instance using numpy for array types
00233 @param str: byte array of serialized message
00234 @type str: str
00235 @param numpy: numpy python module
00236 @type numpy: module
00237 """
00238 try:
00239 if self.header is None:
00240 self.header = std_msgs.msg._Header.Header()
00241 end = 0
00242 _x = self
00243 start = end
00244 end += 12
00245 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00246 start = end
00247 end += 4
00248 (length,) = _struct_I.unpack(str[start:end])
00249 start = end
00250 end += length
00251 self.header.frame_id = str[start:end]
00252 start = end
00253 end += 4
00254 (length,) = _struct_I.unpack(str[start:end])
00255 start = end
00256 end += length
00257 self.path = str[start:end]
00258 start = end
00259 end += 4
00260 (length,) = _struct_I.unpack(str[start:end])
00261 self.initial_states = []
00262 for i in range(0, length):
00263 start = end
00264 end += 4
00265 (length,) = _struct_I.unpack(str[start:end])
00266 start = end
00267 end += length
00268 val1 = str[start:end]
00269 self.initial_states.append(val1)
00270 start = end
00271 end += 4
00272 (length,) = _struct_I.unpack(str[start:end])
00273 self.active_states = []
00274 for i in range(0, length):
00275 start = end
00276 end += 4
00277 (length,) = _struct_I.unpack(str[start:end])
00278 start = end
00279 end += length
00280 val1 = str[start:end]
00281 self.active_states.append(val1)
00282 start = end
00283 end += 4
00284 (length,) = _struct_I.unpack(str[start:end])
00285 start = end
00286 end += length
00287 self.local_data = str[start:end]
00288 start = end
00289 end += 4
00290 (length,) = _struct_I.unpack(str[start:end])
00291 start = end
00292 end += length
00293 self.info = str[start:end]
00294 return self
00295 except struct.error as e:
00296 raise roslib.message.DeserializationError(e)
00297
00298 _struct_I = roslib.message.struct_I
00299 _struct_3I = struct.Struct("<3I")