open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
Collaboration diagram for AddNodes service:

Detailed Description

Add nodes into the address space hierarchy.

See also
https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.2

Typedefs

using opcua::services::MethodCallback = std::function<void(Span<const Variant> input, Span<Variant> output)>
 

Functions

AddNodesResponse opcua::services::addNodes (Client &connection, const AddNodesRequest &request) noexcept
 
template<typename CompletionToken >
auto opcua::services::addNodesAsync (Client &connection, const AddNodesRequest &request, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addNode (T &connection, NodeClass nodeClass, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ExtensionObject &nodeAttributes, const NodeId &typeDefinition, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addNodeAsync (Client &connection, NodeClass nodeClass, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ExtensionObject &nodeAttributes, const NodeId &typeDefinition, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addObject (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ObjectAttributes &attributes, const NodeId &objectType, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addObjectAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ObjectAttributes &attributes, const NodeId &objectType, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addFolder (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ObjectAttributes &attributes, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addFolderAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ObjectAttributes &attributes, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addVariable (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const VariableAttributes &attributes, const NodeId &variableType, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addVariableAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const VariableAttributes &attributes, const NodeId &variableType, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addProperty (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const VariableAttributes &attributes) noexcept
 
template<typename CompletionToken >
auto opcua::services::addPropertyAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const VariableAttributes &attributes, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addMethod (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, MethodCallback callback, Span< const Argument > inputArguments, Span< const Argument > outputArguments, const MethodAttributes &attributes, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addMethodAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, MethodCallback callback, Span< const Argument > inputArguments, Span< const Argument > outputArguments, const MethodAttributes &attributes, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addObjectType (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ObjectTypeAttributes &attributes, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addObjectTypeAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ObjectTypeAttributes &attributes, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addVariableType (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const VariableTypeAttributes &attributes, const NodeId &variableType, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addVariableTypeAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const VariableTypeAttributes &attributes, const NodeId &variableType, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addReferenceType (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ReferenceTypeAttributes &attributes, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addReferenceTypeAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ReferenceTypeAttributes &attributes, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addDataType (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const DataTypeAttributes &attributes, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addDataTypeAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const DataTypeAttributes &attributes, const NodeId &referenceType, CompletionToken &&token)
 
template<typename T >
Result< NodeIdopcua::services::addView (T &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ViewAttributes &attributes, const NodeId &referenceType) noexcept
 
template<typename CompletionToken >
auto opcua::services::addViewAsync (Client &connection, const NodeId &parentId, const NodeId &id, std::string_view browseName, const ViewAttributes &attributes, const NodeId &referenceType, CompletionToken &&token)
 

Typedef Documentation

◆ MethodCallback

using opcua::services::MethodCallback = std::function<void(Span<const Variant> input, Span<Variant> output)>

Method callback.

Parameters
inputInput parameters
outputOutput parameters

Definition at line 573 of file nodemanagement.hpp.

Function Documentation

◆ addNodes()

AddNodesResponse opcua::services::addNodes ( Client & connection,
const AddNodesRequest & request )
noexcept

Add one or more nodes (client only).

Parameters
connectionInstance of type Client
requestAdd nodes request

◆ addNodesAsync()

template<typename CompletionToken >
auto opcua::services::addNodesAsync ( Client & connection,
const AddNodesRequest & request,
CompletionToken && token )

Add one or more nodes (client only).

Parameters
connectionInstance of type Client
requestAdd nodes request
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
UA_AddNodesResponse wrapper class.
Returns

Definition at line 57 of file nodemanagement.hpp.

Referenced by opcua::services::addNodeAsync().

◆ addNode()

template<typename T >
Result< NodeId > opcua::services::addNode ( T & connection,
NodeClass nodeClass,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ExtensionObject & nodeAttributes,
const NodeId & typeDefinition,
const NodeId & referenceType )
noexcept

Add a node.

Parameters
connectionInstance of type Client (or Server)
nodeClassNode class
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
nodeAttributesNode attributes
typeDefinitionNodeId of the type
referenceTypeHierarchical reference type from the parent node to the new node

Referenced by opcua::services::addDataType(), opcua::services::addObject(), opcua::services::addObjectType(), opcua::services::addReferenceType(), opcua::services::addVariable(), opcua::services::addVariableType(), and opcua::services::addView().

◆ addNodeAsync()

template<typename CompletionToken >
auto opcua::services::addNodeAsync ( Client & connection,
NodeClass nodeClass,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ExtensionObject & nodeAttributes,
const NodeId & typeDefinition,
const NodeId & referenceType,
CompletionToken && token )

Add a node.

Parameters
connectionInstance of type Client (or Server)
nodeClassNode class
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
nodeAttributesNode attributes
typeDefinitionNodeId of the type
referenceTypeHierarchical reference type from the parent node to the new node
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
The template class Result encapsulates a StatusCode and optionally a value.
Definition result.hpp:53
Returns

Definition at line 92 of file nodemanagement.hpp.

Referenced by opcua::services::addDataTypeAsync(), opcua::services::addMethodAsync(), opcua::services::addObjectAsync(), opcua::services::addObjectTypeAsync(), opcua::services::addReferenceTypeAsync(), opcua::services::addVariableAsync(), opcua::services::addVariableTypeAsync(), and opcua::services::addViewAsync().

◆ addObject()

template<typename T >
Result< NodeId > opcua::services::addObject ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ObjectAttributes & attributes,
const NodeId & objectType,
const NodeId & referenceType )
noexcept

Add object.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the object node to add
browseNameBrowse name
attributesObject attributes
objectTypeNodeId of the object type, e.g. ObjectTypeId::BaseObjectType
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasComponent

Definition at line 351 of file nodemanagement.hpp.

Referenced by opcua::services::addFolder().

◆ addObjectAsync()

template<typename CompletionToken >
auto opcua::services::addObjectAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ObjectAttributes & attributes,
const NodeId & objectType,
const NodeId & referenceType,
CompletionToken && token )

Add object.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the object node to add
browseNameBrowse name
attributesObject attributes
objectTypeNodeId of the object type, e.g. ObjectTypeId::BaseObjectType
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasComponent
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 378 of file nodemanagement.hpp.

Referenced by opcua::services::addFolderAsync().

◆ addFolder()

template<typename T >
Result< NodeId > opcua::services::addFolder ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ObjectAttributes & attributes,
const NodeId & referenceType )
noexcept

Add folder.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesObject attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasComponent

Definition at line 412 of file nodemanagement.hpp.

◆ addFolderAsync()

template<typename CompletionToken >
auto opcua::services::addFolderAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ObjectAttributes & attributes,
const NodeId & referenceType,
CompletionToken && token )

Add folder.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesObject attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasComponent
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 431 of file nodemanagement.hpp.

◆ addVariable()

template<typename T >
Result< NodeId > opcua::services::addVariable ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const VariableAttributes & attributes,
const NodeId & variableType,
const NodeId & referenceType )
noexcept

Add variable.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesVariable attributes
variableTypeNodeId of the variable type, e.g. VariableTypeId::BaseDataVariableType
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasComponent
Examples
server_datasource.cpp.

Definition at line 464 of file nodemanagement.hpp.

Referenced by opcua::services::addProperty().

◆ addVariableAsync()

template<typename CompletionToken >
auto opcua::services::addVariableAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const VariableAttributes & attributes,
const NodeId & variableType,
const NodeId & referenceType,
CompletionToken && token )

Add variable.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesVariable attributes
variableTypeNodeId of the variable type, e.g. VariableTypeId::BaseDataVariableType
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasComponent
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 491 of file nodemanagement.hpp.

Referenced by opcua::services::addPropertyAsync().

◆ addProperty()

template<typename T >
Result< NodeId > opcua::services::addProperty ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const VariableAttributes & attributes )
noexcept

Add property.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesProperty attributes

Definition at line 523 of file nodemanagement.hpp.

◆ addPropertyAsync()

template<typename CompletionToken >
auto opcua::services::addPropertyAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const VariableAttributes & attributes,
CompletionToken && token )

Add property.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesProperty attributes
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 547 of file nodemanagement.hpp.

◆ addMethod()

template<typename T >
Result< NodeId > opcua::services::addMethod ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
MethodCallback callback,
Span< const Argument > inputArguments,
Span< const Argument > outputArguments,
const MethodAttributes & attributes,
const NodeId & referenceType )
noexcept

Add method.

Callbacks can not be set by clients. Servers can assign callbacks to method nodes afterwards.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
callbackMethod callback
inputArgumentsInput arguments
outputArgumentsOutput arguments
attributesMethod attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasComponent

◆ addMethodAsync()

template<typename CompletionToken >
auto opcua::services::addMethodAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
MethodCallback callback,
Span< const Argument > inputArguments,
Span< const Argument > outputArguments,
const MethodAttributes & attributes,
const NodeId & referenceType,
CompletionToken && token )

Add method.

Callbacks can not be set by clients. Servers can assign callbacks to method nodes afterwards.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
callbackMethod callback
inputArgumentsInput arguments
outputArgumentsOutput arguments
attributesMethod attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasComponent
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 608 of file nodemanagement.hpp.

◆ addObjectType()

template<typename T >
Result< NodeId > opcua::services::addObjectType ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ObjectTypeAttributes & attributes,
const NodeId & referenceType )
noexcept

Add object type.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesObject type attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasSubtype

Definition at line 645 of file nodemanagement.hpp.

◆ addObjectTypeAsync()

template<typename CompletionToken >
auto opcua::services::addObjectTypeAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ObjectTypeAttributes & attributes,
const NodeId & referenceType,
CompletionToken && token )

Add object type.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesObject type attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasSubtype
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 671 of file nodemanagement.hpp.

◆ addVariableType()

template<typename T >
Result< NodeId > opcua::services::addVariableType ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const VariableTypeAttributes & attributes,
const NodeId & variableType,
const NodeId & referenceType )
noexcept

Add variable type.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesVariable type attributes
variableTypeNodeId of the variable type, e.g. VariableTypeId::BaseDataVariableType
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasSubtype

Definition at line 705 of file nodemanagement.hpp.

◆ addVariableTypeAsync()

template<typename CompletionToken >
auto opcua::services::addVariableTypeAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const VariableTypeAttributes & attributes,
const NodeId & variableType,
const NodeId & referenceType,
CompletionToken && token )

Add variable type.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesVariable type attributes
variableTypeNodeId of the variable type, e.g. VariableTypeId::BaseDataVariableType
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasSubtype
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 732 of file nodemanagement.hpp.

◆ addReferenceType()

template<typename T >
Result< NodeId > opcua::services::addReferenceType ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ReferenceTypeAttributes & attributes,
const NodeId & referenceType )
noexcept

Add reference type.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesReference type attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasSubtype

Definition at line 766 of file nodemanagement.hpp.

◆ addReferenceTypeAsync()

template<typename CompletionToken >
auto opcua::services::addReferenceTypeAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ReferenceTypeAttributes & attributes,
const NodeId & referenceType,
CompletionToken && token )

Add reference type.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesReference type attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasSubtype
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 792 of file nodemanagement.hpp.

◆ addDataType()

template<typename T >
Result< NodeId > opcua::services::addDataType ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const DataTypeAttributes & attributes,
const NodeId & referenceType )
noexcept

Add data type.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesData type attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasSubtype

Definition at line 825 of file nodemanagement.hpp.

◆ addDataTypeAsync()

template<typename CompletionToken >
auto opcua::services::addDataTypeAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const DataTypeAttributes & attributes,
const NodeId & referenceType,
CompletionToken && token )

Add data type.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesData type attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::HasSubtype
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 851 of file nodemanagement.hpp.

◆ addView()

template<typename T >
Result< NodeId > opcua::services::addView ( T & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ViewAttributes & attributes,
const NodeId & referenceType )
noexcept

Add view.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesView attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::Organizes

Definition at line 884 of file nodemanagement.hpp.

◆ addViewAsync()

template<typename CompletionToken >
auto opcua::services::addViewAsync ( Client & connection,
const NodeId & parentId,
const NodeId & id,
std::string_view browseName,
const ViewAttributes & attributes,
const NodeId & referenceType,
CompletionToken && token )

Add view.

Parameters
connectionInstance of type Client (or Server)
parentIdParent node
idRequested NodeId of the node to add
browseNameBrowse name
attributesView attributes
referenceTypeHierarchical reference type from the parent node to the new node, e.g. ReferenceTypeId::Organizes
tokenThe completion token that will be used to produce a completion handler, which will be called when the operation completes. Potential completion tokens include useFuture, useDeferred, useDetached, or a function (object) with the correct completion signature. The function signature of the completion handler must be:
Returns

Definition at line 910 of file nodemanagement.hpp.