C++ Based OPC UA Client/Server SDK  1.5.5.355

Implementation of the interface NodeManager operating on a generic address space node model. More...

#include <nodemanageruanode.h>

Inherits NodeManager, NodeManagerConfig, NodeManagerCrossReferences, and UaDataTypeDictionary.

Inherited by NodeManagerBase.

Public Member Functions

 NodeManagerUaNode (const UaString &sNamespaceUri, OpcUa_Int32 nHashTableSize)
 Constructs a NodeManagerUaNode object. More...
 
virtual ~NodeManagerUaNode ()
 Destroys the NodeManagerUaNode object and all nodes managed by the NodeManager. More...
 
virtual UaStatus afterStartUp ()=0
 This method needs to be implemented by the derived class and is called to finish the startup of the NodeManager. More...
 
virtual UaStatus beforeShutDown ()=0
 This method needs to be implemented by the derived class and is called to start the shutdown of the NodeManager. More...
 
virtual IOManagergetIOManager (UaNode *pUaNode, OpcUa_Int32 attributeId) const =0
 Get the responsible IOManager for the node and attribute combination. More...
 
virtual UaNodegetNode (const UaNodeId &nodeId)
 Get a UaNode pointer for a requested nodeId. More...
 
void registerBrowseUaNodeCallback (BrowseUaNodeCallback *pBrowseUaNodeCallback)
 Registers a callback interface used to influence browse results.
 
void setDefaultMethodManager (MethodManager *pMethodManager)
 Sets a default MethodManager; used if Object does not implement MethodManager. More...
 
void setFallbackMethodManager (MethodManager *pMethodManager)
 Set a fallback MethodManager; used if Object and Method are not available as UaNode. More...
 
UaStatus addUaNode (UaNode *pNewNode)
 Adds a new UaNode to the node management. More...
 
UaStatus deleteUaNode (UaNode *pNode, OpcUa_Boolean deleteTargetReferences, OpcUa_Boolean deleteSourceReferences=OpcUa_False, OpcUa_Boolean deleteAllChildren=OpcUa_False)
 Removes a UaNode from the node management. More...
 
UaStatus addNodeAndReference (UaReferenceLists *pSourceNode, UaReferenceLists *pNewNode, const UaNodeId &referenceTypeId)
 Adds the new node to the node management and creates a reference. More...
 
UaStatus addNodeAndReference (const UaNodeId &sourceNode, UaReferenceLists *pNewNode, const UaNodeId &referenceTypeId)
 Adds the new node to the node management and creates a reference. More...
 
UaStatus addUaReference (UaReferenceLists *pSourceNode, UaReferenceLists *pTargetNode, const UaNodeId &referenceTypeId)
 Adds a reference from source node to target node. More...
 
UaStatus addUaReference (const UaNodeId &sourceId, const UaNodeId &targetId, const UaNodeId &referenceTypeId)
 Adds a reference from the source node to the target node. More...
 
UaStatus deleteUaReference (UaReferenceLists *pSourceNode, UaReferenceLists *pTargetNode, const UaNodeId &referenceTypeId)
 Deletes the reference from the source node to the target node. More...
 
UaStatus deleteUaReference (const UaNodeId &sourceId, const UaNodeId &targetId, const UaNodeId &referenceTypeId)
 Deletes the reference from the source node to the target node. More...
 
OpcUa_UInt16 getNameSpaceIndex () const
 Get the namespace index of the NodeManager. More...
 
void lockNodes ()
 Lock access to nodes managed by the NodeManagerConfig.
 
void unlockNodes ()
 Unlock access to nodes managed by the NodeManagerConfig.
 
virtual UaStatus startUp (ServerManager *)
 Start up NodeManager. More...
 
virtual UaStatus shutDown ()
 Shut down module. More...
 
virtual UaStatus browse (const ServiceContext &, BrowseContext &, UaReferenceDescriptions &)
 Discover the references of a specified node of a view. More...
 
virtual UaStatus translateBrowsePathToNodeId (const ServiceContext &, const UaNodeId &, UaRelativePath &, UaBrowsePathTargets &)
 Translates a relative browse path to a node id. More...
 
virtual VariableHandlegetVariableHandle (Session *, VariableHandle::ServiceType, OpcUa_NodeId *, OpcUa_Int32) const
 Get the variable handle for the passed node Id. More...
 
virtual MethodHandlegetMethodHandle (Session *, OpcUa_NodeId *, OpcUa_NodeId *, UaStatus &) const
 Get the method handle for the passed node Id. More...
 
virtual
NodeManagerCrossReferences
getNodeManagerCrossReferences ()
 Get the interface NodeManagerCrossReferences if available. More...
 
virtual NodeManagerConfiggetNodeManagerConfig ()
 Gets the interface NodeManagerConfig if available. More...
 
virtual NodeManagerUaNodegetNodeManagerUaNode ()
 Gets the interface NodeManagerUaNode if available. More...
 
virtual UaStatus connectStartingNode (const UaNodeId &, NodeManager *, OpcUa_Boolean, OpcUa_Boolean)
 Connect a starting node to the passed NodeManager This method is used to tell the NodeManager A (implements this method) that another NodeManager B has a Nodes with references to a Node in A but is not able to specify the list. More...
 
virtual UaStatus disconnectStartingNode (const UaNodeId &, NodeManager *)
 Disconnect a starting node from the passed NodeManager. More...
 
virtual UaStatus addCrossReference (const UaNodeId &, const UaNodeId &, OpcUa_Boolean, const UaNodeId &, NodeManager *)
 Creates a reference between nodes managed by different NodeManagers. More...
 
virtual UaStatus deleteCrossReference (const UaNodeId &, const UaNodeId &, OpcUa_Boolean, const UaNodeId &, NodeManager *)
 Deletes a reference between nodes managed by different NodeManagers. More...
 
UaStatus addTypeDictionary (const UaNodeId &nodeId, const UaString &sName, const UaString &sNamespaceUri=UaString())
 Adds a DataTypeDictionary to the Binary DataTypeSystem. More...
 
UaStatus setTypeDictionary (OpcUa::DataTypeDictionaryType *pTypeDictionary)
 Adds a DataTypeDictionary to the Binary DataTypeSystem without adding nodes. More...
 
UaStatus addTypeDictionaryXml (const UaNodeId &nodeId, const UaString &sName, const UaString &sNamespaceUri=UaString())
 Adds a DataTypeDictionary to the XML DataTypeSystem. More...
 
UaStatus setXmlTypeDictionary (OpcUa::DataTypeDictionaryType *pTypeDictionary)
 Adds a DataTypeDictionary to the XML DataTypeSystem without adding nodes. More...
 
UaStatus addStructuredType (const UaStructureDefinition &structure)
 Adds a new DataType node and all needed DataTypeEncoding and DataTypeDescription nodes. More...
 
UaStatus addStructuredTypes (std::list< UaStructureDefinition > &structures)
 Adds a list of new DataType nodes and all needed DataTypeEncoding and DataTypeDescription nodes. More...
 
UaStatus addStructuredTypeDefinition (const UaStructureDefinition &structure)
 Adds a structured DataType definition without adding nodes. More...
 
UaStatus addEnumeratedType (const UaEnumDefinition &enumeration, const UaNodeId &enumerationPropertyId=UaNodeId())
 Adds a new DataType node and the needed property. More...
 
UaStatus addEnumeratedTypes (std::list< UaEnumDefinition > &enumerations)
 Adds a list of new DataType nodes and the needed property. More...
 
UaStatus addOptionSetType (const UaOptionSetDefinition &optionSet, const UaNodeId &optionSetPropertyId=UaNodeId())
 Adds a new DataType node and the needed property. More...
 
UaStatus addOptionSetTypes (std::list< UaOptionSetDefinition > &optionSets)
 Adds a list of new DataType nodes and the needed property. More...
 
void setDataTypeVersion (const UaString &sDataTypeVersion)
 Sets the version of the dictionaries. More...
 
UaString dataTypeVersion () const
 Returns the version of the dictionaries. More...
 
void findDefinitionsForStructureFields ()
 Searches for UaEnumDefinitions and UaStructureDefinitions in UaStructureFields.
 
virtual
UaDataTypeDictionary::DefinitionType 
definitionType (const UaNodeId &dataTypeId)
 Returns the UaDataTypeDictionary::DefinitionType for a data type. More...
 
virtual UaEnumDefinition enumDefinition (const UaNodeId &dataTypeId)
 Returns the UaEnumDefinition for a specified DataType. More...
 
virtual UaStructureDefinition structureDefinition (const UaNodeId &dataTypeId)
 Returns the UaStructureDefinition for a specified DataType. More...
 
virtual UaOptionSetDefinition optionSetDefinition (const UaNodeId &dataTypeId)
 Returns the UaOptionSetDefinition for the specified data type. More...
 
- Public Member Functions inherited from NodeManager
 NodeManager ()
 construction
 
virtual ~NodeManager ()
 destruction
 
virtual UaStatus sessionOpened (Session *)
 Notifies the node manager that a new session was opened. More...
 
virtual UaStatus sessionActivated (Session *)
 Notifies the node manager that a session was activated. More...
 
virtual UaStatus sessionClosed (Session *)
 Notifies the node manager that a session was closed. More...
 
virtual HistoryVariableHandlegetHistoryVariableHandle (Session *pSession, HistoryVariableHandle::ServiceType serviceType, OpcUa_NodeId *pNodeId, UaStatus &result) const
 Get the history variable handle for the passed node Id. More...
 
virtual UaStatus getEventManagers (Session *pSession, OpcUa_NodeId *pNodeId, OpcUa_EventFilter *eventFilter, EventManagerArray &eventManagers) const
 Get a list of EventManager interfaces for an event notifier. More...
 
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)
 Add node to the NodeManager. More...
 
virtual UaStatus addReference (const ServiceContext &serviceContext, const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaNodeId &targetNodeId, OpcUa_NodeClass targetNodeClass)
 Add reference to the NodeManager. More...
 
virtual UaStatus deleteNode (const ServiceContext &serviceContext, const UaNodeId &nodeId, OpcUa_Boolean deleteTargetReference)
 Delete node from the NodeManager. More...
 
virtual UaStatus deleteReference (const ServiceContext &serviceContext, const UaNodeId &sourceNodeId, const UaNodeId &referenceTypeId, OpcUa_Boolean isForward, const UaNodeId &targetNodeId, OpcUa_Boolean deleteBidirectional)
 Delete reference from the NodeManager. More...
 
- Public Member Functions inherited from NodeManagerConfig
 NodeManagerConfig ()
 construction
 
virtual ~NodeManagerConfig ()
 destruction
 
virtual EventManagerUaNodegetEventManagerUaNode ()
 Get the EventManagerUaNode interface if implemented by the class implementing the NodeManagerConfig interface. More...
 
virtual NodeManagerNodeSetXmlgetNodeManagerNodeSetXml ()
 Get the NodeManagerNodeSetXml interface if implemented by the class implementing the NodeManagerConfig interface. More...
 
- Public Member Functions inherited from NodeManagerCrossReferences
 NodeManagerCrossReferences ()
 construction
 
virtual ~NodeManagerCrossReferences ()
 destruction
 
- Public Member Functions inherited from UaDataTypeDictionary
DefinitionType definitionType (const UaVariant &vValue)
 Returns the UaDataTypeDictionary::DefinitionType of a variant. More...
 
DefinitionType definitionType (const UaExtensionObject &vValue)
 Returns the UaDataTypeDictionary::DefinitionType of an ExtensionObject. More...
 
UaStructureDefinition structureDefinition (const UaVariant &vValue)
 Returns the UaStructureDefinition of a variant. More...
 
UaStructureDefinition structureDefinition (const UaExtensionObject &vValue)
 Returns the UaStructureDefinition of an ExtensionObject. More...
 

Protected Member Functions

UaStatusCode clearAllNodes ()
 Clears all nodes in the NodeManager and all references to other NodeManagers. More...
 
UaNodefindNode (const UaNodeId &nodeId) const
 Find a UaNode by UaNodeId. More...
 
UaNodefindNode (const OpcUa_NodeId *pNodeId) const
 Find a UaNode by OpcUa_NodeId. More...
 
UaString getNameSpaceUri ()
 Gets the namespace URI of this NodeManager. More...
 
OpcUa_Boolean isStarted ()
 Checks whether the NodeManager is started or not. More...
 

Protected Attributes

ServerManagerm_pServerManager
 Central server manager object.
 
NodeManagerCrossReferencesm_pNodeManagerCrossReferences0
 NodeManagerCrossReferences interface of NodeManager root (namespace 0).
 
NodeManagerListm_pNodeManagerList
 NodeManagerList interface of NodeManager root (namespace 0).
 
UaString m_defaultLocaleId
 Default LocaleId for the NodeManager.
 
OpcUa_Boolean m_isStarted
 Flag indicating whether the NodeManager was started.
 
UaMutex m_mutexNodes
 This mutex is used to synchronize access to the nodes and references in this NodeManager.
 
OpcUa_UInt16 m_nNamespaceIndex
 Namespace index of this NodeManager.
 
UaString m_sNamespaceUri
 Namespace URI of this NodeManager.
 
HashTablem_pTable
 Hash table for the nodes managed by this NodeManager.
 
UaMutex m_mutexAliasTable
 Mutex used to protect access to the cross NodeManager alias nodes.
 
UaObjectPointerArray< UaNodeIdm_crossNodeManagerAliasNodes
 List of cross NodeManager alias nodes.
 
BrowseUaNodeCallbackm_pBrowseUaNodeCallback
 Callback interface to influence browse results.
 
MethodManagerm_pDefaultMethodManager
 Method manager called if object and method were found but object does not implement MethodManager.
 
MethodManagerm_pFallbackMethodManager
 Method manager called with NodeIds if object and method were not found, like for conditions without nodes in address space.
 
TypeDictionariesm_pTypeDictionaries
 Used for managing custom Structured DataTypes and Enumerated DataTypes that are added during runtime. More...
 

Additional Inherited Members

- Public Types inherited from UaDataTypeDictionary
enum  DefinitionType
 Enumeration that indicates whether a UaEnumDefinition or a UaStructureDefinition is available.
 

Detailed Description

Implementation of the interface NodeManager operating on a generic address space node model.

This class implements most of the functionality necessary for a client to navigate through the nodes of the namespace managed by this NodeManager. A derived class containing the product specific implementation must implement the functions afterStartUp to create the nodes of the address space and beforeShutDown to clean up resources in the NodeManager. It is possible to add and remove nodes and references by using the interface NodeManagerConfig implemented by this NodeManager class.

Constructor & Destructor Documentation

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

Constructs a NodeManagerUaNode object.

Parameters
[in]sNamespaceUriNamespace URI for the namespace managed by this NodeManager instance.
[in]nHashTableSizeSize of the hash table. The size can be smaller than the total number of nodes managed by the NodeManager but it is better for the performance to avoid collisions with a large size. Preferred sizes are 1.009, 10.007, 100.003, 1.000.003, 10.000.019
NodeManagerUaNode::~NodeManagerUaNode ( )
virtual

Destroys the NodeManagerUaNode object and all nodes managed by the NodeManager.

Member Function Documentation

UaStatus NodeManagerUaNode::addCrossReference ( const UaNodeId sourceNodeId,
const UaNodeId referenceTypeId,
OpcUa_Boolean  isForward,
const UaNodeId targetNodeId,
NodeManager pNodeManager 
)
virtual

Creates a reference between nodes managed by different NodeManagers.

Returns
Error code

Reimplemented from NodeManagerCrossReferences.

UaStatus NodeManagerUaNode::addEnumeratedType ( const UaEnumDefinition enumeration,
const UaNodeId enumerationPropertyId = UaNodeId() 
)

Adds a new DataType node and the needed property.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary must be called before calling this method.

Parameters
enumerationThe NamespaceIndex of the DataType must be the same as the NamespaceIndex of the NodeConfig.
enumerationPropertyIdIf null, a string NodeId is created for the property.
UaStatus NodeManagerUaNode::addEnumeratedTypes ( std::list< UaEnumDefinition > &  enumerations)

Adds a list of new DataType nodes and the needed property.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary must be called before calling this method.

Parameters
enumerationsThe NamespaceIndex of the DataTypes must be the same as the NamespaceIndex of the NodeConfig.
UaStatus NodeManagerUaNode::addNodeAndReference ( UaReferenceLists pSourceNode,
UaReferenceLists pNewNode,
const UaNodeId referenceTypeId 
)
virtual

Adds the new node to the node management and creates a reference.

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.

Returns
Result code for the requested action.
Parameters
[in]pSourceNodePointer to UaReferenceLists interface of the source node.
[in]pNewNodePointer to UaReferenceLists interface of the new node.
[in]referenceTypeIdType 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

Adds the new node to the node management and creates a reference.

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.

Returns
Result code for the requested action.
Parameters
[in]sourceNodeNodeId of the source node.
[in]pNewNodePointer to UaReferenceLists interface of the new node.
[in]referenceTypeIdType of the reference to create from the source node to the new node.

Implements NodeManagerConfig.

UaStatus NodeManagerUaNode::addOptionSetType ( const UaOptionSetDefinition optionSet,
const UaNodeId optionSetPropertyId = UaNodeId() 
)

Adds a new DataType node and the needed property.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1 and the optionSet is a subtype of OptionSet. The method addTypeDictionary must be called before calling this method.

Parameters
optionSetThe NamespaceIndex of the DataType must be the same as the NamespaceIndex of the NodeConfig.
optionSetPropertyIdIf null, a string NodeId is created for the property.
UaStatus NodeManagerUaNode::addOptionSetTypes ( std::list< UaOptionSetDefinition > &  optionSets)

Adds a list of new DataType nodes and the needed property.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1 and one optionSets is a subtype of OptionSet. The method addTypeDictionary must be called before calling this method.

Parameters
optionSetsThe NamespaceIndex of the DataTypes must be the same as the NamespaceIndex of the NodeConfig.
UaStatus NodeManagerUaNode::addStructuredType ( const UaStructureDefinition structure)

Adds a new DataType node and all needed DataTypeEncoding and DataTypeDescription nodes.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary or setTypeDictionary must be called before calling this method.

Parameters
structureThe NamespaceIndex of the DataType and the BinaryEncodingId must be the same as the NamespaceIndex of the NodeConfig.
UaStatus NodeManagerUaNode::addStructuredTypeDefinition ( const UaStructureDefinition structure)

Adds a structured DataType definition without adding nodes.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary or setTypeDictionary must be called before calling this method.

Parameters
structureThe NamespaceIndex of the DataType and the BinaryEncodingId must be the same as the NamespaceIndex of the NodeConfig.
UaStatus NodeManagerUaNode::addStructuredTypes ( std::list< UaStructureDefinition > &  structures)

Adds a list of new DataType nodes and all needed DataTypeEncoding and DataTypeDescription nodes.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary or setTypeDictionary must be called before calling this method.

Parameters
structuresThe NamespaceIndex of the DataTypes and the BinaryEncodingId must be the same as the NamespaceIndex of the NodeConfig.
UaStatus NodeManagerUaNode::addTypeDictionary ( const UaNodeId nodeId,
const UaString sName,
const UaString sNamespaceUri = UaString() 
)

Adds a DataTypeDictionary to the Binary DataTypeSystem.

This method and setTypeDictionary must called at most one time for a NodeManager.

Parameters
nodeIdThe NodeId of the Dictionary node. The NamespaceIndex must match the NamespaceIndex of this NodeManager.
sNameThe name of the Dictionary node.
sNamespaceUriThe namespace uri for the dictionary. If empty, the namespace uri of the NodeManager is used.
UaStatus NodeManagerUaNode::addTypeDictionaryXml ( const UaNodeId nodeId,
const UaString sName,
const UaString sNamespaceUri = UaString() 
)

Adds a DataTypeDictionary to the XML DataTypeSystem.

This method and setXmlTypeDictionary must called at most one time for a NodeManager.

Parameters
nodeIdThe NodeId of the Dictionary node. The NamespaceIndex must match the NamespaceIndex of this NodeManager.
sNameThe name of the Dictionary node. It is recommended that the names of the XML dictionary and the binary dictionary are the same.
sNamespaceUriThe namespace uri for the dictionary. If empty, the namespace uri of the NodeManager is used.
UaStatus NodeManagerUaNode::addUaNode ( UaNode pNewNode)
virtual

Adds a new UaNode to the node management.

Adds the passed new node to the internal node management of the NodeManager.

Returns
Result code for the requested action.
Parameters
[in]pNewNodePointer to UaNode interface of the new node to add

Implements NodeManagerConfig.

UaStatus NodeManagerUaNode::addUaReference ( UaReferenceLists pSourceNode,
UaReferenceLists pTargetNode,
const UaNodeId referenceTypeId 
)
virtual

Adds a reference from source node to target node.

Creates a reference from the passed source node to the passed target node.

Returns
Result code for the requested action
Parameters
[in]pSourceNodePointer to UaReferenceLists interface of the source node.
[in]pTargetNodePointer to UaReferenceLists interface of the target node.
[in]referenceTypeIdType 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

Adds a reference from the source node to the 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.

Returns
Result code for the requested action.
Parameters
[in]sourceIdNodeId of the source node.
[in]targetIdNodeId of the target node.
[in]referenceTypeIdType of the reference to create from the source node to the target node.

Implements NodeManagerConfig.

virtual UaStatus NodeManagerUaNode::afterStartUp ( )
pure virtual

This method needs to be implemented by the derived class and is called to finish the startup of the NodeManager.

This method is typically used to initialize the NodeManager and to create the nodes available at startup.

Returns
Result code

Implemented in NodeManagerRoot, OpcUaDi::NodeManagerDevicesBase, NodeManagerNS1, OpcUaPlc::NodeManagerPLCopenBase, OpcUaDi::NodeManagerDevices, OpcUaPlc::NodeManagerPLCopen, and NodeManagerNodeSetXml.

virtual UaStatus NodeManagerUaNode::beforeShutDown ( )
pure virtual

This method needs to be implemented by the derived class and is called to start the shutdown of the NodeManager.

This method is typically used to clean up resources in the NodeManager. The nodes created in the NodeManager are automatically deleted by the NodeManager.

Returns
Result code

Implemented in NodeManagerRoot, NodeManagerNS1, OpcUaDi::NodeManagerDevices, OpcUaPlc::NodeManagerPLCopen, and NodeManagerNodeSetXml.

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
serviceContextGeneral context for the service call containing information like the session object, return diagnostic mask and timeout hint.
browseContextBrowse context for the first browse or the following browse next calls with continuation point.
ReferencesArray of ReferenceDescription results for the browsed node.
Returns
Error code

Implements NodeManager.

Reimplemented in NodeManagerRoot.

UaStatusCode NodeManagerUaNode::clearAllNodes ( )
protected

Clears all nodes in the NodeManager and all references to other NodeManagers.

Returns
Error code
UaStatus NodeManagerUaNode::connectStartingNode ( const UaNodeId startingNode,
NodeManager pNodeManager,
OpcUa_Boolean  forwardReferences,
OpcUa_Boolean  inverseReferences 
)
virtual

Connect a starting node to the passed NodeManager This method is used to tell the NodeManager A (implements this method) that another NodeManager B has a Nodes with references to a Node in A but is not able to specify the list.

All View services called with the specified Node in A must be called also on NodeManager B to allow B to return affected Nodes.

Parameters
startingNodeNodeId of the node that needs to be connected to the other NodeManager.
pNodeManagerPointer to NodeManager that manages references from the starting node to nodes in the that NodeManager.
forwardReferencesFlag that indicates that there are forward references.
inverseReferencesFlag that indicates that there are inverse references.
Returns
Error code

Implements NodeManagerCrossReferences.

UaString NodeManagerUaNode::dataTypeVersion ( ) const

Returns the version of the dictionaries.

The method addTypeDictionary must be called before calling this method.

UaDataTypeDictionary::DefinitionType NodeManagerUaNode::definitionType ( const UaNodeId dataTypeId)
virtual

Returns the UaDataTypeDictionary::DefinitionType for a data type.

A binary dictionary has to be cretead with addTypeDictionary and a definition for the dataTypeId has to be added with addStructuredType or addEnumeratedType before calling this method. Otherwise, UaDataTypeDictionary::DefinitionType_None is returned.

Parameters
dataTypeIdThe NamespaceIndex of dataTypeId must be the NamespaceIndex of this NodeManager instance.

Implements UaDataTypeDictionary.

UaStatus NodeManagerUaNode::deleteCrossReference ( const UaNodeId sourceNodeId,
const UaNodeId referenceTypeId,
OpcUa_Boolean  isForward,
const UaNodeId targetNodeId,
NodeManager pNodeManager 
)
virtual

Deletes a reference between nodes managed by different NodeManagers.

Returns
Error code

Reimplemented from NodeManagerCrossReferences.

UaStatus NodeManagerUaNode::deleteUaNode ( UaNode pNode,
OpcUa_Boolean  deleteTargetReferences,
OpcUa_Boolean  deleteSourceReferences = OpcUa_False,
OpcUa_Boolean  deleteAllChildren = OpcUa_False 
)
virtual

Removes a UaNode from the node management.

Removes the passed node from the internal node management of the NodeManager.

Returns
Result code for the requested action.
Parameters
[in]pNodePointer to UaNode interface of the node to remove.
[in]deleteTargetReferencesFlag indicating if the inverse references in the target nodes must be deleted
[in]deleteSourceReferencesFlag indicating if the inverse references in the target nodes must be deleted
[in]deleteAllChildrenIndicates whether all child nodes of the node to delete and all references of the nodes must be deleted. In this case, the function follows all forward references that are a subtype of HasChildren, like HasComponent or HasProperty, and deletes the target nodes and all of their references. If this flag is set and one of the child nodes to delete is shared, the shared node and its children are not deleted.

Implements NodeManagerConfig.

UaStatus NodeManagerUaNode::deleteUaReference ( UaReferenceLists pSourceNode,
UaReferenceLists pTargetNode,
const UaNodeId referenceTypeId 
)
virtual

Deletes the reference from the source node to the target node.

Deletes the reference of the passed type from the passed source node to the passed target node.

Returns
Result code for the requested action.
Parameters
[in]pSourceNodePointer to UaReferenceLists interface of the source node.
[in]pTargetNodePointer to UaReferenceLists interface of the target node.
[in]referenceTypeIdType 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

Deletes the reference from the source node to the target node.

This functions is provided for convenience and behaves like the functions above. It finds the node objects for the specified source and target nodeIds and deletes the reference if the nodes exist.

Returns
Result code for the requested action
Parameters
[in]sourceIdNodeId of the source node.
[in]targetIdNodeId of the target node.
[in]referenceTypeIdType of the reference to delete from the source node to the target node.

Implements NodeManagerConfig.

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

Disconnect a starting node from the passed NodeManager.

Parameters
startingNodeNodeId of the node that needs to be disconnected from the other NodeManager.
pNodeManagerPointer of the NodeManager to disconnect.
Returns
Error code

Implements NodeManagerCrossReferences.

UaEnumDefinition NodeManagerUaNode::enumDefinition ( const UaNodeId dataTypeId)
virtual

Returns the UaEnumDefinition for a specified DataType.

A UaEnumDefinition must be available for the DataType. Otherwise an empty UaEnumDefinition is returned.

Implements UaDataTypeDictionary.

UaNode * NodeManagerUaNode::findNode ( const UaNodeId nodeId) const
protected

Find a UaNode by UaNodeId.

Parameters
nodeIdNodeId of the node to find.
Returns
the currently searched Node.
UaNode * NodeManagerUaNode::findNode ( const OpcUa_NodeId pNodeId) const
protected

Find a UaNode by OpcUa_NodeId.

Parameters
pNodeIdNodeId of the node to find.
Returns
the currently searched Node.
virtual IOManager* NodeManagerUaNode::getIOManager ( UaNode pUaNode,
OpcUa_Int32  attributeId 
) const
pure virtual

Get the responsible IOManager for the node and attribute combination.

Parameters
pUaNodethe actual Node where to get all information from.
attributeIdAttributeId of the requested node
Returns
a Variable to the IOManager.

Implemented in NodeManagerBase.

MethodHandle * NodeManagerUaNode::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.

Parameters
pSessionInterface to the Session context for the method call
pObjectNodeIdThe NodeId of the requested Object. The pointer to the NodeId is only valid during this call.
pMethodNodeIdThe NodeId of the requested Method. The pointer to the NodeId is only valid during this call.
resultThe result of the current Operation.
Returns
Error code

Reimplemented from NodeManager.

Reimplemented in NodeManagerRoot.

OpcUa_UInt16 NodeManagerUaNode::getNameSpaceIndex ( ) const
inlinevirtual

Get the namespace index of the NodeManager.

Implements NodeManagerConfig.

UaString NodeManagerUaNode::getNameSpaceUri ( )
inlineprotected

Gets the namespace URI of this NodeManager.

Returns
the requested namespace URI.
UaNode * NodeManagerUaNode::getNode ( const UaNodeId nodeId)
virtual

Get a UaNode pointer for a requested nodeId.

If a UaNode object is found for the nodeId, the reference count of the node is incremented and a pointer to the node is returned. The caller must release the reference when the node is no longer needed.

Parameters
nodeIdNodeId of the node to return.
Returns
The requested node. Null if node was not found. The reference count for the found node is incremented.

Reimplemented in NodeManagerRoot.

NodeManagerConfig * NodeManagerUaNode::getNodeManagerConfig ( )
virtual

Gets the interface NodeManagerConfig if available.

Returns
the NodeManagerConfig Variable.

Reimplemented from NodeManager.

Reimplemented in NodeManagerRoot.

NodeManagerCrossReferences * NodeManagerUaNode::getNodeManagerCrossReferences ( )
virtual

Get the interface NodeManagerCrossReferences if available.

Returns
the NodeManagerCrossReferences interface pointer.

Reimplemented from NodeManager.

Reimplemented in NodeManagerRoot.

NodeManagerUaNode * NodeManagerUaNode::getNodeManagerUaNode ( )
virtual

Gets the interface NodeManagerUaNode if available.

Returns
the NodeManagerUaNode interface pointer.

Reimplemented from NodeManager.

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.

This method is used to get the VariableHandle for a node used to access the related IOManager in the services Read, Write and CreateMonitoredItems. The provided VariableHandle is reference counted. The reference count is 1 after initial creation of the object. The SDK will release its reference after the transaction is finished. If the VariableHandle is stored in an application specific object, the reference counter must be incremented to keep the one reference. If this stored pointer is used to return the VariableHandle in following getVariableHandle calls, the reference counter must be incremented before returning the pointer.

Parameters
pSessionInterface to the Session context for the method call. The Session object is reference counted. The Session is valid until the client has closed the Session or it timed out. If the Session pointer is stored in user objects, these objects must add their own reference.
serviceTypeService type enumerator
pNodeIdNodeId of the requested node. The pointer to the NodeId is only valid during this call.
AttributeIdAttributeId of the requested node
Returns
The variable handle for the passed node Id and attribute Id combination.

Implements NodeManager.

Reimplemented in NodeManagerRoot.

OpcUa_Boolean NodeManagerUaNode::isStarted ( )
inlineprotected

Checks whether the NodeManager is started or not.

Returns
a bool value indicating whether the nodemanager is started or not.
UaOptionSetDefinition NodeManagerUaNode::optionSetDefinition ( const UaNodeId dataTypeId)
virtual

Returns the UaOptionSetDefinition for the specified data type.

Implements UaDataTypeDictionary.

void NodeManagerUaNode::setDataTypeVersion ( const UaString sDataTypeVersion)

Sets the version of the dictionaries.

The method addTypeDictionary must be called before calling this method.

void NodeManagerUaNode::setDefaultMethodManager ( MethodManager pMethodManager)

Sets a default MethodManager; used if Object does not implement MethodManager.

This MethodManager is used if object and method nodes were found but the object does not implement the MethodManager.

void NodeManagerUaNode::setFallbackMethodManager ( MethodManager pMethodManager)

Set a fallback MethodManager; used if Object and Method are not available as UaNode.

This MethodManager is used if object and method were not found as UaNode, like for conditions without nodes in address space. This MethodManager is called with MethodHandleNodeId containing the NodeIds for object and method.

UaStatus NodeManagerUaNode::setTypeDictionary ( OpcUa::DataTypeDictionaryType pTypeDictionary)

Adds a DataTypeDictionary to the Binary DataTypeSystem without adding nodes.

This method and addTypeDictionary must called at most one time for a NodeManager.

UaStatus NodeManagerUaNode::setXmlTypeDictionary ( OpcUa::DataTypeDictionaryType pTypeDictionary)

Adds a DataTypeDictionary to the XML DataTypeSystem without adding nodes.

This method and addTypeDictionaryXml must called at most one time for a NodeManager.

UaStatus NodeManagerUaNode::shutDown ( )
virtual

Shut down module.

Method is called during shut down of OPC Server and can be used to clean up the configuration of the module.

Returns
Error code

Implements UaServerApplicationModule.

UaStatus NodeManagerUaNode::startUp ( ServerManager pServerManager)
virtual

Start up NodeManager.

Parameters
pServerManagerInterface 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 UaServerApplicationModule.

Reimplemented in NodeManagerRoot, NodeManagerBase, and NodeManagerNS1.

UaStructureDefinition NodeManagerUaNode::structureDefinition ( const UaNodeId dataTypeId)
virtual

Returns the UaStructureDefinition for a specified DataType.

A UaStructureDefinition must be available for the DataType. Otherwise an empty UaStructureDefinition is returned.

Implements UaDataTypeDictionary.

UaStatus NodeManagerUaNode::translateBrowsePathToNodeId ( const ServiceContext serviceContext,
const UaNodeId startingNode,
UaRelativePath relativePath,
UaBrowsePathTargets browsePathTargets 
)
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 required to process relative path elements and starting nodes managed by the current node manager instance but it may also resolve the full path for all involved NodeManagers.

If not all path elements can be resolved by the NodeManager, the call can be returned with the last resolved target node and the remaining index provided in browsePathTargets, or the NodeManager calls translateBrowsePathToNodeId() on the NodeManager that is responsible for the next node in the path.

If the path cannot be resolved completely but the next node in the path is in another server, the method must return OpcUa_UncertainReferenceOutOfServer.

If a path results in more than one result, the implementation of this method must resolve the full path for all possible results.

Parameters
serviceContextGeneral context for the service calls containing information like the session object, return diagnostic mask and timeout hint.
startingNodeStarting node from where the relative path is defined.
relativePathRelative path from the starting node to the searched node including the current position of the translate process.
See also
UaRelativePath provides more details.
Parameters
browsePathTargetsAll result target nodes for the browse path or the partial result for the already resolved part of the path.
Returns
Error code

Implements NodeManager.

Reimplemented in NodeManagerRoot.

Member Data Documentation

TypeDictionaries* NodeManagerUaNode::m_pTypeDictionaries
protected

Used for managing custom Structured DataTypes and Enumerated DataTypes that are added during runtime.


The documentation for this class was generated from the following files: