OpcSubscription Class

Namespace: Opc.UaFx.Client
Assemblies: Opc.UaFx.Advanced.dll

Provides mechanisms to monitor a set of attributes (= node data) and (node-related) events using notifications being reported from the server to the client.

C#

public class OpcSubscription


Inheritance Object › OpcSubscription

Remarks

When a subscription is created, the first message is sent at the end of the first publishing cycle to inform the client that the subscription is operational. Another message is sent if there are notifications ready to be reported. If there are none, a keep-alive message is sent instead that contains a sequence number of one, indicating that the first notification has not yet been sent. This is the only time a keep-alive message is sent without waiting for the maximum keep-alive count to be reached.

Name Description
Changed Occurs then a monitored is added, modified, deleted or changes on the OpcSubscription were applied.
DataChangeReceived Occurs then a monitored item receives an event notification which is not handled by an OpcDataChangeReceivedEventHandler on its DataChangeReceived event.
EventReceived Occurs then a monitored item receives an event notification which is not handled by an OpcEventReceivedEventHandler on its EventReceived event.
IsPublishingChanged Occurs then the IsPublishing property has changed.
NotificationReceived Occurs then a OpcNotification for this OpcSubscription has been received by the session which owns this OpcSubscription.
Name Description
CurrentKeepAliveCount Gets the actual keep-alive count used by the server for this OpcSubscription which has been negotiated by the server against the KeepAliveCount requested to meet its own constraints.
CurrentLifetimeCount Gets the actual lifetime count used by the server for this OpcSubscription which has been negotiated by the server against the LifetimeCount requested to meet its own constraints.
CurrentPriority Gets the actual relative priority of the subscription used to priorize notifications being send then more than one subscription is to be notified.
CurrentPublishingInterval Gets the actual publishing interval used by the server for this OpcSubscription which has been negotiated by the server against the PublishingInterval requested to meet its own constraints.
CurrentPublishingIsEnabled Gets the actual value indicating whether publishing is enabled by the server for this OpcSubscription which has been created and validated by the server against its own constraints.
DisplayName Gets or sets the name of the OpcSubscription used just for display purpose in the client application.
HasPendingChanges Gets a value indicating whether there exists any pending change on the subscription which needs to be applied to take effect (ApplyChanges).
Id Gets the server-assigned unique identifier for this OpcSubscription.
IsCreated Gets a value indicating whether this OpcSubscription has been created on the server.
IsPublishing Gets a value indicating whether this OpcSubscription is receiving notifications.
KeepAliveCount Gets or sets a value which defines the requested number of times the publishing timer have to expire without any notification being sent before the server have to send a keep-alive message to the client.
LastNotification Gets the last notification received from the server.
LastNotificationTime Gets the time the last notification which has been received from the server.
LifetimeCount Gets or sets a value which defines the requested number of times the publishing timer have to expire without any publish request before the server have to delete this OpcSubscription.
MaxMessageCount Gets or sets the maximum number of notifications to keep in the cache.
MaxNotificationsPerPublish Gets or sets a value which defines the maximum number of notifications that the client wants to receive in a single publish response.
MinLifetimeInterval Gets or sets a value which defines the minimum lifetime interval to apply in respect of the PublishingInterval and the LifetimeCount configured.
MonitoredItems Gets a read-only collection of OpcMonitoredItem instances associated with this OpcSubscription.
Notifications Gets a sequence of OpcNotification instances received from the server.
Priority Gets or sets a value which defines the relative priority of the subscription used to priorize notifications being send then more than one subscription is to be notified.
PublishingInterval Gets or sets the requested number of milliseconds of the interval within the server have to send cyclic notifications to the client.
PublishingIsEnabled Gets or sets a value indicating whether publishing is enabled for this OpcSubscription.
PublishTime Gets the time the last notification was published from the server.
ReceivedDataChangeCallback Gets or sets the callback used to process data changes of the monitored items associated with this OpcSubscription.
ReceivedEventCallback Gets or sets the callback used to process events of the monitored items associated with this OpcSubscription.
SequenceNumber Gets the sequence number of the last notification which has been received from the server.
Tag Gets or sets the object that contains additional user data about the subscription.
TimestampsToReturn Gets or sets the timestamps the server shall transmit for each monitored item.
UseMonitoredItemDataCache Gets or sets a value indicating whether this OpcSubscription shall forward notifications received from the server to monitored item individual caches. This enables the monitored items to process the data changes and event fields on their own.
Name Description
AddMonitoredItem(IEnumerable) Adds the monitored items specified by items to this OpcSubscription.
AddMonitoredItem(OpcMonitoredItem) Adds the monitored item specified by item to this OpcSubscription.
AddMonitoredItem(OpcMonitoredItem) Adds the monitored items specified by items to this OpcSubscription.
AddMonitoredItem(OpcNodeId) Adds a new monitored item which subscribes to changes on the Value attribute of the node specified by nodeId.
AddMonitoredItem(OpcNodeId, OpcAttribute) Adds a new monitored item which subscribes to the attribute of the node specified by nodeId.
AddMonitoredItem(OpcNodeId, OpcAttribute, OpcDataChangeFilter, OpcDataChangeReceivedEventHandler) Adds a new monitored item which subscribes to the attribute of the node specified by nodeId using the further configured filter.
AddMonitoredItem(OpcNodeId, OpcAttribute, OpcDataChangeReceivedEventHandler) Adds a new monitored item which subscribes to the attribute of the node specified by nodeId.
AddMonitoredItem(OpcNodeId, OpcAttribute, OpcEventFilter, OpcEventReceivedEventHandler) Adds a new monitored item which subscribes to the attribute of the node specified by nodeId using the further configured filter.
AddMonitoredItem(OpcNodeId, OpcAttribute, OpcEventReceivedEventHandler) Adds a new monitored item which subscribes to the attribute of the node specified by nodeId.
AddMonitoredItem(OpcNodeId, OpcAttribute, OpcMonitoringFilter) Adds a new monitored item which subscribes to the attribute of the node specified by nodeId using the further configured filter.
AddMonitoredItem(OpcNodeId, OpcDataChangeFilter, OpcDataChangeReceivedEventHandler) Adds a new monitored item which subscribes to changes on the Value attribute of the node specified by nodeId using the further configured filter.
AddMonitoredItem(OpcNodeId, OpcDataChangeReceivedEventHandler) Adds a new monitored item which subscribes to changes on the Value attribute of the node specified by nodeId.
AddMonitoredItem(OpcNodeId, OpcEventFilter, OpcEventReceivedEventHandler) Adds a new monitored item which subscribes to changes on the EventNotifier attribute of the node specified by nodeId using the further configured filter.
AddMonitoredItem(OpcNodeId, OpcEventReceivedEventHandler) Adds a new monitored item which subscribes to events on the EventNotifier attribute of the node specified by nodeId.
AddMonitoredItem(OpcNodeId, OpcMonitoringFilter) Adds a new monitored item which subscribes to changes on the Value attribute of the node specified by nodeId using the further configured filter.
ApplyChanges Applies any changes made on the current OpcSubscription or on one of its MonitoredItems using the according services of the server connected to.
ChangeMonitoringMode(OpcMonitoringMode) Changes the monitoring mode of all MonitoredItems.
ChangeMonitoringMode(OpcMonitoringMode, IEnumerable) Changes the monitoring mode of one or more monitored items.
ChangeMonitoringMode(OpcMonitoringMode, OpcMonitoredItem) Changes the monitoring mode of one or more monitored items.
GetMonitoredItem(OpcDataChangeDataSetItem) Retrieves the OpcMonitoredItem the dataChange specified belongs to.
OnChanged(OpcSubscriptionChangedEventArgs) Raises the Changed event of the OpcSubscription.
OnDataChangeReceived(OpcDataChangeReceivedEventArgs) Raises the DataChangeReceived event of the OpcSubscription.
OnEventReceived(OpcEventReceivedEventArgs) Raises the EventReceived event of the OpcSubscription.
OnIsPublishingChanged(EventArgs) Raises the IsPublishingChanged event of the OpcSubscription.
OnNotificationReceived(OpcNotificationReceivedEventArgs) Raises the NotificationReceived event of the OpcSubscription.
RefreshConditions Forces the server to refresh all current conditions to synchronize the client with the server.
RemoveMonitoredItem(IEnumerable) Removes the monitored items specified by items from the MonitoredItems of this OpcSubscription.
RemoveMonitoredItem(OpcMonitoredItem) Removes the monitored item specified by item from the MonitoredItems of this OpcSubscription.
RemoveMonitoredItem(OpcMonitoredItem) Removes the monitored items specified by items from the MonitoredItems of this OpcSubscription.
StartPublishing Enables notifications being send from the server to the client for this OpcSubscription.
StopPublishing Disables notifications being send from the server to the client for this OpcSubscription.
ToString Returns a string that represents the current OpcSubscription.
Unsubscribe Deletes this OpcSubscription and all its MonitoredItems.