Matter::Codec::MessageCodec::Base
Instance methods
compute_flags(source_node_id : DataType::NodeId | Nil, destination_node_id : DataType::NodeId | Nil, destination_group_id : DataType::GroupId | Nil) : UInt8
Helper method to compute the flags byte from packet header fields This is used both when encoding and when creating new packet headers
Presence is determined by nil-ness, NOT by the node ID value. Callers should pass nil when there's no node ID (e.g., PASE sessions), not NodeId(0). This ensures consistent AAD computation across the codebase.
decode_packet(data : Slice(UInt8)) : Packet
Sourcedecode_payload(packet : Packet) : Message
Sourceencode_packet(packet : Packet) : Slice(UInt8)
Sourceencode_packet_header(packet_header : PacketHeader, io : IO::Memory, byte_format : IO::ByteFormat = IO::ByteFormat::LittleEndian)
Sourceencode_payload(message : Message) : Packet
Sourceencode_payload_header(payload_header : PayloadHeader, io : IO::Memory, byte_format : IO::ByteFormat = IO::ByteFormat::LittleEndian)
Source