struct

Matter::Cluster::AttributeValuePairTlv

Inherits TLV::Serializable < Struct < Value < Object

Attribute value pair for extension field sets Per Matter spec: AttributeValuePairStruct The value field used depends on the attribute's data type:

  • valueUnsigned8 (tag 1): bool, map8, uint8
  • valueSigned8 (tag 2): int8
  • valueUnsigned16 (tag 3): map16, uint16
  • valueSigned16 (tag 4): int16
  • valueUnsigned32 (tag 5): map32, uint24, uint32
  • valueSigned32 (tag 6): int24, int32
  • valueUnsigned64 (tag 7): map64, uint40-64
  • valueSigned64 (tag 8): int40-64

Constructors

from_tlv_bytes(attribute_id : UInt32, tlv_bytes : Bytes) : AttributeValuePairTlv

Create from raw TLV bytes, converting to the appropriate value field

Source
new(any : TLV::Any)
Source
new(attribute_id : UInt32, value_unsigned8 : UInt8 | Nil = nil, value_signed8 : Int8 | Nil = nil, value_unsigned16 : UInt16 | Nil = nil, value_signed16 : Int16 | Nil = nil, value_unsigned32 : UInt32 | Nil = nil, value_signed32 : Int32 | Nil = nil, value_unsigned64 : UInt64 | Nil = nil, value_signed64 : Int64 | 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

attribute_id
Source
attribute_id=(attribute_id : UInt32)
Source
to_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : Nil
Source
to_slice
Source
to_tlv(outer_tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : TLV::Any
Source
value_signed16
Source
value_signed16=(value_signed16 : Int16 | Nil)
Source
value_signed32
Source
value_signed32=(value_signed32 : Int32 | Nil)
Source
value_signed64
Source
value_signed64=(value_signed64 : Int64 | Nil)
Source
value_signed8
Source
value_signed8=(value_signed8 : Int8 | Nil)
Source
value_unsigned16
Source
value_unsigned16=(value_unsigned16 : UInt16 | Nil)
Source
value_unsigned32
Source
value_unsigned32=(value_unsigned32 : UInt32 | Nil)
Source
value_unsigned64
Source
value_unsigned64=(value_unsigned64 : UInt64 | Nil)
Source
value_unsigned8
Source
value_unsigned8=(value_unsigned8 : UInt8 | Nil)
Source