C# Класс Opc.Ua.Server.Subscription

Manages a subscription created by a client.
Наследование: ISubscription, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

An overrideable version of the Dispose.

Приватные методы

Метод Описание
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.

Описание методов

Acknowledge() публичный Метод

Removes a message from the message queue.
public Acknowledge ( OperationContext context, uint sequenceNumber ) : ServiceResult
context OperationContext
sequenceNumber uint
Результат ServiceResult

ConditionRefresh() публичный Метод

Refreshes the conditions.
public ConditionRefresh ( ) : void
Результат void

CreateMonitoredItems() публичный Метод

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
Результат void

Delete() публичный Метод

Deletes the subscription.
public Delete ( OperationContext context ) : void
context OperationContext
Результат void

DeleteMonitoredItems() публичный Метод

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
Результат void

Dispose() публичный Метод

Frees any unmanaged resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

An overrideable version of the Dispose.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GetMonitoredItems() публичный Метод

Gets the monitored items for the subscription.
public GetMonitoredItems ( uint &serverHandles, uint &clientHandles ) : void
serverHandles uint
clientHandles uint
Результат void

ItemNotificationsAvailable() публичный Метод

Tells the subscription that notifications are available but the item is not ready to publish.
public ItemNotificationsAvailable ( IMonitoredItem monitoredItem ) : void
monitoredItem IMonitoredItem
Результат void

ItemReadyToPublish() публичный Метод

Queues an item that is ready to publish.
public ItemReadyToPublish ( IMonitoredItem monitoredItem ) : void
monitoredItem IMonitoredItem
Результат void

Modify() публичный Метод

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
Результат void

ModifyMonitoredItems() публичный Метод

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
Результат void

Publish() публичный Метод

Returns all available notifications.
public Publish ( OperationContext context, UInt32Collection &availableSequenceNumbers, bool &moreNotifications ) : NotificationMessage
context OperationContext
availableSequenceNumbers UInt32Collection
moreNotifications bool
Результат NotificationMessage

PublishTimeout() публичный Метод

Publishes a timeout status message.
public PublishTimeout ( ) : NotificationMessage
Результат NotificationMessage

PublishTimerExpired() публичный Метод

Checks if the subscription is ready to publish.
public PublishTimerExpired ( ) : PublishingState
Результат PublishingState

Republish() публичный Метод

Returns a cached notification message.
public Republish ( OperationContext context, uint retransmitSequenceNumber ) : NotificationMessage
context OperationContext
retransmitSequenceNumber uint
Результат NotificationMessage

SessionClosed() публичный Метод

Tells the subscription that the owning session is being closed.
public SessionClosed ( ) : void
Результат void

SetMonitoringMode() публичный Метод

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
Результат void

SetPublishingMode() публичный Метод

Enables/disables publishing for the subscription.
public SetPublishingMode ( OperationContext context, bool publishingEnabled ) : void
context OperationContext
publishingEnabled bool
Результат void

SetTriggering() публичный Метод

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
Результат void

Subscription() публичный Метод

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
Результат System

ValidateConditionRefresh() публичный Метод

Verifies that a condition refresh operation is permitted.
public ValidateConditionRefresh ( OperationContext context ) : void
context OperationContext
Результат void