#include <nodemanageruanode.h>
Public Member Functions | |
NodeManagerUaNode (const UaString &sNamespaceUri, OpcUa_Int32 nHashTableSize) | |
virtual | ~NodeManagerUaNode () |
virtual UaStatus | startUp (ServerManager *pServerManager) |
virtual UaStatus | shutDown () |
virtual UaStatus | browse (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References) |
virtual UaStatus | translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets) |
virtual VariableHandle * | getVariableHandle (Session *pSession, VariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, OpcUa_Int32 AttributeId) const |
MethodHandle * | getMethodHandle (Session *pSession, OpcUa_NodeId *pObjectNodeId, OpcUa_NodeId *pMethodNodeId, UaStatus &result) const |
virtual UaStatus | readNodeConfiguration (Session *pSession, const UaNodeId &nodeToRead, OpcUa_Int32 attributeID, UaVariant &value) |
virtual NodeManagerCrossReferences * | getNodeManagerCrossReferences () |
virtual NodeManagerConfig * | getNodeManagerConfig () |
UaStatus | addUaNode (UaNode *pNewNode) |
UaStatus | deleteUaNode (UaNode *pNode, OpcUa_Boolean deleteTargetReferences, OpcUa_Boolean deleteSourceReferences=OpcUa_False) |
UaStatus | addNodeAndReference (UaReferenceLists *pSourceNode, UaReferenceLists *pNewNode, const UaNodeId &referenceTypeId) |
UaStatus | addNodeAndReference (const UaNodeId &sourceNode, UaReferenceLists *pNewNode, const UaNodeId &referenceTypeId) |
UaStatus | addUaReference (UaReferenceLists *pSourceNode, UaReferenceLists *pTargetNode, const UaNodeId &referenceTypeId) |
UaStatus | addUaReference (const UaNodeId &sourceId, const UaNodeId &targetId, const UaNodeId &referenceTypeId) |
UaStatus | deleteUaReference (UaReferenceLists *pSourceNode, UaReferenceLists *pTargetNode, const UaNodeId &referenceTypeId) |
UaStatus | deleteUaReference (const UaNodeId &sourceId, const UaNodeId &targetId, const UaNodeId &referenceTypeId) |
OpcUa_UInt16 | getNameSpaceIndex () const |
virtual UaStatus | connectStartingNode (const UaNodeId &startingNode, NodeManager *pNodeManager, OpcUa_Boolean forwardReferences, OpcUa_Boolean inverseReferences) |
virtual UaStatus | disconnectStartingNode (const UaNodeId &startingNode, NodeManager *pNodeManager) |
virtual IOManager * | getIOManager (UaNode *pUaNode, OpcUa_Int32 attributeId) const =0 |
virtual UaStatus | afterStartUp ()=0 |
virtual UaStatus | beforeShutDown ()=0 |
Protected Member Functions | |
UaStatusCode | createNodeManagerAliasNode (const UaNodeId &sourceNodeId) |
UaStatusCode | clearAllNodes () |
UaNode * | findNode (const UaNodeId &id) const |
UaNode * | findNode (const OpcUa_NodeId *pId) const |
UaString | getNameSpaceUri () |
OpcUa_Boolean | isStarted () |
Protected Attributes | |
ServerManager * | m_pServerManager |
Membervar. | |
NodeManagerCrossReferences * | m_pNodeManagerCrossReferences0 |
Membervar. | |
NodeManagerList * | m_pNodeManagerList |
Membervar. | |
UaString | m_defaultLocaleId |
Membervar. | |
OpcUa_Boolean | m_isStarted |
Membervar. | |
UaMutex | m_mutexNodes |
Membervar. | |
OpcUa_UInt16 | m_nNamespaceIndex |
Membervar. | |
UaString | m_sNamespaceUri |
Membervar. | |
HashTable * | m_pTable |
Membervar. | |
UaMutex | m_mutexAliasTable |
Membervar. | |
UaObjectPointerArray< UaNodeId > | m_crossNodeManagerAliasNodes |
Membervar. |
NodeManagerUaNode::NodeManagerUaNode | ( | const UaString & | sNamespaceUri, | |
OpcUa_Int32 | nHashTableSize | |||
) |
construction
NodeManagerUaNode::~NodeManagerUaNode | ( | ) | [virtual] |
destruction
UaStatus NodeManagerUaNode::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 |
Implements NodeManager.
Reimplemented in NodeManagerNS1, and NodeManagerRoot.
UaStatus NodeManagerUaNode::shutDown | ( | ) | [virtual] |
UaStatus NodeManagerUaNode::browse | ( | const ServiceContext & | serviceContext, | |
BrowseContext & | browseContext, | |||
UaReferenceDescriptions & | References | |||
) | [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. |
Implements NodeManager.
Reimplemented in NodeManagerRoot.
UaStatus NodeManagerUaNode::translateBrowsePathToNodeId | ( | const ServiceContext & | serviceContext, | |
const UaNodeId & | startingNode, | |||
UaRelativePath & | relativePath, | |||
UaBrowsePathTargets & | browsePathTargets | |||
) | [virtual] |
Translates a relative browse path to a node id.
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. | |
browsePathTargets | all needed targets of the Browsepath. |
Implements NodeManager.
Reimplemented in NodeManagerRoot.
VariableHandle * NodeManagerUaNode::getVariableHandle | ( | Session * | pSession, | |
VariableHandle::ServiceType | serviceType, | |||
OpcUa_NodeId * | pNodeId, | |||
OpcUa_Int32 | AttributeId | |||
) | const [virtual] |
Get the variable handle for the passed node Id.
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. | |
AttributeId | AttributeId of the requested node |
Implements NodeManager.
Reimplemented in NodeManagerRoot.
MethodHandle * NodeManagerUaNode::getMethodHandle | ( | Session * | pSession, | |
OpcUa_NodeId * | pObjectNodeId, | |||
OpcUa_NodeId * | pMethodNodeId, | |||
UaStatus & | result | |||
) | const [virtual] |
Get the method handle for the passed node Id.
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 from NodeManager.
Reimplemented in NodeManagerRoot.
UaStatus NodeManagerUaNode::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 from NodeManager.
Reimplemented in NodeManagerRoot.
NodeManagerCrossReferences * NodeManagerUaNode::getNodeManagerCrossReferences | ( | ) | [virtual] |
Get the interface NodeManagerCrossReferences if available.
Reimplemented from NodeManager.
Reimplemented in NodeManagerRoot.
NodeManagerConfig * NodeManagerUaNode::getNodeManagerConfig | ( | ) | [virtual] |
Get the interface NodeManagerConfig if available.
Reimplemented from NodeManager.
Reimplemented in NodeManagerRoot.
Add a new UaNode to the node management. Adds the passed new node to the internal node management of the NodeManager.
pNewNode | Pointer to UaNode interface of the new node. |
Implements NodeManagerConfig.
UaStatus NodeManagerUaNode::deleteUaNode | ( | UaNode * | pNode, | |
OpcUa_Boolean | deleteTargetReferences, | |||
OpcUa_Boolean | deleteSourceReferences = OpcUa_False | |||
) | [virtual] |
Remove a UaNode from the node management. Removes the passed node from the internal node management of the NodeManager.
pNode | Pointer to UaNode interface of the node to remove. | |
deleteTargetReferences | Indicates if the inverse references in the target nodes must be deleted | |
deleteSourceReferences | Indicates if the inverse references in the target nodes must be deleted |
Implements NodeManagerConfig.
UaStatus NodeManagerUaNode::addNodeAndReference | ( | UaReferenceLists * | pSourceNode, | |
UaReferenceLists * | pNewNode, | |||
const UaNodeId & | referenceTypeId | |||
) | [virtual] |
Add a new node and a reference to the node management Adds the passed new node to the internal node management of the NodeManager and creates a reference from the passed source node to the new node.
pSourceNode | Pointer to UaReferenceLists interface of the source node. | |
pNewNode | Pointer to UaReferenceLists interface of the new node. | |
referenceTypeId | Type of the reference to create from the source node to the new node. |
Implements NodeManagerConfig.
UaStatus NodeManagerUaNode::addNodeAndReference | ( | const UaNodeId & | sourceNode, | |
UaReferenceLists * | pNewNode, | |||
const UaNodeId & | referenceTypeId | |||
) | [virtual] |
Add a new node and a reference to the node management Adds the passed new node to the internal node management of the NodeManager and creates a reference from the passed source node to the new node.
sourceNode | NodeId of the source node. | |
pNewNode | Pointer to UaReferenceLists interface of the new node. | |
referenceTypeId | Type of the reference to create from the source node to the new node. |
Implements NodeManagerConfig.
UaStatus NodeManagerUaNode::addUaReference | ( | UaReferenceLists * | pSourceNode, | |
UaReferenceLists * | pTargetNode, | |||
const UaNodeId & | referenceTypeId | |||
) | [virtual] |
Add a reference from source node to target node Creates a reference from the passed source node to the target node.
pSourceNode | Pointer to UaReferenceLists interface of the source node. | |
pTargetNode | Pointer to UaReferenceLists interface of the target node. | |
referenceTypeId | Type of the reference to create from the source node to the target node. |
Implements NodeManagerConfig.
UaStatus NodeManagerUaNode::addUaReference | ( | const UaNodeId & | sourceId, | |
const UaNodeId & | targetId, | |||
const UaNodeId & | referenceTypeId | |||
) | [virtual] |
Add a reference from source node to target node This functions is provided for convenience and behaves like the functions above. This function finds the node objects for the specified source and target nodeIds and creates a new reference if the nodes exist.
sourceId | NodeId of the source node. | |
targetId | NodeId of the target node. | |
referenceTypeId | Type of the reference to create from the source node to the target node. |
Implements NodeManagerConfig.
UaStatus NodeManagerUaNode::deleteUaReference | ( | UaReferenceLists * | pSourceNode, | |
UaReferenceLists * | pTargetNode, | |||
const UaNodeId & | referenceTypeId | |||
) | [virtual] |
Remove a reference from source node to target node Deletes a reference from the passed source node to the target node.
pSourceNode | Pointer to UaReferenceLists interface of the source node. | |
pTargetNode | Pointer to UaReferenceLists interface of the target node. | |
referenceTypeId | Type of the reference to delete from the source node to the target node. |
Implements NodeManagerConfig.
UaStatus NodeManagerUaNode::deleteUaReference | ( | const UaNodeId & | sourceId, | |
const UaNodeId & | targetId, | |||
const UaNodeId & | referenceTypeId | |||
) | [virtual] |
Remove a reference from source node to target node This functions is provided for convenience and behaves like the functions above. This function finds the node objects for the specified source and target nodeIds and creates a deletes the reference if the nodes exist.
sourceId | NodeId of the source node. | |
targetId | NodeId of the target node. | |
referenceTypeId | Type of the reference to delete from the source node to the target node. |
Implements NodeManagerConfig.
OpcUa_UInt16 NodeManagerUaNode::getNameSpaceIndex | ( | ) | const [inline, virtual] |
Get the namespace index of the node manager
Implements NodeManagerConfig.
UaStatus NodeManagerUaNode::connectStartingNode | ( | const UaNodeId & | startingNode, | |
NodeManager * | pNodeManager, | |||
OpcUa_Boolean | forwardReferences, | |||
OpcUa_Boolean | inverseReferences | |||
) | [virtual] |
Connect a starting node to the passed NodeManager
startingNode | Starting node from where the relative path is defined. | |
pNodeManager | Pointer to NodeManager that manages references from the starting node to nodes in the that NodeManager. | |
forwardReferences | Flag that indicates that there are forward references. | |
inverseReferences | Flag that indicates that there are inverse references. |
Implements NodeManagerCrossReferences.
UaStatus NodeManagerUaNode::disconnectStartingNode | ( | const UaNodeId & | startingNode, | |
NodeManager * | pNodeManager | |||
) | [virtual] |
Disconnect a starting node from the passed NodeManager
startingNode | Starting node from where the relative path is defined. | |
pNodeManager | Pointer to NodeManager that manages references from the starting node to nodes in the that NodeManager. |
Implements NodeManagerCrossReferences.
virtual IOManager* NodeManagerUaNode::getIOManager | ( | UaNode * | pUaNode, | |
OpcUa_Int32 | attributeId | |||
) | const [pure virtual] |
Get the responsible IOManager for the node and attribute combination.
pUaNode | the actual Node where to get all information from. | |
attributeId | AttributeId of the requested node |
Implemented in NodeManagerNS1, and NodeManagerRoot.
virtual UaStatus NodeManagerUaNode::afterStartUp | ( | ) | [pure virtual] |
Finish start up in derived class after starting up base class.
Implemented in NodeManagerNS1, and NodeManagerRoot.
virtual UaStatus NodeManagerUaNode::beforeShutDown | ( | ) | [pure virtual] |
Start shut down in derived class before shutting down base class.
Implemented in NodeManagerNS1, and NodeManagerRoot.
UaStatusCode NodeManagerUaNode::createNodeManagerAliasNode | ( | const UaNodeId & | sourceNodeId | ) | [protected] |
Creates an alias node representing a node in another node manager. The node manager gets also connected to the node manager responsible for the source node by using NodeManagerCrossReferences::connectStartingNode
sourceNodeId | the source NodeId of the actual Node. |
UaStatusCode NodeManagerUaNode::clearAllNodes | ( | ) | [protected] |
Clear all nodes in the node manager and all references to other node managers.
UaNode * NodeManagerUaNode::findNode | ( | const OpcUa_NodeId * | pId | ) | const [protected] |
UaString NodeManagerUaNode::getNameSpaceUri | ( | ) | [inline, protected] |
Get all available Namespace Uris.
OpcUa_Boolean NodeManagerUaNode::isStarted | ( | ) | [inline, protected] |
Check if Server is started or not.
UaMutex NodeManagerUaNode::m_mutexNodes [protected] |
Membervar.
This mutex is used to synconize access to the nodes and references in this node manager.