pub struct CreateSubscription { /* private fields */ }Expand description
Create a subscription by sending a CreateSubscriptionRequest to the server.
See OPC UA Part 4 - Services 5.13.2 for complete description of the service and error responses.
Implementations§
Source§impl CreateSubscription
impl CreateSubscription
Sourcepub fn diagnostics(self, bits: DiagnosticBits) -> CreateSubscription
pub fn diagnostics(self, bits: DiagnosticBits) -> CreateSubscription
Set requested diagnostic bits.
Sourcepub fn timeout(self, timeout: Duration) -> CreateSubscription
pub fn timeout(self, timeout: Duration) -> CreateSubscription
Set the timeout for this request. Defaults to session timeout.
Sourcepub fn audit_entry_id(self, entry: impl Into<UAString>) -> CreateSubscription
pub fn audit_entry_id(self, entry: impl Into<UAString>) -> CreateSubscription
Set the audit entry ID for the request.
Sourcepub fn header(&self) -> &RequestHeader
pub fn header(&self) -> &RequestHeader
Get the request header.
Source§impl CreateSubscription
impl CreateSubscription
Sourcepub fn new(session: &Session) -> CreateSubscription
pub fn new(session: &Session) -> CreateSubscription
Construct a new call to the CreateSubscription service.
Sourcepub fn new_manual(
session_id: u32,
timeout: Duration,
auth_token: NodeId,
request_handle: u32,
) -> CreateSubscription
pub fn new_manual( session_id: u32, timeout: Duration, auth_token: NodeId, request_handle: u32, ) -> CreateSubscription
Construct a new call to the CreateSubscription service, setting header parameters manually.
Sourcepub fn publishing_interval(self, interval: Duration) -> CreateSubscription
pub fn publishing_interval(self, interval: Duration) -> CreateSubscription
The requested publishing interval defines the cyclic rate that the Subscription is being requested to return Notifications to the Client. This interval is expressed in milliseconds. This interval is represented by the publishing timer in the Subscription state table. The negotiated value for this parameter returned in the response is used as the default sampling interval for MonitoredItems assigned to this Subscription. If the requested value is 0 or negative, the server shall revise with the fastest supported publishing interval in milliseconds.
Sourcepub fn max_lifetime_count(self, lifetime_count: u32) -> CreateSubscription
pub fn max_lifetime_count(self, lifetime_count: u32) -> CreateSubscription
Requested lifetime count. The lifetime count shall be a minimum of three times the keep keep-alive count. When the publishing timer has expired this number of times without a Publish request being available to send a NotificationMessage, then the Subscription shall be deleted by the Server.
Sourcepub fn max_keep_alive_count(self, keep_alive_count: u32) -> CreateSubscription
pub fn max_keep_alive_count(self, keep_alive_count: u32) -> CreateSubscription
Requested maximum keep-alive count. When the publishing timer has expired this number of times without requiring any NotificationMessage to be sent, the Subscription sends a keep-alive Message to the Client. The negotiated value for this parameter is returned in the response. If the requested value is 0, the server shall revise with the smallest supported keep-alive count.
Sourcepub fn max_notifications_per_publish(
self,
max_notifications_per_publish: u32,
) -> CreateSubscription
pub fn max_notifications_per_publish( self, max_notifications_per_publish: u32, ) -> CreateSubscription
The maximum number of notifications that the Client wishes to receive in a single Publish response. A value of zero indicates that there is no limit. The number of notifications per Publish is the sum of monitoredItems in the DataChangeNotification and events in the EventNotificationList.
Sourcepub fn priority(self, priority: u8) -> CreateSubscription
pub fn priority(self, priority: u8) -> CreateSubscription
Indicates the relative priority of the Subscription. When more than one Subscription needs to send Notifications, the Server should de-queue a Publish request to the Subscription with the highest priority number. For Subscriptions with equal priority the Server should de-queue Publish requests in a round-robin fashion.
Sourcepub fn publishing_enabled(self, publishing_enabled: bool) -> CreateSubscription
pub fn publishing_enabled(self, publishing_enabled: bool) -> CreateSubscription
A boolean parameter with the following values - true publishing
is enabled for the Subscription, false, publishing is disabled for the Subscription.
The value of this parameter does not affect the value of the monitoring mode Attribute of
MonitoredItems.