#include <nodemanagerbase.h>
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 HistoryVariableHandle * | getHistoryVariableHandle (Session *pSession, HistoryVariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, UaStatus &result) const |
virtual IOManager * | getIOManager (UaNode *pUaNode, OpcUa_Int32 attributeId) const |
< [in] AttributeId requested for the node | |
virtual EventManagerUaNode * | getEventManagerUaNode () |
Class providing a simplified base NodeManager, IOManager and optional EventManager implementation for most use cases
NodeManagerBase::NodeManagerBase | ( | const UaString & | sNamespaceUri, |
OpcUa_Boolean | firesEvents = OpcUa_False , |
||
OpcUa_Int32 | nHashTableSize = 10007 |
||
) |
Constructs a NodeManagerUaNode object.
[in] | sNamespaceUri | Name space URI for the name space managed by this node manager instance |
[in] | firesEvents | Flag indicating if the nodes in this node manager do fire events. The default value is OpcUa_False. |
[in] | nHashTableSize | Size 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
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.
pSession | Interface to the Session context for the method call |
pNodeId | NodeId of the requested node |
eventFilter | Event filter defined by the client |
eventManagers | a list of EventManager interfaces for an event notifier. |
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.
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.
pSession | Interface to the Session context for the method call |
serviceType | Service 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 |
pNodeId | NodeId of the requested node |
result | the result of the current Operation. |
Reimplemented from NodeManager.
IOManager * NodeManagerBase::getIOManager | ( | UaNode * | pUaNode, |
OpcUa_Int32 | attributeId | ||
) | const [virtual] |
< [in] AttributeId requested for the node
[in] | pUaNode | The 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.
pServerManager | Interface 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 |
Reimplemented from NodeManagerUaNode.
Reimplemented in NodeManagerNS1.