class
Matter::MatterNode
- Matter::MatterNode
- Reference
- Object
Overview
MatterNode represents a complete Matter device with multiple endpoints
Defined in:
matter/endpoint.crConstructors
Instance Method Summary
-
#add_endpoint(endpoint : Endpoint)
Add an endpoint to this node
-
#description : String
Get a human-readable description of this matter node
-
#endpoint_count : Int32
Get the number of endpoints
-
#endpoint_ids : Array(UInt16)
Get all endpoint IDs
- #endpoints : Hash(UInt16, Endpoint)
-
#get_cluster(endpoint_id : UInt16, cluster_type : T.class) : T | Nil forall T
Get a typed cluster from an endpoint Usage: node.get_cluster(1_u16, OnOffCluster)
-
#get_cluster!(endpoint_id : UInt16, cluster_type : T.class) : T forall T
Get a typed cluster from an endpoint (raises if not found)
-
#get_endpoint(endpoint_id : UInt16) : Endpoint | Nil
Get an endpoint by ID
-
#get_endpoint!(endpoint_id : UInt16) : Endpoint
Get an endpoint by ID (raises if not found)
-
#has_endpoint?(endpoint_id : UInt16) : Bool
Check if node has an endpoint
-
#invoke_command(endpoint_id : UInt16, cluster_id : UInt32, command_id : UInt32, fields : Bytes = Bytes.new(0)) : InteractionModel::Status | Bytes
Invoke a command on a cluster on an endpoint
-
#read_attribute(endpoint_id : UInt16, cluster_id : UInt32, attribute_id : UInt32) : InteractionModel::Status | Bytes
Read an attribute from a cluster on an endpoint
-
#valid? : Bool
Check if all endpoints are valid
-
#validate : Hash(UInt16, Array(String))
Validate all endpoints
-
#write_attribute(endpoint_id : UInt16, cluster_id : UInt32, attribute_id : UInt32, value : Bytes) : InteractionModel::Status
Write an attribute to a cluster on an endpoint
Constructor Detail
Instance Method Detail
Get a typed cluster from an endpoint Usage: node.get_cluster(1_u16, OnOffCluster)
Get a typed cluster from an endpoint (raises if not found)
Get an endpoint by ID (raises if not found)
Invoke a command on a cluster on an endpoint
Read an attribute from a cluster on an endpoint
Write an attribute to a cluster on an endpoint