Skip to content

Commit 316de9c

Browse files
committed
DescriptorCluster: Include attribute for ClientList
1 parent 29622cc commit 316de9c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

matter/src/data_model/system_model/descriptor.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ impl DescriptorCluster {
6767
Access::RV,
6868
Quality::NONE,
6969
)?,
70+
Attribute::new(
71+
Attributes::ClientList as u16,
72+
AttrValue::Custom,
73+
Access::RV,
74+
Quality::NONE,
75+
)?,
7076
];
7177
c.base.add_attributes(&attrs[..])?;
7278
Ok(c)
@@ -124,6 +130,12 @@ impl DescriptorCluster {
124130
}
125131
let _ = tw.end_container();
126132
}
133+
134+
fn encode_client_list(&self, tag: TagType, tw: &mut TLVWriter) {
135+
// No Clients supported
136+
let _ = tw.start_array(tag);
137+
let _ = tw.end_container();
138+
}
127139
}
128140

129141
impl ClusterType for DescriptorCluster {
@@ -145,6 +157,9 @@ impl ClusterType for DescriptorCluster {
145157
Some(Attributes::PartsList) => encoder.encode(EncodeValue::Closure(&|tag, tw| {
146158
self.encode_parts_list(tag, tw)
147159
})),
160+
Some(Attributes::ClientList) => encoder.encode(EncodeValue::Closure(&|tag, tw| {
161+
self.encode_client_list(tag, tw)
162+
})),
148163
_ => {
149164
error!("Attribute not supported: this shouldn't happen");
150165
}

0 commit comments

Comments
 (0)