This version comes with two big new features:
Result<T>
type to encapsulate a result with its status code.
The design is inspired by C++ 23'sstd::expected
and Rust'sResult
type and allows an alternative error handling mechanism without exceptions. We migrated the free functions in theservices
namespace to returnResult
objects to avoid exceptions. All synchronous functions are now markednoexcept
.- Async support with a asynchronous model similar to Boost (Asio).
Async functions are currently only implemented as free functions in theservices
namespace. They take an completion token as the last parameter. By default, the default token is of typeUseFuture
and the async function returns astd::future<Result<T>>
object. Alternatively, a callback function can be passed as a completion token with the signaturevoid(Result<T>&)
. Please refer to the documentation for more details.
Added
- Async functions in
services
namespace (client only), adapting the well-proven asynchronous model of (Boost) Asio (#111)- Example
client_method_async
- Example
Result<T>
class to encapsulate both the status code and the result of typeT
, similar tostd::expected
(#207, #264, #276)- Raw
services::call
functions (#215) NamespaceIndex
alias foruint16_t
(#219)- Symmetric implementation of
services::createMonitoredItemDataChange
,services::deleteMonitoredItem
forServer
andClient
(#238) - Deprecate high-level
DataChangeCallback<T>
andEventCallback<T>
, useDataChangeNotificationCallback
andEventNotificationCallback
instead and createMonitoredItem<T>
on demand (#245) - Subscription service request/response wrapper classes (#270)
- Update open62541 to v1.3.10 (#278)
Changed
- Move-only
Client
andServer
(#211) - Rename
MonitoringParameters
->MonitoringParametersEx
to avoid shadowing of OPC UA typeMonitoringParameter
(#214) - Remove logger utility functions
getLogLevelName
,getLogCategoryName
(#221) - Change return type of
AccessControlBase::getUserTokenPolicies()
toSpan<Span<UserTokenPolicy>
(#223) - Deprecate
TypeWrapper::TypeWrapperBase
alias, useTypeWrapper::TypeWrapper
instead (#253) - Return
ExtensionObject
encoded members by pointer, not optional (#254) - Strip
get
prefix of simple getters, deprecate old member functions (#267) - Use
Result<T>
return type for all functions inservices
namespace (#275)