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

A generic session manager object for a server. More...

Inherits IDisposable, and UnifiedAutomation.UaServer.ISubscriptionManager.

Public Member Functions

 SubscriptionManager (ServerManager server, SubscriptionLimits limits)
 Initializes the manager with its configuration. More...
 
 SubscriptionManager (ServerManager server)
 Initializes the manager with its configuration. More...
 
void Dispose ()
 Frees any unmanaged resources. More...
 
IList< SubscriptionGetSubscriptions (NodeId sessionId)
 Returns all of the subscriptions known to the subscription manager. More...
 
virtual void Startup ()
 Starts up the manager makes it ready to create subscriptions. More...
 
virtual void Shutdown ()
 Closes all subscriptions and rejects any new requests. More...
 
void SessionOpened (Session session)
 Called when a new session is created. More...
 
void SessionActivated (Session session, bool identityChanged)
 Called when a session is activated. More...
 
void SessionClosed (Session session, bool deleteSubscriptions)
 Called when a new session is closed. More...
 
void ConditionRefresh (RequestContext context, uint subscriptionId)
 Refreshes the conditions for the specified subscription. More...
 
void ConditionRefresh2 (RequestContext context, uint subscriptionId, uint monitoredItemId)
 Refreshes the conditions for the specified subscription. More...
 
void ResendData (RequestContext context, uint subscriptionId)
 Requests that all cached values for a subscription be resent. More...
 
StatusCode DeleteSubscription (RequestContext context, uint subscriptionId)
 Deletes the specified subscription. More...
 
virtual void CreateSubscription (RequestContext context, double requestedPublishingInterval, uint requestedLifetimeCount, uint requestedMaxKeepAliveCount, uint maxNotificationsPerPublish, bool publishingEnabled, byte priority, out uint subscriptionId, out double revisedPublishingInterval, out uint revisedLifetimeCount, out uint revisedMaxKeepAliveCount)
 Creates a new subscription. More...
 
void DeleteSubscriptions (RequestContext context, List< uint > subscriptionIds, out StatusCodeCollection results)
 Deletes group of subscriptions. More...
 
PublishResponse Publish (RequestContext context, SubscriptionAcknowledgementCollection subscriptionAcknowledgements, IEndpointIncomingRequest reqeuest)
 Publishes a subscription. More...
 
PublishResponse CompletePublish (RequestContext context, IEndpointIncomingRequest incoming, StatusCode error, object callbackData)
 Completes the publish. More...
 
void ModifySubscription (RequestContext context, uint subscriptionId, double requestedPublishingInterval, uint requestedLifetimeCount, uint requestedMaxKeepAliveCount, uint maxNotificationsPerPublish, byte priority, out double revisedPublishingInterval, out uint revisedLifetimeCount, out uint revisedMaxKeepAliveCount)
 Modifies an existing subscription. More...
 
void SetPublishingMode (RequestContext context, bool publishingEnabled, List< uint > subscriptionIds, out StatusCodeCollection results)
 Sets the publishing mode for a set of subscriptions. More...
 
void TransferSubscriptions (RequestContext context, List< uint > subscriptionIds, bool sendInitialValues, out TransferResultCollection results)
 Attaches a groups a subscriptions to a different session. More...
 
NotificationMessage Republish (RequestContext context, uint subscriptionId, uint retransmitSequenceNumber)
 Republishes a previously published notification message. More...
 
void SetTriggering (RequestContext context, uint subscriptionId, uint triggeringItemId, UInt32Collection linksToAdd, UInt32Collection linksToRemove, out StatusCodeCollection addResults, out StatusCodeCollection removeResults)
 Updates the triggers for the monitored item. More...
 
Subscription GetSubscription (RequestContext context, uint subscriptionId, bool usedForServiceCall=true)
 Gets the subscription. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 An overrideable version of the Dispose. More...
 
virtual void RaiseSubscriptionEvent (Subscription subscription, bool deleted)
 Raises an event related to a subscription. More...
 
virtual double CalculatePublishingInterval (double publishingInterval)
 Calculates the publishing interval. More...
 
virtual uint CalculateKeepAliveCount (double publishingInterval, uint keepAliveCount)
 Calculates the keep alive count. More...
 
virtual uint CalculateLifetimeCount (double publishingInterval, uint keepAliveCount, uint lifetimeCount)
 Calculates the lifetime count. More...
 
virtual uint CalculateMaxNotificationsPerPublish (uint maxNotificationsPerPublish)
 Calculates the maximum number of notifications per publish. More...
 
virtual Subscription CreateSubscription (RequestContext context, uint subscriptionId, double publishingInterval, uint lifetimeCount, uint keepAliveCount, uint maxNotificationsPerPublish, byte priority, bool publishingEnabled)
 Creates a new instance of a subscription. More...
 

Properties

SubscriptionEventHandler SubscriptionCreated
 Raised after a new subscription is created. More...
 
SubscriptionEventHandler SubscriptionDeleted
 Raised before a subscription is deleted. More...
 

Additional Inherited Members

- Events inherited from UnifiedAutomation.UaServer.ISubscriptionManager
SubscriptionEventHandler SubscriptionCreated
 Raised after a new subscription is created. More...
 
SubscriptionEventHandler SubscriptionDeleted
 Raised before a subscription is deleted. More...
 

Detailed Description

A generic session manager object for a server.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.SubscriptionManager.SubscriptionManager ( ServerManager  server,
SubscriptionLimits  limits 
)

Initializes the manager with its configuration.

UnifiedAutomation.UaServer.SubscriptionManager.SubscriptionManager ( ServerManager  server)

Initializes the manager with its configuration.

Member Function Documentation

virtual uint UnifiedAutomation.UaServer.SubscriptionManager.CalculateKeepAliveCount ( double  publishingInterval,
uint  keepAliveCount 
)
protectedvirtual

Calculates the keep alive count.

virtual uint UnifiedAutomation.UaServer.SubscriptionManager.CalculateLifetimeCount ( double  publishingInterval,
uint  keepAliveCount,
uint  lifetimeCount 
)
protectedvirtual

Calculates the lifetime count.

virtual uint UnifiedAutomation.UaServer.SubscriptionManager.CalculateMaxNotificationsPerPublish ( uint  maxNotificationsPerPublish)
protectedvirtual

Calculates the maximum number of notifications per publish.

virtual double UnifiedAutomation.UaServer.SubscriptionManager.CalculatePublishingInterval ( double  publishingInterval)
protectedvirtual

Calculates the publishing interval.

PublishResponse UnifiedAutomation.UaServer.SubscriptionManager.CompletePublish ( RequestContext  context,
IEndpointIncomingRequest  incoming,
StatusCode  error,
object  callbackData 
)

Completes the publish.

Parameters
contextThe request context.
incomingThe incoming.
errorThe error.
callbackDataThe callback data.
Returns
True if successful. False if the request has been requeued.
void UnifiedAutomation.UaServer.SubscriptionManager.ConditionRefresh ( RequestContext  context,
uint  subscriptionId 
)

Refreshes the conditions for the specified subscription.

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

Refreshes the conditions for the specified subscription.

virtual void UnifiedAutomation.UaServer.SubscriptionManager.CreateSubscription ( RequestContext  context,
double  requestedPublishingInterval,
uint  requestedLifetimeCount,
uint  requestedMaxKeepAliveCount,
uint  maxNotificationsPerPublish,
bool  publishingEnabled,
byte  priority,
out uint  subscriptionId,
out double  revisedPublishingInterval,
out uint  revisedLifetimeCount,
out uint  revisedMaxKeepAliveCount 
)
virtual

Creates a new subscription.

virtual Subscription UnifiedAutomation.UaServer.SubscriptionManager.CreateSubscription ( RequestContext  context,
uint  subscriptionId,
double  publishingInterval,
uint  lifetimeCount,
uint  keepAliveCount,
uint  maxNotificationsPerPublish,
byte  priority,
bool  publishingEnabled 
)
protectedvirtual

Creates a new instance of a subscription.

StatusCode UnifiedAutomation.UaServer.SubscriptionManager.DeleteSubscription ( RequestContext  context,
uint  subscriptionId 
)

Deletes the specified subscription.

void UnifiedAutomation.UaServer.SubscriptionManager.DeleteSubscriptions ( RequestContext  context,
List< uint >  subscriptionIds,
out StatusCodeCollection  results 
)

Deletes group of subscriptions.

void UnifiedAutomation.UaServer.SubscriptionManager.Dispose ( )

Frees any unmanaged resources.

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

An overrideable version of the Dispose.

Subscription UnifiedAutomation.UaServer.SubscriptionManager.GetSubscription ( RequestContext  context,
uint  subscriptionId,
bool  usedForServiceCall = true 
)

Gets the subscription.

Parameters
contextThe request context.
subscriptionIdThe subscription id.
usedForServiceCallIf the subscriptionId is not belonging to the Session passed by the context, the StatusCode set in the StatusException is BadSessionIdInvalid for modifying an existing Subscription and BadUserAccessDenied if the method GetMonitoredItems is called.
Returns
IList<Subscription> UnifiedAutomation.UaServer.SubscriptionManager.GetSubscriptions ( NodeId  sessionId)

Returns all of the subscriptions known to the subscription manager.

Returns
A list of the subscriptions.
void UnifiedAutomation.UaServer.SubscriptionManager.ModifySubscription ( RequestContext  context,
uint  subscriptionId,
double  requestedPublishingInterval,
uint  requestedLifetimeCount,
uint  requestedMaxKeepAliveCount,
uint  maxNotificationsPerPublish,
byte  priority,
out double  revisedPublishingInterval,
out uint  revisedLifetimeCount,
out uint  revisedMaxKeepAliveCount 
)

Modifies an existing subscription.

PublishResponse UnifiedAutomation.UaServer.SubscriptionManager.Publish ( RequestContext  context,
SubscriptionAcknowledgementCollection  subscriptionAcknowledgements,
IEndpointIncomingRequest  reqeuest 
)

Publishes a subscription.

virtual void UnifiedAutomation.UaServer.SubscriptionManager.RaiseSubscriptionEvent ( Subscription  subscription,
bool  deleted 
)
protectedvirtual

Raises an event related to a subscription.

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

Republishes a previously published notification message.

void UnifiedAutomation.UaServer.SubscriptionManager.ResendData ( RequestContext  context,
uint  subscriptionId 
)

Requests that all cached values for a subscription be resent.

Parameters
contextThe request context.
subscriptionIdThe id for the subscription to resend.
void UnifiedAutomation.UaServer.SubscriptionManager.SessionActivated ( Session  session,
bool  identityChanged 
)

Called when a session is activated.

Parameters
sessionThe session.
identityChangedif set to true [identity changed].
void UnifiedAutomation.UaServer.SubscriptionManager.SessionClosed ( Session  session,
bool  deleteSubscriptions 
)

Called when a new session is closed.

Parameters
sessionThe session.
deleteSubscriptionsif set to true [delete subscriptions].
void UnifiedAutomation.UaServer.SubscriptionManager.SessionOpened ( Session  session)

Called when a new session is created.

Parameters
sessionThe session.
void UnifiedAutomation.UaServer.SubscriptionManager.SetPublishingMode ( RequestContext  context,
bool  publishingEnabled,
List< uint >  subscriptionIds,
out StatusCodeCollection  results 
)

Sets the publishing mode for a set of subscriptions.

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

Updates the triggers for the monitored item.

virtual void UnifiedAutomation.UaServer.SubscriptionManager.Shutdown ( )
virtual

Closes all subscriptions and rejects any new requests.

virtual void UnifiedAutomation.UaServer.SubscriptionManager.Startup ( )
virtual

Starts up the manager makes it ready to create subscriptions.

void UnifiedAutomation.UaServer.SubscriptionManager.TransferSubscriptions ( RequestContext  context,
List< uint >  subscriptionIds,
bool  sendInitialValues,
out TransferResultCollection  results 
)

Attaches a groups a subscriptions to a different session.

Property Documentation

SubscriptionEventHandler UnifiedAutomation.UaServer.SubscriptionManager.SubscriptionCreated
addremove

Raised after a new subscription is created.

SubscriptionEventHandler UnifiedAutomation.UaServer.SubscriptionManager.SubscriptionDeleted
addremove

Raised before a subscription is deleted.


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