NodeManagerBase Class Reference

#include <nodemanagerbase.h>

Inheritance diagram for NodeManagerBase:
Collaboration diagram for NodeManagerBase:

List of all members.

Public Member Functions

 NodeManagerBase (const UaString &sNamespaceUri, OpcUa_Boolean firesEvents=OpcUa_False, OpcUa_Int32 nHashTableSize=10007)
virtual ~NodeManagerBase ()
void setFiresEvents (OpcUa_Boolean firesEvents)
void setHistoryManager (HistoryManager *pHistoryManager)
virtual UaStatus startUp (ServerManager *)
virtual UaStatus getEventManagers (Session *pSession, OpcUa_NodeId *pNodeId, OpcUa_EventFilter *eventFilter, EventManagerArray &eventManagers) const
virtual HistoryVariableHandlegetHistoryVariableHandle (Session *pSession, HistoryVariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, UaStatus &result) const
virtual IOManagergetIOManager (UaNode *pUaNode, OpcUa_Int32 attributeId) const
 < [in] AttributeId requested for the node
virtual EventManagerUaNodegetEventManagerUaNode ()

Detailed Description

Class providing a simplified base NodeManager, IOManager and optional EventManager implementation for most use cases


Constructor & Destructor Documentation

NodeManagerBase::NodeManagerBase ( const UaString sNamespaceUri,
OpcUa_Boolean  firesEvents = OpcUa_False,
OpcUa_Int32  nHashTableSize = 10007 
)

Constructs a NodeManagerUaNode object.

Parameters:
[in]sNamespaceUriName space URI for the name space managed by this node manager instance
[in]firesEventsFlag indicating if the nodes in this node manager do fire events. The default value is OpcUa_False.
[in]nHashTableSizeSize of the hash table. The default value is 10.007.
The size can be smaller than the total number of nodes managed by the node manager but it is better for the performance to avoid collisions with a large size. Prefered sizes are 1.009, 10.007, 100.003, 1.000.003, 10.000.019
NodeManagerBase::~NodeManagerBase (  ) [virtual]

Destroys the NodeManagerUaNode object and all nodes managed by the node manager


Member Function Documentation

UaStatus NodeManagerBase::getEventManagers ( Session pSession,
OpcUa_NodeId *  pNodeId,
OpcUa_EventFilter *  eventFilter,
EventManagerArray eventManagers 
) const [virtual]

Get a list of EventManager interfaces for an event notifier. This method is used to get a list of EventManager interfaces for the passed object node which must be an event notifier. Since the event notifier can be the root for an event hierarchy with different event sources and different EventManagers. The NodeManager can filter based on the passed event filter. But this can be done also later by the EventManager.

Parameters:
pSessionInterface to the Session context for the method call
pNodeIdNodeId of the requested node
eventFilterEvent filter defined by the client
eventManagersa list of EventManager interfaces for an event notifier.
Returns:
Error code

Reimplemented from NodeManager.

EventManagerUaNode * NodeManagerBase::getEventManagerUaNode (  ) [virtual]

Get the EventManagerUaNode interface if implemented by the class implementing the NodeManagerConfig interface. The implementation in this class returns a NULL pointer. Classes derived from NodeManagerConfig and EventManagerUaNode must overwrite this method and must return the EventManagerUaNode interface. This connection is used to provide the EventManagerUaNode interface to UaCondition classes keeping a NodeManagerConfig interface but needing also the EventManagerUaNode Interface for sending events.

Returns:
The method implemented in this class returns a Null pointer.

Reimplemented from NodeManagerConfig.

HistoryVariableHandle * NodeManagerBase::getHistoryVariableHandle ( Session pSession,
HistoryVariableHandle::ServiceType  serviceType,
OpcUa_NodeId *  pNodeId,
UaStatus result 
) const [virtual]

Get the history variable handle for the passed node Id. This method is used to get the HistoryVariableHandle for a node used to access the related HistoryManager in the services ReadHistory and UpdateHistory.

Parameters:
pSessionInterface to the Session context for the method call
serviceTypeService type enumerator with the following possible settings READ_EVENTS, READ_RAW, READ_MODIFIED, READ_PROCESSED, READ_ATTIME, UPDATE_DATA, UPDATE_EVENT, DELETE_DATA, DELETE_EVENT
pNodeIdNodeId of the requested node
resultthe result of the current Operation.
Returns:
the history variable handle for the passed node Id.

Reimplemented from NodeManager.

IOManager * NodeManagerBase::getIOManager ( UaNode pUaNode,
OpcUa_Int32  attributeId 
) const [virtual]

< [in] AttributeId requested for the node

Parameters:
[in]pUaNodeThe requested UA node

Implements NodeManagerUaNode.

void NodeManagerBase::setFiresEvents ( OpcUa_Boolean  firesEvents )

Set the flag that indicates if the NodeManager fires events.

void NodeManagerBase::setHistoryManager ( HistoryManager pHistoryManager )

Set the HistoryManager responsible for the NodeManager.

The NodeManagerBase implements getHistoryVariableHandle and provides a history variable handle if the requested node is available. Additional checks need to be implemented in the HistoryManager.

The NodeManagerBase creates a HistoryVariableHandle of the type HistoryVariableHandleUaNode. This type contains the UaNode pointer for the node to read.

UaStatus NodeManagerBase::startUp ( ServerManager pServerManager ) [virtual]

Start up NodeManager.

Parameters:
pServerManagerInterface to the central ServerManager object. This interface pointer should be stored in the NodeManager instance to have access to core module objects like the root NodeManager or the ServerConfig
Returns:
Error code

Reimplemented from NodeManagerUaNode.

Reimplemented in NodeManagerNS1.


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