module
Matter::Protocol::IMHandler
Overview
Helper module for Interaction Model message handling
Defined in:
matter/protocol/im_handler.crConstant Summary
-
Log =
::Log.for("matter.im") -
MSG_INVOKE_REQUEST =
8_u8 -
MSG_INVOKE_RESPONSE =
9_u8 -
MSG_READ_REQUEST =
2_u8 -
MSG_REPORT_DATA =
5_u8 -
MSG_STATUS_RESPONSE =
1_u8 -
IM message types
-
MSG_SUBSCRIBE_REQUEST =
3_u8 -
MSG_SUBSCRIBE_RESPONSE =
4_u8 -
MSG_TIMED_REQUEST =
10_u8 -
MSG_WRITE_REQUEST =
6_u8 -
MSG_WRITE_RESPONSE =
7_u8
Class Method Summary
-
.encode_invoke_response(response : InteractionModel::InvokeResponse) : Bytes
Encode InvokeResponse manually to preserve PATH container types
-
.encode_read_response(response : InteractionModel::ReadResponse) : Bytes
Encode ReadResponse manually to preserve PATH container types TLV::Serializable loses container type metadata, so we build manually
-
.invoke_commands(invoke_requests : Array(InteractionModel::CommandDataIB), clusters : Hash(Tuple(UInt16, UInt32), Cluster::Base), session_id : UInt64 | Nil = nil) : InteractionModel::InvokeResponse
Execute commands from invoke requests
-
.parse_invoke_request(payload : Bytes) : InteractionModel::InvokeRequest | Nil
Parse InvokeRequest from decrypted TLV payload
-
.parse_read_request(payload : Bytes) : InteractionModel::ReadRequest | Nil
Parse ReadRequest from decrypted TLV payload
-
.read_attributes(attribute_requests : Array(InteractionModel::AttributePath), clusters : Hash(Tuple(UInt16, UInt32), Cluster::Base)) : InteractionModel::ReadResponse
Read attributes from clusters
Class Method Detail
Encode InvokeResponse manually to preserve PATH container types
Encode ReadResponse manually to preserve PATH container types TLV::Serializable loses container type metadata, so we build manually
Execute commands from invoke requests
Parse InvokeRequest from decrypted TLV payload
Parse ReadRequest from decrypted TLV payload
Read attributes from clusters