pub struct Connection { /* private fields */ }Implementations§
Source§impl Connection
Authenticated virtual connection can be used to send commands to device.
impl Connection
Authenticated virtual connection can be used to send commands to device.
Sourcepub async fn read_request(
&self,
endpoint: u16,
cluster: u32,
attr: u32,
) -> Result<Message>
pub async fn read_request( &self, endpoint: u16, cluster: u32, attr: u32, ) -> Result<Message>
Read attribute from device and return parsed matter protocol response.
Sourcepub async fn read_request2(
&self,
endpoint: u16,
cluster: u32,
attr: u32,
) -> Result<TlvItemValue>
pub async fn read_request2( &self, endpoint: u16, cluster: u32, attr: u32, ) -> Result<TlvItemValue>
Read attribute from device and return tlv with attribute value.
Sourcepub async fn invoke_request(
&self,
endpoint: u16,
cluster: u32,
command: u32,
payload: &[u8],
) -> Result<Message>
pub async fn invoke_request( &self, endpoint: u16, cluster: u32, command: u32, payload: &[u8], ) -> Result<Message>
Invoke command
Sourcepub async fn invoke_request2(
&self,
endpoint: u16,
cluster: u32,
command: u32,
payload: &[u8],
) -> Result<TlvItemValue>
pub async fn invoke_request2( &self, endpoint: u16, cluster: u32, command: u32, payload: &[u8], ) -> Result<TlvItemValue>
Invoke command and return result TLV
pub async fn im_subscribe_request( &self, endpoint: u16, cluster: u32, event: u32, ) -> Result<Message>
pub async fn im_status_response( &self, exchange: u16, flags: u8, ack: u32, ) -> Result<()>
Sourcepub async fn invoke_request_timed(
&self,
endpoint: u16,
cluster: u32,
command: u32,
payload: &[u8],
timeout: u16,
) -> Result<Message>
pub async fn invoke_request_timed( &self, endpoint: u16, cluster: u32, command: u32, payload: &[u8], timeout: u16, ) -> Result<Message>
Invoke command with timed interaction
Sourcepub async fn recv_event(&self) -> Option<Message>
pub async fn recv_event(&self) -> Option<Message>
Receive next event (for subscriptions). Returns None when connection is closed.
Sourcepub fn try_recv_event(&self) -> Option<Message>
pub fn try_recv_event(&self) -> Option<Message>
Try receive event without blocking.
Auto Trait Implementations§
impl !Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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