Skip to main content

Subscription

Struct Subscription 

Source
pub struct Subscription { /* private fields */ }

Implementations§

Source§

impl Subscription

Source

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

Source

pub fn monitored_items_len(&self) -> usize

Source

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>

Creates monitored items on the specified subscription, returning the creation results

Source

pub fn modify_monitored_items( &mut self, server_state: &ServerState, address_space: &AddressSpace, timestamps_to_return: TimestampsToReturn, items_to_modify: &[MonitoredItemModifyRequest], ) -> Vec<MonitoredItemModifyResult>

Modify the specified monitored items, returning a result for each

Source

pub fn set_monitoring_mode( &mut self, monitored_item_id: u32, monitoring_mode: MonitoringMode, ) -> StatusCode

Sets the monitoring mode on one monitored item

Source

pub fn delete_monitored_items( &mut self, items_to_delete: &[u32], ) -> Vec<StatusCode>

Delete the specified monitored items (by item id), returning a status code for each

Source

pub fn get_handles(&self) -> (Vec<u32>, Vec<u32>)

Source

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.

Source

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

Source

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

Source

pub fn start_publishing_timer(&mut self)

Start or restart the publishing timer and decrement the LifetimeCounter Variable.

Source

pub fn subscription_id(&self) -> u32

Source

pub fn lifetime_counter(&self) -> u32

Source

pub fn keep_alive_counter(&self) -> u32

Source

pub fn message_sent(&self) -> bool

Source

pub fn publishing_interval(&self) -> Duration

Source

pub fn max_keep_alive_count(&self) -> u32

Source

pub fn max_lifetime_count(&self) -> u32

Source

pub fn priority(&self) -> u8

Trait Implementations§

Source§

impl Clone for Subscription

Source§

fn clone(&self) -> Subscription

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Subscription

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Subscription

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Serialize for Subscription

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.