DescriptorCluster: Include attribute for ClientList

This commit is contained in:
Kedar Sovani 2023-02-12 10:27:54 +05:30
parent 29622cc22c
commit 316de9c97a

View file

@ -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");
}