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