diff --git a/matter/src/data_model/objects/cluster.rs b/matter/src/data_model/objects/cluster.rs index 68a4860..654a0a5 100644 --- a/matter/src/data_model/objects/cluster.rs +++ b/matter/src/data_model/objects/cluster.rs @@ -46,11 +46,28 @@ pub enum GlobalElements { // TODO: What if we instead of creating this, we just pass the AttrData/AttrPath to the read/write // methods? +/// The Attribute Details structure records the details about the attribute under consideration. +/// Typically this structure is progressively built as we proceed through the request processing. pub struct AttrDetails { - pub attr_id: u16, - pub list_index: Option>, - pub fab_idx: u8, + /// Fabric Filtering Activated pub fab_filter: bool, + /// The current Fabric Index + pub fab_idx: u8, + /// List Index, if any + pub list_index: Option>, + /// The actual attribute ID + pub attr_id: u16, +} + +impl AttrDetails { + pub fn new(fab_idx: u8, fab_filter: bool) -> Self { + Self { + fab_filter, + fab_idx, + list_index: None, + attr_id: 0, + } + } } pub trait ClusterType {