$search
00001 """autogenerated by genmsg_py from ScanActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import wpa_supplicant_node.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class ScanActionResult(roslib.message.Message): 00011 _md5sum = "7dce3f6a8b7fe671e6ddde0490d0c833" 00012 _type = "wpa_supplicant_node/ScanActionResult" 00013 _has_header = True #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 Header header 00017 actionlib_msgs/GoalStatus status 00018 ScanResult result 00019 00020 ================================================================================ 00021 MSG: std_msgs/Header 00022 # Standard metadata for higher-level stamped data types. 00023 # This is generally used to communicate timestamped data 00024 # in a particular coordinate frame. 00025 # 00026 # sequence ID: consecutively increasing ID 00027 uint32 seq 00028 #Two-integer timestamp that is expressed as: 00029 # * stamp.secs: seconds (stamp_secs) since epoch 00030 # * stamp.nsecs: nanoseconds since stamp_secs 00031 # time-handling sugar is provided by the client library 00032 time stamp 00033 #Frame this data is associated with 00034 # 0: no frame 00035 # 1: global frame 00036 string frame_id 00037 00038 ================================================================================ 00039 MSG: actionlib_msgs/GoalStatus 00040 GoalID goal_id 00041 uint8 status 00042 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00043 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00044 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00045 # and has since completed its execution (Terminal State) 00046 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00047 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00048 # to some failure (Terminal State) 00049 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00050 # because the goal was unattainable or invalid (Terminal State) 00051 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00052 # and has not yet completed execution 00053 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00054 # but the action server has not yet confirmed that the goal is canceled 00055 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00056 # and was successfully cancelled (Terminal State) 00057 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00058 # sent over the wire by an action server 00059 00060 #Allow for the user to associate a string with GoalStatus for debugging 00061 string text 00062 00063 00064 ================================================================================ 00065 MSG: actionlib_msgs/GoalID 00066 # The stamp should store the time at which this goal was requested. 00067 # It is used by an action server when it tries to preempt all 00068 # goals that were requested before a certain time 00069 time stamp 00070 00071 # The id provides a way to associate feedback and 00072 # result message with specific goal requests. The id 00073 # specified must be unique. 00074 string id 00075 00076 00077 ================================================================================ 00078 MSG: wpa_supplicant_node/ScanResult 00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00080 #int32 SUCCESS = 0 00081 #int32 TOO_MANY_SSIDS = 1 00082 #int32 TOO_MANY_CHANNELS = 2 00083 #int32 SCAN_REQUEST_FAILED = 3 00084 #int32 SCAN_REQUEST_TIMED_OUT = 4 00085 # 00086 bool success 00087 Bss[] bss 00088 00089 ================================================================================ 00090 MSG: wpa_supplicant_node/Bss 00091 time stamp 00092 string ssid 00093 uint8[6] bssid 00094 int32 frequency # In MHz 00095 int16 beacon_interval 00096 int16 capabilities 00097 int32 quality 00098 int32 noise 00099 int32 level 00100 SecurityProperties wpa 00101 SecurityProperties rsn 00102 00103 #InformationElement []ies 00104 #InformationElement []beacon_ies 00105 # flags 00106 # tsf 00107 # age 00108 00109 ================================================================================ 00110 MSG: wpa_supplicant_node/SecurityProperties 00111 string[] key_mgmt 00112 string[] group 00113 string[] pairwise 00114 00115 """ 00116 __slots__ = ['header','status','result'] 00117 _slot_types = ['Header','actionlib_msgs/GoalStatus','wpa_supplicant_node/ScanResult'] 00118 00119 def __init__(self, *args, **kwds): 00120 """ 00121 Constructor. Any message fields that are implicitly/explicitly 00122 set to None will be assigned a default value. The recommend 00123 use is keyword arguments as this is more robust to future message 00124 changes. You cannot mix in-order arguments and keyword arguments. 00125 00126 The available fields are: 00127 header,status,result 00128 00129 @param args: complete set of field values, in .msg order 00130 @param kwds: use keyword arguments corresponding to message field names 00131 to set specific fields. 00132 """ 00133 if args or kwds: 00134 super(ScanActionResult, self).__init__(*args, **kwds) 00135 #message fields cannot be None, assign default values for those that are 00136 if self.header is None: 00137 self.header = std_msgs.msg._Header.Header() 00138 if self.status is None: 00139 self.status = actionlib_msgs.msg.GoalStatus() 00140 if self.result is None: 00141 self.result = wpa_supplicant_node.msg.ScanResult() 00142 else: 00143 self.header = std_msgs.msg._Header.Header() 00144 self.status = actionlib_msgs.msg.GoalStatus() 00145 self.result = wpa_supplicant_node.msg.ScanResult() 00146 00147 def _get_types(self): 00148 """ 00149 internal API method 00150 """ 00151 return self._slot_types 00152 00153 def serialize(self, buff): 00154 """ 00155 serialize message into buffer 00156 @param buff: buffer 00157 @type buff: StringIO 00158 """ 00159 try: 00160 _x = self 00161 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00162 _x = self.header.frame_id 00163 length = len(_x) 00164 buff.write(struct.pack('<I%ss'%length, length, _x)) 00165 _x = self 00166 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00167 _x = self.status.goal_id.id 00168 length = len(_x) 00169 buff.write(struct.pack('<I%ss'%length, length, _x)) 00170 buff.write(_struct_B.pack(self.status.status)) 00171 _x = self.status.text 00172 length = len(_x) 00173 buff.write(struct.pack('<I%ss'%length, length, _x)) 00174 buff.write(_struct_B.pack(self.result.success)) 00175 length = len(self.result.bss) 00176 buff.write(_struct_I.pack(length)) 00177 for val1 in self.result.bss: 00178 _v1 = val1.stamp 00179 _x = _v1 00180 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00181 _x = val1.ssid 00182 length = len(_x) 00183 buff.write(struct.pack('<I%ss'%length, length, _x)) 00184 _x = val1.bssid 00185 # - if encoded as a list instead, serialize as bytes instead of string 00186 if type(_x) in [list, tuple]: 00187 buff.write(_struct_6B.pack(*_x)) 00188 else: 00189 buff.write(_struct_6s.pack(_x)) 00190 _x = val1 00191 buff.write(_struct_i2h3i.pack(_x.frequency, _x.beacon_interval, _x.capabilities, _x.quality, _x.noise, _x.level)) 00192 _v2 = val1.wpa 00193 length = len(_v2.key_mgmt) 00194 buff.write(_struct_I.pack(length)) 00195 for val3 in _v2.key_mgmt: 00196 length = len(val3) 00197 buff.write(struct.pack('<I%ss'%length, length, val3)) 00198 length = len(_v2.group) 00199 buff.write(_struct_I.pack(length)) 00200 for val3 in _v2.group: 00201 length = len(val3) 00202 buff.write(struct.pack('<I%ss'%length, length, val3)) 00203 length = len(_v2.pairwise) 00204 buff.write(_struct_I.pack(length)) 00205 for val3 in _v2.pairwise: 00206 length = len(val3) 00207 buff.write(struct.pack('<I%ss'%length, length, val3)) 00208 _v3 = val1.rsn 00209 length = len(_v3.key_mgmt) 00210 buff.write(_struct_I.pack(length)) 00211 for val3 in _v3.key_mgmt: 00212 length = len(val3) 00213 buff.write(struct.pack('<I%ss'%length, length, val3)) 00214 length = len(_v3.group) 00215 buff.write(_struct_I.pack(length)) 00216 for val3 in _v3.group: 00217 length = len(val3) 00218 buff.write(struct.pack('<I%ss'%length, length, val3)) 00219 length = len(_v3.pairwise) 00220 buff.write(_struct_I.pack(length)) 00221 for val3 in _v3.pairwise: 00222 length = len(val3) 00223 buff.write(struct.pack('<I%ss'%length, length, val3)) 00224 except struct.error as se: self._check_types(se) 00225 except TypeError as te: self._check_types(te) 00226 00227 def deserialize(self, str): 00228 """ 00229 unpack serialized message in str into this message instance 00230 @param str: byte array of serialized message 00231 @type str: str 00232 """ 00233 try: 00234 if self.header is None: 00235 self.header = std_msgs.msg._Header.Header() 00236 if self.status is None: 00237 self.status = actionlib_msgs.msg.GoalStatus() 00238 if self.result is None: 00239 self.result = wpa_supplicant_node.msg.ScanResult() 00240 end = 0 00241 _x = self 00242 start = end 00243 end += 12 00244 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00245 start = end 00246 end += 4 00247 (length,) = _struct_I.unpack(str[start:end]) 00248 start = end 00249 end += length 00250 self.header.frame_id = str[start:end] 00251 _x = self 00252 start = end 00253 end += 8 00254 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00255 start = end 00256 end += 4 00257 (length,) = _struct_I.unpack(str[start:end]) 00258 start = end 00259 end += length 00260 self.status.goal_id.id = str[start:end] 00261 start = end 00262 end += 1 00263 (self.status.status,) = _struct_B.unpack(str[start:end]) 00264 start = end 00265 end += 4 00266 (length,) = _struct_I.unpack(str[start:end]) 00267 start = end 00268 end += length 00269 self.status.text = str[start:end] 00270 start = end 00271 end += 1 00272 (self.result.success,) = _struct_B.unpack(str[start:end]) 00273 self.result.success = bool(self.result.success) 00274 start = end 00275 end += 4 00276 (length,) = _struct_I.unpack(str[start:end]) 00277 self.result.bss = [] 00278 for i in range(0, length): 00279 val1 = wpa_supplicant_node.msg.Bss() 00280 _v4 = val1.stamp 00281 _x = _v4 00282 start = end 00283 end += 8 00284 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00285 start = end 00286 end += 4 00287 (length,) = _struct_I.unpack(str[start:end]) 00288 start = end 00289 end += length 00290 val1.ssid = str[start:end] 00291 start = end 00292 end += 6 00293 val1.bssid = str[start:end] 00294 _x = val1 00295 start = end 00296 end += 20 00297 (_x.frequency, _x.beacon_interval, _x.capabilities, _x.quality, _x.noise, _x.level,) = _struct_i2h3i.unpack(str[start:end]) 00298 _v5 = val1.wpa 00299 start = end 00300 end += 4 00301 (length,) = _struct_I.unpack(str[start:end]) 00302 _v5.key_mgmt = [] 00303 for i in range(0, length): 00304 start = end 00305 end += 4 00306 (length,) = _struct_I.unpack(str[start:end]) 00307 start = end 00308 end += length 00309 val3 = str[start:end] 00310 _v5.key_mgmt.append(val3) 00311 start = end 00312 end += 4 00313 (length,) = _struct_I.unpack(str[start:end]) 00314 _v5.group = [] 00315 for i in range(0, length): 00316 start = end 00317 end += 4 00318 (length,) = _struct_I.unpack(str[start:end]) 00319 start = end 00320 end += length 00321 val3 = str[start:end] 00322 _v5.group.append(val3) 00323 start = end 00324 end += 4 00325 (length,) = _struct_I.unpack(str[start:end]) 00326 _v5.pairwise = [] 00327 for i in range(0, length): 00328 start = end 00329 end += 4 00330 (length,) = _struct_I.unpack(str[start:end]) 00331 start = end 00332 end += length 00333 val3 = str[start:end] 00334 _v5.pairwise.append(val3) 00335 _v6 = val1.rsn 00336 start = end 00337 end += 4 00338 (length,) = _struct_I.unpack(str[start:end]) 00339 _v6.key_mgmt = [] 00340 for i in range(0, length): 00341 start = end 00342 end += 4 00343 (length,) = _struct_I.unpack(str[start:end]) 00344 start = end 00345 end += length 00346 val3 = str[start:end] 00347 _v6.key_mgmt.append(val3) 00348 start = end 00349 end += 4 00350 (length,) = _struct_I.unpack(str[start:end]) 00351 _v6.group = [] 00352 for i in range(0, length): 00353 start = end 00354 end += 4 00355 (length,) = _struct_I.unpack(str[start:end]) 00356 start = end 00357 end += length 00358 val3 = str[start:end] 00359 _v6.group.append(val3) 00360 start = end 00361 end += 4 00362 (length,) = _struct_I.unpack(str[start:end]) 00363 _v6.pairwise = [] 00364 for i in range(0, length): 00365 start = end 00366 end += 4 00367 (length,) = _struct_I.unpack(str[start:end]) 00368 start = end 00369 end += length 00370 val3 = str[start:end] 00371 _v6.pairwise.append(val3) 00372 self.result.bss.append(val1) 00373 return self 00374 except struct.error as e: 00375 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00376 00377 00378 def serialize_numpy(self, buff, numpy): 00379 """ 00380 serialize message with numpy array types into buffer 00381 @param buff: buffer 00382 @type buff: StringIO 00383 @param numpy: numpy python module 00384 @type numpy module 00385 """ 00386 try: 00387 _x = self 00388 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00389 _x = self.header.frame_id 00390 length = len(_x) 00391 buff.write(struct.pack('<I%ss'%length, length, _x)) 00392 _x = self 00393 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00394 _x = self.status.goal_id.id 00395 length = len(_x) 00396 buff.write(struct.pack('<I%ss'%length, length, _x)) 00397 buff.write(_struct_B.pack(self.status.status)) 00398 _x = self.status.text 00399 length = len(_x) 00400 buff.write(struct.pack('<I%ss'%length, length, _x)) 00401 buff.write(_struct_B.pack(self.result.success)) 00402 length = len(self.result.bss) 00403 buff.write(_struct_I.pack(length)) 00404 for val1 in self.result.bss: 00405 _v7 = val1.stamp 00406 _x = _v7 00407 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00408 _x = val1.ssid 00409 length = len(_x) 00410 buff.write(struct.pack('<I%ss'%length, length, _x)) 00411 _x = val1.bssid 00412 # - if encoded as a list instead, serialize as bytes instead of string 00413 if type(_x) in [list, tuple]: 00414 buff.write(_struct_6B.pack(*_x)) 00415 else: 00416 buff.write(_struct_6s.pack(_x)) 00417 _x = val1 00418 buff.write(_struct_i2h3i.pack(_x.frequency, _x.beacon_interval, _x.capabilities, _x.quality, _x.noise, _x.level)) 00419 _v8 = val1.wpa 00420 length = len(_v8.key_mgmt) 00421 buff.write(_struct_I.pack(length)) 00422 for val3 in _v8.key_mgmt: 00423 length = len(val3) 00424 buff.write(struct.pack('<I%ss'%length, length, val3)) 00425 length = len(_v8.group) 00426 buff.write(_struct_I.pack(length)) 00427 for val3 in _v8.group: 00428 length = len(val3) 00429 buff.write(struct.pack('<I%ss'%length, length, val3)) 00430 length = len(_v8.pairwise) 00431 buff.write(_struct_I.pack(length)) 00432 for val3 in _v8.pairwise: 00433 length = len(val3) 00434 buff.write(struct.pack('<I%ss'%length, length, val3)) 00435 _v9 = val1.rsn 00436 length = len(_v9.key_mgmt) 00437 buff.write(_struct_I.pack(length)) 00438 for val3 in _v9.key_mgmt: 00439 length = len(val3) 00440 buff.write(struct.pack('<I%ss'%length, length, val3)) 00441 length = len(_v9.group) 00442 buff.write(_struct_I.pack(length)) 00443 for val3 in _v9.group: 00444 length = len(val3) 00445 buff.write(struct.pack('<I%ss'%length, length, val3)) 00446 length = len(_v9.pairwise) 00447 buff.write(_struct_I.pack(length)) 00448 for val3 in _v9.pairwise: 00449 length = len(val3) 00450 buff.write(struct.pack('<I%ss'%length, length, val3)) 00451 except struct.error as se: self._check_types(se) 00452 except TypeError as te: self._check_types(te) 00453 00454 def deserialize_numpy(self, str, numpy): 00455 """ 00456 unpack serialized message in str into this message instance using numpy for array types 00457 @param str: byte array of serialized message 00458 @type str: str 00459 @param numpy: numpy python module 00460 @type numpy: module 00461 """ 00462 try: 00463 if self.header is None: 00464 self.header = std_msgs.msg._Header.Header() 00465 if self.status is None: 00466 self.status = actionlib_msgs.msg.GoalStatus() 00467 if self.result is None: 00468 self.result = wpa_supplicant_node.msg.ScanResult() 00469 end = 0 00470 _x = self 00471 start = end 00472 end += 12 00473 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00474 start = end 00475 end += 4 00476 (length,) = _struct_I.unpack(str[start:end]) 00477 start = end 00478 end += length 00479 self.header.frame_id = str[start:end] 00480 _x = self 00481 start = end 00482 end += 8 00483 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00484 start = end 00485 end += 4 00486 (length,) = _struct_I.unpack(str[start:end]) 00487 start = end 00488 end += length 00489 self.status.goal_id.id = str[start:end] 00490 start = end 00491 end += 1 00492 (self.status.status,) = _struct_B.unpack(str[start:end]) 00493 start = end 00494 end += 4 00495 (length,) = _struct_I.unpack(str[start:end]) 00496 start = end 00497 end += length 00498 self.status.text = str[start:end] 00499 start = end 00500 end += 1 00501 (self.result.success,) = _struct_B.unpack(str[start:end]) 00502 self.result.success = bool(self.result.success) 00503 start = end 00504 end += 4 00505 (length,) = _struct_I.unpack(str[start:end]) 00506 self.result.bss = [] 00507 for i in range(0, length): 00508 val1 = wpa_supplicant_node.msg.Bss() 00509 _v10 = val1.stamp 00510 _x = _v10 00511 start = end 00512 end += 8 00513 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00514 start = end 00515 end += 4 00516 (length,) = _struct_I.unpack(str[start:end]) 00517 start = end 00518 end += length 00519 val1.ssid = str[start:end] 00520 start = end 00521 end += 6 00522 val1.bssid = str[start:end] 00523 _x = val1 00524 start = end 00525 end += 20 00526 (_x.frequency, _x.beacon_interval, _x.capabilities, _x.quality, _x.noise, _x.level,) = _struct_i2h3i.unpack(str[start:end]) 00527 _v11 = val1.wpa 00528 start = end 00529 end += 4 00530 (length,) = _struct_I.unpack(str[start:end]) 00531 _v11.key_mgmt = [] 00532 for i in range(0, length): 00533 start = end 00534 end += 4 00535 (length,) = _struct_I.unpack(str[start:end]) 00536 start = end 00537 end += length 00538 val3 = str[start:end] 00539 _v11.key_mgmt.append(val3) 00540 start = end 00541 end += 4 00542 (length,) = _struct_I.unpack(str[start:end]) 00543 _v11.group = [] 00544 for i in range(0, length): 00545 start = end 00546 end += 4 00547 (length,) = _struct_I.unpack(str[start:end]) 00548 start = end 00549 end += length 00550 val3 = str[start:end] 00551 _v11.group.append(val3) 00552 start = end 00553 end += 4 00554 (length,) = _struct_I.unpack(str[start:end]) 00555 _v11.pairwise = [] 00556 for i in range(0, length): 00557 start = end 00558 end += 4 00559 (length,) = _struct_I.unpack(str[start:end]) 00560 start = end 00561 end += length 00562 val3 = str[start:end] 00563 _v11.pairwise.append(val3) 00564 _v12 = val1.rsn 00565 start = end 00566 end += 4 00567 (length,) = _struct_I.unpack(str[start:end]) 00568 _v12.key_mgmt = [] 00569 for i in range(0, length): 00570 start = end 00571 end += 4 00572 (length,) = _struct_I.unpack(str[start:end]) 00573 start = end 00574 end += length 00575 val3 = str[start:end] 00576 _v12.key_mgmt.append(val3) 00577 start = end 00578 end += 4 00579 (length,) = _struct_I.unpack(str[start:end]) 00580 _v12.group = [] 00581 for i in range(0, length): 00582 start = end 00583 end += 4 00584 (length,) = _struct_I.unpack(str[start:end]) 00585 start = end 00586 end += length 00587 val3 = str[start:end] 00588 _v12.group.append(val3) 00589 start = end 00590 end += 4 00591 (length,) = _struct_I.unpack(str[start:end]) 00592 _v12.pairwise = [] 00593 for i in range(0, length): 00594 start = end 00595 end += 4 00596 (length,) = _struct_I.unpack(str[start:end]) 00597 start = end 00598 end += length 00599 val3 = str[start:end] 00600 _v12.pairwise.append(val3) 00601 self.result.bss.append(val1) 00602 return self 00603 except struct.error as e: 00604 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00605 00606 _struct_I = roslib.message.struct_I 00607 _struct_6B = struct.Struct("<6B") 00608 _struct_B = struct.Struct("<B") 00609 _struct_i2h3i = struct.Struct("<i2h3i") 00610 _struct_3I = struct.Struct("<3I") 00611 _struct_6s = struct.Struct("<6s") 00612 _struct_2I = struct.Struct("<2I")