open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
Asynchronous operations

Detailed Description

The asynchronous model is based on (Boost) Asio's universal model for asynchronous operations.

Each async function takes a CompletionToken as it's last parameter. The completion token can be a callable with the signature void(T) or void(T&) where T is a function-specific result type.

See also
https://think-async.com/asio/asio-1.28.0/doc/asio/overview/model/async_ops.html
https://think-async.com/asio/asio-1.28.0/doc/asio/overview/model/completion_tokens.html
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3747.pdf

Classes

struct  opcua::AsyncResult< CompletionToken, T >
 
struct  opcua::UseFutureToken
 
struct  opcua::AsyncResult< UseFutureToken, T >
 
struct  opcua::UseDeferredToken
 
struct  opcua::AsyncResult< UseDeferredToken, T >
 
struct  opcua::UseDetachedToken
 
struct  opcua::AsyncResult< UseDetachedToken, T >
 

Typedefs

using opcua::DefaultCompletionToken = UseFutureToken
 

Functions

template<typename T , typename Initiation , typename CompletionToken , typename... Args>
auto opcua::asyncInitiate (Initiation &&initiation, CompletionToken &&token, Args &&... args)
 

Variables

constexpr UseFutureToken opcua::useFuture
 
constexpr UseDeferredToken opcua::useDeferred
 
constexpr UseDetachedToken opcua::useDetached
 

Typedef Documentation

◆ DefaultCompletionToken

Default completion token for async operations.

See also
UseFutureToken

Definition at line 147 of file async.hpp.

Function Documentation

◆ asyncInitiate()

template<typename T , typename Initiation , typename CompletionToken , typename... Args>
auto opcua::asyncInitiate ( Initiation && initiation,
CompletionToken && token,
Args &&... args )

Variable Documentation

◆ useFuture

UseFutureToken opcua::useFuture
constexpr

Future completion token object.

See also
UseFutureToken
Examples
method/client_method_async.cpp.

Definition at line 60 of file async.hpp.

◆ useDeferred

UseDeferredToken opcua::useDeferred
constexpr

Deferred completion token object.

See also
UseDeferredToken

Definition at line 90 of file async.hpp.

◆ useDetached

UseDetachedToken opcua::useDetached
constexpr

Detached completion token object.

See also
UseDetachedToken

Definition at line 125 of file async.hpp.