00001 """autogenerated by genmsg_py from AppStatus.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import launchman.msg
00006
00007 class AppStatus(roslib.message.Message):
00008 _md5sum = "8a2d696a9a11a9fb77b5416e878dcad0"
00009 _type = "launchman/AppStatus"
00010 _has_header = False
00011 _full_text = """Application[] active
00012
00013 ================================================================================
00014 MSG: launchman/Application
00015 string taskid
00016 string name
00017 string status
00018 string icon
00019 string provides
00020 string depends
00021
00022 """
00023 __slots__ = ['active']
00024 _slot_types = ['launchman/Application[]']
00025
00026 def __init__(self, *args, **kwds):
00027 """
00028 Constructor. Any message fields that are implicitly/explicitly
00029 set to None will be assigned a default value. The recommend
00030 use is keyword arguments as this is more robust to future message
00031 changes. You cannot mix in-order arguments and keyword arguments.
00032
00033 The available fields are:
00034 active
00035
00036 @param args: complete set of field values, in .msg order
00037 @param kwds: use keyword arguments corresponding to message field names
00038 to set specific fields.
00039 """
00040 if args or kwds:
00041 super(AppStatus, self).__init__(*args, **kwds)
00042
00043 if self.active is None:
00044 self.active = []
00045 else:
00046 self.active = []
00047
00048 def _get_types(self):
00049 """
00050 internal API method
00051 """
00052 return self._slot_types
00053
00054 def serialize(self, buff):
00055 """
00056 serialize message into buffer
00057 @param buff: buffer
00058 @type buff: StringIO
00059 """
00060 try:
00061 length = len(self.active)
00062 buff.write(_struct_I.pack(length))
00063 for val1 in self.active:
00064 _x = val1.taskid
00065 length = len(_x)
00066 buff.write(struct.pack('<I%ss'%length, length, _x))
00067 _x = val1.name
00068 length = len(_x)
00069 buff.write(struct.pack('<I%ss'%length, length, _x))
00070 _x = val1.status
00071 length = len(_x)
00072 buff.write(struct.pack('<I%ss'%length, length, _x))
00073 _x = val1.icon
00074 length = len(_x)
00075 buff.write(struct.pack('<I%ss'%length, length, _x))
00076 _x = val1.provides
00077 length = len(_x)
00078 buff.write(struct.pack('<I%ss'%length, length, _x))
00079 _x = val1.depends
00080 length = len(_x)
00081 buff.write(struct.pack('<I%ss'%length, length, _x))
00082 except struct.error, se: self._check_types(se)
00083 except TypeError, te: self._check_types(te)
00084
00085 def deserialize(self, str):
00086 """
00087 unpack serialized message in str into this message instance
00088 @param str: byte array of serialized message
00089 @type str: str
00090 """
00091 try:
00092 end = 0
00093 start = end
00094 end += 4
00095 (length,) = _struct_I.unpack(str[start:end])
00096 self.active = []
00097 for i in xrange(0, length):
00098 val1 = launchman.msg.Application()
00099 start = end
00100 end += 4
00101 (length,) = _struct_I.unpack(str[start:end])
00102 start = end
00103 end += length
00104 val1.taskid = str[start:end]
00105 start = end
00106 end += 4
00107 (length,) = _struct_I.unpack(str[start:end])
00108 start = end
00109 end += length
00110 val1.name = str[start:end]
00111 start = end
00112 end += 4
00113 (length,) = _struct_I.unpack(str[start:end])
00114 start = end
00115 end += length
00116 val1.status = str[start:end]
00117 start = end
00118 end += 4
00119 (length,) = _struct_I.unpack(str[start:end])
00120 start = end
00121 end += length
00122 val1.icon = str[start:end]
00123 start = end
00124 end += 4
00125 (length,) = _struct_I.unpack(str[start:end])
00126 start = end
00127 end += length
00128 val1.provides = str[start:end]
00129 start = end
00130 end += 4
00131 (length,) = _struct_I.unpack(str[start:end])
00132 start = end
00133 end += length
00134 val1.depends = str[start:end]
00135 self.active.append(val1)
00136 return self
00137 except struct.error, e:
00138 raise roslib.message.DeserializationError(e)
00139
00140
00141 def serialize_numpy(self, buff, numpy):
00142 """
00143 serialize message with numpy array types into buffer
00144 @param buff: buffer
00145 @type buff: StringIO
00146 @param numpy: numpy python module
00147 @type numpy module
00148 """
00149 try:
00150 length = len(self.active)
00151 buff.write(_struct_I.pack(length))
00152 for val1 in self.active:
00153 _x = val1.taskid
00154 length = len(_x)
00155 buff.write(struct.pack('<I%ss'%length, length, _x))
00156 _x = val1.name
00157 length = len(_x)
00158 buff.write(struct.pack('<I%ss'%length, length, _x))
00159 _x = val1.status
00160 length = len(_x)
00161 buff.write(struct.pack('<I%ss'%length, length, _x))
00162 _x = val1.icon
00163 length = len(_x)
00164 buff.write(struct.pack('<I%ss'%length, length, _x))
00165 _x = val1.provides
00166 length = len(_x)
00167 buff.write(struct.pack('<I%ss'%length, length, _x))
00168 _x = val1.depends
00169 length = len(_x)
00170 buff.write(struct.pack('<I%ss'%length, length, _x))
00171 except struct.error, se: self._check_types(se)
00172 except TypeError, te: self._check_types(te)
00173
00174 def deserialize_numpy(self, str, numpy):
00175 """
00176 unpack serialized message in str into this message instance using numpy for array types
00177 @param str: byte array of serialized message
00178 @type str: str
00179 @param numpy: numpy python module
00180 @type numpy: module
00181 """
00182 try:
00183 end = 0
00184 start = end
00185 end += 4
00186 (length,) = _struct_I.unpack(str[start:end])
00187 self.active = []
00188 for i in xrange(0, length):
00189 val1 = launchman.msg.Application()
00190 start = end
00191 end += 4
00192 (length,) = _struct_I.unpack(str[start:end])
00193 start = end
00194 end += length
00195 val1.taskid = str[start:end]
00196 start = end
00197 end += 4
00198 (length,) = _struct_I.unpack(str[start:end])
00199 start = end
00200 end += length
00201 val1.name = str[start:end]
00202 start = end
00203 end += 4
00204 (length,) = _struct_I.unpack(str[start:end])
00205 start = end
00206 end += length
00207 val1.status = str[start:end]
00208 start = end
00209 end += 4
00210 (length,) = _struct_I.unpack(str[start:end])
00211 start = end
00212 end += length
00213 val1.icon = str[start:end]
00214 start = end
00215 end += 4
00216 (length,) = _struct_I.unpack(str[start:end])
00217 start = end
00218 end += length
00219 val1.provides = str[start:end]
00220 start = end
00221 end += 4
00222 (length,) = _struct_I.unpack(str[start:end])
00223 start = end
00224 end += length
00225 val1.depends = str[start:end]
00226 self.active.append(val1)
00227 return self
00228 except struct.error, e:
00229 raise roslib.message.DeserializationError(e)
00230
00231 _struct_I = roslib.message.struct_I