pub struct CapabilityMinima {
pub case_sessions_per_fabric: u16,
pub subscriptions_per_fabric: u16,
pub simultaneous_invocations: Option<u16>,
pub simultaneous_writes: Option<u16>,
pub read_paths: Option<u16>,
pub subscribe_paths: Option<u16>,
}Expand description
CapabilityMinimaStruct (§11.1.4.4) — “the minimum guaranteed value for some system-wide
resource capabilities”.
The last four fields arrived in cluster revision 6, where §11.1.4.4 makes them mandatory.
They are Option so that a node declaring an older ClusterRevision can omit them — this
crate declares revision 6, so its own defaults fill them in.
Fields§
§case_sessions_per_fabric: u16CaseSessionsPerFabric [0] — 3 to 10000, fallback 3. “SHALL NOT be smaller than the
required minimum indicated in Section 4.14.2.8”.
subscriptions_per_fabric: u16SubscriptionsPerFabric [1] — 3 to 10000, fallback 3.
simultaneous_invocations: Option<u16>SimultaneousInvocationsSupported [2] — 1 to 10000, revision 6.
simultaneous_writes: Option<u16>SimultaneousWritesSupported [3] — 1 to 10000, revision 6.
read_paths: Option<u16>ReadPathsSupported [4] — 9 to 10000, revision 6. §2.11.2.1’s read limit.
subscribe_paths: Option<u16>SubscribePathsSupported [5] — 3 to 10000, revision 6. §2.11.2.2’s subscribe limit.
Implementations§
Source§impl CapabilityMinima
impl CapabilityMinima
Sourcepub const fn from_tables<C, S, B>() -> Self
pub const fn from_tables<C, S, B>() -> Self
The values a node actually guarantees, taken from the tables that will answer for them.
§11.1.4.4 says each field “SHALL indicate the actual” number the node supports, so
every one of them has exactly one honest source: the table. S is the session table and
B the subscription table, both of which publish their real capacity through
Capacity; read_paths is
Config::READ_PATHS, the one figure here that is a
promise about work rather than storage.
use matter_kit::clusters::basic_information::CapabilityMinima;
use matter_kit::{DefaultConfig, im::SubscriptionTable, session::SessionTable};
type Sessions = SessionTable<DefaultConfig, 16>;
type Subs = SubscriptionTable<DefaultConfig>;
let minima = CapabilityMinima::from_tables::<DefaultConfig, Sessions, Subs>();
assert_eq!(minima.case_sessions_per_fabric, 3); // 16 sessions over 5 fabricsThere is deliberately no from_config. A Config cannot size a table, so a figure
derived from one describes whatever the integrator wrote next to it — and this attribute
is read during certification.
SimultaneousInvocationsSupported and SimultaneousWritesSupported take the
specification’s floor of 1: this crate serves one interaction at a time per exchange,
and §8.8.2.3’s MaxPathsPerInvoke — a separate attribute — is what bounds the paths
inside one of them.
Trait Implementations§
Source§impl Clone for CapabilityMinima
impl Clone for CapabilityMinima
impl Copy for CapabilityMinima
Source§impl Debug for CapabilityMinima
impl Debug for CapabilityMinima
Source§impl Default for CapabilityMinima
impl Default for CapabilityMinima
Source§fn default() -> Self
fn default() -> Self
§11.1.4.4’s fallbacks and floors, every field present.
Revision 6’s four fields are not left absent, because this cluster declares revision
6 and §11.1.4.4 makes them mandatory there — a struct that omits them describes an
older node than the one sending it, which TC_IDM_2_3 checks directly.