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
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)
SourceInstance methods
attribute_paths
Sourceattribute_paths=(attribute_paths : Array(InteractionModel::AttributePath))
Sourceexchange_id
Sourceexchange_id=(exchange_id : UInt16)
Sourcelast_report_time
Sourcelast_report_time=(last_report_time : Time)
Sourcematches?(endpoint_id : UInt16, cluster_id : UInt32, attribute_id : UInt32) : Bool
Check if a path matches any subscribed paths (including wildcards)
max_interval
Sourcemax_interval=(max_interval : UInt16)
Sourcemin_interval
Sourcemin_interval=(min_interval : UInt16)
Sourcepeer
Sourcepeer=(peer : Socket::IPAddress)
Sourcesession
Sourcesession=(session : Session::SecureContext)
Sourcesubscription_id
Sourcesubscription_id=(subscription_id : UInt32)
Sourceto_h
Serialize subscription to hash for persistence Note: session is stored by session_id - must be resolved when restoring