C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
UaClientSdk::NodesetBrowseImport Class Reference

OPC UA client based implementation for the Nodeset Browse/Read importer. More...

#include <nodesetbrowseimport.h>

Inherits UaBase::AbstractNodesetBrowseImport.

Public Member Functions

void setBrowseTimeout (OpcUa_Int32 timeout)
 Sets the timeout used for Browse service requests.
 
void setReadTimeout (OpcUa_Int32 timeout)
 Sets the timeout used for Read service requests.
 
void setMaxReferencesToReturn (OpcUa_UInt32 maxReferencesToReturn)
 Sets the maximum number of references to return parameter for Browse service requests.
 
- Public Member Functions inherited from UaBase::AbstractNodesetBrowseImport
virtual UaStatus import (Nodeset &nodeset)
 Implementation of interface AbstractNodesetImport::import. More...
 
virtual UaStatus import (Nodeset &nodeset, const UaStringArray &nsUris)
 import multiple namespaces from server to nodeset More...
 
virtual UaStatus import (Nodeset &nodeset, const UaString &nsUri)
 import single namespace from server to nodeset More...
 
virtual UaStatus import (Nodeset &nodeset, const UaUInt16Array &namespaceIndices)
 import multiple namespaces from server to nodeset More...
 
virtual UaStatus import (Nodeset &nodeset, const OpcUa_UInt16 namespaceIndex)
 import single namespace from server to nodeset More...
 
void setMaxNodesPerBrowse (OpcUa_UInt32 maxNodes)
 Sets the maximum number of nodes passed to one Browse service requests.
 
void setMaxNodesPerRead (OpcUa_UInt32 maxNodes)
 Sets the maximum number of nodes passed to one Read service requests.
 
void setMaxTotalNodes (OpcUa_UInt32 maxTotalNodes)
 Sets the maximum number of nodes that can be exported.
 
bool isPartialExport () const
 Get the information if the export was complete.
 
UaString lastErrorInformation () const
 Get additional information about the last error.
 

Protected Member Functions

virtual bool browseList (const UaNodeIdArray &nodeIds, UaBrowseResults &targetNodes)
 Implementation of the AbstractNodesetBrowseImport::browseList() interface. More...
 
bool browseListNext (UaBrowseResults &targetNodes)
 Continue a previously startet NodesetBrowseImport::browseList() call until all results are retrieved or an error occurs. More...
 
virtual bool read (UaBase::BaseNode *nodes[], UaDataValues &attributes)
 Implementation of the AbstractNodesetBrowseImport::read() interface. More...
 
virtual UaStringArray readNamespaceTable ()
 Implementation of the AbstractNodesetBrowseImport::readNamespaceTable interface.
 
UaReadValueIds getAttributes (UaBase::BaseNode *nodeIds[], bool singleNode) const
 provide ReadValueIds to read all attributes of each nodeclass. More...
 

Additional Inherited Members

- Protected Attributes inherited from UaBase::AbstractNodesetImport
Nodesetm_pNodeset
 The Nodeset to import to.
 
UaBooleanArray m_importNsIdx
 Remote namespace indices to import.
 

Detailed Description

OPC UA client based implementation for the Nodeset Browse/Read importer.

This class allows the creation of a node model (UaBase::Nodeset) from browsing and reading the address space of the connected OPC UA Server.

The imported model can be exported to a UANodeSet XML file by using the class UaBase::NodesetXmlExport.

UaClientSdk::NodesetBrowseImport nodesetBrowseImport(m_pSession);
UaBase::NodesetXmlExport nodesetXmlExport;
// Import namespace with index 2 from server
nodesetBrowseImport.import(nodeset, 2);
// Store namespace in UANodeSet XML file
nodesetXmlExport.exportNs(nodeset, "ExportNodeset.xml", 2);

Member Function Documentation

bool UaClientSdk::NodesetBrowseImport::browseList ( const UaNodeIdArray nodeIds,
UaBrowseResults targetNodes 
)
protectedvirtual

Implementation of the AbstractNodesetBrowseImport::browseList() interface.

Parameters
nodeIdsArray of Node IDs to browse.
targetNodesResults of the service call, possibly containing continuation points.
Returns
true if all all nodes could be browsed and no continuation points are left, false on error

Implements UaBase::AbstractNodesetBrowseImport.

bool UaClientSdk::NodesetBrowseImport::browseListNext ( UaBrowseResults targetNodes)
protected

Continue a previously startet NodesetBrowseImport::browseList() call until all results are retrieved or an error occurs.

Parameters
targetNodesThe (partial) result list from a previous browseList() or browseListNext() call
UaReadValueIds UaClientSdk::NodesetBrowseImport::getAttributes ( UaBase::BaseNode nodes[],
bool  singleNode 
) const
protected

provide ReadValueIds to read all attributes of each nodeclass.

Parameters
nodeIdsBaseNodes to be read
Returns
UaReadValueIds to be used in a UaSession::read() service call to read all attributes of the nodes.
bool UaClientSdk::NodesetBrowseImport::read ( UaBase::BaseNode nodes[],
UaDataValues attributes 
)
protectedvirtual

Implementation of the AbstractNodesetBrowseImport::read() interface.

Parameters
[in]nodesArray of BaseNode* of nodes to read.
[out]Resultsof the read service call
Returns
true if all all nodes could be read, otherwise false

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