pub struct EzspAdapter { /* private fields */ }Expand description
An EmberZNet NCP.
Implementations§
Source§impl EzspAdapter
impl EzspAdapter
Sourcepub async fn connect<T>(
io: T,
config: ClientConfig,
) -> Result<(EzspAdapter, UnboundedReceiver<AdapterEvent>), HostError>where
T: AsyncRead + AsyncWrite + Send + 'static,
pub async fn connect<T>(
io: T,
config: ClientConfig,
) -> Result<(EzspAdapter, UnboundedReceiver<AdapterEvent>), HostError>where
T: AsyncRead + AsyncWrite + Send + 'static,
Connect to an NCP over io. Returns the adapter and its events.
Trait Implementations§
Source§impl Adapter for EzspAdapter
impl Adapter for EzspAdapter
Source§fn info(&self) -> AdapterInfo
fn info(&self) -> AdapterInfo
The NCP’s identity.
Source§async fn start(
&self,
mode: StartMode,
) -> Result<(StartOutcome, NetworkInfo), HostError>
async fn start( &self, mode: StartMode, ) -> Result<(StartOutcome, NetworkInfo), HostError>
Configure the NCP and bring the network up.
Source§async fn permit_join(
&self,
seconds: u8,
join: &JoinPolicy,
) -> Result<(), HostError>
async fn permit_join( &self, seconds: u8, join: &JoinPolicy, ) -> Result<(), HostError>
Open (seconds > 0) or close (0) the coordinator for joining.
Source§async fn add_join_key(&self, ieee: Ieee, key: Key) -> Result<(), HostError>
async fn add_join_key(&self, ieee: Ieee, key: Key) -> Result<(), HostError>
Let the device
ieee join with key (from its install code).Source§async fn send_unicast(
&self,
nwk: NodeId,
aps: Aps,
payload: Vec<u8>,
) -> Result<u16, HostError>
async fn send_unicast( &self, nwk: NodeId, aps: Aps, payload: Vec<u8>, ) -> Result<u16, HostError>
Send an APS unicast. Returns a tag that a later
AdapterEvent::Delivery names.Source§async fn send_broadcast(
&self,
destination: NodeId,
aps: Aps,
payload: Vec<u8>,
) -> Result<(), HostError>
async fn send_broadcast( &self, destination: NodeId, aps: Aps, payload: Vec<u8>, ) -> Result<(), HostError>
Send an APS broadcast to 0xFFFF, 0xFFFD or 0xFFFC.
Source§async fn network_info(&self) -> Result<NetworkInfo, HostError>
async fn network_info(&self) -> Result<NetworkInfo, HostError>
Read the running network’s parameters again (after a channel
change).
Source§async fn active_scan(&self, channel_mask: u32) -> Result<Vec<Beacon>, HostError>
async fn active_scan(&self, channel_mask: u32) -> Result<Vec<Beacon>, HostError>
Listen for other networks’ beacons on the channels in the mask
(an active scan). Works before a network is formed. An NCP family
that cannot scan returns none.
Auto Trait Implementations§
impl !Freeze for EzspAdapter
impl !RefUnwindSafe for EzspAdapter
impl !UnwindSafe for EzspAdapter
impl Send for EzspAdapter
impl Sync for EzspAdapter
impl Unpin for EzspAdapter
impl UnsafeUnpin for EzspAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more