comment wifi scanning items
This commit is contained in:
parent
2c5d94493c
commit
76b967a966
@ -309,6 +309,13 @@ impl<'a> Control<'a> {
|
|||||||
resp_len
|
resp_len
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Start a wifi scan
|
||||||
|
///
|
||||||
|
/// Returns a `Stream` of networks found by the device
|
||||||
|
///
|
||||||
|
/// # Note
|
||||||
|
/// Device events are currently implemented using a bounded queue.
|
||||||
|
/// To not miss any events, you should make sure to always await the stream.
|
||||||
pub async fn scan(&mut self) -> Scanner<'_> {
|
pub async fn scan(&mut self) -> Scanner<'_> {
|
||||||
const SCANTYPE_PASSIVE: u8 = 1;
|
const SCANTYPE_PASSIVE: u8 = 1;
|
||||||
|
|
||||||
@ -346,6 +353,7 @@ pub struct Scanner<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Scanner<'_> {
|
impl Scanner<'_> {
|
||||||
|
/// wait for the next found network
|
||||||
pub async fn next(&mut self) -> Option<BssInfo> {
|
pub async fn next(&mut self) -> Option<BssInfo> {
|
||||||
let event = self.subscriber.next_message_pure().await;
|
let event = self.subscriber.next_message_pure().await;
|
||||||
if event.header.status != EStatus::PARTIAL {
|
if event.header.status != EStatus::PARTIAL {
|
||||||
|
Loading…
Reference in New Issue
Block a user