abstract class
Matter::Cluster::Base
- Matter::Cluster::Base
- Reference
- Object
Overview
Base class for all cluster implementations
Direct Known Subclasses
- Matter::Cluster::AccessControlCluster
- Matter::Cluster::AdministratorCommissioningCluster
- Matter::Cluster::BasicInformationCluster
- Matter::Cluster::CarbonDioxideConcentrationMeasurementCluster
- Matter::Cluster::ColorControlCluster
- Matter::Cluster::DescriptorCluster
- Matter::Cluster::DiagnosticLogsCluster
- Matter::Cluster::EthernetNetworkDiagnosticsCluster
- Matter::Cluster::FanControlCluster
- Matter::Cluster::GeneralCommissioningCluster
- Matter::Cluster::GeneralDiagnosticsCluster
- Matter::Cluster::GroupKeyManagementCluster
- Matter::Cluster::GroupsCluster
- Matter::Cluster::IcdManagementCluster
- Matter::Cluster::IdentifyCluster
- Matter::Cluster::IlluminanceMeasurementCluster
- Matter::Cluster::LevelControlCluster
- Matter::Cluster::NetworkCommissioningCluster
- Matter::Cluster::OccupancySensingCluster
- Matter::Cluster::OnOffCluster
- Matter::Cluster::OperationalCredentialsCluster
- Matter::Cluster::OtaRequestorCluster
- Matter::Cluster::PowerSourceCluster
- Matter::Cluster::PressureMeasurementCluster
- Matter::Cluster::RelativeHumidityMeasurementCluster
- Matter::Cluster::ScenesCluster
- Matter::Cluster::ScenesManagementCluster
- Matter::Cluster::TemperatureMeasurementCluster
- Matter::Cluster::TimeFormatLocalizationCluster
- Matter::Cluster::WindowCoveringCluster
Defined in:
matter/cluster/cluster.crConstant Summary
-
GLOBAL_ACCEPTED_COMMAND_LIST =
65529_u32 -
GLOBAL_ATTRIBUTE_LIST =
65531_u32 -
Global attribute IDs (mandatory on all clusters)
-
GLOBAL_CLUSTER_REVISION =
65533_u32 -
GLOBAL_FEATURE_MAP =
65532_u32 -
GLOBAL_GENERATED_COMMAND_LIST =
65528_u32
Constructors
Instance Method Summary
- #apply_scene_extension_field_set(field_set : ScenesManagementCluster::ExtensionFieldSet) : Bool
-
#attributes : Array(AttributeMetadata)
Get all attribute metadata
- #cluster_id : DataType::ClusterId
- #cluster_id=(cluster_id : DataType::ClusterId)
-
#commands : Array(CommandMetadata)
Get all command metadata
- #data_version : UInt32
- #data_version=(data_version : UInt32)
- #endpoint_id : DataType::EndpointNumber
- #endpoint_id=(endpoint_id : DataType::EndpointNumber)
-
#events : Array(EventMetadata)
Get all event metadata
-
#get_attribute_metadata(attribute_id : UInt32) : AttributeMetadata | Nil
Get attribute metadata by ID
-
#get_command_metadata(command_id : UInt32) : CommandMetadata | Nil
Get command metadata by ID
-
#invoke_command(command_id : UInt32, fields : Bytes = Bytes.new(0), session_id : UInt64 | Nil = nil, is_case_session : Bool = false, fabric_index : UInt8 | Nil = nil) : InteractionModel::Status | CommandResponse
Invoke a command
-
#name : String
Get cluster name
-
#on_attribute_changed : Proc(UInt16, UInt32, UInt32, Nil) | Nil
Callback for attribute change notifications (used by subscription system) Parameters: endpoint_id, cluster_id, attribute_id
-
#on_attribute_changed=(on_attribute_changed : Proc(UInt16, UInt32, UInt32, Nil) | Nil)
Callback for attribute change notifications (used by subscription system) Parameters: endpoint_id, cluster_id, attribute_id
-
#persistence_key : String
Returns a unique key for this cluster instance for persistence Format: "endpoint_
cluster " -
#read_attribute(attribute_id : UInt32, fabric_index : UInt8 | Nil = nil) : InteractionModel::Status | Bytes
Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster
- #request_fabric_index : UInt8 | Nil
- #request_fabric_index=(request_fabric_index : UInt8 | Nil)
- #request_is_case_session=(request_is_case_session : Bool)
- #request_is_case_session? : Bool
- #request_peer_node_id : UInt64 | Nil
- #request_peer_node_id=(request_peer_node_id : UInt64 | Nil)
-
#request_session_id : UInt64 | Nil
Request context (populated by the protocol layer for the current operation).
-
#request_session_id=(request_session_id : UInt64 | Nil)
Request context (populated by the protocol layer for the current operation).
-
#restore_state(json : String) : Nil
Restore cluster state from JSON.
-
#save_state : String | Nil
Save cluster state to JSON for persistence.
-
#store_scene_extension_field_set : ScenesManagementCluster::ExtensionFieldSet | Nil
------------------------------------------------------------------------ Scenes Management hooks ------------------------------------------------------------------------
-
#write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
Write an attribute value
Constructor Detail
Instance Method Detail
Get attribute metadata by ID
Invoke a command
Callback for attribute change notifications (used by subscription system) Parameters: endpoint_id, cluster_id, attribute_id
Callback for attribute change notifications (used by subscription system) Parameters: endpoint_id, cluster_id, attribute_id
Returns a unique key for this cluster instance for persistence
Format: "endpoint_
Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster
Request context (populated by the protocol layer for the current operation). These are intentionally prefixed to avoid colliding with cluster-specific state.
Request context (populated by the protocol layer for the current operation). These are intentionally prefixed to avoid colliding with cluster-specific state.
Restore cluster state from JSON. Override in subclasses that need to restore state. The json parameter is the string returned by save_state.
Save cluster state to JSON for persistence. Override in subclasses that need to persist state (e.g., scenes, groups). Returns nil if no state needs to be persisted.
Scenes Management hooks
ScenesManagementCluster (0x0062) stores "extension field sets" that capture cluster-specific state for scene recall. Clusters can override these hooks to participate; default implementations are no-ops.
The Device base class wires ScenesManagementCluster callbacks by calling these methods on clusters present on the same endpoint.
Write an attribute value