#include <nodemanager.h>
Public Member Functions | |
NodeManager () | |
virtual | ~NodeManager () |
virtual UaStatus | startUp (ServerManager *pServerManager)=0 |
virtual UaStatus | shutDown ()=0 |
virtual UaStatus | sessionOpened (Session *) |
virtual UaStatus | sessionActivated (Session *) |
virtual UaStatus | sessionClosed (Session *) |
virtual UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)=0 |
virtual UaStatus | translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets)=0 |
virtual VariableHandle * | getVariableHandle (Session *pSession, VariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, OpcUa_Int32 AttributeId) const =0 |
virtual HistoryVariableHandle * | getHistoryVariableHandle (Session *pSession, HistoryVariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, UaStatus &result) const |
virtual UaStatus | getEventManagers (Session *pSession, OpcUa_NodeId *pNodeId, OpcUa_EventFilter *eventFilter, EventManagerArray &eventManagers) const |
virtual MethodHandle * | getMethodHandle (Session *pSession, OpcUa_NodeId *pObjectNodeId, OpcUa_NodeId *pMethodNodeId, UaStatus &result) const |
virtual UaStatus | addNode (const ServiceContext &serviceContext, const UaNodeId &parentNodeId, const UaNodeId &referenceTypeId, const UaNodeId &requestedNewNodeId, const UaQualifiedName &browseName, OpcUa_NodeClass nodeClass, const UaExtensionObject &nodeAttributes, const UaNodeId &typeDefinition, UaNodeId &addedNodeId) |
virtual UaStatus | addReference (const ServiceContext &serviceContext, const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaNodeId &targetNodeId, OpcUa_NodeClass targetNodeClass) |
virtual UaStatus | deleteNode (const ServiceContext &serviceContext, const UaNodeId &nodeId, OpcUa_Boolean deleteTargetReference) |
virtual UaStatus | deleteReference (const ServiceContext &serviceContext, const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaNodeId &targetNodeId, OpcUa_Boolean deleteBidirectional) |
virtual UaStatus | readNodeConfiguration (Session *pSession, const UaNodeId &nodeToRead, OpcUa_Int32 attributeID, UaVariant &value) |
virtual NodeManagerCrossReferences * | getNodeManagerCrossReferences () |
virtual NodeManagerConfig * | getNodeManagerConfig () |
NodeManager::NodeManager | ( | ) |
construction
NodeManager::~NodeManager | ( | ) | [virtual] |
destruction
virtual UaStatus NodeManager::startUp | ( | ServerManager * | pServerManager | ) | [pure virtual] |
Start up NodeManager. Method is called during start up of OPC Server and must load the initial NodeManager configuration.
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 |
Implemented in NodeManagerNS1, NodeManagerRoot, and NodeManagerUaNode.
virtual UaStatus NodeManager::shutDown | ( | ) | [pure virtual] |
Shut down NodeManager. Method is called during shut down of OPC Server and can be used to clean up the configuration of the NodeManager.
Implemented in NodeManagerUaNode.
Notifies the node manager that a new session was opened. This information can be used to establish a connection to an underlying system if Session specific (e.g. user specific) connections are necessary. The method can be overwritten in a derived class if the implementation needs to know which sessions are active
Reimplemented in NodeManagerRoot.
Notifies the node manager that a session was activated. The method can be overwritten in a derived class if the implementation needs to know which sessions are active
Reimplemented in NodeManagerRoot.
Notifies the node manager that a session was closed. The method can be overwritten in a derived class if the implementation needs to know which sessions are active
Reimplemented in NodeManagerRoot.
virtual UaStatus NodeManager::browse | ( | const ServiceContext & | serviceContext, | |
BrowseContext & | browseContext, | |||
UaReferenceDescriptions & | References | |||
) | [pure virtual] |
Discover the references of a specified node of a view. This method is used to return a list of references and target nodes for the passed node to browse for the services Browse and BrowseNext.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
browseContext | Browse context for the first browse or the following browse with continuation point. | |
References | Array of ReferenceDescription results for the browsed node. |
Implemented in NodeManagerRoot, and NodeManagerUaNode.
virtual UaStatus NodeManager::translateBrowsePathToNodeId | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | startingNode, | |||
UaRelativePath & | relativePath, | |||
UaBrowsePathTargets & | browsePathTargets | |||
) | [pure virtual] |
Translates a relative browse path to a node id. This method is used to request the Server to translate a browse paths to a NodeId for the target node. There could be a list of target nodes but the normal case is a single result for a starting node and a path. The browse path is constructed of a starting Node and a RelativePath. The specified starting Node identifies the Node from which the RelativePath is based. The RelativePath contains a sequence of BrowseNames. The relative path parameter contains a list of relative path elements and the current position of the translate process since the translate can affect more than one node manager and the implementation of this method is only responsible for processing relative path elements and starting nodes managed by the current node manager instance.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
startingNode | Starting node from where the relative path is defined. | |
relativePath | Relative path from the starting node to the searched node including the current position of the translate process. |
browsePathTargets | All result target nodes for the Browsepath. |
Implemented in NodeManagerRoot, and NodeManagerUaNode.
virtual VariableHandle* NodeManager::getVariableHandle | ( | Session * | pSession, | |
VariableHandle::ServiceType | serviceType, | |||
OpcUa_NodeId * | pNodeId, | |||
OpcUa_Int32 | AttributeId | |||
) | const [pure virtual] |
Get the variable handle for the passed node Id. This method is used to get the VariableHandle for a node used to access the related IOManager in the services Read, Write and CreateMonitoredItems.
pSession | Interface to the Session context for the method call | |
serviceType | Service type enumerator with the following possible settings READ - Read service WRITE - Write service MONITORING - CreateMonitoredItems service | |
pNodeId | NodeId of the requested node | |
AttributeId | AttributeId of the requested node |
Implemented in NodeManagerRoot, and NodeManagerUaNode.
HistoryVariableHandle * NodeManager::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 in NodeManagerNS1, and NodeManagerRoot.
UaStatus NodeManager::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 in NodeManagerNS1, and NodeManagerRoot.
MethodHandle * NodeManager::getMethodHandle | ( | Session * | pSession, | |
OpcUa_NodeId * | pObjectNodeId, | |||
OpcUa_NodeId * | pMethodNodeId, | |||
UaStatus & | result | |||
) | const [virtual] |
Get the method handle for the passed node Id. This method is used to get the MethodHandle for a Object node / Method combination used to access the related MethodManager in the service Call.
pSession | Interface to the Session context for the method call | |
pObjectNodeId | the NodeId of the actual Object. | |
pMethodNodeId | the NodeId of the actual Method. | |
result | the result of the current Operation. |
Reimplemented in NodeManagerRoot, and NodeManagerUaNode.
UaStatus NodeManager::addNode | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | parentNodeId, | |||
const UaNodeId & | referenceTypeId, | |||
const UaNodeId & | requestedNewNodeId, | |||
const UaQualifiedName & | browseName, | |||
OpcUa_NodeClass | nodeClass, | |||
const UaExtensionObject & | nodeAttributes, | |||
const UaNodeId & | typeDefinition, | |||
UaNodeId & | addedNodeId | |||
) | [virtual] |
Add node to the NodeManager.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
parentNodeId | the parentNodeId of the current Node. | |
referenceTypeId | Type of the reference to create from the source node to the new node. | |
requestedNewNodeId | the new NodeId of the requested Node. | |
browseName | the actual browse name of the Node. | |
nodeClass | the actual node class of the Node. | |
nodeAttributes | all attributes of the current Node. | |
typeDefinition | the Definition of the actual Node. | |
addedNodeId | the added NodeId. |
Reimplemented in NodeManagerRoot.
UaStatus NodeManager::addReference | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | sourceNodeId, | |||
const UaNodeId & | referenceTypeId, | |||
OpcUa_Boolean | isForward, | |||
const UaNodeId & | targetNodeId, | |||
OpcUa_NodeClass | targetNodeClass | |||
) | [virtual] |
Add reference to the NodeManager.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
sourceNodeId | the source NodeId of the actual Node. | |
referenceTypeId | Type of the reference to create from the source node to the new node. | |
isForward | indicates if the Node is forwardreferenced or not. | |
targetNodeId | the NodeId of the target Node. | |
targetNodeClass | the NodeClass of the target Node. |
Reimplemented in NodeManagerRoot.
UaStatus NodeManager::deleteNode | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | nodeId, | |||
OpcUa_Boolean | deleteTargetReference | |||
) | [virtual] |
Delete node from the NodeManager.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
nodeId | the Id of the current Node. | |
deleteTargetReference | Indicates if the inverse references in the target nodes must be deleted |
Reimplemented in NodeManagerRoot.
UaStatus NodeManager::deleteReference | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | sourceNodeId, | |||
const UaNodeId & | referenceTypeId, | |||
OpcUa_Boolean | isForward, | |||
const UaNodeId & | targetNodeId, | |||
OpcUa_Boolean | deleteBidirectional | |||
) | [virtual] |
Delete reference from the NodeManager.
serviceContext | General context for the service calls containing information like the session object, return diagnostic mask and timeout hint. | |
sourceNodeId | the source NodeId of the actual Node. | |
referenceTypeId | Type of the reference to create from the source node to the new node. | |
isForward | indicates if the Node is forwardreferenced or not. | |
targetNodeId | the NodeId of the target Node. | |
deleteBidirectional | TRUE if delete bidirectional FALSE if not. |
Reimplemented in NodeManagerRoot.
UaStatus NodeManager::readNodeConfiguration | ( | Session * | pSession, | |
const UaNodeId & | nodeToRead, | |||
OpcUa_Int32 | attributeID, | |||
UaVariant & | value | |||
) | [virtual] |
Read configuration information attributes of a node.
pSession | Interface to the Session context for the method call | |
nodeToRead | the actual Node to read from. | |
attributeID | the Id of the actual attribute. | |
value | the value of the current Node. |
Reimplemented in NodeManagerRoot, and NodeManagerUaNode.
NodeManagerCrossReferences * NodeManager::getNodeManagerCrossReferences | ( | ) | [virtual] |
Get the interface NodeManagerCrossReferences if available.
Reimplemented in NodeManagerRoot, and NodeManagerUaNode.
NodeManagerConfig * NodeManager::getNodeManagerConfig | ( | ) | [virtual] |
Get the interface NodeManagerConfig if available.
Reimplemented in NodeManagerRoot, and NodeManagerUaNode.