class
Matter::Protocol::MessageHandler::ActiveSubscription
- Matter::Protocol::MessageHandler::ActiveSubscription
- Reference
- Object
Overview
Active subscriptions - keyed by subscription_id After SubscribeResponse is sent, subscriptions are moved here for ongoing updates
Defined in:
matter/protocol/message_handler.crConstructors
-
.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), next_exchange_id : UInt16 = 0_u16)
Instance Method Summary
- #attribute_paths : Array(InteractionModel::AttributePath)
- #attribute_paths=(attribute_paths : Array(InteractionModel::AttributePath))
- #last_report_time : Time
- #last_report_time=(last_report_time : Time)
-
#matches?(endpoint_id : UInt16, cluster_id : UInt32, attribute_id : UInt32) : Bool
Check if a path matches any subscribed paths (including wildcards)
- #max_interval : UInt16
- #max_interval=(max_interval : UInt16)
- #min_interval : UInt16
- #min_interval=(min_interval : UInt16)
- #next_exchange_id : UInt16
- #next_exchange_id=(next_exchange_id : UInt16)
- #peer : Socket::IPAddress
- #peer=(peer : Socket::IPAddress)
- #session : Session::SecureContext
- #session=(session : Session::SecureContext)
- #subscription_id : UInt32
- #subscription_id=(subscription_id : UInt32)
-
#to_h : Hash(String, String | UInt32 | UInt16 | Int64 | Array(Hash(String, UInt32 | UInt16 | Nil)))
Serialize subscription to hash for persistence Note: session is stored by session_id - must be resolved when restoring
Constructor Detail
def self.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
def self.new(subscription_id : UInt32, min_interval : UInt16, max_interval : UInt16, peer : Socket::IPAddress, session : Matter::Session::SecureContext, attribute_paths : Array(Matter::InteractionModel::AttributePath), next_exchange_id : UInt16 = 0_u16)
#
Instance Method Detail
def matches?(endpoint_id : UInt16, cluster_id : UInt32, attribute_id : UInt32) : Bool
#
Check if a path matches any subscribed paths (including wildcards)
def to_h : Hash(String, String | UInt32 | UInt16 | Int64 | Array(Hash(String, UInt32 | UInt16 | Nil)))
#
Serialize subscription to hash for persistence Note: session is stored by session_id - must be resolved when restoring