struct Matter::Session::Pase::Definitions::StatusReport

Overview

StatusReport message Sent to indicate success or failure of a protocol operation

NOTE StatusReport is NOT TLV encoded! It's raw binary format: 2 bytes: generalStatus (UInt16) 4 bytes: vendorProtocolId (UInt32) - lower 16 bits = protocol ID, upper 16 bits = vendor ID 2 bytes: protocolStatus (UInt16) N bytes: protocolData (optional)

Defined in:

matter/session/pase/definitions.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_bytes(data : Bytes) : StatusReport #

Decode from raw binary bytes (NOT TLV!)


[View source]
def self.new(general_status : UInt16 = 0_u16, protocol_id : UInt16 = 0_u16, vendor_id : UInt16 = 0_u16, protocol_status : UInt16 = 0_u16, protocol_data : Bytes | Nil = nil) #

[View source]

Instance Method Detail

def general_status : UInt16 #

General status code (SUCCESS = 0)


[View source]
def general_status=(general_status : UInt16) #

General status code (SUCCESS = 0)


[View source]
def protocol_data : Bytes | Nil #

Optional protocol-specific data


[View source]
def protocol_data=(protocol_data : Bytes | Nil) #

Optional protocol-specific data


[View source]
def protocol_id : UInt16 #

Protocol ID (lower 16 bits of vendorProtocolId)


[View source]
def protocol_id=(protocol_id : UInt16) #

Protocol ID (lower 16 bits of vendorProtocolId)


[View source]
def protocol_status : UInt16 #

Protocol-specific status code (SUCCESS = 0 for Secure Channel)


[View source]
def protocol_status=(protocol_status : UInt16) #

Protocol-specific status code (SUCCESS = 0 for Secure Channel)


[View source]
def to_bytes : Bytes #

Encode to raw binary bytes (NOT TLV!)


[View source]
def vendor_id : UInt16 #

Vendor ID (upper 16 bits of vendorProtocolId)


[View source]
def vendor_id=(vendor_id : UInt16) #

Vendor ID (upper 16 bits of vendorProtocolId)


[View source]