Struct opcua_server::subscriptions::subscription::Subscription
source · [−]pub struct Subscription { /* private fields */ }Implementations
sourceimpl Subscription
impl Subscription
pub fn new(
diagnostics: Arc<RwLock<ServerDiagnostics>>,
subscription_id: u32,
publishing_enabled: bool,
publishing_interval: Duration,
lifetime_counter: u32,
keep_alive_counter: u32,
priority: u8
) -> Subscription
pub fn monitored_items_len(&self) -> usize
sourcepub fn create_monitored_items(
&mut self,
server_state: &ServerState,
address_space: &AddressSpace,
now: &DateTimeUtc,
timestamps_to_return: TimestampsToReturn,
items_to_create: &[MonitoredItemCreateRequest]
) -> Vec<MonitoredItemCreateResult>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn create_monitored_items(
&mut self,
server_state: &ServerState,
address_space: &AddressSpace,
now: &DateTimeUtc,
timestamps_to_return: TimestampsToReturn,
items_to_create: &[MonitoredItemCreateRequest]
) -> Vec<MonitoredItemCreateResult>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Creates monitored items on the specified subscription, returning the creation results
sourcepub fn modify_monitored_items(
&mut self,
server_state: &ServerState,
address_space: &AddressSpace,
timestamps_to_return: TimestampsToReturn,
items_to_modify: &[MonitoredItemModifyRequest]
) -> Vec<MonitoredItemModifyResult>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn modify_monitored_items(
&mut self,
server_state: &ServerState,
address_space: &AddressSpace,
timestamps_to_return: TimestampsToReturn,
items_to_modify: &[MonitoredItemModifyRequest]
) -> Vec<MonitoredItemModifyResult>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Modify the specified monitored items, returning a result for each
sourcepub fn set_monitoring_mode(
&mut self,
monitored_item_id: u32,
monitoring_mode: MonitoringMode
) -> StatusCode
pub fn set_monitoring_mode(
&mut self,
monitored_item_id: u32,
monitoring_mode: MonitoringMode
) -> StatusCode
Sets the monitoring mode on one monitored item
sourcepub fn delete_monitored_items(
&mut self,
items_to_delete: &[u32]
) -> Vec<StatusCode>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn delete_monitored_items(
&mut self,
items_to_delete: &[u32]
) -> Vec<StatusCode>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Delete the specified monitored items (by item id), returning a status code for each
pub fn get_handles(&self) -> (Vec<u32>, Vec<u32>)
sourcepub fn set_resend_data(&mut self)
pub fn set_resend_data(&mut self)
Sets the resend data flag which means the next publish request will receive the latest value of every monitored item whether it has changed in this cycle or not.
sourcepub fn reset_keep_alive_counter(&mut self)
pub fn reset_keep_alive_counter(&mut self)
Reset the keep-alive counter to the maximum keep-alive count of the Subscription. The maximum keep-alive count is set by the Client when the Subscription is created and may be modified using the ModifySubscription Service
sourcepub fn reset_lifetime_counter(&mut self)
pub fn reset_lifetime_counter(&mut self)
Reset the lifetime counter to the value specified for the life time of the subscription in the create subscription service
sourcepub fn start_publishing_timer(&mut self)
pub fn start_publishing_timer(&mut self)
Start or restart the publishing timer and decrement the LifetimeCounter Variable.
pub fn subscription_id(&self) -> u32
pub fn lifetime_counter(&self) -> u32
pub fn keep_alive_counter(&self) -> u32
pub fn message_sent(&self) -> bool
pub fn publishing_interval(&self) -> Duration
pub fn max_keep_alive_count(&self) -> u32
pub fn max_lifetime_count(&self) -> u32
pub fn priority(&self) -> u8
Trait Implementations
sourceimpl Clone for Subscription
impl Clone for Subscription
sourcefn clone(&self) -> Subscription
fn clone(&self) -> Subscription
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for Subscription
impl Debug for Subscription
sourceimpl Drop for Subscription
impl Drop for Subscription
sourceimpl Serialize for Subscription
impl Serialize for Subscription
Auto Trait Implementations
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnwindSafe for Subscription
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more