HistoryManager Class Reference
[Core Module Interfaces]

#include <historymanager.h>

List of all members.


Public Types

enum  TransactionType {
  READ_EVENTS, READ_RAW, READ_MODIFIED, READ_PROCESSED,
  READ_ATTIME, UPDATE_DATA, UPDATE_EVENT, DELETE_RAW,
  DELETE_ATTIME, DELETE_EVENT
}

Public Member Functions

 HistoryManager ()
virtual ~HistoryManager ()
virtual UaStatus beginHistoryTransaction (HistoryManagerCallback *pCallback, const ServiceContext &serviceContext, OpcUa_UInt32 hTransaction, TransactionType transactionType, OpcUa_Handle &hHistoryManagerContext)=0
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)=0
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)=0
virtual UaStatus beginReadProcessed (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, HistoryReadCPUserDataBase *pContinuationPoint, OpcUa_DateTime &startTime, OpcUa_DateTime &endTime, OpcUa_Double resampleInterval, const OpcUa_NodeId &aggregateType, OpcUa_AggregateConfiguration aggregateConfiguration)=0
virtual UaStatus beginReadAtTime (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, HistoryReadCPUserDataBase *pContinuationPoint, const UaDateTimeArray &requestedTimes)=0
virtual UaStatus beginUpdateData (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, OpcUa_HistoryUpdateMode performInsertReplace, const UaDataValues &updateValue)=0
virtual UaStatus beginUpdateEvents (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, OpcUa_HistoryUpdateMode performInsertReplace, const OpcUa_EventFilter &filter, const UaEventFieldLists &eventData)=0
virtual UaStatus beginDeleteRawModified (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, OpcUa_Boolean isDeleteModified, OpcUa_DateTime &startTime, OpcUa_DateTime &endTime)=0
virtual UaStatus beginDeleteAtTime (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, const UaDateTimeArray &requestedTimes)=0
virtual UaStatus beginDeleteEvents (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, const UaByteStringArray &eventIds)=0
virtual UaStatus finishHistoryTransaction (OpcUa_Handle hHistoryManagerContext)=0

Detailed Description

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.
!!!!!
This interface may change after release 1.0 of the UA Server SDK since the corresponding OPC UA Specificaiton is not finally released
!!!!!

Member Enumeration Documentation

TransactionType enumeration

Enumerator:
READ_EVENTS  Event: Read
READ_RAW  Event: Read_Raw
READ_MODIFIED  Event: Read_Modified
READ_PROCESSED  Event: Read_Processed
READ_ATTIME  Event: Read_AtTime
UPDATE_DATA  Event: Update_Data
UPDATE_EVENT  Event: Update_Event
DELETE_RAW  Event: Delete_Raw
DELETE_ATTIME  Event: Delete_AtTime
DELETE_EVENT  Event: Delete_Event


Constructor & Destructor Documentation

HistoryManager::HistoryManager (  )  [inline]

construction

virtual HistoryManager::~HistoryManager (  )  [inline, virtual]

destruction


Member Function Documentation

virtual UaStatus HistoryManager::beginHistoryTransaction ( HistoryManagerCallback pCallback,
const ServiceContext serviceContext,
OpcUa_UInt32  hTransaction,
TransactionType  transactionType,
OpcUa_Handle &  hHistoryManagerContext 
) [pure virtual]

Start a transaction.

Parameters:
pCallback Callback interface used for the transaction. The IOManager must use this interface to finish the action for each passed node in the transaction.
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. This handle was passed in to the IOManager with the beginTransaction method.
transactionType Type of the transaction. The possible enum values are: READ, WRITE, MONITOR_BEGIN, MONITOR_MODIFY, MONITOR_STOP.
hHistoryManagerContext General context for the service calls containing information like history.
Returns:
Error code

virtual UaStatus HistoryManager::beginReadEvents ( OpcUa_Handle  hHistoryManagerContext,
OpcUa_UInt32  callbackHandle,
HistoryVariableHandle pVariableHandle,
HistoryReadCPUserDataBase pContinuationPoint,
OpcUa_UInt32  numValuesPerNode,
OpcUa_DateTime &  startTime,
OpcUa_DateTime &  endTime,
const OpcUa_EventFilter &  filter 
) [pure virtual]

Read event history for a node.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
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.
numValuesPerNode the Number of Values per Node.
startTime a value when to start processing.
endTime a value when to stop processing.
filter a filter for all common Events that can occur.
Returns:
Error code

virtual UaStatus HistoryManager::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 
) [pure virtual]

Read raw or modified history values for a node.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
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.
IsReadModified true if modified false if not.
numValuesPerNode the Number of Values per Node.
startTime a value when to start processing.
endTime a value when to stop processing.
returnBounds the returned bounds of the actual operation.
Returns:
Error code

virtual UaStatus HistoryManager::beginReadProcessed ( OpcUa_Handle  hHistoryManagerContext,
OpcUa_UInt32  callbackHandle,
HistoryVariableHandle pVariableHandle,
HistoryReadCPUserDataBase pContinuationPoint,
OpcUa_DateTime &  startTime,
OpcUa_DateTime &  endTime,
OpcUa_Double  resampleInterval,
const OpcUa_NodeId &  aggregateType,
OpcUa_AggregateConfiguration  aggregateConfiguration 
) [pure virtual]

Read processed history values for a node.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
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.
startTime a value when to start processing.
endTime a value when to stop processing.
resampleInterval the interval to resample.
aggregateType the aggregate type of the node.
Returns:
Error code

virtual UaStatus HistoryManager::beginReadAtTime ( OpcUa_Handle  hHistoryManagerContext,
OpcUa_UInt32  callbackHandle,
HistoryVariableHandle pVariableHandle,
HistoryReadCPUserDataBase pContinuationPoint,
const UaDateTimeArray &  requestedTimes 
) [pure virtual]

Read history values for a node at specific timestamps.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
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.
requestedTimes the requested time when to begin to read.
Returns:
Error code

virtual UaStatus HistoryManager::beginUpdateData ( OpcUa_Handle  hHistoryManagerContext,
OpcUa_UInt32  callbackHandle,
HistoryVariableHandle pVariableHandle,
OpcUa_HistoryUpdateMode  performInsertReplace,
const UaDataValues &  updateValue 
) [pure virtual]

Update history values for a node.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
performInsertReplace a mode to insert data by replacing the older data.
updateValue a variable to fill with data to update.
Returns:
Error code

virtual UaStatus HistoryManager::beginUpdateEvents ( OpcUa_Handle  hHistoryManagerContext,
OpcUa_UInt32  callbackHandle,
HistoryVariableHandle pVariableHandle,
OpcUa_HistoryUpdateMode  performInsertReplace,
const OpcUa_EventFilter &  filter,
const UaEventFieldLists &  eventData 
) [pure virtual]

Update history event for a node.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
performInsertReplace a mode to insert data by replacing the older data.
filter a filter for all common Events that can occur.
eventData a field list of event data.
Returns:
Error code

virtual UaStatus HistoryManager::beginDeleteRawModified ( OpcUa_Handle  hHistoryManagerContext,
OpcUa_UInt32  callbackHandle,
HistoryVariableHandle pVariableHandle,
OpcUa_Boolean  isDeleteModified,
OpcUa_DateTime &  startTime,
OpcUa_DateTime &  endTime 
) [pure virtual]

Delete raw or modified history values for a node.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
isDeleteModified a variable that indicates if the new values is modified or not.
startTime a value when to start processing.
endTime a value when to stop processing.
Returns:
Error code

virtual UaStatus HistoryManager::beginDeleteAtTime ( OpcUa_Handle  hHistoryManagerContext,
OpcUa_UInt32  callbackHandle,
HistoryVariableHandle pVariableHandle,
const UaDateTimeArray &  requestedTimes 
) [pure virtual]

Delete raw or modified history values for a node.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
requestedTimes the requested time when to begin to delete.
Returns:
Error code

virtual UaStatus HistoryManager::beginDeleteEvents ( OpcUa_Handle  hHistoryManagerContext,
OpcUa_UInt32  callbackHandle,
HistoryVariableHandle pVariableHandle,
const UaByteStringArray &  eventIds 
) [pure virtual]

Delete events for a node.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
callbackHandle Handle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandle Variable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
eventIds the Id of the currently fired Event.
Returns:
Error code

virtual UaStatus HistoryManager::finishHistoryTransaction ( OpcUa_Handle  hHistoryManagerContext  )  [pure virtual]

Finish a transaction.

Parameters:
hHistoryManagerContext General context for the service calls containing information like history.
Returns:
Error code


The documentation for this class was generated from the following file:
  • src/uaserver/uaservercpp/coremodule/historymanager.h