#include <uabasenodes.h>

Inheritance diagram for UaReferenceLists:
Collaboration diagram for UaReferenceLists:

List of all members.

Public Member Functions

 UaReferenceLists ()
virtual ~UaReferenceLists ()
virtual UaStatus browseReferences (const ServiceContext &serviceContext, BrowseContext &browseContext, UaReferenceDescriptions &References)
virtual UaStatus translateBrowsePathToNodeId (const ServiceContext &serviceContext, const UaNodeId &startingNode, UaRelativePath &relativePath, UaBrowsePathTargets &browsePathTargets)
virtual const UaReferencepTargetNodes () const
virtual const UaReferencepSourceNodes () const
virtual UaNodegetTargetNodeByBrowseName (const UaQualifiedName &browseName) const
 < [in] Browse name of the searched node.
virtual void addTargetNode (UaReference *pReference)
virtual void addSourceNode (UaReference *pReference)
virtual UaStatus removeSourceNode (UaReference *pReferenceToRemove)
virtual bool removeSourceReference (UaReference *pReferenceToRemove)
virtual UaStatus removeTargetNode (UaNode *pTargetNode, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
virtual UaStatus removeTargetNode (const UaNodeId &targetNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean deleteBidirectional)
virtual bool removeTargetReference (UaReference *pReferenceToRemove)
virtual UaStatus removeCrossNodeManagerRef (NodeManager *pNodeManager)
virtual UaStatus invalidateSourceReferences (OpcUa_Boolean deleteSourceReferences)
virtual UaStatus invalidateTargetReferences (OpcUa_Boolean deleteTargetReferences)
virtual UaStatus deleteAllChilren (NodeManagerConfig *pNodeManagerConfig)
virtual UaNodegetUaNode () const =0

Protected Attributes

UaReferencem_pTargetNodes
UaReferencem_pLastTargetNode
UaReferencem_pSourceNodes

Detailed Description

Class implementing the reference handling for UaNodes

Concrete implementation of one of the UaNode interfaces like UaObject or UaVariable can derive from this class to get the default reference handling for UaNodes. This includes adding and removing references, browsing and the implementation of translateBrowsePathToNodeIds.

The class is not thread safe. It is stronly recommended to lock the protected member m_mutexNodes of NodeManagerUaNode if the methods of this class are used directly in the NodeManager. The methods browseReferences and translateBrowsePathToNodeId are using a mutex thas is passed in to the serviceContext parameter. This is automatically used by the SDK when using one of the two methods.


Constructor & Destructor Documentation

UaReferenceLists::UaReferenceLists (  )

Constructs the reference lists object

UaReferenceLists::~UaReferenceLists (  ) [virtual]

Destroys the reference lists object


Member Function Documentation

void UaReferenceLists::addSourceNode ( UaReference pReference ) [virtual]

Adds a reference to a source node where this node is the target node.

Parameters:
[in]pReferenceA reference to a target node.
void UaReferenceLists::addTargetNode ( UaReference pReference ) [virtual]

Add a reference to a target node where this node is the source node.

Parameters:
[in]pReferenceA reference to a target node.
UaStatus UaReferenceLists::browseReferences ( 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.

Returns:
Result code for the requested action
Parameters:
[in]serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in,out]browseContextBrowse context for the first browse or the following browse with continuation point.
[out]ReferencesArray of ReferenceDescription results for the browsed node.
UaStatus UaReferenceLists::deleteAllChilren ( NodeManagerConfig pNodeManagerConfig ) [virtual]

Deletes all child nodes

Deletes all child nodes and all references of the nodes to delete. The fuction follows all forward references that are a subtype of HasChild like HasComponent or HasProperty and deletes the target nodes and all of their references.

Returns:
Result code for the requested action
Parameters:
[in]pNodeManagerConfigConfig interface of the node manager that owns the nodes to delete.
UaNode * UaReferenceLists::getTargetNodeByBrowseName ( const UaQualifiedName browseName ) const [virtual]

< [in] Browse name of the searched node.

Searches a target node with the passed browse name and returns the UaNode interface if found. Returns NULL if the node was not found.

UaStatus UaReferenceLists::invalidateSourceReferences ( OpcUa_Boolean  deleteSourceReferences ) [virtual]

Set all refernces from SourceNodes to this Node invalid.

Returns:
Result code for the requested action
Parameters:
[in]deleteSourceReferencesFlag indicating if the inverse references in the target nodes must be deleted
UaStatus UaReferenceLists::invalidateTargetReferences ( OpcUa_Boolean  deleteTargetReferences ) [virtual]

Set all refernces to TargetNode of this node invalid.

Returns:
Result code for the requested action
Parameters:
[in]deleteTargetReferencesFlag indicating if the inverse references in the target nodes must be deleted
const UaReference * UaReferenceLists::pSourceNodes (  ) const [virtual]

Returns the list of references to source nodes. The returned pointer is null if there are no references. Use UaReference::pNextInverseReference to iterate through the list of inverse references. Do not use the access to this list for any changes. Changes must be executed by using the methods of the class UaReferenceList. Iterating through the list of references is not thread safe. Use the mutex NodeManagerUaNode::m_mutexNodes to lock the access to the list.

const UaReference * UaReferenceLists::pTargetNodes (  ) const [virtual]

Returns the list of references to target nodes. The returned pointer is null if there are no references. Use UaReference::pNextForwardReference to iterate through the list of forward references. Do not use the access to this list for any changes. Changes must be executed by using the methods of the class UaReferenceList. Iterating through the list of references is not thread safe. Use the mutex NodeManagerUaNode::m_mutexNodes to lock the access to the list.

UaStatus UaReferenceLists::removeCrossNodeManagerRef ( NodeManager pNodeManager ) [virtual]

Remove references to another NodeManager.

Returns:
Result code for the requested action
Parameters:
[in]pNodeManagerPointer to NodeManager that manages references from the starting node to nodes in the that NodeManager.
UaStatus UaReferenceLists::removeSourceNode ( UaReference pReferenceToRemove ) [virtual]

Remove a reference to a source node where this node is the target node.

Returns:
Result code for the requested action
Parameters:
[in]pReferenceToRemoveA reference to a target node to be removed
bool UaReferenceLists::removeSourceReference ( UaReference pReferenceToRemove ) [virtual]

Remove the passed reference to a source node. The reference is NOT deleted by this function.

Returns:
True if the reference was found and removed from the list. False if the reference was not found
Parameters:
[in]pReferenceToRemoveA reference from a source node to be removed
UaStatus UaReferenceLists::removeTargetNode ( UaNode pTargetNode,
const UaNodeId referenceTypeId,
OpcUa_Boolean  deleteBidirectional 
) [virtual]

Remove a reference to a target node where this node is the source node.

Returns:
Result code for the requested action
Parameters:
[in]pTargetNodeThe target node to which the reference should be removed.
[in]referenceTypeIdType of the reference to remove from the source node to the target node.
[in]deleteBidirectionalTRUE if delete bidirectional FALSE if not.
UaStatus UaReferenceLists::removeTargetNode ( const UaNodeId targetNodeId,
const UaNodeId referenceTypeId,
OpcUa_Boolean  deleteBidirectional 
) [virtual]

Remove a reference to a target node where this node is the source node.

Returns:
Result code for the requested action
Parameters:
[in]targetNodeIdThe target node to which the reference should be removed.
[in]referenceTypeIdType of the reference to remove from the source node to the target node.
[in]deleteBidirectionalTRUE if delete bidirectional FALSE if not.
bool UaReferenceLists::removeTargetReference ( UaReference pReferenceToRemove ) [virtual]

Remove the passed reference to a target node. The reference is NOT deleted by this function.

Returns:
True if the reference was found and removed from the list. False if the reference was not found
Parameters:
[in]pReferenceToRemoveA reference to a target node to be removed
UaStatus UaReferenceLists::translateBrowsePathToNodeId ( const ServiceContext serviceContext,
const UaNodeId startingNode,
UaRelativePath relativePath,
UaBrowsePathTargets &  browsePathTargets 
) [virtual]

Find a node based on an element of an relative path.

Returns:
Result code for the requested action
Parameters:
[in]serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
[in]startingNodeStarting node from where the relative path is defined.
[in,out]relativePathRelative path from the starting node to the searched node.
[out]browsePathTargetsTargets of the Browsepath.

Member Data Documentation

Last references in the list of references to the target nodes.

List of references to source nodes where this node is the target node.

List of references to target nodes where this node is the source node.


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