UA Server SDK C++ Bundle
1.4.2.275
|
Interface definition of the HistoryManager used for reading, updating and deletion of data and event history. More...
#include <historymanager.h>
Inherited by HistoryManagerBase.
Public Types | |
enum | TransactionType { TransactionReadEvents, TransactionReadRaw, TransactionReadModified, TransactionReadProcessed, TransactionReadAtTime, TransactionUpdateData, TransactionUpdateStructureData, TransactionUpdateEvents, TransactionDeleteData, TransactionDeleteAtTime, TransactionDeleteEvents } |
TransactionType enumeration. More... | |
Public Member Functions | |
HistoryManager () | |
construction | |
virtual | ~HistoryManager () |
destruction | |
virtual UaStatus | beginHistoryTransaction (HistoryManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 hTransaction, OpcUa_UInt32 totalItemCountHint, TransactionType transactionType, OpcUa_TimestampsToReturn timestampsToReturn, OpcUa_Handle &hHistoryManagerContext)=0 |
Begins a transaction for historical access. More... | |
virtual UaStatus | beginReadEvents (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, HistoryReadCPUserDataBase *pContinuationPoint, OpcUa_UInt32 numValuesPerNode, OpcUa_DateTime &startTime, OpcUa_DateTime &endTime, const OpcUa_EventFilter &filter, OpcUa_HistoryReadValueId *pReadValueId)=0 |
Read event history for a node. More... | |
virtual UaStatus | beginReadRawModified (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, HistoryReadCPUserDataBase *pContinuationPoint, OpcUa_Boolean IsReadModified, OpcUa_UInt32 numValuesPerNode, OpcUa_DateTime &startTime, OpcUa_DateTime &endTime, OpcUa_Boolean returnBounds, OpcUa_HistoryReadValueId *pReadValueId)=0 |
Read raw or modified history values for a node. More... | |
virtual UaStatus | beginReadProcessed (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, HistoryReadCPUserDataBase *pContinuationPoint, OpcUa_DateTime &startTime, OpcUa_DateTime &endTime, OpcUa_Double processingInterval, const OpcUa_NodeId &aggregateType, OpcUa_AggregateConfiguration aggregateConfiguration, OpcUa_HistoryReadValueId *pReadValueId)=0 |
Read processed history values for a node. More... | |
virtual UaStatus | beginReadAtTime (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, HistoryReadCPUserDataBase *pContinuationPoint, const UaDateTimeArray &requestedTimes, OpcUa_Boolean useSimpleBounds, OpcUa_HistoryReadValueId *pReadValueId)=0 |
Read history values for a node at specific timestamps. More... | |
virtual UaStatus | beginUpdateData (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, OpcUa_PerformUpdateType performInsertReplace, OpcUa_Boolean isStructureUpdate, const UaDataValues &updateValue)=0 |
Update history values for a node. More... | |
virtual UaStatus | beginUpdateEvents (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, OpcUa_PerformUpdateType performInsertReplace, const OpcUa_EventFilter &filter, const UaHistoryEventFieldLists &eventData)=0 |
Update history event for a node. More... | |
virtual UaStatus | beginDeleteRawModified (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, OpcUa_Boolean isDeleteModified, OpcUa_DateTime &startTime, OpcUa_DateTime &endTime)=0 |
Delete raw or modified history values for a node. More... | |
virtual UaStatus | beginDeleteAtTime (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, const UaDateTimeArray &requestedTimes)=0 |
Delete history values at given times. More... | |
virtual UaStatus | beginDeleteEvents (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, const UaByteStringArray &eventIds)=0 |
Delete events for a node. More... | |
virtual UaStatus | finishHistoryTransaction (OpcUa_Handle hHistoryManagerContext)=0 |
Finishes the transaction for historical access. More... | |
virtual UaStatus | cancelHistoryTransaction (OpcUa_Handle hHistoryManagerContext) |
Canceles the transaction for historical access. More... | |
Interface definition of the HistoryManager used for reading, updating and deletion of data and event history.
The HistoryManager interface provides the reading, updating and deletion capabilities for data and event history. The HistoryManager interface is asynchronous. For the HistoryManager callback the HistoryManagerCallback interface is implemented by the consumer of the history data or events. One of the consumers is the UA Module. This interface is used by the SDK to multiplex the list of nodes in the UA service call to different HistoryManagers. One UA service call is a transaction for the SDK. If an HistoryManager is used in a transaction, the beginHistoryTransaction method is called by the SDK. This allows the HistoryManagers to create a context for the transactions since the SDK will call the associated begin method (e.g. beginReadRawModified) for each node in the transaction. Depending on the underlying system, the action can be started for each node in the begin method or for a list of nodes in the finishHistoryTransaction method. If the underlying system allows optimizing access for a list of nodes, the finishHistoryTransaction method should be used to start the access to the underlying system. This method is called by the SDK after calling the begin methods for all nodes in the transaction.
TransactionType enumeration.
Enumerator | |
---|---|
TransactionReadEvents |
Read event history transaction executed through HistoryManager::beginReadEvents |
TransactionReadRaw |
Read raw historical data transaction executed through HistoryManager::beginReadRawModified |
TransactionReadModified |
Read modified historical data transaction executed through HistoryManager::beginReadRawModified |
TransactionReadProcessed |
Read processed historical data transaction executed through HistoryManager::beginReadProcessed |
TransactionReadAtTime |
Read data at time history transaction executed through HistoryManager::beginReadAtTime |
TransactionUpdateData |
Update history data transaction executed through HistoryManager::beginUpdateData |
TransactionUpdateStructureData |
Update history structure data like Anotations executed through HistoryManager::beginUpdateData |
TransactionUpdateEvents |
Update event history transaction executed through HistoryManager::beginUpdateEvents |
TransactionDeleteData |
Delete history data transaction executed through HistoryManager::beginDeleteRawModified |
TransactionDeleteAtTime |
Delete history data at time transaction executed through HistoryManager::beginDeleteAtTime |
TransactionDeleteEvents |
Delete event history transaction executed through HistoryManager::beginDeleteEvents |
|
pure virtual |
Delete history values at given times.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getHistoryVariableHandle. This object contains the information needed by the HistoryManager to identify the variable to delete in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
requestedTimes | The list of timestamps to delete. |
Implemented in HistoryManagerBase.
|
pure virtual |
Delete events for a node.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the HistoryManager to identify the node to read in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
eventIds | The list of EventIds for the events to delete. |
Implemented in HistoryManagerBase.
|
pure virtual |
Delete raw or modified history values for a node.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getHistoryVariableHandle. This object contains the information needed by the HistoryManager to identify the variable to delete in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
isDeleteModified | A flag that indicates if modified values should be deleted instead of raw value. |
startTime | The start time of the time period to delete. |
endTime | The end time of the time period to delete. |
Implemented in HistoryManagerBase.
|
pure virtual |
Begins a transaction for historical access.
pCallback | Callback interface used for the transaction. The HistoryManager must use this interface to finish the action for each passed variable in the transaction. The callback interface pointer is valid until the transaction is completely finished. |
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. |
hTransaction | Handle for the transaction used by the SDK to identify the transaction in the callbacks. The HistoryManager must store this handle and use it in callbacks to HistoryManagerCallback |
totalItemCountHint | A hint for the HistoryManager about the total number of variables in the transaction. The HistoryManager may not be responsible for all variables but he can use this hint if he wants to optimize memory allocation for further processing. |
transactionType | Type of the history transaction. |
timestampsToReturn | The client selected timestamp to return. Valid enum values are: OpcUa_TimestampsToReturn_Source, OpcUa_TimestampsToReturn_Server, OpcUa_TimestampsToReturn_Both |
hHistoryManagerContext | Handle provided by the HistoryManager to identify the transaction in the following begin calls. The handle is managed by the HistoryManager and must be valid until the transaction is completely finished. |
Implemented in HistoryManagerBase.
|
pure virtual |
Read history values for a node at specific timestamps.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getHistoryVariableHandle. This object contains the information needed by the HistoryManager to identify the variable to read in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
pContinuationPoint | The continuation point data from a previous Read call. Null if first Read. Implementers of this interface can store the continuation point data in a derived class. Implementers of the HistoryManager interface are responsible for deleting the HistoryReadCPUserDataBase object if it is not NULL. |
requestedTimes | The requested timestamps to read. |
useSimpleBounds | Use SimpleBounds to determine the value at the specific timestamp. |
pReadValueId | Context for the node to read. The context contains the IndexRange and the DataEncoding requested by the client. The other parameters of this context are already handled by the HistoryVariableHandle and the SDK. |
Implemented in HistoryManagerBase.
|
pure virtual |
Read event history for a node.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getHistoryVariableHandle. This object contains the information needed by the HistoryManager to identify the variable to read in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
pContinuationPoint | The continuation point data from a previous Read call. Null if first Read. Implementers of this interface can store the continuation point data in a derived class. Implementers of the HistoryManager interface are responsible for deleting the HistoryReadCPUserDataBase object if it is not NULL. |
numValuesPerNode | The maximum number of values per Node to return. |
startTime | The start time of the time period to read. |
endTime | The end time of the time period to read. |
filter | An event filter used to select events to read. |
pReadValueId | Context for the node to read. The context contains the IndexRange and the DataEncoding requested by the client. The other parameters of this context are already handled by the HistoryVariableHandle and the SDK. |
Implemented in HistoryManagerBase.
|
pure virtual |
Read processed history values for a node.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getHistoryVariableHandle. This object contains the information needed by the HistoryManager to identify the variable to read in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
pContinuationPoint | The continuation point data from a previous Read call. Null if first Read. Implementers of this interface can store the continuation point data in a derived class. Implementers of the HistoryManager interface are responsible for deleting the HistoryReadCPUserDataBase object if it is not NULL. |
startTime | The start time of the time period to read. |
endTime | The end time of the time period to read. |
processingInterval | The interval to re sample. |
aggregateType | The aggregate type node id. |
aggregateConfiguration | The aggregate configuration. |
pReadValueId | Context for the node to read. The context contains the IndexRange and the DataEncoding requested by the client. The other parameters of this context are already handled by the HistoryVariableHandle and the SDK. |
Implemented in HistoryManagerBase.
|
pure virtual |
Read raw or modified history values for a node.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getHistoryVariableHandle. This object contains the information needed by the HistoryManager to identify the variable to read in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
pContinuationPoint | The continuation point data from a previous Read call. Null if first Read. Implementers of this interface can store the continuation point data in a derived class. Implementers of the HistoryManager interface are responsible for deleting the HistoryReadCPUserDataBase object if it is not NULL. |
IsReadModified | true if modified data should be read - false if raw data should be read. |
numValuesPerNode | The maximum number of values per Node to return. |
startTime | The start time of the time period to read. |
endTime | The end time of the time period to read. |
returnBounds | Flag that indicates if bounding values should be returned. |
pReadValueId | Context for the node to read. The context contains the IndexRange and the DataEncoding requested by the client. The other parameters of this context are already handled by the HistoryVariableHandle and the SDK. |
Implemented in HistoryManagerBase.
|
pure virtual |
Update history values for a node.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getHistoryVariableHandle. This object contains the information needed by the HistoryManager to identify the variable to update in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
performInsertReplace | The mode to insert data or to replace data. |
isStructureUpdate | Flag indicating if the provided data is meta data like anotations describing an entry in the history database |
updateValue | The data values to update. |
Implemented in HistoryManagerBase.
|
pure virtual |
Update history event for a node.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
callbackHandle | Handle for the variable in the callback. |
pVariableHandle | Variable handle provided by the NodeManager::getHistoryVariableHandle. This object contains the information needed by the HistoryManager to identify the variable to update in its context. The object is reference counted. The reference used by the SDK is released after finishHistoryTransaction is called. If the HistoryManager needs the VariableHandle of asynchronous handling, the HistoryManager must add its own reference as long as the VariableHandle is used. |
performInsertReplace | The mode to insert events or to replace events. |
filter | An event filter used to select the event to update. |
eventData | A list of event data to update. |
Implemented in HistoryManagerBase.
|
virtual |
Canceles the transaction for historical access.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
|
pure virtual |
Finishes the transaction for historical access.
hHistoryManagerContext | Handle provided by the HistoryManager in beginHistoryTransaction used to identify the transaction context for this call. |
Implemented in HistoryManagerBase.