Helper: Get primary device type
class
Matter::Cluster::DescriptorCluster
- Matter::Cluster::DescriptorCluster
- Matter::Cluster::Base
- Reference
- Object
Overview
Descriptor Cluster (0x001D)
Provides device composition information including device types, server/client clusters, and endpoint hierarchy.
Required on all endpoints.
Matter Spec: Core 9.5
Defined in:
matter/cluster/descriptor_cluster.crConstant Summary
-
ATTR_CLIENT_LIST =
2_u32 -
ATTR_DEVICE_TYPE_LIST =
0_u32 -
Attributes
-
ATTR_PARTS_LIST =
3_u32 -
ATTR_SERVER_LIST =
1_u32 -
CLUSTER_ID =
29_u32
Constructors
Class Method Summary
-
.cluster_id
Descriptor Cluster (0x001D)
Instance Method Summary
-
#add_client(cluster_class : Base.class)
Add a client cluster by class
-
#add_part(endpoint_id : UInt16)
Add a child endpoint to the parts list
-
#add_server(cluster_class : Base.class)
Add a server cluster by class
-
#attributes : Array(AttributeMetadata)
Get all attribute metadata
- #client_list : Array(UInt32)
- #client_list=(client_list : Array(UInt32))
-
#commands : Array(CommandMetadata)
Get all command metadata
-
#device_type_list : Array(DeviceTypeStruct)
Attribute storage
-
#device_type_list=(device_type_list : Array(DeviceTypeStruct))
Attribute storage
-
#has_client_cluster?(cluster_id : UInt32) : Bool
Helper: Check if a cluster is in the client list
-
#has_client_cluster?(cluster_class : Base.class) : Bool
Helper: Check if a cluster is in the client list (by class)
-
#has_part?(endpoint_id : UInt16) : Bool
Helper: Check if an endpoint is in the parts list
-
#has_server_cluster?(cluster_id : UInt32) : Bool
Helper: Check if a cluster is in the server list
-
#has_server_cluster?(cluster_class : Base.class) : Bool
Helper: Check if a cluster is in the server list (by class)
-
#name : String
Get cluster name
- #parts_list : Array(UInt16)
- #parts_list=(parts_list : Array(UInt16))
-
#primary_device_type : DeviceTypeStruct | Nil
Helper: Get primary device type
-
#read_attribute(attribute_id : UInt32) : InteractionModel::Status | Bytes
Read an attribute value
- #server_list : Array(UInt32)
- #server_list=(server_list : Array(UInt32))
-
#write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
Write an attribute value
Instance methods inherited from class Matter::Cluster::Base
attributes : Array(AttributeMetadata)
attributes,
cluster_id : DataType::ClusterId
cluster_id,
cluster_id=(cluster_id : DataType::ClusterId)
cluster_id=,
commands : Array(CommandMetadata)
commands,
data_version : UInt32
data_version,
data_version=(data_version : UInt32)
data_version=,
endpoint_id : DataType::EndpointNumber
endpoint_id,
endpoint_id=(endpoint_id : DataType::EndpointNumber)
endpoint_id=,
events : Array(EventMetadata)
events,
get_attribute_metadata(attribute_id : UInt32) : AttributeMetadata | Nil
get_attribute_metadata,
get_command_metadata(command_id : UInt32) : CommandMetadata | Nil
get_command_metadata,
invoke_command(command_id : UInt32, fields : Bytes = Bytes.new(0), session_id : UInt64 | Nil = nil) : InteractionModel::Status | CommandResponse
invoke_command,
name : String
name,
read_attribute(attribute_id : UInt32) : InteractionModel::Status | Bytes
read_attribute,
write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
write_attribute
Constructor methods inherited from class Matter::Cluster::Base
new(endpoint_id : DataType::EndpointNumber, cluster_id : DataType::ClusterId)
new
Constructor Detail
Class Method Detail
Descriptor Cluster (0x001D)
Provides device composition information including device types, server/client clusters, and endpoint hierarchy.
Required on all endpoints.
Matter Spec: Core 9.5
Instance Method Detail
Add a client cluster by class
@param cluster_class The cluster class (e.g., OnOffCluster) @return self for chaining
Example: descriptor.add_client(OnOffCluster) .add_client(LevelControlCluster)
Add a child endpoint to the parts list
@param endpoint_id The endpoint ID @return self for chaining
Example: descriptor.add_part(1_u16) .add_part(2_u16)
Add a server cluster by class
@param cluster_class The cluster class (e.g., OnOffCluster) @return self for chaining
Example: descriptor.add_server(OnOffCluster) .add_server(LevelControlCluster)
Get all attribute metadata
Get all command metadata
Helper: Check if a cluster is in the client list
Helper: Check if a cluster is in the client list (by class)
Helper: Check if a cluster is in the server list
Helper: Check if a cluster is in the server list (by class)
Read an attribute value
Write an attribute value