.NET Based OPC UA Client/Server SDK  3.3.3.537
UnifiedAutomation.UaServer.Subscription Class Reference

Manages a subscription created by a client. More...

Inherits IDisposable.

Public Member Functions

 Subscription (ServerManager server, Session session, SubscriptionLimits limits, uint subscriptionId, double publishingInterval, uint maxLifetimeCount, uint maxKeepAliveCount, uint maxNotificationsPerPublish, byte priority, bool publishingEnabled)
 Initializes the object. More...
 
void Dispose ()
 Frees any unmanaged resources. More...
 
void Delete (RequestContext context)
 Deletes the subscription. More...
 
PublishingState PublishTimerExpired ()
 Checks if the subscription is ready to publish. More...
 
void SessionClosed ()
 Tells the subscription that the owning session is being closed. More...
 
void ResendData (RequestContext context)
 Resends the cached values for all monitored items. More...
 
TransferResult Transfer (RequestContext context, bool sendInitialValues)
 Transfers a subscription to a new session. More...
 
StatusCode Acknowledge (RequestContext context, uint sequenceNumber)
 Removes a message from the message queue. More...
 
NotificationMessage Publish (RequestContext context, out UInt32Collection availableSequenceNumbers, out bool moreNotifications)
 Returns all available notifications. More...
 
void PublishTimeout ()
 Indicates that the subscription has expired. More...
 
NotificationMessage NewStatusMessage (StatusCode status)
 Publishes a timeout status message. More...
 
NotificationMessage Republish (RequestContext context, uint retransmitSequenceNumber)
 Returns a cached notification message. More...
 
void Modify (RequestContext context, double publishingInterval, uint maxLifetimeCount, uint maxKeepAliveCount, uint maxNotificationsPerPublish, byte priority)
 Updates the publishing parameters for the subscription. More...
 
void SetPublishingMode (RequestContext context, bool publishingEnabled)
 Enables/disables publishing for the subscription. More...
 
void SetTriggering (RequestContext context, uint triggeringItemId, UInt32Collection linksToAdd, UInt32Collection linksToRemove, out StatusCodeCollection addResults, out StatusCodeCollection removeResults)
 Updates the triggers for the monitored item. More...
 
void OnReadyToPublish (object userData)
 Called when [ready to publish]. More...
 
MonitoredItemHandle GetMonitoredItem (uint monitoredItemId)
 Gets the monitored item. More...
 
StatusCode CreateDataMonitoredItem (RequestContext context, TimestampsToReturn timestampsToReturn, NodeAttributeOperationHandle nodeHandle, uint monitoredItemId, MonitoredItemCreateRequest settings)
 Creates the data monitored item. More...
 
MonitoredItemCreateResult CreateDataMonitoredItemComplete (RequestContext context, MonitoredItemHandle itemHandle, DataMonitoringResult result)
 Creates the data monitored item complete. More...
 
StatusCode ModifyDataMonitoredItem (RequestContext context, TimestampsToReturn timestampsToReturn, MonitoredItemOperationHandle itemHandle, MonitoredItemModifyRequest settings)
 Modifies the data monitored item. More...
 
MonitoredItemModifyResult ModifyDataMonitoredItemComplete (RequestContext context, MonitoredItemOperationHandle itemHandle, TimestampsToReturn timestampsToReturn, DataMonitoringResult result)
 Modifies the data monitored item complete. More...
 
StatusCode SetMonitoringMode (RequestContext context, MonitoredItemOperationHandle itemHandle, MonitoringMode monitoringMode)
 Sets the monitoring mode. More...
 
StatusCode SetMonitoringModeComplete (RequestContext context, MonitoredItemOperationHandle itemHandle, StatusCode result)
 Modifies the data monitored item complete. More...
 
StatusCode DeleteMonitoredItem (RequestContext context, MonitoredItemOperationHandle itemHandle)
 Deletes the monitored item. More...
 
StatusCode DeleteMonitoredItemComplete (RequestContext context, MonitoredItemOperationHandle itemHandle, StatusCode result)
 Deletes the monitored item complete. More...
 
StatusCode CreateEventMonitoredItem (RequestContext context, NotifierOperationHandle notifierHandle, uint monitoredItemId, MonitoredItemCreateRequest settings)
 Creates the event monitored item. More...
 
MonitoredItemCreateResult CreateEventMonitoredItemComplete (RequestContext context, MonitoredItemHandle itemHandle, EventMonitoringResult result)
 Creates the event monitored item complete. More...
 
StatusCode ModifyEventMonitoredItem (RequestContext context, MonitoredItemOperationHandle itemHandle, MonitoredItemModifyRequest settings)
 Creates the event monitored item. More...
 
MonitoredItemModifyResult ModifyEventMonitoredItemComplete (RequestContext context, MonitoredItemOperationHandle itemHandle, EventMonitoringResult result)
 Creates the event monitored item complete. More...
 
void ValidateConditionRefresh (RequestContext context)
 Verifies that a condition refresh operation is permitted. More...
 
void ValidateConditionRefresh2 (RequestContext context, uint monitoredItemId)
 Verifies that a condition refresh 2 operation is permitted. More...
 
void ConditionRefresh (RequestContext context)
 Refreshes the conditions. More...
 
void ConditionRefresh2 (RequestContext context, uint monitoredItemId)
 Refreshes the conditions. More...
 
void GetMonitoredItems (out uint[] serverHandles, out uint[] clientHandles)
 Gets the monitored items for the subscription. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 An overrideable version of the Dispose. More...
 

Properties

Session Session [get]
 The session that owns the monitored item. More...
 
uint Id [get]
 The unique identifier assigned to the subscription. More...
 
NodeId SessionId [get]
 The identifier for the session that owns the subscription. More...
 
object DiagnosticsLock [get]
 Gets the lock that must be acquired before accessing the contents of the Diagnostics property. More...
 
SubscriptionDiagnosticsModel Diagnostics [get]
 Gets the current diagnostics for the subscription. More...
 
double PublishingInterval [get]
 The publishing rate for the subscription. More...
 
int MonitoredItemCount [get]
 The number of monitored items. More...
 
byte Priority [get]
 The priority assigned to the subscription. More...
 

Detailed Description

Manages a subscription created by a client.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.Subscription.Subscription ( ServerManager  server,
Session  session,
SubscriptionLimits  limits,
uint  subscriptionId,
double  publishingInterval,
uint  maxLifetimeCount,
uint  maxKeepAliveCount,
uint  maxNotificationsPerPublish,
byte  priority,
bool  publishingEnabled 
)

Initializes the object.

Member Function Documentation

StatusCode UnifiedAutomation.UaServer.Subscription.Acknowledge ( RequestContext  context,
uint  sequenceNumber 
)

Removes a message from the message queue.

void UnifiedAutomation.UaServer.Subscription.ConditionRefresh ( RequestContext  context)

Refreshes the conditions.

void UnifiedAutomation.UaServer.Subscription.ConditionRefresh2 ( RequestContext  context,
uint  monitoredItemId 
)

Refreshes the conditions.

StatusCode UnifiedAutomation.UaServer.Subscription.CreateDataMonitoredItem ( RequestContext  context,
TimestampsToReturn  timestampsToReturn,
NodeAttributeOperationHandle  nodeHandle,
uint  monitoredItemId,
MonitoredItemCreateRequest  settings 
)

Creates the data monitored item.

Parameters
contextThe request context.
timestampsToReturnThe timestamps to return.
nodeHandleThe node handle.
monitoredItemIdThe monitored item id.
settingsThe settings.
Returns
MonitoredItemCreateResult UnifiedAutomation.UaServer.Subscription.CreateDataMonitoredItemComplete ( RequestContext  context,
MonitoredItemHandle  itemHandle,
DataMonitoringResult  result 
)

Creates the data monitored item complete.

Parameters
contextThe request context.
itemHandleThe item handle.
resultThe result.
Returns
StatusCode UnifiedAutomation.UaServer.Subscription.CreateEventMonitoredItem ( RequestContext  context,
NotifierOperationHandle  notifierHandle,
uint  monitoredItemId,
MonitoredItemCreateRequest  settings 
)

Creates the event monitored item.

Parameters
contextThe request context.
notifierHandleThe notifier handle.
monitoredItemIdThe monitored item id.
settingsThe settings.
Returns
MonitoredItemCreateResult UnifiedAutomation.UaServer.Subscription.CreateEventMonitoredItemComplete ( RequestContext  context,
MonitoredItemHandle  itemHandle,
EventMonitoringResult  result 
)

Creates the event monitored item complete.

Parameters
contextThe request context.
itemHandleThe item handle.
resultThe result.
Returns
void UnifiedAutomation.UaServer.Subscription.Delete ( RequestContext  context)

Deletes the subscription.

StatusCode UnifiedAutomation.UaServer.Subscription.DeleteMonitoredItem ( RequestContext  context,
MonitoredItemOperationHandle  itemHandle 
)

Deletes the monitored item.

Parameters
contextThe request context.
itemHandleThe item handle.
Returns
StatusCode UnifiedAutomation.UaServer.Subscription.DeleteMonitoredItemComplete ( RequestContext  context,
MonitoredItemOperationHandle  itemHandle,
StatusCode  result 
)

Deletes the monitored item complete.

Parameters
contextThe request context.
itemHandleThe item handle.
resultThe result.
Returns
void UnifiedAutomation.UaServer.Subscription.Dispose ( )

Frees any unmanaged resources.

virtual void UnifiedAutomation.UaServer.Subscription.Dispose ( bool  disposing)
protectedvirtual

An overrideable version of the Dispose.

MonitoredItemHandle UnifiedAutomation.UaServer.Subscription.GetMonitoredItem ( uint  monitoredItemId)

Gets the monitored item.

Parameters
monitoredItemIdThe monitored item id.
Returns
void UnifiedAutomation.UaServer.Subscription.GetMonitoredItems ( out uint[]  serverHandles,
out uint[]  clientHandles 
)

Gets the monitored items for the subscription.

void UnifiedAutomation.UaServer.Subscription.Modify ( RequestContext  context,
double  publishingInterval,
uint  maxLifetimeCount,
uint  maxKeepAliveCount,
uint  maxNotificationsPerPublish,
byte  priority 
)

Updates the publishing parameters for the subscription.

StatusCode UnifiedAutomation.UaServer.Subscription.ModifyDataMonitoredItem ( RequestContext  context,
TimestampsToReturn  timestampsToReturn,
MonitoredItemOperationHandle  itemHandle,
MonitoredItemModifyRequest  settings 
)

Modifies the data monitored item.

Parameters
contextThe request context.
timestampsToReturnThe timestamps to return.
itemHandleThe item handle.
settingsThe settings.
Returns
MonitoredItemModifyResult UnifiedAutomation.UaServer.Subscription.ModifyDataMonitoredItemComplete ( RequestContext  context,
MonitoredItemOperationHandle  itemHandle,
TimestampsToReturn  timestampsToReturn,
DataMonitoringResult  result 
)

Modifies the data monitored item complete.

Parameters
contextThe request context.
itemHandleThe item handle.
timestampsToReturnThe timestamps to return.
resultThe result.
Returns
StatusCode UnifiedAutomation.UaServer.Subscription.ModifyEventMonitoredItem ( RequestContext  context,
MonitoredItemOperationHandle  itemHandle,
MonitoredItemModifyRequest  settings 
)

Creates the event monitored item.

Parameters
contextThe request context.
itemHandleThe item handle.
settingsThe settings.
Returns
MonitoredItemModifyResult UnifiedAutomation.UaServer.Subscription.ModifyEventMonitoredItemComplete ( RequestContext  context,
MonitoredItemOperationHandle  itemHandle,
EventMonitoringResult  result 
)

Creates the event monitored item complete.

Parameters
contextThe request context.
itemHandleThe item handle.
resultThe result.
Returns
NotificationMessage UnifiedAutomation.UaServer.Subscription.NewStatusMessage ( StatusCode  status)

Publishes a timeout status message.

void UnifiedAutomation.UaServer.Subscription.OnReadyToPublish ( object  userData)

Called when [ready to publish].

Parameters
userDataThe user data.
NotificationMessage UnifiedAutomation.UaServer.Subscription.Publish ( RequestContext  context,
out UInt32Collection  availableSequenceNumbers,
out bool  moreNotifications 
)

Returns all available notifications.

void UnifiedAutomation.UaServer.Subscription.PublishTimeout ( )

Indicates that the subscription has expired.

PublishingState UnifiedAutomation.UaServer.Subscription.PublishTimerExpired ( )

Checks if the subscription is ready to publish.

NotificationMessage UnifiedAutomation.UaServer.Subscription.Republish ( RequestContext  context,
uint  retransmitSequenceNumber 
)

Returns a cached notification message.

void UnifiedAutomation.UaServer.Subscription.ResendData ( RequestContext  context)

Resends the cached values for all monitored items.

Parameters
contextThe request context.
void UnifiedAutomation.UaServer.Subscription.SessionClosed ( )

Tells the subscription that the owning session is being closed.

StatusCode UnifiedAutomation.UaServer.Subscription.SetMonitoringMode ( RequestContext  context,
MonitoredItemOperationHandle  itemHandle,
MonitoringMode  monitoringMode 
)

Sets the monitoring mode.

Parameters
contextThe request context.
itemHandleThe item handle.
monitoringModeThe monitoring mode.
Returns
StatusCode UnifiedAutomation.UaServer.Subscription.SetMonitoringModeComplete ( RequestContext  context,
MonitoredItemOperationHandle  itemHandle,
StatusCode  result 
)

Modifies the data monitored item complete.

Parameters
contextThe request context.
itemHandleThe item handle.
resultThe result.
Returns
void UnifiedAutomation.UaServer.Subscription.SetPublishingMode ( RequestContext  context,
bool  publishingEnabled 
)

Enables/disables publishing for the subscription.

void UnifiedAutomation.UaServer.Subscription.SetTriggering ( RequestContext  context,
uint  triggeringItemId,
UInt32Collection  linksToAdd,
UInt32Collection  linksToRemove,
out StatusCodeCollection  addResults,
out StatusCodeCollection  removeResults 
)

Updates the triggers for the monitored item.

TransferResult UnifiedAutomation.UaServer.Subscription.Transfer ( RequestContext  context,
bool  sendInitialValues 
)

Transfers a subscription to a new session.

Parameters
contextThe request context.
sendInitialValuesWhether to resend the cached values for all monitored items.
Returns
The result of the operation.
void UnifiedAutomation.UaServer.Subscription.ValidateConditionRefresh ( RequestContext  context)

Verifies that a condition refresh operation is permitted.

void UnifiedAutomation.UaServer.Subscription.ValidateConditionRefresh2 ( RequestContext  context,
uint  monitoredItemId 
)

Verifies that a condition refresh 2 operation is permitted.

Property Documentation

SubscriptionDiagnosticsModel UnifiedAutomation.UaServer.Subscription.Diagnostics
get

Gets the current diagnostics for the subscription.

object UnifiedAutomation.UaServer.Subscription.DiagnosticsLock
get

Gets the lock that must be acquired before accessing the contents of the Diagnostics property.

uint UnifiedAutomation.UaServer.Subscription.Id
get

The unique identifier assigned to the subscription.

int UnifiedAutomation.UaServer.Subscription.MonitoredItemCount
get

The number of monitored items.

byte UnifiedAutomation.UaServer.Subscription.Priority
get

The priority assigned to the subscription.

double UnifiedAutomation.UaServer.Subscription.PublishingInterval
get

The publishing rate for the subscription.

Session UnifiedAutomation.UaServer.Subscription.Session
get

The session that owns the monitored item.

NodeId UnifiedAutomation.UaServer.Subscription.SessionId
get

The identifier for the session that owns the subscription.


The documentation for this class was generated from the following file: