Skip to content

v0.13.0

Latest
Compare
Choose a tag to compare
@lukasberbuer lukasberbuer released this 27 Apr 13:24
· 10 commits to master since this release
6b83f18

This version comes with two big new features:

  1. Result<T> type to encapsulate a result with its status code.
    The design is inspired by C++ 23's std::expected and Rust's Result type and allows an alternative error handling mechanism without exceptions. We migrated the free functions in the services namespace to return Result objects to avoid exceptions. All synchronous functions are now marked noexcept.
  2. Async support with a asynchronous model similar to Boost (Asio).
    Async functions are currently only implemented as free functions in the services namespace. They take an completion token as the last parameter. By default, the default token is of type UseFuture and the async function returns a std::future<Result<T>> object. Alternatively, a callback function can be passed as a completion token with the signature void(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
  • Result<T> class to encapsulate both the status code and the result of type T, similar to std::expected (#207, #264, #276)
  • Raw services::call functions (#215)
  • NamespaceIndex alias for uint16_t (#219)
  • Symmetric implementation of services::createMonitoredItemDataChange, services::deleteMonitoredItem for Server and Client (#238)
  • Deprecate high-level DataChangeCallback<T> and EventCallback<T>, use DataChangeNotificationCallback and EventNotificationCallback instead and create MonitoredItem<T> on demand (#245)
  • Subscription service request/response wrapper classes (#270)
  • Update open62541 to v1.3.10 (#278)

Changed

  • Move-only Client and Server (#211)
  • Rename MonitoringParameters -> MonitoringParametersEx to avoid shadowing of OPC UA type MonitoringParameter (#214)
  • Remove logger utility functions getLogLevelName, getLogCategoryName (#221)
  • Change return type of AccessControlBase::getUserTokenPolicies() to Span<Span<UserTokenPolicy> (#223)
  • Deprecate TypeWrapper::TypeWrapperBase alias, use TypeWrapper::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 in services namespace (#275)

Fixed

  • Error handling in client_subscription example (#203)
  • Compare DataType only by typeId (#217)
  • Variant::isArray check (#274)