struct

Matter::InteractionModel::AttributePath

Inherits TLV::Serializable < Struct < Value < Object

Attribute path identifying a specific attribute Encoded as a TLV list per Matter spec (and matter.js/CHIP encodings), and TLV::Serializable decoding is tolerant of list/structure variations. Note: fixed_size: true ensures proper type widths for iOS compatibility.

Matter spec allows Boolean true as a wildcard indicator for path fields. iOS/Apple controllers send true instead of omitting fields for wildcards. We handle this by accepting Bool in the union type and converting to nil.

Constructors

new(any : TLV::Any)
Source
new(endpoint : UInt16 | Nil = nil, cluster : UInt32 | Nil = nil, attribute : UInt32 | Nil = nil, list_index : UInt16 | Nil = nil, *, enable_tag_compression : Bool | Nil = nil, node : UInt64 | Nil = nil, wildcard_path_flags : UInt32 | Nil = nil)
Source

Class methods

from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian)
Source
from_slice(bytes : Bytes)
Source
from_tlv(any : TLV::Any)
Source
from_tlv(data : Bytes)
Source

Instance methods

==(other : AttributePath) : Bool
Source
attribute
Source
attribute=(value : UInt32 | Nil)
Source
attribute_raw
Source
attribute_raw=(attribute_raw : UInt32 | Bool | Nil)
Source
cluster
Source
cluster=(value : UInt32 | Nil)
Source
cluster_raw
Source
cluster_raw=(cluster_raw : UInt32 | Bool | Nil)
Source
concrete?

Concrete path specifies a single attribute

Source
enable_tag_compression
Source
enable_tag_compression=(enable_tag_compression : Bool | Nil)
Source
endpoint

Getters that convert Bool (wildcard) to nil

Source
endpoint=(value : UInt16 | Nil)

Setters for API compatibility

Source
endpoint_raw

Internal storage accepts Bool for wildcard indicator from iOS

Source
endpoint_raw=(endpoint_raw : UInt16 | Bool | Nil)

Internal storage accepts Bool for wildcard indicator from iOS

Source
list_index
Source
list_index=(value : UInt16 | Nil)
Source
list_index_raw
Source
list_index_raw=(list_index_raw : UInt16 | Bool | Nil)
Source
node
Source
node=(value : UInt64 | Nil)
Source
node_raw
Source
node_raw=(node_raw : UInt64 | Nil)
Source
to_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : Nil
Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source
to_slice
Source
to_tlv(outer_tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : TLV::Any
Source
wildcard?

Wildcard path matches all endpoints/clusters/attributes

Source
wildcard_path_flags
Source
wildcard_path_flags=(value : UInt32 | Nil)
Source
wildcard_path_flags_raw
Source
wildcard_path_flags_raw=(wildcard_path_flags_raw : UInt32 | Nil)
Source