C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
UaBase::Nodeset Class Reference

Container Class for a Nodeset of OPC UA Nodes. More...

#include <nodeset.h>

Inherits UaBase::AbstractNodesetServices.

Public Member Functions

 ~Nodeset ()
 Destruction, automatically frees all BaseNode s.
 
BaseNodenewNode (UaNodeId nodeId, OpcUa_NodeClass nodeClass)
 Allocates and inserts a new Nodeset member. More...
 
bool deleteNode (UaNodeId nodeId)
 Delete a node from the Nodeset. More...
 
void setNamespaces (const UaStringArray &namespaceUris)
 Sets the namespaceArray of the Nodeset. More...
 
const UaStringArraygetNamespaces () const
 Gets the namespaceArray of the Nodeset. More...
 
OpcUa_UInt32 numberOfNamespaces () const
 Returns the number of available namespaces in the Nodeset, including NS0 and NS1.
 
UaUInt16Array getNamespaceIndices (const UaStringArray &nsUris) const
 Returns the namespace indices in the Nodeset's namespace table for the given namespace uris. More...
 
bool remapNamespaces ()
 Map all namespace indices in Nodeset according to m_nsmap and adjust the namespacetable accordingly. More...
 
virtual UaStatus browse (const UaNodeId &nodeToBrowse, const OpcUa_BrowseDirection browseDirection, const UaNodeId &referenceTypeId, const OpcUa_Boolean includeSubtypes, const OpcUa_UInt32 nodeClassMask, const OpcUa_UInt32 resultMask, const OpcUa_UInt32 maxReferencesToReturn, UaByteString &continuationPoint, UaReferenceDescriptions &referenceDescriptions) const
 Implementation of the interface AbstractOfflineServices::browse().
 
virtual UaStatus browseNext (OpcUa_Boolean releaseContinuationPoint, UaByteString &continuationPoint, UaReferenceDescriptions &referenceDescriptions) const
 Implementation of the AbstractOfflineServices::browseNext() interface.
 
virtual UaStatus read (OpcUa_Double maxAge, OpcUa_TimestampsToReturn timeStamps, const UaReadValueIds &nodesToRead, UaDataValues &values, UaDiagnosticInfos &diagnosticInfos) const
 Implementation of the AbstractOfflineServices::read() interface.
 
- Public Member Functions inherited from UaBase::AbstractNodesetServices
virtual UaStatus write (const UaWriteValues &nodesToWrite, UaStatusCodeArray &results, UaDiagnosticInfos &diagnosticInfos)
 Writes variable values synchronously to an OPC UA server. More...
 

Detailed Description

Container Class for a Nodeset of OPC UA Nodes.

This class is used to store an imported OPC UA Addressspace (or parts of it) and provides a STL like interface to work with the data. The internal representation for data storage is a std::map of UaBase::BaseNodes but can change in future revisions. Therefore the public STL interface (iterators and standard operations like e.g. empty()) is provided.

This class implements the AbstractNodesetServices Interface which provides a more UA like way to interact with a Nodeset. This implementation is used to implement, for example the UaAbstractDictionaryReader interface in UaBase::AbstractNodesetExport .

Member Function Documentation

bool UaBase::Nodeset::deleteNode ( UaNodeId  nodeId)

Delete a node from the Nodeset.

If there is a value allocated for this key, free the associated memory.

Parameters
nodeIdThe key to delete from the Nodeset.
UaUInt16Array UaBase::Nodeset::getNamespaceIndices ( const UaStringArray nsUris) const

Returns the namespace indices in the Nodeset's namespace table for the given namespace uris.

Parameters
nsUrisa UaStringArray of namespace uris for which to retrieve the index in the Nodeset's namespace table.
Returns
a UaUInt16Array of namespace indices corresponding to the namespace uris
const UaStringArray & UaBase::Nodeset::getNamespaces ( ) const

Gets the namespaceArray of the Nodeset.

Returns
a reference to the UaStringArray containing the namespace uris of all namespaces currently present in the Nodeset
BaseNode * UaBase::Nodeset::newNode ( UaNodeId  nodeId,
OpcUa_NodeClass  nodeClass 
)

Allocates and inserts a new Nodeset member.

Parameters
nodeIdthe nodeId of the new BaseNode
nodeClassthe nodeClass of the new BaseNode
Returns
a pointer to the newly allocated BaseNode
bool UaBase::Nodeset::remapNamespaces ( )

Map all namespace indices in Nodeset according to m_nsmap and adjust the namespacetable accordingly.

On Success m_nsmap will get cleared.

void UaBase::Nodeset::setNamespaces ( const UaStringArray namespaceUris)

Sets the namespaceArray of the Nodeset.

Parameters
namespaceUrisa UaStringArray containing the namespace uris of all namespaces present in the Nodeset

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