pub struct Subscription { /* private fields */ }Expand description
A single subscription maintained by the server.
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn get(&self, id: &u32) -> Option<&MonitoredItem>
pub fn get(&self, id: &u32) -> Option<&MonitoredItem>
Get a reference to a monitored item managed by this subscription.
Sourcepub fn contains_key(&self, id: &u32) -> bool
pub fn contains_key(&self, id: &u32) -> bool
Return whether the subscription contains the given monitored item ID.
Sourcepub fn items(&self) -> impl Iterator<Item = &MonitoredItem>
pub fn items(&self) -> impl Iterator<Item = &MonitoredItem>
Iterate over the monitored items in the subscription.
Sourcepub fn set_resend_data(&mut self)
pub fn set_resend_data(&mut self)
Set resend_data. The next publish request will send values for all
monitored items, whether or not they have produced any new data.
Sourcepub fn notify_data_value(&mut self, id: &u32, value: DataValue, now: &DateTime)
pub fn notify_data_value(&mut self, id: &u32, value: DataValue, now: &DateTime)
Notify the given monitored item of a new data value.
Sourcepub fn notify_event(
&mut self,
id: &u32,
event: &dyn Event,
type_tree: &dyn TypeTree,
)
pub fn notify_event( &mut self, id: &u32, event: &dyn Event, type_tree: &dyn TypeTree, )
Notify the given monitored item of a new event.
Sourcepub fn publishing_interval(&self) -> Duration
pub fn publishing_interval(&self) -> Duration
The publishing interval of this subscription.
Sourcepub fn publishing_enabled(&self) -> bool
pub fn publishing_enabled(&self) -> bool
Whether publishing is enabled on this subscription.
Sourcepub fn max_queued_notifications(&self) -> usize
pub fn max_queued_notifications(&self) -> usize
The maximum number of notification messages queued for this subscription.
Sourcepub fn max_notifications_per_publish(&self) -> usize
pub fn max_notifications_per_publish(&self) -> usize
The maximum number of notifications per notification message for this subscription.
Sourcepub fn state(&self) -> SubscriptionState
pub fn state(&self) -> SubscriptionState
The current state of the subscription.