From 316de9c97a4bd2d3d69b45161115abb370a99bbb Mon Sep 17 00:00:00 2001 From: Kedar Sovani Date: Sun, 12 Feb 2023 10:27:54 +0530 Subject: [PATCH] DescriptorCluster: Include attribute for ClientList --- matter/src/data_model/system_model/descriptor.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/matter/src/data_model/system_model/descriptor.rs b/matter/src/data_model/system_model/descriptor.rs index 377b950..ac778bb 100644 --- a/matter/src/data_model/system_model/descriptor.rs +++ b/matter/src/data_model/system_model/descriptor.rs @@ -67,6 +67,12 @@ impl DescriptorCluster { Access::RV, Quality::NONE, )?, + Attribute::new( + Attributes::ClientList as u16, + AttrValue::Custom, + Access::RV, + Quality::NONE, + )?, ]; c.base.add_attributes(&attrs[..])?; Ok(c) @@ -124,6 +130,12 @@ impl DescriptorCluster { } let _ = tw.end_container(); } + + fn encode_client_list(&self, tag: TagType, tw: &mut TLVWriter) { + // No Clients supported + let _ = tw.start_array(tag); + let _ = tw.end_container(); + } } impl ClusterType for DescriptorCluster { @@ -145,6 +157,9 @@ impl ClusterType for DescriptorCluster { Some(Attributes::PartsList) => encoder.encode(EncodeValue::Closure(&|tag, tw| { self.encode_parts_list(tag, tw) })), + Some(Attributes::ClientList) => encoder.encode(EncodeValue::Closure(&|tag, tw| { + self.encode_client_list(tag, tw) + })), _ => { error!("Attribute not supported: this shouldn't happen"); }