#[non_exhaustive]pub enum Action {
Invoke {
session: SessionContext,
endpoint: u16,
cluster: u32,
command: u32,
payload: Vec<u8>,
expect: Expectation,
},
ReadAttribute {
session: SessionContext,
endpoint: u16,
cluster: u32,
attributes: &'static [u32],
expect: Expectation,
},
EvictCase {
fabric_id: u64,
peer_node_id: u64,
},
EstablishCase {
fabric_id: u64,
peer_node_id: u64,
},
Done(CommissionedFabric),
Abort {
send_disarm_failsafe: bool,
reason: String,
},
}Expand description
The next piece of work the caller must perform.
Returned by super::Commissioner::poll. The state machine is
idempotent: calling poll twice without an intervening on_response
returns the same Action.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Invoke
Invoke a cluster command. The caller frames payload into an
Invoke envelope and routes via matter-transport over the
indicated session. The decoded response payload is fed back via
super::Commissioner::on_response with the matching expect.
Fields
session: SessionContextWhich session to route the Invoke over.
cluster: u32Cluster ID (0x0030 GeneralCommissioning or 0x003E
OperationalCredentials for all M6.4 stages).
expect: ExpectationThe response type the state machine expects next.
ReadAttribute
Read attributes from a cluster. Used only by
Stage::ReadCommissioningInfo.
Fields
session: SessionContextWhich session to route the Read over.
expect: ExpectationThe response type the state machine expects next.
EvictCase
Evict any prior CASE session for this fabric/peer pair.
Reserved for M8 multi-fabric work; never emitted by M6.4’s
state machine. Kept in the enum so M8 can wire eviction in
without a SemVer bump.
Fields
EstablishCase
Discover the device on its operational network and establish a
CASE session. Caller calls Commissioner::on_case_established
(added in M6.4.5) on success or
on_response(Expectation::CaseFailed, &[]) on failure.
Fields
Done(CommissionedFabric)
Commissioning succeeded. Caller may persist the
CommissionedFabric long-term.
Abort
Commissioning failed. If send_disarm_failsafe is true, the
caller should send ArmFailSafe(expiry_length_seconds=0) to the
device over PASE to roll the device back to its
pre-commissioning state.
reason is a rendered, log-friendly summary of the
CommissioningError that caused the abort. The caller will have
also received that error directly via
super::Commissioner::on_response’s Err return — reason
here is supplementary, intended for logs.