Expand description
Notification Forwarder object (type 51, Clause 12.51).
A forwarder originates no events. It takes the event notifications this
device receives, and those its own objects address to the local Device,
and sends each one on to the destinations it holds: the configured
Recipient_List and the expiring Subscribed_Recipients. The server does the
sending; see forwarding_targets for which notifications a forwarder
takes and where it sends them.
§Rows
The object serves every required row of Table 12-58, plus Description and, when the application configures one, Port_Filter. Over the network:
- Recipient_List takes the same writes as a Notification Class’s, capped
at
MAX_RECIPIENT_LIST_DESTINATIONSdestinations. - Subscribed_Recipients is a
SubscribedRecipientsstore: entries run out after their Time Remaining and are edited by AddListElement and RemoveListElement. - Process_Identifier_Filter takes an Unsigned32, or NULL to forward every process identifier; Local_Forwarding_Only and Out_Of_Service take a BOOLEAN.
- Port_Filter takes writes of its Enabled members only (Clause 12.51.11): the array keeps its size and Port_IDs.
- Reliability is always NO_FAULT_DETECTED and is not writable.
§Restarts
Clauses 12.51.8 and 12.51.9 ask for both lists to survive a restart. A
forwarder built with NotificationForwarderObject::with_persistence
saves Recipient_List and Subscribed_Recipients together, each
subscription with the minutes it has left, when a write changes either
list, when an entry lapses, and at most once a minute while the minutes
the entries serve fall; it restores both when built again. A restored
entry counts down from its saved minutes: no fewer than it had left when
the device stopped, about a minute more at most, and never more than its
last subscription gave it, so restarts do not keep an entry alive.
Saves run on the forwarder’s own writer thread, never while the database
guard is held (crate::durable), and a list write that cannot be saved
is refused with DEVICE / OPERATIONAL_PROBLEM, leaving the old list. A
failed save is logged and counted (ForwarderSaveCounters); one the
operation task made is retried a minute later.
A written Recipient_List wins over the one the application configures:
once a write has set the list and it was saved, a rebuilt forwarder
serves the saved list and ignores add_destination calls. Until then
the configured destinations apply at every start; they are not saved. A
forwarder built with NotificationForwarderObject::new keeps both lists
in memory only.
Re-exports§
pub use crate::notification_class::MAX_RECIPIENT_LIST_DESTINATIONS;
Structs§
- File
Notification Forwarder Persistence - A file holding one forwarder’s lists, replaced whole on each save.
- Forwarder
Save Counters - Lifetime totals of one forwarder’s saves, shared with the object: take it
with
save_countersbefore the object joins a database, and read it at any time after. Each total saturates atu64::MAX. - Forwarder
Snapshot - What a forwarder keeps across a restart: both of its lists.
- Forwarding
Input - One event notification offered to this device’s forwarders.
- Forwarding
Targets - Where this device’s forwarders send one notification.
- Notification
Forwarder Object - BACnet Notification Forwarder object (type 51). See the module documentation.
Traits§
- Notification
Forwarder Persistence - Application-owned storage for one Notification Forwarder’s lists.
Functions§
- forwarding_
targets - Select the forwarders that take
inputand their destinations, leaving out the forwarders inskip(those that already took this notification earlier in a chain within this device).