pub struct Node { /* private fields */ }
Available on crate feature
mesh
only.Expand description
Interface to a Bluetooth mesh node.
Implementations§
source§impl Node
impl Node
sourcepub fn management(&self) -> Management
pub fn management(&self) -> Management
Management interface for the node.
sourcepub async fn publish(
&self,
element_ref: &ElementRef,
model_id: u16,
data: &[u8]
) -> Result<()>
pub async fn publish( &self, element_ref: &ElementRef, model_id: u16, data: &[u8] ) -> Result<()>
Send a publication originated by a local model.
Since only one Publish record may exist per element-model, the destination and key_index are obtained from the Publication record cached by the daemon.
sourcepub async fn send(
&self,
element_ref: &ElementRef,
destination: u16,
key_index: u16,
data: &[u8]
) -> Result<()>
pub async fn send( &self, element_ref: &ElementRef, destination: u16, key_index: u16, data: &[u8] ) -> Result<()>
Send a message originated by a local model.
sourcepub async fn dev_key_send(
&self,
element_ref: &ElementRef,
destination: u16,
remote: bool,
net_index: u16,
data: &[u8]
) -> Result<()>
pub async fn dev_key_send( &self, element_ref: &ElementRef, destination: u16, remote: bool, net_index: u16, data: &[u8] ) -> Result<()>
Send a message originated by a local model encoded with the device key of the remote node.
sourcepub async fn add_app_key(
&self,
element_ref: &ElementRef,
destination: u16,
app_key: u16,
net_index: u16,
update: bool
) -> Result<()>
pub async fn add_app_key( &self, element_ref: &ElementRef, destination: u16, app_key: u16, net_index: u16, update: bool ) -> Result<()>
Send add or update network key originated by the local configuration client to a remote configuration server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl !RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
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