async fn offline_task(&self) -> Result<(), Error> {
        fx_log_info!("offline_loop: Entered");

        {
            // Scope for the API task lock.
            // Wait for our turn.
            let _lock = self.wait_for_api_task_lock("offline_task").await?;

            // Mark the network interface as offline.
            self.net_if
                .set_online(false)
                .await
                .context("Unable to mark network interface as offline")?;

            // Bring down the mesh stack.
            if let Err(err) = self
                .frame_handler
                .send_request(CmdPropValueSet(PropNet::StackUp.into(), false))
                .await
                .context("Setting PropNet::StackUp to False")
            {
                fx_log_warn!("Unable to set `PropNet::StackUp`: {:?}", err);
            }

            // Bring down the network interface.
            if let Err(err) = self
                .frame_handler
                .send_request(CmdPropValueSet(PropNet::InterfaceUp.into(), false))
                .await
                .context("Setting PropNet::InterfaceUp to False")
            {
                fx_log_warn!("Unable to set `PropNet::InterfaceUp`: {:?}", err);
            }
        } // API task lock goes out of scope here

        fx_log_info!("offline_loop: Waiting");

        Ok(futures::future::pending().await)
    }
/// Offline loop task that is executed while we are either "not ready" or "inactive".
///
/// This task will bring the device to a state where
/// it is not an active participant in the network.
///
/// The resulting future may be terminated at any time.
Offline loop task that is executed while we are either "not ready" or "inactive".
This task will bring the device to a state where
it is not an active participant in the network.

The resulting future may be terminated at any time.
Offline loop task that is executed while we are either " not ready " or " inactive " . This task will bring the device to a state where it is not an active participant in the network . The resulting future may be terminated at any time .
async fn offline_task(&self) -> Result<(), Error> {
        fx_log_info!("offline_loop: Entered");
        {
            // Scope for the API task lock.
            // Wait for our turn.
            let _lock = self.wait_for_api_task_lock("offline_task").await?;
            // Mark the network interface as offline.
            self.net_if
                .set_online(false)
                .await
                .context("Unable to mark network interface as offline")?;
            // Bring down the mesh stack.
            if let Err(err) = self
                .frame_handler
                .send_request(CmdPropValueSet(PropNet::StackUp.into(), false))
                .await
                .context("Setting PropNet::StackUp to False")
            {
                fx_log_warn!("Unable to set `PropNet::StackUp`: {:?}", err);
            }
            // Bring down the network interface.
            if let Err(err) = self
                .frame_handler
                .send_request(CmdPropValueSet(PropNet::InterfaceUp.into(), false))
                .await
                .context("Setting PropNet::InterfaceUp to False")
            {
                fx_log_warn!("Unable to set `PropNet::InterfaceUp`: {:?}", err);
            }
        } // API task lock goes out of scope here
        fx_log_info!("offline_loop: Waiting");
        Ok(futures::future::pending().await)
    }
async fn offline_task ( & self ) -> Result < ( ) , Error > { fx_log_info ! ( " " ) ; { // Scope for the API task lock. // Wait for our turn. let _lock = self . wait_for_api_task_lock ( " " ) . await ? ; // Mark the network interface as offline. self . net_if . set_online ( false ) . await . context ( " " ) ? ; // Bring down the mesh stack. if let Err ( err ) = self . frame_handler . send_request ( CmdPropValueSet ( PropNet :: StackUp . into ( ) , false ) ) . await . context ( " " ) { fx_log_warn ! ( " " err ) ; } // Bring down the network interface. if let Err ( err ) = self . frame_handler . send_request ( CmdPropValueSet ( PropNet :: InterfaceUp . into ( ) , false ) ) . await . context ( " " ) { fx_log_warn ! ( " " err ) ; } } // API task lock goes out of scope here fx_log_info ! ( " " ) ; Ok ( futures :: future :: pending ( ) . await ) }
Offline loop task that is executed while we are either "not ready" or "inactive".
Offline loop task that is executed while we are either " not ready " or " inactive " .
&self
&self