/// Called after switching to a requested channel from a scan request. It's primarily to
/// send out, or schedule to send out, a probe request in an active scan.
Called after switching to a requested channel from a scan request. It's primarily to
send out, or schedule to send out, a probe request in an active scan.
Called after switching to a requested channel from a scan request . It ' s primarily to send out or schedule to send out a probe request in an active scan .
pub fn begin_requested_channel_time(&mut self, channel: banjo_wlan_info::WlanChannel) {
        let (req, probe_delay_timeout_id) = match &mut self.scanner.ongoing_scan {
            Some(req) => (&req.req, &mut req.probe_delay_timeout_id),
            None => return,
        };
        if req.scan_type == fidl_mlme::ScanTypes::Active {
            if req.probe_delay == 0 {
                let ssid = req.ssid.clone();
                if let Err(e) = self.send_probe_req(&ssid[..], channel) {
                    error!("{}", e);
                }
            } else {
                let deadline = self.ctx.timer.now() + TimeUnit(req.probe_delay as u16).into();
                let timeout_id =
                    self.ctx.timer.schedule_event(deadline, TimedEvent::ScannerProbeDelay(channel));
                if let Some(old_id) = probe_delay_timeout_id.replace(timeout_id) {
                    self.ctx.timer.cancel_event(old_id);
                }
            }
        }
    }
pub fn begin_requested_channel_time ( & mut self , channel : banjo_wlan_info :: WlanChannel ) { let ( req , probe_delay_timeout_id ) = match & mut self . scanner . ongoing_scan { Some ( req ) => ( & req . req , & mut req . probe_delay_timeout_id ) , None => return , } ; if req . scan_type == fidl_mlme :: ScanTypes :: Active { if req . probe_delay == 0 { let ssid = req . ssid . clone ( ) ; if let Err ( e ) = self . send_probe_req ( & ssid [ .. ] , channel ) { error ! ( " " e ) ; } } else { let deadline = self . ctx . timer . now ( ) + TimeUnit ( req . probe_delay as u16 ) . into ( ) ; let timeout_id = self . ctx . timer . schedule_event ( deadline , TimedEvent :: ScannerProbeDelay ( channel ) ) ; if let Some ( old_id ) = probe_delay_timeout_id . replace ( timeout_id ) { self . ctx . timer . cancel_event ( old_id ) ; } } } }
Called after switching to a requested channel from a scan request.
Called after switching to a requested channel from a scan request .
&mut self
channel
banjo_wlan_info::WlanChannel