Skip to main content

Module subscribed_recipients

Module subscribed_recipients 

Source
Expand description

A Notification Forwarder’s Subscribed_Recipients (Clause 12.51.9, #1049): a bounded BACnetLIST of BACnetEventNotificationSubscription whose entries lapse when their time runs out.

The bundled NotificationForwarderObject keeps its list in a SubscribedRecipients. An application that implements its own type-51 object can do the same, routing to the store the property’s reads and writes (read and write) and the object’s monotonic clock hooks (bind_monotonic_clock, advance_to and next_deadline). The server then serves the list to ReadProperty, ReadPropertyMultiple and ReadRange, and its AddListElement and RemoveListElement handlers edit it the way the clause asks: an entry is named by its recipient and process identifier, and adding one already present renews it with the other members given.

§Lifetimes

Time Remaining travels in minutes. The store keeps each entry’s deadline on the database’s monotonic clock, the one the server’s operation task uses for the Access Door’s pulse relock, and serves the whole minutes left, rounded up, so a live entry never reads as zero. An entry leaves the list once its deadline passes: reads and writes skip it from then on, and the server’s operation task drops it at its deadline (through advance_monotonic_time_internal). With no clock bound the store counts the time advance_by gives it, and binding a clock later keeps the time each entry has left.

Clause 12.51.9 asks for the list to survive a restart. The store itself lives in memory; the forwarder object saves it through a NotificationForwarderPersistence and restores it with write.

Structs§

SubscribedRecipients
A Notification Forwarder’s Subscribed_Recipients: at most MAX_SUBSCRIBED_RECIPIENTS entries, each lapsing when its Time Remaining runs out. See the module documentation.

Constants§

MAX_SUBSCRIBED_RECIPIENTS
The most entries a SubscribedRecipients holds.
MAX_SUBSCRIPTION_MINUTES
The longest Time Remaining, in minutes, the store accepts: 1,440 (a day).