$search
00001 """autogenerated by genmsg_py from ListApplicationsResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ListApplicationsResult(roslib.message.Message): 00007 _md5sum = "529b1334801bfd8ac373e2c8fd509c92" 00008 _type = "application_msgs/ListApplicationsResult" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 string[] application_name 00012 string[] application_status 00013 bool[] daemonize 00014 00015 """ 00016 __slots__ = ['application_name','application_status','daemonize'] 00017 _slot_types = ['string[]','string[]','bool[]'] 00018 00019 def __init__(self, *args, **kwds): 00020 """ 00021 Constructor. Any message fields that are implicitly/explicitly 00022 set to None will be assigned a default value. The recommend 00023 use is keyword arguments as this is more robust to future message 00024 changes. You cannot mix in-order arguments and keyword arguments. 00025 00026 The available fields are: 00027 application_name,application_status,daemonize 00028 00029 @param args: complete set of field values, in .msg order 00030 @param kwds: use keyword arguments corresponding to message field names 00031 to set specific fields. 00032 """ 00033 if args or kwds: 00034 super(ListApplicationsResult, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.application_name is None: 00037 self.application_name = [] 00038 if self.application_status is None: 00039 self.application_status = [] 00040 if self.daemonize is None: 00041 self.daemonize = [] 00042 else: 00043 self.application_name = [] 00044 self.application_status = [] 00045 self.daemonize = [] 00046 00047 def _get_types(self): 00048 """ 00049 internal API method 00050 """ 00051 return self._slot_types 00052 00053 def serialize(self, buff): 00054 """ 00055 serialize message into buffer 00056 @param buff: buffer 00057 @type buff: StringIO 00058 """ 00059 try: 00060 length = len(self.application_name) 00061 buff.write(_struct_I.pack(length)) 00062 for val1 in self.application_name: 00063 length = len(val1) 00064 buff.write(struct.pack('<I%ss'%length, length, val1)) 00065 length = len(self.application_status) 00066 buff.write(_struct_I.pack(length)) 00067 for val1 in self.application_status: 00068 length = len(val1) 00069 buff.write(struct.pack('<I%ss'%length, length, val1)) 00070 length = len(self.daemonize) 00071 buff.write(_struct_I.pack(length)) 00072 pattern = '<%sB'%length 00073 buff.write(struct.pack(pattern, *self.daemonize)) 00074 except struct.error as se: self._check_types(se) 00075 except TypeError as te: self._check_types(te) 00076 00077 def deserialize(self, str): 00078 """ 00079 unpack serialized message in str into this message instance 00080 @param str: byte array of serialized message 00081 @type str: str 00082 """ 00083 try: 00084 end = 0 00085 start = end 00086 end += 4 00087 (length,) = _struct_I.unpack(str[start:end]) 00088 self.application_name = [] 00089 for i in range(0, length): 00090 start = end 00091 end += 4 00092 (length,) = _struct_I.unpack(str[start:end]) 00093 start = end 00094 end += length 00095 val1 = str[start:end] 00096 self.application_name.append(val1) 00097 start = end 00098 end += 4 00099 (length,) = _struct_I.unpack(str[start:end]) 00100 self.application_status = [] 00101 for i in range(0, length): 00102 start = end 00103 end += 4 00104 (length,) = _struct_I.unpack(str[start:end]) 00105 start = end 00106 end += length 00107 val1 = str[start:end] 00108 self.application_status.append(val1) 00109 start = end 00110 end += 4 00111 (length,) = _struct_I.unpack(str[start:end]) 00112 pattern = '<%sB'%length 00113 start = end 00114 end += struct.calcsize(pattern) 00115 self.daemonize = struct.unpack(pattern, str[start:end]) 00116 self.daemonize = map(bool, self.daemonize) 00117 return self 00118 except struct.error as e: 00119 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00120 00121 00122 def serialize_numpy(self, buff, numpy): 00123 """ 00124 serialize message with numpy array types into buffer 00125 @param buff: buffer 00126 @type buff: StringIO 00127 @param numpy: numpy python module 00128 @type numpy module 00129 """ 00130 try: 00131 length = len(self.application_name) 00132 buff.write(_struct_I.pack(length)) 00133 for val1 in self.application_name: 00134 length = len(val1) 00135 buff.write(struct.pack('<I%ss'%length, length, val1)) 00136 length = len(self.application_status) 00137 buff.write(_struct_I.pack(length)) 00138 for val1 in self.application_status: 00139 length = len(val1) 00140 buff.write(struct.pack('<I%ss'%length, length, val1)) 00141 length = len(self.daemonize) 00142 buff.write(_struct_I.pack(length)) 00143 pattern = '<%sB'%length 00144 buff.write(self.daemonize.tostring()) 00145 except struct.error as se: self._check_types(se) 00146 except TypeError as te: self._check_types(te) 00147 00148 def deserialize_numpy(self, str, numpy): 00149 """ 00150 unpack serialized message in str into this message instance using numpy for array types 00151 @param str: byte array of serialized message 00152 @type str: str 00153 @param numpy: numpy python module 00154 @type numpy: module 00155 """ 00156 try: 00157 end = 0 00158 start = end 00159 end += 4 00160 (length,) = _struct_I.unpack(str[start:end]) 00161 self.application_name = [] 00162 for i in range(0, length): 00163 start = end 00164 end += 4 00165 (length,) = _struct_I.unpack(str[start:end]) 00166 start = end 00167 end += length 00168 val1 = str[start:end] 00169 self.application_name.append(val1) 00170 start = end 00171 end += 4 00172 (length,) = _struct_I.unpack(str[start:end]) 00173 self.application_status = [] 00174 for i in range(0, length): 00175 start = end 00176 end += 4 00177 (length,) = _struct_I.unpack(str[start:end]) 00178 start = end 00179 end += length 00180 val1 = str[start:end] 00181 self.application_status.append(val1) 00182 start = end 00183 end += 4 00184 (length,) = _struct_I.unpack(str[start:end]) 00185 pattern = '<%sB'%length 00186 start = end 00187 end += struct.calcsize(pattern) 00188 self.daemonize = numpy.frombuffer(str[start:end], dtype=numpy.bool, count=length) 00189 self.daemonize = map(bool, self.daemonize) 00190 return self 00191 except struct.error as e: 00192 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00193 00194 _struct_I = roslib.message.struct_I