pub struct SubscribedRecipients { /* private fields */ }Expand description
A Notification Forwarder’s Subscribed_Recipients: at most
MAX_SUBSCRIBED_RECIPIENTS entries, each lapsing when its Time
Remaining runs out. See the module documentation.
Implementations§
Source§impl SubscribedRecipients
impl SubscribedRecipients
Sourcepub fn subscriptions(&self) -> Vec<BACnetEventNotificationSubscription>
pub fn subscriptions(&self) -> Vec<BACnetEventNotificationSubscription>
The live entries in list order, each with the whole minutes it has left, rounded up.
Sourcepub fn read(&self) -> PropertyValue
pub fn read(&self) -> PropertyValue
The property value: the live entries, encoded back to back in
PropertyValue::ApplicationData.
Sourcepub fn write(&mut self, value: PropertyValue) -> Result<(), Error>
pub fn write(&mut self, value: PropertyValue) -> Result<(), Error>
Replace the list with a written one, all or nothing.
Only the framed form in PropertyValue::ApplicationData is a value;
anything else, or an entry that does not decode, fails with PROPERTY /
INVALID_DATA_TYPE. An entry whose Time Remaining is 0 or past
MAX_SUBSCRIPTION_MINUTES fails with PROPERTY / VALUE_OUT_OF_RANGE,
and the first entry past MAX_SUBSCRIBED_RECIPIENTS with RESOURCES /
NO_SPACE_TO_WRITE_PROPERTY; both name the entry’s position in the
written list.
Each entry’s Time Remaining starts its lifetime over, except that an entry written as it reads now keeps its deadline, and so does one written with a minute more, which is how it read if a minute boundary fell between the read and this write. A list read and written back, or edited by the list services, so leaves the entries it doesn’t change alone, rather than stretching each to its rounded-up minute. Two entries naming the same recipient and process are one entry, which takes the later one’s members.
Sourcepub fn bind_monotonic_clock(&mut self, clock: Option<Arc<MonotonicClock>>)
pub fn bind_monotonic_clock(&mut self, clock: Option<Arc<MonotonicClock>>)
Bind the database’s monotonic clock, from the object’s
bind_monotonic_clock_internal. Each held entry keeps the time it has
left: its deadline moves from the old time base to the new one, so a
list written or restored before the object joins a database lapses on
time.
Sourcepub fn advance_to(&mut self, now: Duration) -> bool
pub fn advance_to(&mut self, now: Duration) -> bool
Drop every entry whose deadline is at or before now, a monotonic
instant, from the object’s advance_monotonic_time_internal. true
when one was dropped.
Sourcepub fn advance_by(&mut self, elapsed: Duration) -> bool
pub fn advance_by(&mut self, elapsed: Duration) -> bool
Count elapsed on a store with no bound clock, then drop what has
lapsed, as Self::advance_to does. true when an entry was dropped.
Sourcepub fn next_deadline(&self) -> Option<Duration>
pub fn next_deadline(&self) -> Option<Duration>
The earliest deadline among the held entries, for the object’s
next_monotonic_deadline_internal.