pub struct Controller { /* private fields */ }Implementations§
Source§impl Controller
impl Controller
pub fn new( certmanager: &Arc<dyn CertManager>, transport: &Arc<Transport>, fabric_id: u64, ) -> Result<Arc<Self>>
Sourcepub async fn commission(
&self,
connection: &Arc<dyn ConnectionTrait>,
pin: u32,
node_id: u64,
controller_id: u64,
) -> Result<Connection>
pub async fn commission( &self, connection: &Arc<dyn ConnectionTrait>, pin: u32, node_id: u64, controller_id: u64, ) -> Result<Connection>
commission device
- authenticate using pin
- push CA certificate to device
- sign device’s certificate
- set controller id - user which can control device
- return authenticated connection which can be used to send additional commands
Sourcepub async fn auth_sigma(
&self,
connection: &Arc<dyn ConnectionTrait>,
node_id: u64,
controller_id: u64,
) -> Result<Connection>
pub async fn auth_sigma( &self, connection: &Arc<dyn ConnectionTrait>, node_id: u64, controller_id: u64, ) -> Result<Connection>
create authenticated connection to control device
Sourcepub async fn auth_sigma_with_busy_retry(
&self,
connection: &Arc<dyn ConnectionTrait>,
node_id: u64,
controller_id: u64,
) -> Result<Session>
pub async fn auth_sigma_with_busy_retry( &self, connection: &Arc<dyn ConnectionTrait>, node_id: u64, controller_id: u64, ) -> Result<Session>
Run auth_sigma with automatic BUSY retry. Attempts a CASE session resumption first; falls back to full SIGMA on failure. Returns only the Session so that both initial connect and in-place reauth can use it.
Auto Trait Implementations§
impl Freeze for Controller
impl !RefUnwindSafe for Controller
impl Send for Controller
impl Sync for Controller
impl Unpin for Controller
impl UnsafeUnpin for Controller
impl !UnwindSafe for Controller
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