class

Matter::Protocol::MessageHandler::ActiveSubscription

Inherits Reference < Object

Active subscriptions - keyed by subscription_id After SubscribeResponse is sent, subscriptions are moved here for ongoing updates

Constructors

from_h(h : Hash(String, String | UInt32 | UInt16 | Int64 | Array(Hash(String, UInt32 | UInt16 | Nil))), session : Session::SecureContext) : ActiveSubscription

Deserialize subscription from hash Requires a session lookup function to resolve session_id to SecureContext

Source
new(subscription_id : UInt32, min_interval : UInt16, max_interval : UInt16, peer : Socket::IPAddress, session : Matter::Session::SecureContext, attribute_paths : Array(Matter::InteractionModel::AttributePath), exchange_id : UInt16)
Source

Instance methods

attribute_paths
Source
attribute_paths=(attribute_paths : Array(InteractionModel::AttributePath))
Source
exchange_id
Source
exchange_id=(exchange_id : UInt16)
Source
last_report_time
Source
last_report_time=(last_report_time : Time)
Source
matches?(endpoint_id : UInt16, cluster_id : UInt32, attribute_id : UInt32) : Bool

Check if a path matches any subscribed paths (including wildcards)

Source
max_interval
Source
max_interval=(max_interval : UInt16)
Source
min_interval
Source
min_interval=(min_interval : UInt16)
Source
peer
Source
peer=(peer : Socket::IPAddress)
Source
session
Source
session=(session : Session::SecureContext)
Source
subscription_id
Source
subscription_id=(subscription_id : UInt32)
Source
to_h

Serialize subscription to hash for persistence Note: session is stored by session_id - must be resolved when restoring

Source