NodeManagerUaNode Class Reference
[Core Module Interface Base Implementations]

#include <nodemanageruanode.h>

Inheritance diagram for NodeManagerUaNode:
Collaboration diagram for NodeManagerUaNode:

List of all members.


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 VariableHandlegetVariableHandle (Session *pSession, VariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, OpcUa_Int32 AttributeId) const
MethodHandlegetMethodHandle (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 NodeManagerConfiggetNodeManagerConfig ()
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 IOManagergetIOManager (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 ()
UaNodefindNode (const UaNodeId &id) const
UaNodefindNode (const OpcUa_NodeId *pId) const
UaString getNameSpaceUri ()
OpcUa_Boolean isStarted ()

Protected Attributes

ServerManagerm_pServerManager
 Membervar.
NodeManagerCrossReferencesm_pNodeManagerCrossReferences0
 Membervar.
NodeManagerListm_pNodeManagerList
 Membervar.
UaString m_defaultLocaleId
 Membervar.
OpcUa_Boolean m_isStarted
 Membervar.
UaMutex m_mutexNodes
 Membervar.
OpcUa_UInt16 m_nNamespaceIndex
 Membervar.
UaString m_sNamespaceUri
 Membervar.
HashTablem_pTable
 Membervar.
UaMutex m_mutexAliasTable
 Membervar.
UaObjectPointerArray< UaNodeIdm_crossNodeManagerAliasNodes
 Membervar.

Detailed Description

Implementation of the interface NodeManager operating on a generic address space node model. Provides access for browsing and all operations which belong to it. Derived from NodeManager, NodeManagerConfig and NodeManagerCrossReferences It is not possible to create plane copies of this Interface.

Constructor & Destructor Documentation

NodeManagerUaNode::NodeManagerUaNode ( const UaString sNamespaceUri,
OpcUa_Int32  nHashTableSize 
)

construction

NodeManagerUaNode::~NodeManagerUaNode (  )  [virtual]

destruction


Member Function Documentation

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

Start up NodeManager.

Parameters:
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
Returns:
Error code

Implements NodeManager.

Reimplemented in NodeManagerNS1, and NodeManagerRoot.

UaStatus NodeManagerUaNode::shutDown (  )  [virtual]

Shut down NodeManager.

Returns:
Error code

Implements NodeManager.

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.

Parameters:
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.
Returns:
Error code

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.

Parameters:
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.
Returns:
Error code

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.

Parameters:
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
Returns:
the variable handle for the passed node Id.

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.

Parameters:
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.
Returns:
the method handle for the passed node Id.

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.

Parameters:
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.
Returns:
Error code

Reimplemented from NodeManager.

Reimplemented in NodeManagerRoot.

NodeManagerCrossReferences * NodeManagerUaNode::getNodeManagerCrossReferences (  )  [virtual]

Get the interface NodeManagerCrossReferences if available.

Returns:
the NodeManagerCrossReferences Variable.

Reimplemented from NodeManager.

Reimplemented in NodeManagerRoot.

NodeManagerConfig * NodeManagerUaNode::getNodeManagerConfig (  )  [virtual]

Get the interface NodeManagerConfig if available.

Returns:
the NodeManagerConfig Variable.

Reimplemented from NodeManager.

Reimplemented in NodeManagerRoot.

UaStatus NodeManagerUaNode::addUaNode ( UaNode pNewNode  )  [virtual]

Add a new UaNode to the node management. Adds the passed new node to the internal node management of the NodeManager.

Parameters:
pNewNode Pointer to UaNode interface of the new node.
Returns:
Error code

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.

Parameters:
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
Returns:
Error code

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.

Parameters:
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.
Returns:
Error code

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.

Parameters:
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.
Returns:
Error code

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.

Parameters:
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.
Returns:
Error code

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.

Parameters:
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.
Returns:
Error code

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.

Parameters:
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.
Returns:
Error code

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.

Parameters:
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.
Returns:
Error code

Implements NodeManagerConfig.

OpcUa_UInt16 NodeManagerUaNode::getNameSpaceIndex (  )  const [inline, virtual]

Get the namespace index of the node manager

Returns:
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

Parameters:
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.
Returns:
Error code

Implements NodeManagerCrossReferences.

UaStatus NodeManagerUaNode::disconnectStartingNode ( const UaNodeId startingNode,
NodeManager pNodeManager 
) [virtual]

Disconnect a starting node from the passed NodeManager

Parameters:
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.
Returns:
Error code

Implements NodeManagerCrossReferences.

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

Get the responsible IOManager for the node and attribute combination.

Parameters:
pUaNode the actual Node where to get all information from.
attributeId AttributeId of the requested node
Returns:
a Variable to the IOManager.

Implemented in NodeManagerNS1, and NodeManagerRoot.

virtual UaStatus NodeManagerUaNode::afterStartUp (  )  [pure virtual]

Finish start up in derived class after starting up base class.

Returns:
Error code

Implemented in NodeManagerNS1, and NodeManagerRoot.

virtual UaStatus NodeManagerUaNode::beforeShutDown (  )  [pure virtual]

Start shut down in derived class before shutting down base class.

Returns:
Error code

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

Parameters:
sourceNodeId the source NodeId of the actual Node.
Returns:
Error code

UaStatusCode NodeManagerUaNode::clearAllNodes (  )  [protected]

Clear all nodes in the node manager and all references to other node managers.

Returns:
Error code

UaNode * NodeManagerUaNode::findNode ( const UaNodeId id  )  const [protected]

Find a UaNode by UaNodeId.

Parameters:
id NodeId to convert.
Returns:
the current searched Node.

UaNode * NodeManagerUaNode::findNode ( const OpcUa_NodeId *  pId  )  const [protected]

Find a UaNode by OpcUa_NodeId.

Parameters:
pId NodeId to convert.
Returns:
the curent searched Node.

UaString NodeManagerUaNode::getNameSpaceUri (  )  [inline, protected]

Get all available Namespace Uris.

Returns:
the requested Namespace Uri.

OpcUa_Boolean NodeManagerUaNode::isStarted (  )  [inline, protected]

Check if Server is started or not.

Returns:
a bool value if started or not.


Member Data Documentation

Membervar.

This mutex is used to synconize access to the nodes and references in this node manager.


The documentation for this class was generated from the following files:
  • src/uaserver/uaservercpp/coremodule/nodemanageruanode.h
  • src/uaserver/uaservercpp/coremodule/nodemanageruanode.cpp