UaClientSdk::UaSubscription Class Reference
[UA Client Library]

#include <uasubscription.h>

List of all members.

Public Member Functions

UaStatus modifySubscription (ServiceSettings &serviceSettings, SubscriptionSettings &subscriptionSettings)
UaStatus setPublishingMode (ServiceSettings &serviceSettings, OpcUa_Boolean publishingEnabled)
UaStatus createMonitoredItems (ServiceSettings &serviceSettings, OpcUa_TimestampsToReturn timestampsToReturn, const UaMonitoredItemCreateRequests &monitoredItemCreateRequests, UaMonitoredItemCreateResults &monitoredItemCreateResults)
UaStatus modifyMonitoredItems (ServiceSettings &serviceSettings, OpcUa_TimestampsToReturn timestampsToReturn, const UaMonitoredItemModifyRequests &monitoredItemModifyRequests, UaMonitoredItemModifyResults &monitoredItemModifyResults)
UaStatus setMonitoringMode (ServiceSettings &serviceSettings, OpcUa_MonitoringMode monitoringMode, const UaUInt32Array &monitoredItemIds, UaStatusCodeArray &results)
UaStatus deleteMonitoredItems (ServiceSettings &serviceSettings, const UaUInt32Array &monitoredItemIds, UaStatusCodeArray &results)
UaStatus republish (ServiceSettings &serviceSettings, OpcUa_Int32 retransmitSequenceNumber, UaDataNotifications &dataNotifications, UaDiagnosticInfos &diagnosticInfos, UaEventFieldLists &eventFieldList, UaStatus &subscriptionStatus)
UaStatus beginCreateMonitoredItems (ServiceSettings &serviceSettings, OpcUa_TimestampsToReturn timestampsToReturn, const UaMonitoredItemCreateRequests &monitoredItemCreateRequests, OpcUa_UInt32 transactionId)
UaStatus beginModifyMonitoredItems (ServiceSettings &serviceSettings, OpcUa_TimestampsToReturn timestampsToReturn, const UaMonitoredItemModifyRequests &monitoredItemModifyRequests, OpcUa_UInt32 transactionId)
UaStatus beginSetMonitoringMode (ServiceSettings &serviceSettings, OpcUa_MonitoringMode monitoringMode, const UaUInt32Array &monitoredItemIds, OpcUa_UInt32 transactionId)
UaStatus beginDeleteMonitoredItems (ServiceSettings &serviceSettings, const UaUInt32Array &monitoredItemIds, OpcUa_UInt32 transactionId)
OpcUa_UInt32 subscriptionId ()
OpcUa_Double publishingInterval ()
OpcUa_UInt32 lifetimeCount ()
OpcUa_UInt32 maxKeepAliveCount ()
OpcUa_UInt32 maxNotificationsPerPublish ()
OpcUa_Byte priority ()
OpcUa_Boolean publishingEnabled ()

Friends

class UaSession

Detailed Description

The UaSubscription class manges a UA Client created subscription. The class provides all Subscription related UA Services as syncronous and asyncronous methods.


Member Function Documentation

UaStatus UaSubscription::beginCreateMonitoredItems ( ServiceSettings serviceSettings,
OpcUa_TimestampsToReturn  timestampsToReturn,
const UaMonitoredItemCreateRequests &  monitoredItemCreateRequests,
OpcUa_UInt32  transactionId 
)

Ayncronous call to create a list of monitored items in the subscriptions. The monitored items could be data monitored items or event monitored items.

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]timestampsToReturnOPC UA defines two timestamps, the source and the server timestamp. This parameter allows the client to define which timestamps the server should return with the value.
The source timestamp is only available for Value Attributes. The source timestamp is used to reflect the timestamp that was applied to a Variable value by the data source. It should indicate the last change of the value or status code. The source timestamp must be always generated by the same physical clock. This timestamp type was added for OPC UA to cover the use case to get the timestamp of the last value change which is different than the server timestamp definition.
The server timestamp is used to reflect the time that the server received a Variable value or knew it to be accurate if the changes are reported by exeption and the connection to the data source is operating. This is the behavior expected by Classic OPC
Possible values are:
OpcUa_TimestampsToReturn_Source
OpcUa_TimestampsToReturn_Server
OpcUa_TimestampsToReturn_Both
[in]monitoredItemCreateRequestsList of monitored items to create
[in]transactionIdTransaction ID for the asynchronous call used to assign the callback to the transaction
UaStatus UaSubscription::beginDeleteMonitoredItems ( ServiceSettings serviceSettings,
const UaUInt32Array &  monitoredItemIds,
OpcUa_UInt32  transactionId 
)

Ayncronous call to delete monitored items

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]monitoredItemIdsList of monitored items to delete
[in]transactionIdTransaction ID for the asynchronous call used to assign the callback to the transaction
UaStatus UaSubscription::beginModifyMonitoredItems ( ServiceSettings serviceSettings,
OpcUa_TimestampsToReturn  timestampsToReturn,
const UaMonitoredItemModifyRequests &  monitoredItemModifyRequests,
OpcUa_UInt32  transactionId 
)

Ayncronous call to modify monitored items

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]timestampsToReturnOPC UA defines two timestamps, the source and the server timestamp. This parameter allows the client to define which timestamps the server should return with the value.
The source timestamp is only available for Value Attributes. The source timestamp is used to reflect the timestamp that was applied to a Variable value by the data source. It should indicate the last change of the value or status code. The source timestamp must be always generated by the same physical clock. This timestamp type was added for OPC UA to cover the use case to get the timestamp of the last value change which is different than the server timestamp definition.
The server timestamp is used to reflect the time that the server received a Variable value or knew it to be accurate if the changes are reported by exeption and the connection to the data source is operating. This is the behavior expected by Classic OPC
Possible values are:
OpcUa_TimestampsToReturn_Source
OpcUa_TimestampsToReturn_Server
OpcUa_TimestampsToReturn_Both
[in]monitoredItemModifyRequestsList of monitored items to modify
[in]transactionIdTransaction ID for the asynchronous call used to assign the callback to the transaction
UaStatus UaSubscription::beginSetMonitoringMode ( ServiceSettings serviceSettings,
OpcUa_MonitoringMode  monitoringMode,
const UaUInt32Array &  monitoredItemIds,
OpcUa_UInt32  transactionId 
)

Ayncronous call to set monitoring mode for monitored items

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]monitoringModeNew monitoring mode. Options are OpcUa_MonitoringMode_Disabled, OpcUa_MonitoringMode_Sampling and OpcUa_MonitoringMode_Reporting
[in]monitoredItemIdsList of monitored items where the monitoring mode should be changed
[in]transactionIdTransaction ID for the asynchronous call used to assign the callback to the transaction
UaStatus UaSubscription::createMonitoredItems ( ServiceSettings serviceSettings,
OpcUa_TimestampsToReturn  timestampsToReturn,
const UaMonitoredItemCreateRequests &  monitoredItemCreateRequests,
UaMonitoredItemCreateResults &  monitoredItemCreateResults 
)

Creates a list of monitored items in the subscriptions. The monitored items could be data monitored items or event monitored items.

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]timestampsToReturnOPC UA defines two timestamps, the source and the server timestamp. This parameter allows the client to define which timestamps the server should return with the value.
The source timestamp is only available for Value Attributes. The source timestamp is used to reflect the timestamp that was applied to a Variable value by the data source. It should indicate the last change of the value or status code. The source timestamp must be always generated by the same physical clock. This timestamp type was added for OPC UA to cover the use case to get the timestamp of the last value change which is different than the server timestamp definition.
The server timestamp is used to reflect the time that the server received a Variable value or knew it to be accurate if the changes are reported by exeption and the connection to the data source is operating. This is the behavior expected by Classic OPC
Possible values are:
OpcUa_TimestampsToReturn_Source
OpcUa_TimestampsToReturn_Server
OpcUa_TimestampsToReturn_Both
[in]monitoredItemCreateRequestsList of monitored items to create
[out]monitoredItemCreateResultsList of create results
UaStatus UaSubscription::deleteMonitoredItems ( ServiceSettings serviceSettings,
const UaUInt32Array &  monitoredItemIds,
UaStatusCodeArray &  deleteResults 
)

Delete monitored items

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]monitoredItemIdsList of monitored items to delete
[out]deleteResultsList of delete results
OpcUa_UInt32 UaSubscription::lifetimeCount (  )

Returns the lifetime count of the subscription.

OpcUa_UInt32 UaSubscription::maxKeepAliveCount (  )

Returns the maximim keep alive count of the subscription

OpcUa_UInt32 UaSubscription::maxNotificationsPerPublish (  )

Returns the maximum number of notifications per publish for the subscription

UaStatus UaSubscription::modifyMonitoredItems ( ServiceSettings serviceSettings,
OpcUa_TimestampsToReturn  timestampsToReturn,
const UaMonitoredItemModifyRequests &  monitoredItemModifyRequests,
UaMonitoredItemModifyResults &  monitoredItemModifyResults 
)

Modify monitored items

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]timestampsToReturnOPC UA defines two timestamps, the source and the server timestamp. This parameter allows the client to define which timestamps the server should return with the value.
The source timestamp is only available for Value Attributes. The source timestamp is used to reflect the timestamp that was applied to a Variable value by the data source. It should indicate the last change of the value or status code. The source timestamp must be always generated by the same physical clock. This timestamp type was added for OPC UA to cover the use case to get the timestamp of the last value change which is different than the server timestamp definition.
The server timestamp is used to reflect the time that the server received a Variable value or knew it to be accurate if the changes are reported by exeption and the connection to the data source is operating. This is the behavior expected by Classic OPC
Possible values are:
OpcUa_TimestampsToReturn_Source
OpcUa_TimestampsToReturn_Server
OpcUa_TimestampsToReturn_Both
[in]monitoredItemModifyRequestsList of monitored items to modify
[out]monitoredItemModifyResultsList of modify results
UaStatus UaSubscription::modifySubscription ( ServiceSettings serviceSettings,
SubscriptionSettings subscriptionSettings 
)

Modify the subscription settings

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in,out]subscriptionSettingsThe new subscription settings. See SubscriptionSettings for more details
OpcUa_Byte UaSubscription::priority (  )

Returns the priority of the subscription

OpcUa_Boolean UaSubscription::publishingEnabled (  )

Returns the publish enabled flag of the subscription

OpcUa_Double UaSubscription::publishingInterval (  )

Returns the publishing interval of the subscription

UaStatus UaSubscription::republish ( ServiceSettings serviceSettings,
OpcUa_Int32  retransmitSequenceNumber,
UaDataNotifications &  dataNotifications,
UaDiagnosticInfos &  diagnosticInfos,
UaEventFieldLists &  eventFieldList,
UaStatus subscriptionStatus 
)

Republish call to get lost notifications

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]retransmitSequenceNumberThe sequence number which will be retransmited
[out]dataNotificationsList of data notifiations. The list can be empty if the message contains only event notifications.
[out]diagnosticInfosList of diagnostic info related to the data notifications. This list can be empty.
[out]eventFieldListList of event notifiations. The list can be empty if the message contains only data change notifications.
[out]subscriptionStatusContains the status of the subscription if it has changed.
UaStatus UaSubscription::setMonitoringMode ( ServiceSettings serviceSettings,
OpcUa_MonitoringMode  monitoringMode,
const UaUInt32Array &  monitoredItemIds,
UaStatusCodeArray &  setMonitoringResults 
)

Set monitoring mode for monitored items

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]monitoringModeNew monitoring mode. Options are OpcUa_MonitoringMode_Disabled, OpcUa_MonitoringMode_Sampling and OpcUa_MonitoringMode_Reporting
[in]monitoredItemIdsList of monitored items where the monitoring mode should be changed
[out]setMonitoringResultsList of change results
UaStatus UaSubscription::setPublishingMode ( ServiceSettings serviceSettings,
OpcUa_Boolean  publishingEnabled 
)

Set the publishing mode of the subscription

Parameters:
[in,out]serviceSettingsThe general service settings like timeout. See ServiceSettings for more details
[in]publishingEnabledNew publishing enabled setting.
OpcUa_UInt32 UaSubscription::subscriptionId (  )

Returns the id of the subscription


The documentation for this class was generated from the following files:
  • /home/buildbot/work/uasdkcpp/src/uaclient/uaclientcpp/uasubscription.h
  • /home/buildbot/work/uasdkcpp/src/uaclient/uaclientcpp/uasubscription.cpp