UaServerSubscriptionManager


Defines

#define NUM_SUBSCRIPTIONRATES   7
 Configure Subscription Rates here.

Functions

OpcUa_StatusCode OPCUA_DLLCALL UaServer_SubscriptionManager_TimerCallback (OpcUa_Void *a_pvCallbackData, OpcUa_Timer a_hTimer, OpcUa_UInt32 a_msecElapsed)
 A callback function for the timer.
OpcUa_StatusCode OPCUA_DLLCALL UaServer_SubscriptionManager_TimerStoppedCallback (OpcUa_Void *a_pvCallbackData, OpcUa_Timer a_hTimer, OpcUa_UInt32 a_msecElapsed)
 A callback function for the timer.
OpcUa_StatusCode UaServer_SubscriptionManager_InitSubscriptionTimer (OpcUa_Void)
 Initialising Subscription.
OpcUa_Void UaServer_SubscriptionManager_CleanupSubscriptionTimer (OpcUa_Void)
 Cleans up everything InitSubscriptionTimer has initialized.
OpcUa_StatusCode UaServer_SubscriptionManager_AddSubscriptionToSortedList (UaServer_Subscription *pSubscription)
 Locks the access to g_SubscriptionLists.
OpcUa_Void UaServer_SubscriptionManager_RemoveSubscriptionFromSortedList (UaServer_Subscription *pSubscription)
 Removes the subscription from the according sampling list You should lock the list before using this function with LockSubscriptionList.
OpcUa_StatusCode UaServer_SubscriptionManager_Create (UaServer_SubscriptionManager **a_ppSubscriptionManager, OpcUa_UInt32 a_uMinPublishRate)
 Create A New Subscription Manager.
OpcUa_StatusCode UaServer_SubscriptionManager_Delete (UaServer_SubscriptionManager **a_ppSubscriptionManager)
 Delete A Subscription Manager.
OpcUa_StatusCode UaServer_SubscriptionManager_AddSubscription (UaServer_SubscriptionManager *a_pSubscriptionManager, UaServer_Subscription *a_pSubscription)
 Add A Subscription To A Subscription Manager.
OpcUa_StatusCode UaServer_SubscriptionManager_DeleteSubscription (UaServer_SubscriptionManager *a_pSubscriptionManager, OpcUa_Int32 a_iSubscriptionId)
 Delete A Subscription From A Subscription Manager.
OpcUa_StatusCode UaServer_SubscriptionManager_FindSubscription (UaServer_SubscriptionManager *a_pSubscriptionManager, UaServer_Subscription **a_ppSubscription, OpcUa_Int32 a_iSubscriptionId)
 Find A Subscription From A Subscription Manager.
OpcUa_StatusCode UaServer_SubscriptionManager_DeleteAllSubscriptionsBySession (UaServer_Session *pSession)
 Delete all subscriptions, that belong to the given session.
OpcUa_StatusCode UaServer_SubscriptionManager_UnlinkAllSubscriptionsBySession (UaServer_Session *pSession)
 Remove handles to a given session handles from all subscriptions.

Variables

OpcUa_Int g_SubscriptionCounterMax [NUM_SUBSCRIPTIONRATES]
 Initial Counter Values.
OpcUa_Int g_SubscriptionCounters [NUM_SUBSCRIPTIONRATES]
 Current Counter Values.
OpcUa_Int g_MinSubscriptionRate
 Minimum Subscription Rate.
OpcUa_List g_SubscriptionList [NUM_SUBSCRIPTIONRATES]
 List of Subscriptions for each sampling rate.
OpcUa_Timer g_hSubscriptionTimer
 Subscription Timer working with minimum subscription rate.

Function Documentation

OpcUa_StatusCode UaServer_SubscriptionManager_AddSubscription ( UaServer_SubscriptionManager a_pSubscriptionManager,
UaServer_Subscription a_pSubscription 
)

Add A Subscription To A Subscription Manager.

Parameters:
a_pSubscriptionManager a pointer to the actual subscription manager.
a_pSubscription a pointer to the subscription.
Returns:
the OPC UA Status code.

OpcUa_StatusCode UaServer_SubscriptionManager_AddSubscriptionToSortedList ( UaServer_Subscription pSubscription  ) 

Locks the access to g_SubscriptionLists.

Unlocks the access to g_SubscriptionLists Adds subscription to sorted sampling list. This functions sorts the item into the according sampling lists. You should lock the list before using this function with LockSubscriptionList.

Parameters:
pSubscription the actual subscription.
Returns:
the OPC UA Status code.

OpcUa_Void UaServer_SubscriptionManager_CleanupSubscriptionTimer ( OpcUa_Void   ) 

Cleans up everything InitSubscriptionTimer has initialized.

What else?

OpcUa_StatusCode UaServer_SubscriptionManager_Create ( UaServer_SubscriptionManager **  a_ppSubscriptionManager,
OpcUa_UInt32  a_uMinPublishRate 
)

Create A New Subscription Manager.

Parameters:
a_ppSubscriptionManager a pointer to the actual subscription manager.
a_uMinPublishRate the minimum publish rate.
Returns:
the OPC UA Status code.

OpcUa_StatusCode UaServer_SubscriptionManager_Delete ( UaServer_SubscriptionManager **  a_ppSubscriptionManager  ) 

Delete A Subscription Manager.

Parameters:
a_ppSubscriptionManager a pointer to the actual subscription manager.
Returns:
the OPC UA Status code.

OpcUa_StatusCode UaServer_SubscriptionManager_DeleteAllSubscriptionsBySession ( UaServer_Session pSession  ) 

Delete all subscriptions, that belong to the given session.

Parameters:
pSession a pointer to the actual session.
Returns:
the OPC UA Status code.

OpcUa_StatusCode UaServer_SubscriptionManager_DeleteSubscription ( UaServer_SubscriptionManager a_pSubscriptionManager,
OpcUa_Int32  a_iSubscriptionId 
)

Delete A Subscription From A Subscription Manager.

Parameters:
a_pSubscriptionManager a pointer to the actual subscription manager.
a_iSubscriptionId the actual id of the subscription.
Returns:
the OPC UA Status code.

OpcUa_StatusCode UaServer_SubscriptionManager_FindSubscription ( UaServer_SubscriptionManager a_pSubscriptionManager,
UaServer_Subscription **  a_ppSubscription,
OpcUa_Int32  a_iSubscriptionId 
)

Find A Subscription From A Subscription Manager.

Parameters:
a_pSubscriptionManager a pointer to the actual subscription manager.
a_ppSubscription a pointer to the subscription structure.
a_iSubscriptionId the actual id of the subscription.
Returns:
the OPC UA Status code.

OpcUa_StatusCode UaServer_SubscriptionManager_InitSubscriptionTimer ( OpcUa_Void   ) 

Initialising Subscription.

This functions sets up configured sampling rates and system timer.

Returns:
OPC UA Status code.

OpcUa_Void UaServer_SubscriptionManager_RemoveSubscriptionFromSortedList ( UaServer_Subscription pSubscription  ) 

Removes the subscription from the according sampling list You should lock the list before using this function with LockSubscriptionList.

Parameters:
pSubscription the actual subscription.

OpcUa_StatusCode OPCUA_DLLCALL UaServer_SubscriptionManager_TimerCallback ( OpcUa_Void *  a_pvCallbackData,
OpcUa_Timer  a_hTimer,
OpcUa_UInt32  a_msecElapsed 
)

A callback function for the timer.

Parameters:
a_pvCallbackData the actual callback data.
a_hTimer the value of the timer.
a_msecElapsed the elapsed msec for this operation.
Returns:
the OPC UA Status code.

OpcUa_StatusCode OPCUA_DLLCALL UaServer_SubscriptionManager_TimerStoppedCallback ( OpcUa_Void *  a_pvCallbackData,
OpcUa_Timer  a_hTimer,
OpcUa_UInt32  a_msecElapsed 
)

A callback function for the timer.

Parameters:
a_pvCallbackData the actual callback data.
a_hTimer the value of the timer.
a_msecElapsed the elapsed msec for this operation.
Returns:
the OPC UA Status code.

OpcUa_StatusCode UaServer_SubscriptionManager_UnlinkAllSubscriptionsBySession ( UaServer_Session pSession  ) 

Remove handles to a given session handles from all subscriptions.

Parameters:
pSession a pointer to the actual session.
Returns:
the OPC UA Status code.