macro_rules! clusters {
(sys
$(, acl($($acl_opt:ident),* $(,)?))?
$(, sw_diag($($sw_opt:ident),* $(,)?))?
$(, time_sync($($ts_opt:ident),* $(,)?))?
; $($cluster:expr $(,)?)*
) => { ... };
(eth
$(, acl($($acl_opt:ident),* $(,)?))?
$(, sw_diag($($sw_opt:ident),* $(,)?))?
$(, time_sync($($ts_opt:ident),* $(,)?))?
; $($cluster:expr $(,)?)*
) => { ... };
(thread
$(, acl($($acl_opt:ident),* $(,)?))?
$(, sw_diag($($sw_opt:ident),* $(,)?))?
$(, time_sync($($ts_opt:ident),* $(,)?))?
; $($cluster:expr $(,)?)*
) => { ... };
(wifi
$(, acl($($acl_opt:ident),* $(,)?))?
$(, sw_diag($($sw_opt:ident),* $(,)?))?
$(, time_sync($($ts_opt:ident),* $(,)?))?
; $($cluster:expr $(,)?)*
) => { ... };
($($cluster:expr $(,)?)*) => { ... };
}Expand description
Re-export the rs-matter crate
A macro to generate the clusters’ meta-data for an endpoint.
Net-type tokens (pick exactly one):
sys;- all system model clusters except the concrete Network Diagnostics cluster. Usually you wanteth;/wifi;/thread;instead.eth;/wifi;/thread;- same assys;plus the matching Network Diagnostics cluster.
Optional cluster-shape modifiers — supply zero or more, in the order shown, after the net-type token:
sw_diag(heap | watermarks | thread, …)- shape the Software Diagnostics cluster’s advertised attribute/command surface. Tokens map tocrate::dm::clusters::sw_diag::Options:heap→HEAP,watermarks→WATERMARKS(claims the MatterWATERMARKSfeature and impliesHEAP),thread→THREAD(advertisesThreadMetrics; unrelated to the Thread network protocol).time_sync(time_zone | ntp_client | ntp_server | time_sync_client, …)- shape the Time Synchronization cluster. Tokens map 1:1 tocrate::dm::clusters::time_sync::Optionsand to the matching Matter features (TIME_ZONE,NTP_CLIENT,NTP_SERVER,TIME_SYNC_CLIENT).
Omitting a modifier advertises the corresponding cluster’s empty-options shape (required globals + always-on attributes, no features, no commands).
Trailing positional arguments are additional Cluster<'static> literals
merged into the slice — e.g. clusters!(eth, sw_diag(heap); my_cluster).
The Groups cluster is intentionally not included in any of these presets:
Root Node (Matter Device Library) does not list Groups, and Groups
(Matter Application Cluster Specification) is scoped to per-endpoint
group membership which has no defined behavior on the Root Node. Wire
GroupsHandler::CLUSTER onto the application endpoint(s) where it actually
has meaning instead.