C# Class Opc.Ua.Server.Subscription

Manages a subscription created by a client.
Inheritance: ISubscription, IDisposable
Afficher le fichier Open project: OPCFoundation/UA-.NET Class Usage Examples

Méthodes publiques

Méthode Description
Acknowledge ( OperationContext context, uint sequenceNumber ) : ServiceResult

Removes a message from the message queue.

ConditionRefresh ( ) : void

Refreshes the conditions.

CreateMonitoredItems ( OperationContext context, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequestCollection itemsToCreate, MonitoredItemCreateResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Adds monitored items to a subscription.

Delete ( OperationContext context ) : void

Deletes the subscription.

DeleteMonitoredItems ( OperationContext context, UInt32Collection monitoredItemIds, StatusCodeCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Deletes the monitored items in a subscription.

Dispose ( ) : void

Frees any unmanaged resources.

GetMonitoredItems ( uint &serverHandles, uint &clientHandles ) : void

Gets the monitored items for the subscription.

ItemNotificationsAvailable ( IMonitoredItem monitoredItem ) : void

Tells the subscription that notifications are available but the item is not ready to publish.

ItemReadyToPublish ( IMonitoredItem monitoredItem ) : void

Queues an item that is ready to publish.

Modify ( OperationContext context, double publishingInterval, uint maxLifetimeCount, uint maxKeepAliveCount, uint maxNotificationsPerPublish, byte priority ) : void

Updates the publishing parameters for the subscription.

ModifyMonitoredItems ( OperationContext context, TimestampsToReturn timestampsToReturn, MonitoredItemModifyRequestCollection itemsToModify, MonitoredItemModifyResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Modifies monitored items in a subscription.

Publish ( OperationContext context, UInt32Collection &availableSequenceNumbers, bool &moreNotifications ) : NotificationMessage

Returns all available notifications.

PublishTimeout ( ) : NotificationMessage

Publishes a timeout status message.

PublishTimerExpired ( ) : PublishingState

Checks if the subscription is ready to publish.

Republish ( OperationContext context, uint retransmitSequenceNumber ) : NotificationMessage

Returns a cached notification message.

SessionClosed ( ) : void

Tells the subscription that the owning session is being closed.

SetMonitoringMode ( OperationContext context, MonitoringMode monitoringMode, UInt32Collection monitoredItemIds, StatusCodeCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Changes the monitoring mode for a set of items.

SetPublishingMode ( OperationContext context, bool publishingEnabled ) : void

Enables/disables publishing for the subscription.

SetTriggering ( OperationContext context, uint triggeringItemId, UInt32Collection linksToAdd, UInt32Collection linksToRemove, StatusCodeCollection &addResults, DiagnosticInfoCollection &addDiagnosticInfos, StatusCodeCollection &removeResults, DiagnosticInfoCollection &removeDiagnosticInfos ) : void

Updates the triggers for the monitored item.

Subscription ( IServerInternal server, Session session, uint subscriptionId, double publishingInterval, uint maxLifetimeCount, uint maxKeepAliveCount, uint maxNotificationsPerPublish, byte priority, bool publishingEnabled, uint maxMessageCount ) : System

Initializes the object.

ValidateConditionRefresh ( OperationContext context ) : void

Verifies that a condition refresh operation is permitted.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

Private Methods

Méthode Description
AddItemToSamplingInterval ( double samplingInterval, MonitoringMode monitoringMode ) : void

Adds an item to the sampling interval.

ConstructMessage ( Queue events, Queue datachanges, Queue datachangeDiagnostics, int &notificationCount ) : NotificationMessage

Construct a message from the queues.

DeleteMonitoredItems ( OperationContext context, UInt32Collection monitoredItemIds, bool doNotCheckSession, StatusCodeCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void

Deletes the monitored items in a subscription.

InnerPublish ( OperationContext context, UInt32Collection &availableSequenceNumbers, bool &moreNotifications ) : NotificationMessage

Returns all available notifications.

ModifyItemMonitoringMode ( double samplingInterval, MonitoringMode oldMode, MonitoringMode newMode ) : void

Changes the monitoring mode for an item.

ModifyItemSamplingInterval ( double oldInterval, double newInterval, MonitoringMode monitoringMode ) : void

Adds an item to the sampling interval.

OnUpdateDiagnostics ( ISystemContext context, NodeState node, object &value ) : ServiceResult

Returns a copy of the current diagnostics.

RemoveItemToSamplingInterval ( double samplingInterval, MonitoringMode monitoringMode ) : void

Removes an item from the sampling interval.

ResetKeepaliveCount ( ) : void

Resets the keepalive counter.

ResetLifetimeCount ( ) : void

Resets the lifetime count.

TraceState ( string context ) : void

Dumps the current state of the session queue.

VerifySession ( OperationContext context ) : void

Throws an exception if the session is not the owner.

Method Details

Acknowledge() public méthode

Removes a message from the message queue.
public Acknowledge ( OperationContext context, uint sequenceNumber ) : ServiceResult
context OperationContext
sequenceNumber uint
Résultat ServiceResult

ConditionRefresh() public méthode

Refreshes the conditions.
public ConditionRefresh ( ) : void
Résultat void

CreateMonitoredItems() public méthode

Adds monitored items to a subscription.
public CreateMonitoredItems ( OperationContext context, TimestampsToReturn timestampsToReturn, MonitoredItemCreateRequestCollection itemsToCreate, MonitoredItemCreateResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
timestampsToReturn TimestampsToReturn
itemsToCreate MonitoredItemCreateRequestCollection
results MonitoredItemCreateResultCollection
diagnosticInfos DiagnosticInfoCollection
Résultat void

Delete() public méthode

Deletes the subscription.
public Delete ( OperationContext context ) : void
context OperationContext
Résultat void

DeleteMonitoredItems() public méthode

Deletes the monitored items in a subscription.
public DeleteMonitoredItems ( OperationContext context, UInt32Collection monitoredItemIds, StatusCodeCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
monitoredItemIds UInt32Collection
results StatusCodeCollection
diagnosticInfos DiagnosticInfoCollection
Résultat void

Dispose() public méthode

Frees any unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetMonitoredItems() public méthode

Gets the monitored items for the subscription.
public GetMonitoredItems ( uint &serverHandles, uint &clientHandles ) : void
serverHandles uint
clientHandles uint
Résultat void

ItemNotificationsAvailable() public méthode

Tells the subscription that notifications are available but the item is not ready to publish.
public ItemNotificationsAvailable ( IMonitoredItem monitoredItem ) : void
monitoredItem IMonitoredItem
Résultat void

ItemReadyToPublish() public méthode

Queues an item that is ready to publish.
public ItemReadyToPublish ( IMonitoredItem monitoredItem ) : void
monitoredItem IMonitoredItem
Résultat void

Modify() public méthode

Updates the publishing parameters for the subscription.
public Modify ( OperationContext context, double publishingInterval, uint maxLifetimeCount, uint maxKeepAliveCount, uint maxNotificationsPerPublish, byte priority ) : void
context OperationContext
publishingInterval double
maxLifetimeCount uint
maxKeepAliveCount uint
maxNotificationsPerPublish uint
priority byte
Résultat void

ModifyMonitoredItems() public méthode

Modifies monitored items in a subscription.
public ModifyMonitoredItems ( OperationContext context, TimestampsToReturn timestampsToReturn, MonitoredItemModifyRequestCollection itemsToModify, MonitoredItemModifyResultCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
timestampsToReturn TimestampsToReturn
itemsToModify MonitoredItemModifyRequestCollection
results MonitoredItemModifyResultCollection
diagnosticInfos DiagnosticInfoCollection
Résultat void

Publish() public méthode

Returns all available notifications.
public Publish ( OperationContext context, UInt32Collection &availableSequenceNumbers, bool &moreNotifications ) : NotificationMessage
context OperationContext
availableSequenceNumbers UInt32Collection
moreNotifications bool
Résultat NotificationMessage

PublishTimeout() public méthode

Publishes a timeout status message.
public PublishTimeout ( ) : NotificationMessage
Résultat NotificationMessage

PublishTimerExpired() public méthode

Checks if the subscription is ready to publish.
public PublishTimerExpired ( ) : PublishingState
Résultat PublishingState

Republish() public méthode

Returns a cached notification message.
public Republish ( OperationContext context, uint retransmitSequenceNumber ) : NotificationMessage
context OperationContext
retransmitSequenceNumber uint
Résultat NotificationMessage

SessionClosed() public méthode

Tells the subscription that the owning session is being closed.
public SessionClosed ( ) : void
Résultat void

SetMonitoringMode() public méthode

Changes the monitoring mode for a set of items.
public SetMonitoringMode ( OperationContext context, MonitoringMode monitoringMode, UInt32Collection monitoredItemIds, StatusCodeCollection &results, DiagnosticInfoCollection &diagnosticInfos ) : void
context OperationContext
monitoringMode MonitoringMode
monitoredItemIds UInt32Collection
results StatusCodeCollection
diagnosticInfos DiagnosticInfoCollection
Résultat void

SetPublishingMode() public méthode

Enables/disables publishing for the subscription.
public SetPublishingMode ( OperationContext context, bool publishingEnabled ) : void
context OperationContext
publishingEnabled bool
Résultat void

SetTriggering() public méthode

Updates the triggers for the monitored item.
public SetTriggering ( OperationContext context, uint triggeringItemId, UInt32Collection linksToAdd, UInt32Collection linksToRemove, StatusCodeCollection &addResults, DiagnosticInfoCollection &addDiagnosticInfos, StatusCodeCollection &removeResults, DiagnosticInfoCollection &removeDiagnosticInfos ) : void
context OperationContext
triggeringItemId uint
linksToAdd UInt32Collection
linksToRemove UInt32Collection
addResults StatusCodeCollection
addDiagnosticInfos DiagnosticInfoCollection
removeResults StatusCodeCollection
removeDiagnosticInfos DiagnosticInfoCollection
Résultat void

Subscription() public méthode

Initializes the object.
public Subscription ( IServerInternal server, Session session, uint subscriptionId, double publishingInterval, uint maxLifetimeCount, uint maxKeepAliveCount, uint maxNotificationsPerPublish, byte priority, bool publishingEnabled, uint maxMessageCount ) : System
server IServerInternal
session Session
subscriptionId uint
publishingInterval double
maxLifetimeCount uint
maxKeepAliveCount uint
maxNotificationsPerPublish uint
priority byte
publishingEnabled bool
maxMessageCount uint
Résultat System

ValidateConditionRefresh() public méthode

Verifies that a condition refresh operation is permitted.
public ValidateConditionRefresh ( OperationContext context ) : void
context OperationContext
Résultat void