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

Detailed Description

This Service is used to call (invoke) a list of methods.

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

Functions

CallResponse opcua::services::call (Client &connection, const CallRequest &request) noexcept
 
template<typename CompletionToken >
auto opcua::services::callAsync (Client &connection, const CallRequest &request, CompletionToken &&token)
 
template<typename T >
CallMethodResult opcua::services::call (T &connection, const NodeId &objectId, const NodeId &methodId, Span< const Variant > inputArguments) noexcept
 
template<typename CompletionToken >
auto opcua::services::callAsync (Client &connection, const NodeId &objectId, const NodeId &methodId, Span< const Variant > inputArguments, CompletionToken &&token)
 

Function Documentation

◆ call() [1/2]

CallResponse opcua::services::call ( Client & connection,
const CallRequest & request )
noexcept

Call server methods.

Parameters
connectionInstance of type Client
requestCall request

Referenced by opcua::Node< Connection >::callMethod().

◆ callAsync() [1/2]

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

Call server methods.

Parameters
connectionInstance of type Client
requestCall 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:
void(CallResponse&)
UA_CallResponse wrapper class.
Returns

Definition at line 49 of file method.hpp.

Referenced by opcua::services::callAsync(), and opcua::Node< Connection >::callMethodAsync().

◆ call() [2/2]

template<typename T >
CallMethodResult opcua::services::call ( T & connection,
const NodeId & objectId,
const NodeId & methodId,
Span< const Variant > inputArguments )
noexcept

Call a server method.

The objectId must have a HasComponent reference to the method specified in methodId.

Parameters
connectionInstance of type Server or Client
objectIdNodeId of the object on which the method is invoked
methodIdNodeId of the method to invoke
inputArgumentsInput argument values

◆ callAsync() [2/2]

template<typename CompletionToken >
auto opcua::services::callAsync ( Client & connection,
const NodeId & objectId,
const NodeId & methodId,
Span< const Variant > inputArguments,
CompletionToken && token )

Call a server method.

The objectId must have a HasComponent reference to the method specified in methodId.

Parameters
connectionInstance of type Server or Client
objectIdNodeId of the object on which the method is invoked
methodIdNodeId of the method to invoke
inputArgumentsInput argument values
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_CallMethodResult wrapper class.
Returns

Definition at line 78 of file method.hpp.