HistoryManager Class Reference
[Core Module Interfaces]

#include <historymanager.h>

Inheritance diagram for HistoryManager:

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_TimestampsToReturn timestampsToReturn, 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 processingInterval, 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_PerformUpdateType performInsertReplace, const UaDataValues &updateValue)=0
virtual UaStatus beginUpdateEvents (OpcUa_Handle hHistoryManagerContext, OpcUa_UInt32 callbackHandle, HistoryVariableHandle *pVariableHandle, OpcUa_PerformUpdateType 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 

Read event history transaction

READ_RAW 

Read raw historical data transaction

READ_MODIFIED 

Read modified historical data transaction

READ_PROCESSED 

Read processed historical data transaction

READ_ATTIME 

Read data at time history transaction

UPDATE_DATA 

Update history data transaction

UPDATE_EVENT 

Update event history transaction

DELETE_RAW 

Delete history data transaction

DELETE_ATTIME 

Delete history data at time transaction

DELETE_EVENT 

Delete event history transaction


Constructor & Destructor Documentation

HistoryManager::HistoryManager (  ) [inline]

construction

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

destruction


Member Function Documentation

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:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
requestedTimesThe list of timestamps to delete.
Returns:
Error code

Implemented in HistoryManagerBase.

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

Delete events for a node.

Parameters:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
eventIdsThe list of EventIds for the events to delete.
Returns:
Error code

Implemented in HistoryManagerBase.

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:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
isDeleteModifiedA flag that indicates if modified values should be deleted instead of raw value.
startTimeThe start time of the time period to delete.
endTimeThe end time of the time period to delete.
Returns:
Error code

Implemented in HistoryManagerBase.

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

Start a transaction.

Parameters:
pCallbackCallback interface used for the transaction. The IOManager must use this interface to finish the action for each passed node in the transaction.
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
hTransactionHandle 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.
transactionTypeType of the transaction. The possible enum values are: READ, WRITE, MONITOR_BEGIN, MONITOR_MODIFY, MONITOR_STOP.
timestampsToReturnThe client selected timestamp to return. Valid enum values are: OpcUa_TimestampsToReturn_Source, OpcUa_TimestampsToReturn_Server, OpcUa_TimestampsToReturn_Both
hHistoryManagerContextGeneral context for the service calls containing information like history.
Returns:
Error code

Implemented in HistoryManagerBase.

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:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
pContinuationPointThe 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.
requestedTimesThe requested timestamps to read.
Returns:
Error code

Implemented in HistoryManagerBase.

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:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
pContinuationPointThe 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.
numValuesPerNodethe Number of Values per Node.
startTimeThe start time of the time period to read.
endTimeThe end time of the time period to read.
filterAn event filter used to select events to read.
Returns:
Error code

Implemented in HistoryManagerBase.

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

Read processed history values for a node.

Parameters:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
pContinuationPointThe 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.
startTimeThe start time of the time period to read.
endTimeThe end time of the time period to read.
processingIntervalthe interval to resample.
aggregateTypethe aggregate type node id.
aggregateConfigurationThe aggregate configuration.
Returns:
Error code

Implemented in HistoryManagerBase.

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:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
pContinuationPointThe 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.
IsReadModifiedtrue if modified false if not.
numValuesPerNodethe Number of Values per Node.
startTimeThe start time of the time period to read.
endTimeThe end time of the time period to read.
returnBoundsFlag that indicates if bounding values should be returned.
Returns:
Error code

Implemented in HistoryManagerBase.

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

Update history values for a node.

Parameters:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
performInsertReplaceThe mode to insert data or to replace older data.
updateValueThe list of data values to update.
Returns:
Error code

Implemented in HistoryManagerBase.

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

Update history event for a node.

Parameters:
hHistoryManagerContextGeneral context for the service calls containing information like history.
callbackHandleHandle for the node in the callback. This handle was passed in to the IOManager with the beginStopMonitoring method.
pVariableHandleVariable handle provided by the NodeManager::getVariableHandle. This object contains the information needed by the IOManager to identify the node to read in its context.
performInsertReplaceThe mode to insert events or to replace older events.
filterAn event filter used to select events to update.
eventDataA list of events to update.
Returns:
Error code

Implemented in HistoryManagerBase.

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

Finish a transaction.

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

Implemented in HistoryManagerBase.


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