pub struct DeconzAdapter { /* private fields */ }Expand description
A ConBee or RaspBee.
Implementations§
Source§impl DeconzAdapter
impl DeconzAdapter
Sourcepub async fn connect<T>(
io: T,
config: ClientConfig,
) -> Result<(DeconzAdapter, UnboundedReceiver<AdapterEvent>), HostError>where
T: AsyncRead + AsyncWrite + Send + 'static,
pub async fn connect<T>(
io: T,
config: ClientConfig,
) -> Result<(DeconzAdapter, UnboundedReceiver<AdapterEvent>), HostError>where
T: AsyncRead + AsyncWrite + Send + 'static,
Connect to a ConBee or RaspBee over io. Returns the adapter and
its events.
Trait Implementations§
Source§impl Adapter for DeconzAdapter
impl Adapter for DeconzAdapter
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 DeconzAdapter
impl !RefUnwindSafe for DeconzAdapter
impl !UnwindSafe for DeconzAdapter
impl Send for DeconzAdapter
impl Sync for DeconzAdapter
impl Unpin for DeconzAdapter
impl UnsafeUnpin for DeconzAdapter
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