$search
00001 """autogenerated by genmsg_py from AssociateFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import wpa_supplicant_node.msg 00006 import roslib.rostime 00007 00008 class AssociateFeedback(roslib.message.Message): 00009 _md5sum = "78ebac03d392e2d79e861554bdd8b7a7" 00010 _type = "wpa_supplicant_node/AssociateFeedback" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00013 bool associated 00014 Bss bss 00015 00016 00017 ================================================================================ 00018 MSG: wpa_supplicant_node/Bss 00019 time stamp 00020 string ssid 00021 uint8[6] bssid 00022 int32 frequency # In MHz 00023 int16 beacon_interval 00024 int16 capabilities 00025 int32 quality 00026 int32 noise 00027 int32 level 00028 SecurityProperties wpa 00029 SecurityProperties rsn 00030 00031 #InformationElement []ies 00032 #InformationElement []beacon_ies 00033 # flags 00034 # tsf 00035 # age 00036 00037 ================================================================================ 00038 MSG: wpa_supplicant_node/SecurityProperties 00039 string[] key_mgmt 00040 string[] group 00041 string[] pairwise 00042 00043 """ 00044 __slots__ = ['associated','bss'] 00045 _slot_types = ['bool','wpa_supplicant_node/Bss'] 00046 00047 def __init__(self, *args, **kwds): 00048 """ 00049 Constructor. Any message fields that are implicitly/explicitly 00050 set to None will be assigned a default value. The recommend 00051 use is keyword arguments as this is more robust to future message 00052 changes. You cannot mix in-order arguments and keyword arguments. 00053 00054 The available fields are: 00055 associated,bss 00056 00057 @param args: complete set of field values, in .msg order 00058 @param kwds: use keyword arguments corresponding to message field names 00059 to set specific fields. 00060 """ 00061 if args or kwds: 00062 super(AssociateFeedback, self).__init__(*args, **kwds) 00063 #message fields cannot be None, assign default values for those that are 00064 if self.associated is None: 00065 self.associated = False 00066 if self.bss is None: 00067 self.bss = wpa_supplicant_node.msg.Bss() 00068 else: 00069 self.associated = False 00070 self.bss = wpa_supplicant_node.msg.Bss() 00071 00072 def _get_types(self): 00073 """ 00074 internal API method 00075 """ 00076 return self._slot_types 00077 00078 def serialize(self, buff): 00079 """ 00080 serialize message into buffer 00081 @param buff: buffer 00082 @type buff: StringIO 00083 """ 00084 try: 00085 _x = self 00086 buff.write(_struct_B2I.pack(_x.associated, _x.bss.stamp.secs, _x.bss.stamp.nsecs)) 00087 _x = self.bss.ssid 00088 length = len(_x) 00089 buff.write(struct.pack('<I%ss'%length, length, _x)) 00090 _x = self.bss.bssid 00091 # - if encoded as a list instead, serialize as bytes instead of string 00092 if type(_x) in [list, tuple]: 00093 buff.write(_struct_6B.pack(*_x)) 00094 else: 00095 buff.write(_struct_6s.pack(_x)) 00096 _x = self 00097 buff.write(_struct_i2h3i.pack(_x.bss.frequency, _x.bss.beacon_interval, _x.bss.capabilities, _x.bss.quality, _x.bss.noise, _x.bss.level)) 00098 length = len(self.bss.wpa.key_mgmt) 00099 buff.write(_struct_I.pack(length)) 00100 for val1 in self.bss.wpa.key_mgmt: 00101 length = len(val1) 00102 buff.write(struct.pack('<I%ss'%length, length, val1)) 00103 length = len(self.bss.wpa.group) 00104 buff.write(_struct_I.pack(length)) 00105 for val1 in self.bss.wpa.group: 00106 length = len(val1) 00107 buff.write(struct.pack('<I%ss'%length, length, val1)) 00108 length = len(self.bss.wpa.pairwise) 00109 buff.write(_struct_I.pack(length)) 00110 for val1 in self.bss.wpa.pairwise: 00111 length = len(val1) 00112 buff.write(struct.pack('<I%ss'%length, length, val1)) 00113 length = len(self.bss.rsn.key_mgmt) 00114 buff.write(_struct_I.pack(length)) 00115 for val1 in self.bss.rsn.key_mgmt: 00116 length = len(val1) 00117 buff.write(struct.pack('<I%ss'%length, length, val1)) 00118 length = len(self.bss.rsn.group) 00119 buff.write(_struct_I.pack(length)) 00120 for val1 in self.bss.rsn.group: 00121 length = len(val1) 00122 buff.write(struct.pack('<I%ss'%length, length, val1)) 00123 length = len(self.bss.rsn.pairwise) 00124 buff.write(_struct_I.pack(length)) 00125 for val1 in self.bss.rsn.pairwise: 00126 length = len(val1) 00127 buff.write(struct.pack('<I%ss'%length, length, val1)) 00128 except struct.error as se: self._check_types(se) 00129 except TypeError as te: self._check_types(te) 00130 00131 def deserialize(self, str): 00132 """ 00133 unpack serialized message in str into this message instance 00134 @param str: byte array of serialized message 00135 @type str: str 00136 """ 00137 try: 00138 if self.bss is None: 00139 self.bss = wpa_supplicant_node.msg.Bss() 00140 end = 0 00141 _x = self 00142 start = end 00143 end += 9 00144 (_x.associated, _x.bss.stamp.secs, _x.bss.stamp.nsecs,) = _struct_B2I.unpack(str[start:end]) 00145 self.associated = bool(self.associated) 00146 start = end 00147 end += 4 00148 (length,) = _struct_I.unpack(str[start:end]) 00149 start = end 00150 end += length 00151 self.bss.ssid = str[start:end] 00152 start = end 00153 end += 6 00154 self.bss.bssid = str[start:end] 00155 _x = self 00156 start = end 00157 end += 20 00158 (_x.bss.frequency, _x.bss.beacon_interval, _x.bss.capabilities, _x.bss.quality, _x.bss.noise, _x.bss.level,) = _struct_i2h3i.unpack(str[start:end]) 00159 start = end 00160 end += 4 00161 (length,) = _struct_I.unpack(str[start:end]) 00162 self.bss.wpa.key_mgmt = [] 00163 for i in range(0, length): 00164 start = end 00165 end += 4 00166 (length,) = _struct_I.unpack(str[start:end]) 00167 start = end 00168 end += length 00169 val1 = str[start:end] 00170 self.bss.wpa.key_mgmt.append(val1) 00171 start = end 00172 end += 4 00173 (length,) = _struct_I.unpack(str[start:end]) 00174 self.bss.wpa.group = [] 00175 for i in range(0, length): 00176 start = end 00177 end += 4 00178 (length,) = _struct_I.unpack(str[start:end]) 00179 start = end 00180 end += length 00181 val1 = str[start:end] 00182 self.bss.wpa.group.append(val1) 00183 start = end 00184 end += 4 00185 (length,) = _struct_I.unpack(str[start:end]) 00186 self.bss.wpa.pairwise = [] 00187 for i in range(0, length): 00188 start = end 00189 end += 4 00190 (length,) = _struct_I.unpack(str[start:end]) 00191 start = end 00192 end += length 00193 val1 = str[start:end] 00194 self.bss.wpa.pairwise.append(val1) 00195 start = end 00196 end += 4 00197 (length,) = _struct_I.unpack(str[start:end]) 00198 self.bss.rsn.key_mgmt = [] 00199 for i in range(0, length): 00200 start = end 00201 end += 4 00202 (length,) = _struct_I.unpack(str[start:end]) 00203 start = end 00204 end += length 00205 val1 = str[start:end] 00206 self.bss.rsn.key_mgmt.append(val1) 00207 start = end 00208 end += 4 00209 (length,) = _struct_I.unpack(str[start:end]) 00210 self.bss.rsn.group = [] 00211 for i in range(0, length): 00212 start = end 00213 end += 4 00214 (length,) = _struct_I.unpack(str[start:end]) 00215 start = end 00216 end += length 00217 val1 = str[start:end] 00218 self.bss.rsn.group.append(val1) 00219 start = end 00220 end += 4 00221 (length,) = _struct_I.unpack(str[start:end]) 00222 self.bss.rsn.pairwise = [] 00223 for i in range(0, length): 00224 start = end 00225 end += 4 00226 (length,) = _struct_I.unpack(str[start:end]) 00227 start = end 00228 end += length 00229 val1 = str[start:end] 00230 self.bss.rsn.pairwise.append(val1) 00231 return self 00232 except struct.error as e: 00233 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00234 00235 00236 def serialize_numpy(self, buff, numpy): 00237 """ 00238 serialize message with numpy array types into buffer 00239 @param buff: buffer 00240 @type buff: StringIO 00241 @param numpy: numpy python module 00242 @type numpy module 00243 """ 00244 try: 00245 _x = self 00246 buff.write(_struct_B2I.pack(_x.associated, _x.bss.stamp.secs, _x.bss.stamp.nsecs)) 00247 _x = self.bss.ssid 00248 length = len(_x) 00249 buff.write(struct.pack('<I%ss'%length, length, _x)) 00250 _x = self.bss.bssid 00251 # - if encoded as a list instead, serialize as bytes instead of string 00252 if type(_x) in [list, tuple]: 00253 buff.write(_struct_6B.pack(*_x)) 00254 else: 00255 buff.write(_struct_6s.pack(_x)) 00256 _x = self 00257 buff.write(_struct_i2h3i.pack(_x.bss.frequency, _x.bss.beacon_interval, _x.bss.capabilities, _x.bss.quality, _x.bss.noise, _x.bss.level)) 00258 length = len(self.bss.wpa.key_mgmt) 00259 buff.write(_struct_I.pack(length)) 00260 for val1 in self.bss.wpa.key_mgmt: 00261 length = len(val1) 00262 buff.write(struct.pack('<I%ss'%length, length, val1)) 00263 length = len(self.bss.wpa.group) 00264 buff.write(_struct_I.pack(length)) 00265 for val1 in self.bss.wpa.group: 00266 length = len(val1) 00267 buff.write(struct.pack('<I%ss'%length, length, val1)) 00268 length = len(self.bss.wpa.pairwise) 00269 buff.write(_struct_I.pack(length)) 00270 for val1 in self.bss.wpa.pairwise: 00271 length = len(val1) 00272 buff.write(struct.pack('<I%ss'%length, length, val1)) 00273 length = len(self.bss.rsn.key_mgmt) 00274 buff.write(_struct_I.pack(length)) 00275 for val1 in self.bss.rsn.key_mgmt: 00276 length = len(val1) 00277 buff.write(struct.pack('<I%ss'%length, length, val1)) 00278 length = len(self.bss.rsn.group) 00279 buff.write(_struct_I.pack(length)) 00280 for val1 in self.bss.rsn.group: 00281 length = len(val1) 00282 buff.write(struct.pack('<I%ss'%length, length, val1)) 00283 length = len(self.bss.rsn.pairwise) 00284 buff.write(_struct_I.pack(length)) 00285 for val1 in self.bss.rsn.pairwise: 00286 length = len(val1) 00287 buff.write(struct.pack('<I%ss'%length, length, val1)) 00288 except struct.error as se: self._check_types(se) 00289 except TypeError as te: self._check_types(te) 00290 00291 def deserialize_numpy(self, str, numpy): 00292 """ 00293 unpack serialized message in str into this message instance using numpy for array types 00294 @param str: byte array of serialized message 00295 @type str: str 00296 @param numpy: numpy python module 00297 @type numpy: module 00298 """ 00299 try: 00300 if self.bss is None: 00301 self.bss = wpa_supplicant_node.msg.Bss() 00302 end = 0 00303 _x = self 00304 start = end 00305 end += 9 00306 (_x.associated, _x.bss.stamp.secs, _x.bss.stamp.nsecs,) = _struct_B2I.unpack(str[start:end]) 00307 self.associated = bool(self.associated) 00308 start = end 00309 end += 4 00310 (length,) = _struct_I.unpack(str[start:end]) 00311 start = end 00312 end += length 00313 self.bss.ssid = str[start:end] 00314 start = end 00315 end += 6 00316 self.bss.bssid = str[start:end] 00317 _x = self 00318 start = end 00319 end += 20 00320 (_x.bss.frequency, _x.bss.beacon_interval, _x.bss.capabilities, _x.bss.quality, _x.bss.noise, _x.bss.level,) = _struct_i2h3i.unpack(str[start:end]) 00321 start = end 00322 end += 4 00323 (length,) = _struct_I.unpack(str[start:end]) 00324 self.bss.wpa.key_mgmt = [] 00325 for i in range(0, length): 00326 start = end 00327 end += 4 00328 (length,) = _struct_I.unpack(str[start:end]) 00329 start = end 00330 end += length 00331 val1 = str[start:end] 00332 self.bss.wpa.key_mgmt.append(val1) 00333 start = end 00334 end += 4 00335 (length,) = _struct_I.unpack(str[start:end]) 00336 self.bss.wpa.group = [] 00337 for i in range(0, length): 00338 start = end 00339 end += 4 00340 (length,) = _struct_I.unpack(str[start:end]) 00341 start = end 00342 end += length 00343 val1 = str[start:end] 00344 self.bss.wpa.group.append(val1) 00345 start = end 00346 end += 4 00347 (length,) = _struct_I.unpack(str[start:end]) 00348 self.bss.wpa.pairwise = [] 00349 for i in range(0, length): 00350 start = end 00351 end += 4 00352 (length,) = _struct_I.unpack(str[start:end]) 00353 start = end 00354 end += length 00355 val1 = str[start:end] 00356 self.bss.wpa.pairwise.append(val1) 00357 start = end 00358 end += 4 00359 (length,) = _struct_I.unpack(str[start:end]) 00360 self.bss.rsn.key_mgmt = [] 00361 for i in range(0, length): 00362 start = end 00363 end += 4 00364 (length,) = _struct_I.unpack(str[start:end]) 00365 start = end 00366 end += length 00367 val1 = str[start:end] 00368 self.bss.rsn.key_mgmt.append(val1) 00369 start = end 00370 end += 4 00371 (length,) = _struct_I.unpack(str[start:end]) 00372 self.bss.rsn.group = [] 00373 for i in range(0, length): 00374 start = end 00375 end += 4 00376 (length,) = _struct_I.unpack(str[start:end]) 00377 start = end 00378 end += length 00379 val1 = str[start:end] 00380 self.bss.rsn.group.append(val1) 00381 start = end 00382 end += 4 00383 (length,) = _struct_I.unpack(str[start:end]) 00384 self.bss.rsn.pairwise = [] 00385 for i in range(0, length): 00386 start = end 00387 end += 4 00388 (length,) = _struct_I.unpack(str[start:end]) 00389 start = end 00390 end += length 00391 val1 = str[start:end] 00392 self.bss.rsn.pairwise.append(val1) 00393 return self 00394 except struct.error as e: 00395 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00396 00397 _struct_I = roslib.message.struct_I 00398 _struct_6B = struct.Struct("<6B") 00399 _struct_6s = struct.Struct("<6s") 00400 _struct_i2h3i = struct.Struct("<i2h3i") 00401 _struct_B2I = struct.Struct("<B2I")