From c74c46d3edb2872c781cede25001248669331aa1 Mon Sep 17 00:00:00 2001 From: Shane Snover Date: Tue, 12 Sep 2023 18:58:11 -0600 Subject: [PATCH] Update the types of the arguments for General Commissioning cluster's ArmFailSafe command to match spec --- rs-matter/src/data_model/sdm/failsafe.rs | 4 ++-- rs-matter/src/data_model/sdm/general_commissioning.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rs-matter/src/data_model/sdm/failsafe.rs b/rs-matter/src/data_model/sdm/failsafe.rs index 043f5b93..b841b8fc 100644 --- a/rs-matter/src/data_model/sdm/failsafe.rs +++ b/rs-matter/src/data_model/sdm/failsafe.rs @@ -34,7 +34,7 @@ enum NocState { #[derive(PartialEq)] pub struct ArmedCtx { session_mode: SessionMode, - timeout: u8, + timeout: u16, noc_state: NocState, } @@ -54,7 +54,7 @@ impl FailSafe { Self { state: State::Idle } } - pub fn arm(&mut self, timeout: u8, session_mode: SessionMode) -> Result<(), Error> { + pub fn arm(&mut self, timeout: u16, session_mode: SessionMode) -> Result<(), Error> { match &mut self.state { State::Idle => { self.state = State::Armed(ArmedCtx { diff --git a/rs-matter/src/data_model/sdm/general_commissioning.rs b/rs-matter/src/data_model/sdm/general_commissioning.rs index 5e28eec9..93453b87 100644 --- a/rs-matter/src/data_model/sdm/general_commissioning.rs +++ b/rs-matter/src/data_model/sdm/general_commissioning.rs @@ -117,8 +117,8 @@ pub const CLUSTER: Cluster<'static> = Cluster { #[derive(FromTLV, ToTLV)] struct FailSafeParams { - expiry_len: u8, - bread_crumb: u8, + expiry_len: u16, + bread_crumb: u64, } #[derive(ToTLV)]