Client

Client-side API: sessions, subscriptions, and service calls.

ua::client::AddressSpaceCachePolicy

struct

Per-Connection tunables for the optional client-side address-space cache (section 8.7).

The cache trades a bounded amount of client memory for fewer server round-trips: it substitutes server-assigned numeric handles (RegisterNodes) into repeated access operations, caches the static attributes tier-2 pre-flights against, and optionally caches Browse results for repeated subtree walks. It is opt-in: when enabled is false the cache is a clean pass-through no-op and every operation goes wire-direct.

The numeric defaults are the frozen SDK policy choices (client design section 9.8.2), not spec-mandated; real workloads override them here.

Public attributes

bool enabled

Master switch.

bool useRegisterNodes

When true, repeated access to a Node auto-registers it (RegisterNodes) and substitutes the returned numeric alias into later requests (CL-VIEW-009).

std::size_t maxRegisteredNodes

Ceiling on the RegisterNodes alias sub-cache; the least-recently-used alias is evicted (and its node queued for UnregisterNodes) past this (section 9.8.2).

std::size_t maxCachedAttributes

Ceiling on the static-attribute sub-cache (ArrayDimensions / AccessLevelEx / DataType / ValueRank / AccessLevel / UserAccessLevel) that drives tier-2 pre-flight (section 9.8.2).

std::size_t maxCachedBrowses

Ceiling on the Browse-result sub-cache that accelerates repeated BrowseCursor walks (section 9.8.2).

std::size_t unregisterBatchSize

The evicted/explicitly-released nodes are coalesced into one UnregisterNodes call once this many have accumulated (whichever comes first with unregisterCoalesceWindow) (section 9.8.2, CL-VIEW-010).

std::chrono::milliseconds unregisterCoalesceWindow

The single-armed-with-rearm coalesce window: a steady stream of evictions never flushes the pending UnregisterNodes batch until the stream quiets for this long (section 9.8.2, CL-VIEW-010).

std::chrono::seconds browseEntryTtl

Idle time-to-live for a cached Browse result; a lookup treats an older entry as a miss and drops it (section 9.8.2).

ua::client::AlarmConditionTrackerPolicy

struct

Per-Connection knobs for the tracker (section 8.8.1).

Public attributes

bool preferConditionRefresh2

The prefer condition refresh2.

std::size_t methodCacheCapacity

The method cache capacity.

std::size_t maxTimeShelvedCacheCapacity

The max time shelved cache capacity.

bool refreshOnRedundancySwitch

The refresh on redundancy switch.

ua::client::TrackedKey

struct

A tracked condition/branch key: trunk (branchId empty == NULL) and prior-state branches are INDEPENDENT entries (CL-AC-002).

Functions

bool operator==(const TrackedKey &) const =default

Returns: True when the requested condition is satisfied. Supports value-handle comparison or assignment.

Public attributes

ua::NodeId conditionId

The condition id.

ua::NodeId branchId

The ConditionBranch this entry tracks; a NULL NodeId is the trunk (the condition's current state).

ua::client::TwoStateValue

struct

A TwoStateVariableType sub-state value (CL-AC-016).

id == true means the "true" state is current.

Public attributes

std::optional< bool > id

The id.

std::optional< ua::DateTime > transitionTime

The transition time.

std::optional< ua::LocalizedText > effectiveDisplayName

The effective display name.

ua::client::DiscreteAlarmInfo

struct

Marker payload for DiscreteAlarmType itself, which adds no properties beyond AlarmConditionType (CL-AC-021).

ua::client::OffNormalAlarmInfo

struct

OffNormalAlarmType-family payload (also Trip, SystemOffNormal, and CertificateExpiration).

The property is mandatory in a conforming event model; optionality preserves the distinction when a malformed or incomplete server event omitted it (CL-AC-021).

Public attributes

std::optional< ua::NodeId > normalState

The normal state.

ua::client::DiscrepancyAlarmInfo

struct

DiscrepancyAlarmType payload.

TargetValueNode and ExpectedTime are mandatory server properties; Tolerance is optional. Optional members preserve wire absence/malformed-type information (CL-AC-021).

Public attributes

std::optional< ua::NodeId > targetValueNode

The target value node.

std::optional< ua::Duration > expectedTime

The expected time.

std::optional< double > tolerance

The tolerance.

ua::client::AlarmRateMetric

struct

Public alarm rate metric API.

Public attributes

double value

The value.

std::uint16_t rateMinutes

The rate minutes.

ua::client::AlarmMetricsSnapshot

struct

Public alarm metrics snapshot API.

Public attributes

std::uint32_t alarmCount

The alarm count.

ua::DateTime startTime

The start time.

ua::Duration maximumActiveState

The maximum active state.

ua::Duration maximumUnAck

The maximum un ack.

AlarmRateMetric currentAlarmRate

The current alarm rate.

AlarmRateMetric maximumAlarmRate

The maximum alarm rate.

std::uint32_t maximumReAlarmCount

The maximum re alarm count.

AlarmRateMetric averageAlarmRate

The average alarm rate.

ua::client::AlarmMetricsView

class

Public alarm metrics view API.

Functions

AlarmMetricsView()=default
void read_all_async(std::function< void(ua::Result< AlarmMetricsSnapshot >)> callback) noexcept
AlarmMetricsSnapshot read_all_sync()

Returns: The requested value. Synchronously read all.

ua::Result< AlarmMetricsSnapshot > try_read_all_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read all sync without throwing.

void reset_async(std::function< void(ua::VoidResult)> callback) noexcept
void reset_sync()

Synchronously reset.

ua::VoidResult try_reset_sync() noexcept

Returns: The requested value. Attempts to reset sync without throwing.

ua::client::TrackedCondition

struct

The tracked state of one condition/branch (section 8.8).

Public attributes

TrackedKey key

The key.

ua::NodeId conditionTypeId

most-derived EventType

ua::LocalizedText conditionName

The condition name.

ua::NodeId conditionClassId

mandatory ConditionType class identifier (CL-AC-014)

ua::LocalizedText conditionClassName

mandatory human-readable class name (CL-AC-014)

ua::ByteString lastEventId

CL-AC-019 - updated on every inbound event for the key.

std::uint16_t severity

The severity.

ua::LocalizedText message

The message.

ua::DateTime time

The time.

ua::DateTime receiveTime

CL-AC-005 ordering source.

ua::NodeId sourceNode

The source node.

ua::String sourceName

The source name.

bool retain

CL-AC-006 - false to removed.

std::optional< ua::LocalizedText > comment

The comment.

TwoStateValue enabledState

The enabled state.

std::optional< TwoStateValue > ackedState

The acked state.

std::optional< TwoStateValue > confirmedState

The confirmed state.

std::optional< TwoStateValue > activeState

The active state.

AlarmSubtypeInfo subtypeInfo

Typed payload selected from the exact EventType for Discrete/OffNormal/Discrepancy families (CL-AC-021).

std::optional< TwoStateValue > suppressedState

The suppressed state.

std::optional< TwoStateValue > outOfServiceState

The out of service state.

std::optional< TwoStateValue > silenceState

The silence state.

std::optional< TwoStateValue > latchedState

The latched state.

std::optional< bool > suppressedOrShelved

The suppressed or shelved.

std::optional< ua::LocalizedText > shelvingState

ShelvingState.CurrentState (surfaced only)

std::optional< ua::Duration > reAlarmTime

The re alarm time.

std::optional< std::int16_t > reAlarmRepeatCount

The re alarm repeat count.

std::optional< ua::Duration > onDelay

The on delay.

std::optional< ua::Duration > offDelay

The off delay.

std::optional< bool > audibleEnabled

The audible enabled.

std::optional< ua::AudioDataType > audibleSound

The audible sound.

std::optional< bool > firstInGroupFlag

The first in group flag.

std::optional< ua::NodeId > firstInGroup

The first in group.

std::optional< double > highHighLimit

ExclusiveLimit / LimitAlarm thresholds (CL-AC-023).

std::optional< double > highLimit

The high limit.

std::optional< double > lowLimit

The low limit.

std::optional< double > lowLowLimit

The low low limit.

std::optional< TwoStateValue > lowLowState

NonExclusiveLimitAlarm concurrent limit-state active flags (CL-AC-025).

std::optional< TwoStateValue > lowState

The low state.

std::optional< TwoStateValue > highState

The high state.

std::optional< TwoStateValue > highHighState

The high high state.

std::optional< ua::LocalizedText > exclusiveLimitState

ExclusiveLimitStateMachine CurrentState (LimitState) - surfaced only (CL-AC-024).

std::optional< double > maxTimeShelved

The alarm's MaxTimeShelved (milliseconds) when the event carried it.

ua::client::AlarmConditionTrackerInfo

struct

Cross-strand observability snapshot of the tracker (section 8.8.1).

Public attributes

std::size_t trackedConditionCount

The tracked condition count.

std::size_t openRefreshWindowCount

The open refresh window count.

bool pendingFollowOnRefresh

The pending follow on refresh.

bool useRefresh2

The use refresh2.

ua::client::AlarmHandle

class

A per-condition ACTIONABLE handle (T30): callers act on a condition object directly instead of round-tripping an opaque TrackedKey back through the tracker.

Move/copy-cheap value handle (weak tracker back-ref, strong-locked per call; mKey identifies the branch). Every method forwards to the tracker's strand; refresh + observer registration stay on the tracker.

Functions

AlarmHandle()=default
TrackedKey key() const

Returns: The requested value. Returns or updates the key.

void acknowledge_async(std::optional< ua::LocalizedText > comment, std::function< void(ua::VoidResult)> callback) noexcept
void acknowledge_sync(std::optional< ua::LocalizedText > comment)
  • comment (std::optional< ua::LocalizedText >) - The comment. Synchronously acknowledge. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_acknowledge_sync(std::optional< ua::LocalizedText > comment) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to acknowledge sync without throwing.

void confirm_async(std::optional< ua::LocalizedText > comment, std::function< void(ua::VoidResult)> callback) noexcept
void confirm_sync(std::optional< ua::LocalizedText > comment)
  • comment (std::optional< ua::LocalizedText >) - The comment. Synchronously confirm. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_confirm_sync(std::optional< ua::LocalizedText > comment) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to confirm sync without throwing.

void add_comment_async(ua::ByteString eventId, std::optional< ua::LocalizedText > comment, std::function< void(ua::VoidResult)> callback) noexcept
void add_comment_sync(ua::ByteString eventId, std::optional< ua::LocalizedText > comment)
  • eventId (ua::ByteString) - The eventid.
  • comment (std::optional< ua::LocalizedText >) - The comment. Synchronously add comment. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_add_comment_sync(ua::ByteString eventId, std::optional< ua::LocalizedText > comment) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to add comment sync without throwing.

void enable_async(std::function< void(ua::VoidResult)> callback) noexcept
void enable_sync()

Synchronously enable.

ua::VoidResult try_enable_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to enable sync without throwing.

void disable_async(std::function< void(ua::VoidResult)> callback) noexcept
void disable_sync()

Synchronously disable.

ua::VoidResult try_disable_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to disable sync without throwing.

void silence_async(std::function< void(ua::VoidResult)> callback) noexcept
void silence_sync()

Synchronously silence.

ua::VoidResult try_silence_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to silence sync without throwing.

void suppress_async(std::function< void(ua::VoidResult)> callback) noexcept
void suppress_sync()

Synchronously suppress.

ua::VoidResult try_suppress_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to suppress sync without throwing.

void unsuppress_async(std::function< void(ua::VoidResult)> callback) noexcept
void unsuppress_sync()

Synchronously unsuppress.

ua::VoidResult try_unsuppress_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to unsuppress sync without throwing.

void shelve_async(std::optional< ua::Duration > shelvingTime, std::function< void(ua::VoidResult)> callback) noexcept
void shelve_sync(std::optional< ua::Duration > shelvingTime)
  • shelvingTime (std::optional< ua::Duration >) - The shelvingtime. Synchronously shelve. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_shelve_sync(std::optional< ua::Duration > shelvingTime) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to shelve sync without throwing.

void unshelve_async(std::function< void(ua::VoidResult)> callback) noexcept
void unshelve_sync()

Synchronously unshelve.

ua::VoidResult try_unshelve_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to unshelve sync without throwing.

void read_property_async(ua::QualifiedName property, std::function< void(ua::Result< ua::Variant >)> callback) noexcept
  • property (ua::QualifiedName) - Property browse name.
  • callback (std::function< void(ua::Result< ua::Variant >)>) - Completion callback that receives the operation result. Reads a current child property/value directly from the condition instance. This is the fallback for plain AlarmConditionType Properties whose mutation is not guaranteed to generate an Event.
ua::Variant read_property_sync(ua::QualifiedName property)

Returns: The requested value. Synchronously read property.

ua::Result< ua::Variant > try_read_property_sync(ua::QualifiedName property) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read property sync without throwing.

ua::client::AlarmConditionTracker

class

The public value handle (move-only shared_ptr pimpl) over the co-owned private sub-object detail::AlarmConditionTrackerImpl (T23).

Lifecycle (construction, start, close, reconnect) is NOT on this handle - it is driven by detail::EventSubscriberImpl. This handle exposes only the consumer surface; every method forwards one-hop to the co-owned Impl.

Functions

AlarmConditionTracker(AlarmConditionTracker &&) noexcept=default

Returns or updates the alarm condition tracker.

AlarmConditionTracker & operator=(AlarmConditionTracker &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~AlarmConditionTracker()=default
std::shared_ptr< const AlarmConditionTrackerInfo > info() const noexcept

Returns: An immutable snapshot of the current state. Returns or updates the info.

void on_condition_added_async(ConditionAddedCb cb, std::function< void(ua::VoidResult)> callback) noexcept
  • cb (ConditionAddedCb) - Observer callback to register.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Asynchronously on condition added.
void on_condition_added_sync(ConditionAddedCb cb)
  • cb (ConditionAddedCb) - The cb. Synchronously on condition added. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_on_condition_added_sync(ConditionAddedCb cb) noexcept
  • cb (ConditionAddedCb) - The cb.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to on condition added sync without throwing.

void on_condition_changed_async(ConditionChangedCb cb, std::function< void(ua::VoidResult)> callback) noexcept
  • cb (ConditionChangedCb) - Observer callback to register.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Asynchronously on condition changed.
void on_condition_changed_sync(ConditionChangedCb cb)
  • cb (ConditionChangedCb) - The cb. Synchronously on condition changed. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_on_condition_changed_sync(ConditionChangedCb cb) noexcept
  • cb (ConditionChangedCb) - The cb.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to on condition changed sync without throwing.

void on_condition_removed_async(ConditionRemovedCb cb, std::function< void(ua::VoidResult)> callback) noexcept
  • cb (ConditionRemovedCb) - Observer callback to register.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Asynchronously on condition removed.
void on_condition_removed_sync(ConditionRemovedCb cb)
  • cb (ConditionRemovedCb) - The cb. Synchronously on condition removed. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_on_condition_removed_sync(ConditionRemovedCb cb) noexcept
  • cb (ConditionRemovedCb) - The cb.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to on condition removed sync without throwing.

void list_conditions_async(std::function< void(ua::Result< std::vector< TrackedCondition > >)> callback) noexcept
std::vector< TrackedCondition > list_conditions_sync()

Returns: The requested value. Synchronously list conditions. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< std::vector< TrackedCondition > > try_list_conditions_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to list conditions sync without throwing.

void get_condition_async(TrackedKey key, std::function< void(ua::Result< TrackedCondition >)> callback) noexcept
TrackedCondition get_condition_sync(TrackedKey key)

Returns: The requested value. Synchronously get condition. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< TrackedCondition > try_get_condition_sync(TrackedKey key) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to get condition sync without throwing.

AlarmHandle handle(TrackedKey key) const noexcept
  • key (TrackedKey) - Tracked condition and branch key.

Returns: The requested value. Mints an AlarmHandle for a known key (T30).

AlarmMetricsView alarm_metrics(ua::NodeId metricsObject) const noexcept
  • metricsObject (ua::NodeId) - The metrics object.

Returns: The requested value. On-demand typed view over an AlarmMetricsType Object instance (CL-AC-026).

void refresh_async(std::function< void(ua::VoidResult)> callback) noexcept
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Idempotent - a call while a window is open queues a follow-on; a call while a client-initiated refresh is already awaiting its RefreshEnd is REJECTED with Bad_RefreshInProgress (section 9.6.7 re-entrancy).
void refresh_sync()

Synchronously refresh.

ua::VoidResult try_refresh_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to refresh sync without throwing.

void acknowledge_async(TrackedKey key, std::optional< ua::LocalizedText > comment, std::function< void(ua::VoidResult)> callback) noexcept
void acknowledge_sync(TrackedKey key, std::optional< ua::LocalizedText > comment)
  • key (TrackedKey) - The key.
  • comment (std::optional< ua::LocalizedText >) - The comment. Synchronously acknowledge. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_acknowledge_sync(TrackedKey key, std::optional< ua::LocalizedText > comment) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to acknowledge sync without throwing.

void acknowledge_async(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment, std::function< void(ua::VoidResult)> callback) noexcept
void acknowledge_sync(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment)
  • key (TrackedKey) - The key.
  • eventId (ua::ByteString) - The eventid.
  • comment (std::optional< ua::LocalizedText >) - The comment. Synchronously acknowledge. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_acknowledge_sync(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to acknowledge sync without throwing.

void confirm_async(TrackedKey key, std::optional< ua::LocalizedText > comment, std::function< void(ua::VoidResult)> callback) noexcept
void confirm_sync(TrackedKey key, std::optional< ua::LocalizedText > comment)
  • key (TrackedKey) - The key.
  • comment (std::optional< ua::LocalizedText >) - The comment. Synchronously confirm. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_confirm_sync(TrackedKey key, std::optional< ua::LocalizedText > comment) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to confirm sync without throwing.

void confirm_async(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment, std::function< void(ua::VoidResult)> callback) noexcept
void confirm_sync(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment)
  • key (TrackedKey) - The key.
  • eventId (ua::ByteString) - The eventid.
  • comment (std::optional< ua::LocalizedText >) - The comment. Synchronously confirm. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_confirm_sync(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to confirm sync without throwing.

void add_comment_async(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment, std::function< void(ua::VoidResult)> callback) noexcept
void add_comment_sync(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment)
  • key (TrackedKey) - The key.
  • eventId (ua::ByteString) - The eventid.
  • comment (std::optional< ua::LocalizedText >) - The comment. Synchronously add comment. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_add_comment_sync(TrackedKey key, ua::ByteString eventId, std::optional< ua::LocalizedText > comment) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to add comment sync without throwing.

void enable_async(TrackedKey key, std::function< void(ua::VoidResult)> callback) noexcept
void enable_sync(TrackedKey key)
  • key (TrackedKey) - The key. Synchronously enable. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_enable_sync(TrackedKey key) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to enable sync without throwing.

void disable_async(TrackedKey key, std::function< void(ua::VoidResult)> callback) noexcept
void disable_sync(TrackedKey key)
  • key (TrackedKey) - The key. Synchronously disable. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_disable_sync(TrackedKey key) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to disable sync without throwing.

void silence_async(TrackedKey key, std::function< void(ua::VoidResult)> callback) noexcept
void silence_sync(TrackedKey key)
  • key (TrackedKey) - The key. Synchronously silence. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_silence_sync(TrackedKey key) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to silence sync without throwing.

void suppress_async(TrackedKey key, std::function< void(ua::VoidResult)> callback) noexcept
void suppress_sync(TrackedKey key)
  • key (TrackedKey) - The key. Synchronously suppress. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_suppress_sync(TrackedKey key) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to suppress sync without throwing.

void unsuppress_async(TrackedKey key, std::function< void(ua::VoidResult)> callback) noexcept
void unsuppress_sync(TrackedKey key)
  • key (TrackedKey) - The key. Synchronously unsuppress. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_unsuppress_sync(TrackedKey key) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to unsuppress sync without throwing.

void timed_shelve_async(TrackedKey key, ua::Duration shelvingTime, std::function< void(ua::VoidResult)> callback) noexcept
void timed_shelve_sync(TrackedKey key, ua::Duration shelvingTime)
  • key (TrackedKey) - The key.
  • shelvingTime (ua::Duration) - The shelvingtime. Synchronously timed shelve. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_timed_shelve_sync(TrackedKey key, ua::Duration shelvingTime) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to timed shelve sync without throwing.

void one_shot_shelve_async(TrackedKey key, std::function< void(ua::VoidResult)> callback) noexcept
void one_shot_shelve_sync(TrackedKey key)
  • key (TrackedKey) - The key. Synchronously one shot shelve. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_one_shot_shelve_sync(TrackedKey key) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to one shot shelve sync without throwing.

void unshelve_async(TrackedKey key, std::function< void(ua::VoidResult)> callback) noexcept
void unshelve_sync(TrackedKey key)
  • key (TrackedKey) - The key. Synchronously unshelve. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_unshelve_sync(TrackedKey key) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to unshelve sync without throwing.

ua::client::BrowseOptions

struct

The parameters of a BrowseCursor walk (client design section 7.5).

Defaults browse every forward reference of every node class, returning all result fields, at the server's default page size.

Public attributes

std::optional< ua::DateTime > viewTimestamp

Optional historical instant for a View browse. Mutually exclusive with viewVersion.

std::optional< std::uint32_t > viewVersion

Optional version for a View browse. Mutually exclusive with viewTimestamp.

ua::BrowseDirection direction

Which direction to follow references (Forward / Inverse / Both).

ua::NodeId referenceTypeId

Restrict to this reference type (and, per includeSubtypes, its subtypes).

bool includeSubtypes

When a referenceTypeId is given, also follow its subtypes.

std::uint32_t nodeClassMask

Restrict to these node classes (a bit mask of NodeClass values). 0 means "all node classes".

std::uint32_t resultMask

Which ReferenceDescription fields the server should populate (a bit mask). Defaults to all fields.

std::uint32_t requestedMaxReferencesPerNode

The maximum references the server returns per page (0 = server default).

ua::client::BrowseCursor

class

A forward iterator over the references from a start node (client design section 7.5).

BrowseCursor hides the BrowseResult / BrowseNext continuation-point dance behind a forward-iterator shape: next_async yields one Entry at a time, transparently issuing a BrowseNext when the current page is exhausted and the server held back a continuation point. The cursor idiom is unified with HistoryReadCursor (section 8.9): the same has_more predicate name, the same section 7.0 async / sync / try_sync triple on next_async, and the same close-on-destruct + explicit-close_async continuation-point release. Element granularity is per-Entry (vs the history cursor's per-page vector) - an intentional, kept difference.

Move-only: the moved-from cursor releases its continuation point on drop. Not directly constructible; obtained from TypedAccess::browse.

A BrowseCursor is a forward iterator: issue one next_async (or a *_sync variant) at a time and await its completion before issuing the next. Overlapping advances are rejected. The sync / try_sync variants block the calling thread; they MUST NOT be called from the Connection's executor thread.

Functions

BrowseCursor(BrowseCursor &&) noexcept=default

Returns or updates the browse cursor.

BrowseCursor & operator=(BrowseCursor &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~BrowseCursor()

Posts a release-only BrowseNext (releaseContinuationPoints = true) to free the server's continuation point.

bool has_more() const noexcept

Returns: True iff more entries remain to yield - the current page has unconsumed entries, a continuation point is held, or the initial Browse has not yet been issued. False once the walk is fully drained.

void next_async(std::function< void(ua::Result< Entry >)> callback) noexcept

Fetches the next reference.

ua::Result< Entry > try_next_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Blocking try_* bridge over next_async; never throws. MUST NOT run on the executor thread.

Entry next_sync()

Returns: The requested value. Blocking bridge over next_async; throws UaException on a bad Result. MUST NOT run on the executor thread.

void close_async(std::function< void(ua::VoidResult)> callback) noexcept

Explicitly releases the continuation point now (a release-only BrowseNext).

ua::VoidResult try_close_sync() noexcept

Returns: The requested value. Blocking try_* bridge over close_async; never throws. MUST NOT run on the executor thread.

void close_sync()

Blocking bridge over close_async; throws UaException on a bad Result.

ua::client::Client

class

Tier-1 root of the OPC UA Client SDK - the managed surface (client design section 7.1).

Composes a CoreClient by value and surfaces the managed entry points over it. Move-only handle; methods are safe to call from any thread and post their work to the executor supplied at create.

CoreClient, Connection, Discovery

Member types

ua::Result< Connection > ConnectResult

Result of a managed connect: the open Connection or an ErrorDetail.

std::function< void(ConnectResult)> ConnectCallback

Callback receiving the outcome of connect_async.

ua::Result< std::shared_ptr< PullCertificateManager > > PullCertificateManagerResult

The PullCertificateManager handle on success, or an ErrorDetail on failure (e.g.

std::function< void(PullCertificateManagerResult)> StartPullCertManagementCallback

Callback receiving the outcome of start_pull_cert_management_async.

std::function< void(ua::VoidResult)> ShutdownCallback

Callback receiving the outcome of shutdown_async.

ua::Result< Client > CreateResult

The created Client on success, or an ErrorDetail on failure.

Static functions

Client create(boost::asio::any_io_executor executor, CreateConfig config, std::shared_ptr< const ua::Crypto > crypto={}, std::shared_ptr< ua::CertificateStore > certStore={}, std::shared_ptr< ua::LogSink > logSink=nullptr, ua::LogLevel logLevel=ua::LogLevel::Info)

Creates a tier-1 Client with explicit configuration and optional crypto and certificate store.

Returns: A ready-to-use Client.

CreateResult try_create(boost::asio::any_io_executor executor, CreateConfig config, std::shared_ptr< const ua::Crypto > crypto={}, std::shared_ptr< ua::CertificateStore > certStore={}, std::shared_ptr< ua::LogSink > logSink=nullptr, ua::LogLevel logLevel=ua::LogLevel::Info) noexcept

Creates a tier-1 Client, returning a bad CreateResult instead of throwing on failure.

Returns: The created Client, or an ErrorDetail on failure. Never throws.

Functions

Client(Client &&) noexcept=default

Move-constructs from other, transferring ownership of the composed CoreClient.

Client & operator=(Client &&) noexcept=default

Move-assigns from other, transferring ownership of the composed CoreClient.

Returns: Reference to this Client.

~Client()
void connect_async(ConnectionConfig config, ConnectCallback callback) noexcept

Establishes a fully-managed Connection to a server endpoint (client design section 7.3).

  • config (ConnectionConfig) - Endpoint, security, identity, session, and lifecycle-automation parameters.
  • callback (ConnectCallback) - Receives the outcome: on success the open Connection; on failure an ErrorDetail naming the failing step. This overload never throws.
Connection connect_sync(ConnectionConfig config)

Establishes a managed Connection, blocking until the connect completes.

  • config (ConnectionConfig) - Endpoint, security, identity, session, and lifecycle-automation parameters.

Returns: The open Connection.

ConnectResult try_connect_sync(ConnectionConfig config) noexcept

Establishes a managed Connection, blocking until the connect completes.

  • config (ConnectionConfig) - Endpoint, security, identity, session, and lifecycle-automation parameters.

Returns: The open Connection, or an ErrorDetail on failure. Never throws.

void easy_connect_async(EasyConnectPolicy policy, ConnectCallback callback) noexcept

Establishes a managed Connection from a URL alone (client design section 7.3A).

  • policy (EasyConnectPolicy) - Endpoint URL, identity, trust prompt, ranker, and the customize hook.
  • callback (ConnectCallback) - Receives the open Connection, or an ErrorDetail whose source names the failing step (client.tier1.easy_connect.*). Never throws.
Connection easy_connect_sync(EasyConnectPolicy policy)

Discovery-driven managed connect, blocking until it completes.

  • policy (EasyConnectPolicy) - Endpoint URL, identity, trust prompt, ranker, and the customize hook.

Returns: The open Connection.

ConnectResult try_easy_connect_sync(EasyConnectPolicy policy) noexcept

Discovery-driven managed connect, blocking until it completes.

  • policy (EasyConnectPolicy) - Endpoint URL, identity, trust prompt, ranker, and the customize hook.

Returns: The open Connection, or an ErrorDetail on failure. Never throws.

Discovery discovery()

Returns the Client-level Discovery facade (client design section 7.6).

Returns: A Discovery value handle. Empty (all calls fail fast) if this Client has been shut down.

void set_mdns_transport(std::shared_ptr< ua::mdns::MdnsTransport > transport)

Installs an alternative mDNS transport used by Discovery::start_mdns_browse (client design section 8.12).

void set_connection_observer(std::shared_ptr< ConnectionObserver > observer)
  • observer (std::shared_ptr< ConnectionObserver >) - Observer to install; an empty pointer removes the observer. Sets the Client-level default connection / session lifecycle observer (section 7.8).
void set_subscription_observer(std::shared_ptr< SubscriptionObserver > observer)
  • observer (std::shared_ptr< SubscriptionObserver >) - Observer to install; an empty pointer removes the observer. Sets the Client-level default Subscription / MonitoredItem lifecycle observer (section 7.8).
void set_security_observer(std::shared_ptr< SecurityObserver > observer)
  • observer (std::shared_ptr< SecurityObserver >) - Observer to install; an empty pointer removes the observer. Sets the Client-level default certificate security observer (section 7.8).
void set_type_observer(std::shared_ptr< TypeObserver > observer)
  • observer (std::shared_ptr< TypeObserver >) - Observer to install; an empty pointer removes the observer. Sets the Client-level default type-system observer (section 7.8).
void set_address_space_observer(std::shared_ptr< AddressSpaceObserver > observer)
  • observer (std::shared_ptr< AddressSpaceObserver >) - Observer to install; an empty pointer removes the observer. Sets the Client-level default address-space model / semantic-change observer (section 7.8).
void set_server_state_observer(std::shared_ptr< ServerStateObserver > observer)
  • observer (std::shared_ptr< ServerStateObserver >) - Observer to install; an empty pointer removes the observer. Sets the Client-level default server-state / progress / device-failure observer (section 7.8).
void set_alarm_observer(std::shared_ptr< AlarmObserver > observer)
  • observer (std::shared_ptr< AlarmObserver >) - Observer to install; an empty pointer removes the observer. Sets the Client-level default Alarms & Conditions observer (section 7.8).
void start_pull_cert_management_async(PullCertManagementConfig config, StartPullCertManagementCallback callback) noexcept

Starts the per-Client Pull-Model certificate + trust-list refresh engine (client design section 8.1A).

  • config (PullCertManagementConfig) - Pull-Model configuration (GDS endpoint, bootstrap + runtime trust stores, cadence).
  • callback (StartPullCertManagementCallback) - Receives the manager handle, or an ErrorDetail on failure.
std::shared_ptr< PullCertificateManager > start_pull_cert_management(PullCertManagementConfig config)

Starts Pull-Model certificate management, blocking until the manager is constructed.

Returns: The shared PullCertificateManager handle.

PullCertificateManagerResult try_start_pull_cert_management_sync(PullCertManagementConfig config) noexcept

Starts Pull-Model certificate management, blocking until the manager is constructed.

Returns: The manager handle, or an ErrorDetail on failure. Never throws.

CoreClient & core() noexcept

Returns the composed tier-0 CoreClient (client design section 7.1).

Returns: Reference to the composed CoreClient; valid for this Client's lifetime. Never a shared_ptr - ownership stays with this Client.

const CoreClient & core() const noexcept

Returns the composed tier-0 CoreClient (client design section 7.1).

Returns: Reference to the composed CoreClient; valid for this Client's lifetime. Never a shared_ptr - ownership stays with this Client.

void shutdown_async(ShutdownCallback callback) noexcept

Initiates cascading client shutdown.

  • callback (ShutdownCallback) - Receives a VoidResult once shutdown completes. Never throws.
void shutdown_sync()

Performs cascading shutdown, blocking until complete.

ua::VoidResult try_shutdown_sync() noexcept

Performs cascading shutdown, blocking until complete.

Returns: A VoidResult - success, or an ErrorDetail on failure. Never throws.

ua::client::CreateConfig

struct

Value-based configuration bundle used when creating a Client.

Aggregates the three inputs CoreClient::create() needs: the application's identity, the shared application/stack configuration, and the client-specific defaults. It is passed by value so callers may edit it freely before construction; the client freezes its contents internally once created, and later mutation of the original struct has no effect.

CoreClient::create

Public attributes

::ua::ApplicationIdentity mIdentity

Identity advertised by the client (product URI, name, application type, build info).

::ua::ApplicationConfiguration mApplication

Shared application and stack configuration (security, timeouts, trust list, limits).

::ua::client::ClientConfiguration mClient

Client-specific defaults (service/session/channel timeouts, reverse-connect listeners).

ua::client::CombinedConfig

struct

Complete configuration required to construct a client instance.

Bundles the three configuration inputs a client needs: the application identity advertised to servers, the shared application-wide configuration, and the client-only defaults.

Public attributes

::ua::ApplicationIdentity mIdentity

Application identity (product URI, application name, type) advertised to servers.

std::shared_ptr< const ::ua::ApplicationConfiguration > mApplication

Shared application-wide configuration (stack limits, trust list, etc.).

::ua::client::ClientConfiguration mClient

Client-only defaults (service/session timeouts, reverse-connect listeners, etc.).

ua::client::ClientConfiguration

struct

Client-wide configuration defaults.

Each field supplies the default used when a per-call configuration struct leaves the corresponding option unset; an explicit per-call value always takes precedence. The struct is plain configuration data with no behaviour and no ownership of external resources - it is copied into the Client at construction time.

Public attributes

std::chrono::milliseconds mDefaultServiceTimeout

Default timeout applied to every service call, in milliseconds.

std::chrono::milliseconds mDefaultSessionTimeout

Default requested session timeout, in milliseconds.

std::chrono::milliseconds mDefaultChannelLifetime

Default requested secure channel lifetime, in milliseconds.

uint32_t mIncomingChunkQueueDepth

Maximum incoming message chunks buffered per channel awaiting decode before the client read-pauses the transport (stops re-arming the socket read until the queue drains below half this depth).

uint32_t mWriteQueueDepthPerConnection

Maximum buffers queued for transmission per outbound connection before async_write fails closed with Bad_TcpNotEnoughResources.

optional< uint32_t > mMaxInboundStringLength

Optional overrides for the client's inbound (server-response) decode size caps.

optional< uint32_t > mMaxInboundByteStringLength

Optional inbound byte-string size cap (bytes); nullopt keeps the bounded-floor default (16 MB).

optional< uint32_t > mMaxInboundArrayLength

Optional inbound array element-count cap; nullopt keeps the bounded-floor default (65535).

uint32_t mDefaultReturnDiagnostics

Default returnDiagnostics bitmask stamped on every request header.

ClientDiagnosticPolicy mDiagnostics

Client-wide defaults for diagnostic handling on direct tier-0 Session service calls.

ua::client::ClientDiagnosticPolicy

struct

Per-Connection tunables for how the SDK surfaces decoded server diagnostics (client design section 7.10.4).

This is the single home for the diagnostics-related knobs so a Connection's diagnostic behaviour is configured in one place. It is attached to ConnectionConfig and decomposed into an immutable member at ua::client::detail::ConnectionImpl construction (read from any strand without synchronisation).

The defaults preserve the pre-policy behaviour exactly: the error-chain / advisory observer fires whenever the server attaches a DiagnosticInfo (which it only does when a request set returnDiagnostics != 0), and the decoded chain is depth-capped at 32.

This type grows as its requirements are wired. The WrapLevel field (CL-DIAG-015) is not yet present. It is added when their wiring lands, so a field present here is always enforced (no inert knobs).

Member types

WrapLevel (enum)

The wrap level.

Public attributes

std::optional< std::uint32_t > requestedDiagnosticsMask

Overrides the Client-wide default on every request issued by this Connection.

bool wrapTier0

Opts direct tier-0 Session service results into one SDK context wrap.

WrapLevel wrapLevel

Controls SDK tier-boundary links and their context richness. Standard is the default.

bool emitOnErrorChainObserver

When true (the default), a decoded server diagnostic on a wire response fires the ua::client::ClientObserver error-chain hook (on_error_chain on a bad service result, on_advisory_diagnostic on a good one).

std::uint32_t maxChainDepth

Cap on the decoded ErrorDetail chain depth.

ua::client::DataChangeEvent

struct

One decoded data-change notification delivered to a data-change monitor's callback (section 7.4).

The nodeId / attribute are pre-decoded from the pipeline's clientHandle table so the user never sees the wire handle.

Public attributes

MonitoredItemId itemId

The item id.

ua::NodeId nodeId

The node id.

ua::AttributeId attribute

The attribute.

ua::DataValue value

The value.

ua::client::AuditEventFields

struct

Mandatory Part 5 AuditEventType properties decoded for an audit notification (CL-AUDIT-004).

Public attributes

ua::DateTime actionTimeStamp

The action time stamp.

bool status

The status.

ua::String serverId

The server id.

ua::String clientAuditEntryId

The client audit entry id.

ua::String clientUserId

The client user id.

ua::client::AuditSubtypeFields

struct

Category-specific fields recognised from the standard AuditEventType subtree (CL-AUDIT-006).

Public attributes

AuditEventCategory category

The category.

std::optional< ua::StatusCode > statusCodeId

The status code id.

std::optional< ua::String > secureChannelId

The secure channel id.

std::optional< ua::NodeId > sessionId

The session id.

std::optional< ua::NodeId > methodId

The method id.

std::optional< ua::Variant > inputArguments

The input arguments.

ua::client::ProgressEventFields

struct

Typed ProgressEventType properties (CL-EVT-006).

Context is always retained verbatim; Service events additionally expose the decoded RequestHeader.requestHandle.

Public attributes

ua::Variant context

The context.

std::uint16_t progress

The progress.

ProgressSourceKind sourceKind

The source kind.

std::optional< std::uint32_t > requestHandle

The request handle.

ua::client::EventNotification

struct

One event notification delivered to an event consumer's callback (section 7.4 / section 8.13).

The decoded BaseEventType mandatory fields (CL-EVT-001) are surfaced as named members; fields carries every selected event-field value positionally in the order of the composite EventFilter.selectClauses (CL-EVT-002), with a null / unavailable field surfaced as nullopt (CL-MI-017). fieldPaths is the parallel BrowsePath metadata so callers can resolve a field by NAME (field / field_as, T22) instead of indexing positionally (robust under composite-filter widening).

Functions

std::optional< ua::Variant > field(std::string_view name) const

Returns: The requested value. The value of the selected field whose (single-segment) BrowseName == name, or nullopt if that SelectClause was not requested (T22 - by-name access correlates fields[i] with fieldPaths[i]).

std::optional< ua::Variant > field(std::initializer_list< std::string_view > browsePath) const

The value of the selected field whose FULL BrowsePath equals browsePath (each segment compared in order), or nullopt if that SelectClause was not requested.

  • browsePath (std::initializer_list< std::string_view >) - Complete browse path of the selected event field.

Returns: The selected field value, or nullopt when the path was not requested.

ua::Result< T > field_as(std::string_view name) const

Returns: The operation result, including status and diagnostic detail on failure. field coerced to T via Variant::to<T>(); Bad_NoData if the field was not requested / is null, or the coercion's Bad_TypeMismatch on a type error (T22).

ua::Result< T > field_as(std::initializer_list< std::string_view > browsePath) const
  • browsePath (std::initializer_list< std::string_view >) - The browse path.

Returns: The operation result, including status and diagnostic detail on failure. Multi-segment field({...}) coerced to T (see the single-segment field_as overload, T22).

Public attributes

MonitoredItemId itemId

The item id.

ua::NodeId eventTypeId

The event type id.

ua::ByteString eventId

The event id.

ua::NodeId sourceNode

The source node.

ua::String sourceName

The source name. A String, as OPC 10000-5 defines BaseEventType/SourceName.

ua::DateTime time

The time.

ua::DateTime receiveTime

The receive time.

ua::LocalizedText message

The message.

std::uint16_t severity

The severity.

std::optional< AuditEventFields > audit

engaged for a well-formed AuditEventType notification

std::optional< AuditSubtypeFields > auditSubtype

category/runtime subtype fields when audit is engaged

std::optional< ProgressEventFields > progress

engaged for a decodable ProgressEventType notification

std::vector< std::optional< ua::Variant > > fields

The fields.

std::vector< std::vector< ua::QualifiedName > > fieldPaths

fieldPaths[i] is the BrowsePath of fields[i]

ua::client::MonitorRequest

struct

A request to attach a DATA-CHANGE monitor (T17).

The filter is a data-change-only 3-way variant (monostate = no filter, ua::DataChangeFilter, or ua::AggregateFilter). There is deliberately NO ua::EventFilter alternative here, so "put an event filter on a data-change monitor" is a COMPILE error rather than a runtime reject - the invariant the earlier 4-way variant only claimed is now enforced by the type system. Event monitors use the dedicated EventMonitorRequest.

Public attributes

ua::NodeId nodeId

The node id.

ua::AttributeId attribute

The attribute.

std::optional< std::string > indexRange

The index range.

std::optional< std::uint32_t > queueSize

The queue size.

std::optional< ua::MonitoringMode > monitoringMode

default Reporting when unset

std::variant< std::monostate, ua::DataChangeFilter, ua::AggregateFilter > filter

The filter.

double samplingIntervalMs

0 = use the Subscription's publishing interval

bool discardOldest

queue-overflow policy (CL-MI-020): drop the oldest (true) vs newest (false)

ua::client::EventMonitorRequest

struct

A request to attach an EVENT monitor (T17) - a dedicated shape with a REQUIRED ua::EventFilter (an event monitor with no filter is meaningless).

Public attributes

ua::NodeId nodeId

the event notifier (e.g.

ua::AttributeId attribute

The attribute.

std::optional< std::uint32_t > queueSize

The queue size.

std::optional< ua::MonitoringMode > monitoringMode

default Reporting when unset

ua::EventFilter filter

REQUIRED.

double samplingIntervalMs

The sampling interval ms.

ua::client::MonitoredItem

class

The single, unified, self-acting MonitoredItem identity (T13 / T14).

Returned from every "subscribe and get a handle" call (data-change monitor, and - from Slice 10a - event subscriber / state-machine transition / server-diagnostics subscribe). Retires the former EventSubscriptionHandle / MonitoredItemHandle. A lightweight COPYABLE value type: it carries a weak_ptr to its connection-lifetime owner plus an immutable identity/snapshot, no owning resource, so copying and dropping it are cheap and side-effect-free.

Functions

MonitoredItem()=default

Constructs an EMPTY handle (no owner, handle 0).

MonitoredItemId client_handle() const noexcept

Returns: The requested value. The opaque Connection-unique client handle (CL-MI-003). Immutable.

const ua::NodeId & node_id() const noexcept

Returns: A reference to this object. The monitored node. Immutable.

ua::AttributeId attribute() const noexcept

Returns: The requested value. The monitored attribute. Immutable.

MonitoredItemKind kind() const noexcept

Returns: The requested value. The kind (DataChange | Event). Immutable - for consumers that must branch.

ua::MonitoringMode mode() const noexcept

The item's current monitoring mode.

Returns: The handle's current monitoring mode.

double revised_sampling_interval() const noexcept

The server's REVISED sampling interval (milliseconds) for this item (CL-MI-002 / CL-MI-019).

Returns: The revised sampling interval in milliseconds.

std::uint32_t revised_queue_size() const noexcept

Returns: The requested value. The server's REVISED queue size for this item (CL-MI-019). Captured at create and UPDATED on every Good modify_async (DataChange items) to the modify's revised value; an Event item surfaces the create-time value. 0 on an empty handle. Thread-safe; shared across copies.

bool discard_oldest() const noexcept

The queue-overflow policy this item was created / modified with (CL-MI-020): true drops the oldest.

Returns: True when the requested condition is satisfied. queued notification on overflow, false drops the newest. true on an empty handle. Thread-safe.

void modify_async(MonitorRequest request, std::function< void(ua::VoidResult)> callback) noexcept
void set_mode_async(ua::MonitoringMode mode, std::function< void(ua::VoidResult)> callback) noexcept
void delete_async(std::function< void(ua::VoidResult)> callback) noexcept
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Deletes this item server-side. The callback runs on the executor. Never throws.
void modify_sync(MonitorRequest request)
ua::VoidResult try_modify_sync(MonitorRequest request) noexcept

Returns: The requested value. Blocking modify. Never throws.

void set_mode_sync(ua::MonitoringMode mode)
ua::VoidResult try_set_mode_sync(ua::MonitoringMode mode) noexcept

Returns: The requested value. Blocking set_mode. Never throws.

void delete_sync()

Blocking delete.

ua::VoidResult try_delete_sync() noexcept

Returns: The requested value. Blocking delete. Never throws.

ua::client::ScopedMonitoredItem

class

Opt-in RAII wrapper that DELETES its wrapped MonitoredItem on destruction (D-DIAG-1).

The plain MonitoredItem is uniformly persist-on-drop; a caller who wants drop-cancels wraps it here. Move-only (owns the drop-cancel duty). The destructor issues a fire-and-forget MonitoredItem::delete_async (its completion is not awaited - the object is going away); release relinquishes the duty (persist-on-drop) and get exposes the wrapped item for its own self-actions.

Functions

ScopedMonitoredItem(MonitoredItem item) noexcept
  • item (MonitoredItem) - The item. Wraps item; its destructor will delete item unless release is called first.
ScopedMonitoredItem(ScopedMonitoredItem &&other) noexcept
  • other (ScopedMonitoredItem &&) - The other. Returns or updates the scoped monitored item.
ScopedMonitoredItem & operator=(ScopedMonitoredItem &&other) noexcept
  • other (ScopedMonitoredItem &&) - The other.

Returns: A reference to this object. Supports value-handle comparison or assignment.

~ScopedMonitoredItem()

Issues a fire-and-forget delete of the wrapped item (unless released / moved-from).

const MonitoredItem & get() const noexcept

Returns: A reference to this object. The wrapped item (for its own self-actions / identity queries).

MonitoredItem release() noexcept

Returns: The requested value. Relinquishes the drop-cancel duty (the wrapped item then persists on drop). Returns the item.

ua::client::ProposedAdjustment

struct

The adjustment the SubscriptionsPipeline proposes after exhausting its automated oversized-message recovery (section 9.5, CL-SUB-005).

Carried by SubscriptionObserver::on_subscription_recovery_action so the application can re-issue ModifySubscription / ModifyMonitoredItems with its own parameters.

Public attributes

std::uint32_t maxNotificationsPerPublish

The maxNotificationsPerPublish the automated halving arrived at before giving up (0 == unbounded).

ua::client::ModelChangeStructure

struct

One entry of a model-change notification (section 7.8; the OPC-UA ModelChangeStructureDataType mapped to a lightweight value type at the AddressSpaceObserver boundary).

Delivered by AddressSpaceObserver::on_model_change.

Public attributes

ua::NodeId affected

The node the change concerns.

ua::NodeId affectedType

The affected node's type (when applicable).

std::uint8_t verb

The ModelChangeStructureVerbMask bits describing the change.

ua::client::SemanticChangeStructure

struct

One entry of a semantic-change notification (section 7.8; the OPC-UA SemanticChangeStructureDataType mapped to a lightweight value type at the AddressSpaceObserver boundary).

Delivered by AddressSpaceObserver::on_semantic_change.

Public attributes

ua::NodeId affected

The node whose semantics changed.

ua::NodeId affectedType

The affected node's type (when applicable).

ua::client::ConnectionObserver

class

Observes the connection + session lifecycle of one Connection (section 7.8).

Registered per-Connection (Connection::set_connection_observer) or Client-wide (Client::set_connection_observer).

Functions

ConnectionObserver()=default
~ConnectionObserver()=default
void on_connecting(const Connection &connection)
  • connection (const Connection &) - Connection that emitted the notification. The Connection has begun its initial connect (bootstrap starting).
void on_connected(const Connection &connection)
  • connection (const Connection &) - Connection that emitted the notification. The Connection reached Active for the first time (bootstrap complete).
void on_disconnected(const Connection &connection, ua::StatusCode reason, std::shared_ptr< const ua::ErrorDetail > detail)

The Connection left Active for a terminal state - either a reconnect that terminally gave up (reason carries the failure status and detail its cause chain) OR an intentional, graceful client-initiated.

  • connection (const Connection &) - Connection that emitted the notification. close (reason == Good, detail == nullptr). A consumer distinguishing the two cases must test reason.is_good(), not assume an error. on_closed always follows on a graceful close.
  • reason (ua::StatusCode) - The status categorising the disconnect (Good for a graceful close).
  • detail (std::shared_ptr< const ua::ErrorDetail >) - The full ErrorDetail cause chain (null on a graceful close, or when unavailable).
void on_reconnecting(const Connection &connection, std::size_t attempt, ReconnectCause cause)

An automatic reconnect attempt has begun.

  • connection (const Connection &) - Connection that emitted the notification.
  • attempt (std::size_t) - The 1-based attempt counter.
  • cause (ReconnectCause) - Why the reconnect is being attempted (std::visit the tagged sum).
void on_reconnected(const Connection &connection, ReconnectOutcome outcome)

A reconnect completed and the Connection is Active again.

  • connection (const Connection &) - Connection that emitted the notification.
  • outcome (ReconnectOutcome) - What was preserved vs recreated across the reconnect.
void on_closed(const Connection &connection)
  • connection (const Connection &) - Connection that emitted the notification. The Connection reached Closed (graceful close completed).
void on_session_created(const Connection &connection, ua::NodeId sessionId)

A Session was created on the server (CreateSession completed).

  • connection (const Connection &) - Connection that emitted the notification.
  • sessionId (ua::NodeId) - The server-assigned session identifier.
void on_session_activated(const Connection &connection)
  • connection (const Connection &) - Connection that emitted the notification. The Session was activated (ActivateSession completed).
void on_session_recreated(const Connection &connection, ua::NodeId oldId, ua::NodeId newId)

A fresh Session replaced the previous one across a reconnect (CL-RECONN-003).

  • connection (const Connection &) - Connection that emitted the notification.
  • oldId (ua::NodeId) - The previous (now invalid) session identifier.
  • newId (ua::NodeId) - The new session identifier.
void on_namespace_remap(const Connection &connection, std::size_t generation, bool sizeChanged, bool indexShifted)
  • connection (const Connection &) - Connection that emitted the notification. The NamespaceArray snapshot was replaced with changed contents (CL-ADDRSP-004). Fires only when the array contents actually changed, so persisted-NodeId consumers can re-anchor.
  • generation (std::size_t) - The monotonically increasing namespace-table generation.
  • sizeChanged (bool) - Whether the number of namespaces changed.
  • indexShifted (bool) - Whether an existing URI moved to a different index.
void on_error_chain(const Connection &connection, ua::StatusCode terminalCode, std::shared_ptr< const ua::ErrorDetail > chain, std::string_view operationTag)

A completed error cause-chain crossed a tier/wire boundary (advisory; section 7.10, CL-DIAG-011).

  • connection (const Connection &) - Connection that emitted the notification. Read-only - the observer cannot suppress or rewrite it.
  • terminalCode (ua::StatusCode) - The terminal status of the chain.
  • chain (std::shared_ptr< const ua::ErrorDetail >) - The full ErrorDetail cause chain (may be null).
  • operationTag (std::string_view) - The CL-DIAG source tag of the operation that failed.
void on_advisory_diagnostic(const Connection &connection, std::shared_ptr< const ua::ErrorDetail > detail)
  • connection (const Connection &) - Connection that emitted the notification. An advisory (non-fatal) diagnostic was produced (section 7.10, CL-DIAG-012). Read-only.
  • detail (std::shared_ptr< const ua::ErrorDetail >) - The advisory ErrorDetail (may be null).

ua::client::SubscriptionObserver

class

Observes Subscription and MonitoredItem lifecycle events (section 7.8).

Functions

SubscriptionObserver()=default
~SubscriptionObserver()=default
void on_subscription_transferred(ua::IntegerId subscriptionId)
  • subscriptionId (ua::IntegerId) - The subscription id. A Subscription was transferred to the current Session (TransferSubscriptions succeeded).
void on_subscription_recreated(ua::IntegerId oldId, ua::IntegerId newId)
  • oldId (ua::IntegerId) - The old id.
  • newId (ua::IntegerId) - The new id. A Subscription was recreated with a new id across a reconnect.
void on_publish_gap(ua::IntegerId subscriptionId, std::uint32_t lostFrom, std::uint32_t to)
  • subscriptionId (ua::IntegerId) - The subscription id.
  • lostFrom (std::uint32_t) - The lost from.
  • to (std::uint32_t) - The to. A publish sequence gap was detected (notifications lostFrom..to could not be recovered).
void on_subscription_recovery_action(ua::IntegerId subscriptionId, ua::StatusCode terminalCode, std::shared_ptr< const ua::ErrorDetail > chain, ProposedAdjustment proposed)

The SubscriptionsPipeline exhausted its automated oversized-message recovery (CL-SUB-005, section 9.5).

void on_subscription_terminated(ua::IntegerId subscriptionId, ua::StatusCode reason, std::shared_ptr< const ua::ErrorDetail > chain)

A Subscription terminated without recreation (CL-SUB-008).

ua::client::TypeObserver

class

Observes type-system registration events (section 7.8).

Functions

TypeObserver()=default
~TypeObserver()=default
void on_type_registered(ua::NodeId encodingId, std::string typeName)

A structured type was registered with the type resolver (lazy or eager).

ua::client::SecurityObserver

class

Observes certificate-rotation lifecycle events (section 7.8).

Pull-cert hooks are Client-level facilities, so their Connection is NULLABLE (null when no / an expired Connection is associated).

Functions

SecurityObserver()=default
~SecurityObserver()=default
void on_certificate_rotated(const ua::X509Certificate &newCert)

The client's application-instance certificate was rotated (CL-PULLCRT-*).

  • newCert (const ua::X509Certificate &) - The new certificate (borrowed for the callback).
void on_pull_cert_management_lifecycle(const Connection *connection, PullCertLifecycleEvent event, std::shared_ptr< const ua::ErrorDetail > detail)

A pull-cert management lifecycle transition occurred (CL-PULLCRT-*, section 8.1A).

ua::client::AddressSpaceObserver

class

Observes address-space model + semantic-change events (section 7.8, routed from the EventSubscriber).

Functions

AddressSpaceObserver()=default
~AddressSpaceObserver()=default
void on_model_change(const Connection &connection, std::vector< ModelChangeStructure > changes)
  • connection (const Connection &) - Connection that emitted the notification.
  • changes (std::vector< ModelChangeStructure >) - The changes. A GeneralModelChangeEvent / BaseModelChangeEvent was observed (Base Info Client Change Events).
void on_semantic_change(const Connection &connection, std::vector< SemanticChangeStructure > changes)
  • connection (const Connection &) - Connection that emitted the notification.
  • changes (std::vector< SemanticChangeStructure >) - The changes. A SemanticChangeEvent was observed (Data Access Client SemanticChange).

ua::client::ServerStateObserver

class

Observes server-state, progress, and device-failure events (section 7.8).

Functions

ServerStateObserver()=default
~ServerStateObserver()=default
void on_device_failure(const Connection &connection, EventNotification event)
  • connection (const Connection &) - Connection that emitted the notification.
  • event (EventNotification) - The event. A DeviceFailureEventType event was observed.
void on_progress_event(const Connection &connection, EventNotification event)
  • connection (const Connection &) - Connection that emitted the notification.
  • event (EventNotification) - The event. A ProgressEventType event was observed.
void on_system_status_change(const Connection &connection, ua::NodeId sourceNode, ua::String sourceName, ua::ServerState newState, SystemStatusOrigin origin)

A system's ServerState changed, as reported by SystemStatusChangeEventType.

  • connection (const Connection &) - Connection that emitted the notification.
  • sourceNode (ua::NodeId) - Node identifying the affected system.
  • sourceName (ua::String) - Human-readable identity of the affected system.
  • newState (ua::ServerState) - The system's new ServerState.
  • origin (SystemStatusOrigin) - Server when sourceNode is NS0 Server; otherwise UnderlyingSystem.

ua::client::AlarmObserver

class

Observes Alarms & Conditions broadcasts, audit events, and data-integrity warnings (section 7.8).

Functions

AlarmObserver()=default
~AlarmObserver()=default
void on_refresh_required(const Connection &connection, std::size_t conditionCount)

The server lost confidence in its condition cache and asks clients to re-issue ConditionRefresh.

  • connection (const Connection &) - Connection that emitted the notification. (CL-AC-007). Advisory; the tracker drives the actual refresh.
  • conditionCount (std::size_t) - The tracked-condition count at fire time (diagnostics).
void on_data_integrity_warning(const Connection &connection, TrackedKey key, DataIntegrityKind kind, std::shared_ptr< const ua::ErrorDetail > details)
  • connection (const Connection &) - Connection that emitted the notification. A tracker observed a server-side invariant violation (CL-AC-023 / CL-AC-025). Read-only.
  • key (TrackedKey) - The tracked condition/branch the warning concerns.
  • kind (DataIntegrityKind) - The class of invariant violation.
  • details (std::shared_ptr< const ua::ErrorDetail >) - A ErrorDetail describing the violation (may be null).
void on_audit_event(const Connection &connection, EventNotification event)
  • connection (const Connection &) - Connection that emitted the notification.
  • event (EventNotification) - The event. An AuditEventType-subtree event was routed from the EventSubscriber (CL-AUDIT-003).
void on_audit_security_event(const Connection &connection, EventNotification event)
  • connection (const Connection &) - Connection that emitted the notification.
  • event (EventNotification) - The event. Returns or updates the on audit security event.
void on_audit_channel_event(const Connection &connection, EventNotification event)
  • connection (const Connection &) - Connection that emitted the notification.
  • event (EventNotification) - The event. Returns or updates the on audit channel event.
void on_audit_session_event(const Connection &connection, EventNotification event)
  • connection (const Connection &) - Connection that emitted the notification.
  • event (EventNotification) - The event. Returns or updates the on audit session event.
void on_audit_update_event(const Connection &connection, EventNotification event)
  • connection (const Connection &) - Connection that emitted the notification.
  • event (EventNotification) - The event. Returns or updates the on audit update event.
void on_audit_update_method_event(const Connection &connection, EventNotification event)
  • connection (const Connection &) - Connection that emitted the notification.
  • event (EventNotification) - The event. Returns or updates the on audit update method event.

ua::client::SecureChannel

class

Public handle for a client-side OPC UA Secure Channel.

Wraps a strand-serialized component (SecureChannelImpl) through a shared_ptr pimpl, so every method may be called from any thread; the implementation serializes work on its own internal strand. The handle is not directly constructable - instances are produced by CoreClientImpl or by SecureChannelImpl::create().

This is a move-only handle. Move-only is what guarantees that close_async's move-into-lambda plus reset releases the last strong reference, so the owning thread pool's join() can return.

Member types

ua::Result< Session > SessionResult

Outcome of session creation: the created (NOT yet activated) Session, or an ErrorDetail.

std::function< void(SessionResult)> CreateSessionCallback

Callback receiving the outcome of create_session_async.

ua::Result< ua::GetEndpointsResponse > GetEndpointsResponseResult

Outcome of GetEndpoints: the GetEndpointsResponse, or an ErrorDetail.

std::function< void(GetEndpointsResponseResult)> GetEndpointsCallback

Callback receiving the outcome of get_endpoints_async.

ua::Result< ua::FindServersResponse > FindServersResponseResult

Outcome of FindServers: the FindServersResponse, or an ErrorDetail.

std::function< void(FindServersResponseResult)> FindServersCallback

Callback receiving the outcome of find_servers_async.

ua::Result< ua::FindServersOnNetworkResponse > FindServersOnNetworkResponseResult

Outcome of FindServersOnNetwork: the response, or an ErrorDetail.

std::function< void(FindServersOnNetworkResponseResult)> FindServersOnNetworkCallback

Callback receiving the outcome of find_servers_on_network_async.

ua::Result< ua::RegisterServerResponse > RegisterServerResponseResult

Outcome of RegisterServer: the RegisterServerResponse, or an ErrorDetail.

std::function< void(RegisterServerResponseResult)> RegisterServerCallback

Callback receiving the outcome of register_server_async.

ua::Result< ua::RegisterServer2Response > RegisterServer2ResponseResult

Outcome of RegisterServer2: the RegisterServer2Response, or an ErrorDetail.

std::function< void(RegisterServer2ResponseResult)> RegisterServer2Callback

Callback receiving the outcome of register_server2_async.

std::function< void(ua::VoidResult)> CloseCallback

Callback receiving the success-or-error outcome of close_async.

Functions

SecureChannel(SecureChannel &&) noexcept=default

Transfers ownership of the underlying channel impl; the source is left empty.

SecureChannel & operator=(SecureChannel &&) noexcept=default

Transfers ownership of the underlying channel impl; the source is left empty.

Returns: Reference to this handle (*this).

~SecureChannel()

Releases this handle's share of the channel impl.

void create_session_async(CreateSessionConfig config, CreateSessionCallback callback) noexcept

Creates a session on this channel.

  • config (CreateSessionConfig) - Session parameters; see CreateSessionConfig.
  • callback (CreateSessionCallback) - Receives the outcome: on success the Result holds the created Session, which still requires activation; on failure it carries an ErrorDetail. This overload never throws.
Session create_session_sync(CreateSessionConfig config)

Creates a session on this channel, blocking until complete.

  • config (CreateSessionConfig) - Session parameters; see CreateSessionConfig.

Returns: The created session, which still requires Session::activate_sync.

SessionResult try_create_session_sync(CreateSessionConfig config) noexcept

Creates a session on this channel, blocking until complete.

  • config (CreateSessionConfig) - Session parameters; see CreateSessionConfig.

Returns: The created session (still requiring activation), or an ErrorDetail on failure. Never throws.

void get_endpoints_async(ua::GetEndpointsRequest request, GetEndpointsCallback callback) noexcept

Invokes the GetEndpoints discovery service on this channel.

  • request (ua::GetEndpointsRequest) - The GetEndpoints request.
  • callback (GetEndpointsCallback) - Receives the outcome: on success the Result holds the GetEndpointsResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::GetEndpointsResponse get_endpoints_sync(ua::GetEndpointsRequest request)

Invokes the GetEndpoints discovery service, blocking until complete.

Returns: The GetEndpoints response.

GetEndpointsResponseResult try_get_endpoints_sync(ua::GetEndpointsRequest request) noexcept

Invokes the GetEndpoints discovery service, blocking until complete.

Returns: The GetEndpoints response, or an ErrorDetail on failure. Never throws.

void find_servers_async(ua::FindServersRequest request, FindServersCallback callback) noexcept

Invokes the FindServers discovery service on this channel.

  • request (ua::FindServersRequest) - The FindServers request.
  • callback (FindServersCallback) - Receives the outcome: on success the Result holds the FindServersResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::FindServersResponse find_servers_sync(ua::FindServersRequest request)

Invokes the FindServers discovery service, blocking until complete.

Returns: The FindServers response.

FindServersResponseResult try_find_servers_sync(ua::FindServersRequest request) noexcept

Invokes the FindServers discovery service, blocking until complete.

Returns: The FindServers response, or an ErrorDetail on failure. Never throws.

void find_servers_on_network_async(ua::FindServersOnNetworkRequest request, FindServersOnNetworkCallback callback) noexcept

Invokes the FindServersOnNetwork discovery service on this channel.

  • request (ua::FindServersOnNetworkRequest) - The FindServersOnNetwork request.
  • callback (FindServersOnNetworkCallback) - Receives the outcome: on success the Result holds the FindServersOnNetworkResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::FindServersOnNetworkResponse find_servers_on_network_sync(ua::FindServersOnNetworkRequest request)

Invokes the FindServersOnNetwork discovery service, blocking until complete.

Returns: The FindServersOnNetwork response.

FindServersOnNetworkResponseResult try_find_servers_on_network_sync(ua::FindServersOnNetworkRequest request) noexcept

Invokes the FindServersOnNetwork discovery service, blocking until complete.

Returns: The FindServersOnNetwork response, or an ErrorDetail on failure. Never throws.

void register_server_async(ua::RegisterServerRequest request, RegisterServerCallback callback) noexcept

Registers a server with a Local Discovery Server over this channel.

  • request (ua::RegisterServerRequest) - The RegisterServer request.
  • callback (RegisterServerCallback) - Receives the outcome: on success the Result holds the RegisterServerResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::RegisterServerResponse register_server_sync(ua::RegisterServerRequest request)

Registers a server with a Local Discovery Server, blocking until complete.

Returns: The RegisterServer response.

RegisterServerResponseResult try_register_server_sync(ua::RegisterServerRequest request) noexcept

Registers a server with a Local Discovery Server, blocking until complete.

Returns: The RegisterServer response, or an ErrorDetail on failure. Never throws.

void register_server2_async(ua::RegisterServer2Request request, RegisterServer2Callback callback) noexcept

Registers a server with a Local Discovery Server using RegisterServer2.

  • request (ua::RegisterServer2Request) - The RegisterServer2 request.
  • callback (RegisterServer2Callback) - Receives the outcome: on success the Result holds the RegisterServer2Response; on failure it carries an ErrorDetail. This overload never throws.
ua::RegisterServer2Response register_server2_sync(ua::RegisterServer2Request request)

Registers a server with a Local Discovery Server using RegisterServer2, blocking until complete.

Returns: The RegisterServer2 response.

RegisterServer2ResponseResult try_register_server2_sync(ua::RegisterServer2Request request) noexcept

Registers a server with a Local Discovery Server using RegisterServer2, blocking until complete.

Returns: The RegisterServer2 response, or an ErrorDetail on failure. Never throws.

void close_async(CloseCallback callback) noexcept

Gracefully closes the channel.

  • callback (CloseCallback) - Receives the outcome as a VoidResult: success, or an ErrorDetail on failure. This overload never throws.
void close_sync()

Gracefully closes the channel, blocking until complete.

ua::VoidResult try_close_sync() noexcept

Gracefully closes the channel, blocking until complete.

Returns: Success, or an ErrorDetail on failure. Never throws.

uint32_t secure_channel_id() const

Returns the server-assigned secure channel identifier.

Returns: The secure channel id, or 0 if the channel has not yet opened.

bool is_open() const

Reports whether the channel is currently open.

Returns: true while the secure channel is established; false once it is closed, has not yet opened, or this handle is empty.

ua::client::Session

class

Move-only public handle for a client-side OPC UA Session.

Wraps a strand-serialized component (SessionImpl) behind a shared_ptr pimpl. Not directly constructable: a Session is produced by the client machinery (e.g. SecureChannel::create_session). Service operations are not invoked on the Session directly; they are reached through the lightweight service-set accessors returned by discovery(), view(), attributes(), node_management(), methods(), subscriptions(), monitored_items(), and query().

Member types

std::function< void(ua::VoidResult)> ActivateCallback

Callback invoked with the outcome of an activate operation.

ua::Result< ua::CancelResponse > CancelResponseResult

Result of a Cancel operation: the CancelResponse, or an ErrorDetail.

std::function< void(CancelResponseResult)> CancelCallback

Callback invoked with the outcome of a cancel operation.

std::function< void(ua::VoidResult)> CloseCallback

Callback invoked with the outcome of a close operation.

Functions

Session(Session &&) noexcept=default

Move-constructs from other, transferring the underlying session reference.

Session & operator=(Session &&) noexcept=default

Move-assigns from other, transferring the underlying session reference.

Returns: Reference to this handle (*this).

~Session()

Releases this handle's reference to the underlying session.

SessionDiscoveryServices discovery() const

Returns the discovery service set (GetEndpoints, FindServers, ...) for this session.

Returns: The discovery service set bound to this session.

SessionViewServices view() const

Returns the view service set (Browse, BrowseNext, TranslateBrowsePaths, ...) for this session.

Returns: The view service set bound to this session.

SessionAttributeServices attributes() const

Returns the attribute service set (Read, Write, HistoryRead, ...) for this session.

Returns: The attribute service set bound to this session.

SessionNodeManagementServices node_management() const

Returns the node-management service set (AddNodes, AddReferences, DeleteNodes, ...).

Returns: The node-management service set bound to this session.

SessionMethodServices methods() const

Returns the method service set (Call) for this session.

Returns: The method service set bound to this session.

SessionSubscriptionServices subscriptions() const

Returns the subscription service set (CreateSubscription, Publish, ...) for this session.

Returns: The subscription service set bound to this session.

SessionMonitoredItemServices monitored_items() const

Returns the monitored-item service set (CreateMonitoredItems, ModifyMonitoredItems, ...).

Returns: The monitored-item service set bound to this session.

SessionQueryServices query() const

Returns the query service set (QueryFirst, QueryNext) for this session.

Returns: The query service set bound to this session.

void activate_async(ActivateConfig config, ActivateCallback callback) noexcept

Activates the session on its currently-bound channel.

  • config (ActivateConfig) - Activation parameters (token policy, identity, locales).
  • callback (ActivateCallback) - Receives the outcome: a successful VoidResult on activation, otherwise a Result carrying an ErrorDetail. This overload never throws.
void activate_sync(ActivateConfig config={})

Activates the session on its currently-bound channel, blocking until complete.

  • config (ActivateConfig) - Activation parameters (token policy, identity, locales).
ua::VoidResult try_activate_sync(ActivateConfig config={}) noexcept

Activates the session on its currently-bound channel, blocking until complete.

  • config (ActivateConfig) - Activation parameters (token policy, identity, locales).

Returns: A successful VoidResult, or an ErrorDetail on failure. Never throws.

void activate_async(SecureChannel channel, ActivateConfig config, ActivateCallback callback) noexcept

Activates (or re-activates) the session on a different channel.

  • channel (SecureChannel) - Channel to bind and activate on; ownership is shared by the session.
  • config (ActivateConfig) - Activation parameters (token policy, identity, locales).
  • callback (ActivateCallback) - Receives the outcome: a successful VoidResult on activation, otherwise a Result carrying an ErrorDetail. This overload never throws.
void activate_sync(SecureChannel channel, ActivateConfig config={})

Activates (or re-activates) the session on a different channel, blocking until complete.

  • channel (SecureChannel) - Channel to bind and activate on; ownership is shared by the session.
  • config (ActivateConfig) - Activation parameters (token policy, identity, locales).
ua::VoidResult try_activate_sync(SecureChannel channel, ActivateConfig config={}) noexcept

Activates (or re-activates) the session on a different channel, blocking until complete.

  • channel (SecureChannel) - Channel to bind and activate on; ownership is shared by the session.
  • config (ActivateConfig) - Activation parameters (token policy, identity, locales).

Returns: A successful VoidResult, or an ErrorDetail on failure. Never throws.

void cancel_async(ua::CancelRequest request, CancelCallback callback) noexcept

Requests cancellation of outstanding service requests.

  • request (ua::CancelRequest) - The Cancel request identifying the work to cancel.
  • callback (CancelCallback) - Receives the outcome: on success the Result holds the CancelResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::CancelResponse cancel_sync(ua::CancelRequest request)

Requests cancellation of outstanding service requests, blocking until complete.

Returns: The server's CancelResponse.

CancelResponseResult try_cancel_sync(ua::CancelRequest request) noexcept

Requests cancellation of outstanding service requests, blocking until complete.

Returns: The CancelResponse, or an ErrorDetail on failure. Never throws.

void close_async(CloseCallback callback) noexcept
  • callback (CloseCallback) - Receives the outcome: a successful VoidResult on close, otherwise a Result carrying an ErrorDetail. This overload never throws.
void close_async(CloseConfig config, CloseCallback callback) noexcept

Closes the session with explicit options.

  • config (CloseConfig) - Close options; see CloseConfig::mDeleteSubscriptions.
  • callback (CloseCallback) - Receives the outcome. This overload never throws.
void close_sync()

Gracefully closes the session, blocking until complete.

ua::VoidResult try_close_sync() noexcept

Gracefully closes the session, blocking until complete.

Returns: A successful VoidResult, or an ErrorDetail on failure. Never throws.

ua::VoidResult try_close_sync(CloseConfig config) noexcept

Closes the session with explicit options, blocking until complete.

  • config (CloseConfig) - Close options; see CloseConfig::mDeleteSubscriptions.

Returns: A successful VoidResult, or an ErrorDetail on failure. Never throws.

ua::NodeId session_id() const

Returns the server-assigned session identifier.

Returns: The server-assigned session identifier, or a null NodeId before the session has been created on the server.

double revised_session_timeout_ms() const

Returns the server's revised session timeout in milliseconds, as agreed in the CreateSession response.

Returns: The revised session timeout in milliseconds, or 0.0 before the session has been created.

bool is_created() const

Returns whether the session is in the Created state (created but not yet activated).

Returns: true if the session is Created but not yet activated; otherwise false.

bool is_active() const

Returns whether the session is in the Active state (activated and usable for service calls).

Returns: true if the session is Active and usable for service calls; otherwise false.

bool is_disconnected() const

Returns whether the session is in the Disconnected state (its channel was lost).

Returns: true if the session is Disconnected (its channel was lost); otherwise false.

ua::client::SubscriptionConfig

struct

The parameters for creating a Subscription (OPC 10000-4 5.13.2, Table 85).

Every field reaches the CreateSubscription request; an unset optional takes the SDK default named on it. The values are also retained for the two operations that replace the whole parameter set later - Subscription::modify_async and the rebuild after a reconnect that had to create a fresh Session - so neither silently reverts them.

Note the one place the SDK adjusts a request: setting maxKeepAliveCount WITHOUT lifetimeCount raises the lifetime to three times the keep-alive, the floor Table 90 requires. Left alone, the default lifetime would sit below that floor for any raised keep-alive and the server would revise BOTH, handing back a Subscription tuned like neither the request nor the default. Set both to be sent verbatim.

Public attributes

double publishingIntervalMs

The requested publishing interval in milliseconds; 0 asks the server for its fastest supported rate.

bool publishingEnabled

Whether the Subscription starts publishing. False creates it dormant, to be enabled later.

std::optional< std::uint32_t > lifetimeCount

Publishing intervals without an acknowledged Publish before the server deletes the Subscription.

std::optional< std::uint32_t > maxKeepAliveCount

Publishing intervals with nothing to report before the server sends a keep-alive.

std::optional< std::uint32_t > maxNotificationsPerPublish

The maximum notifications the server may pack into one Publish response; unset (0) means no limit.

std::optional< std::uint8_t > priority

Relative publishing priority when the server has several Subscriptions to service.

ua::client::SubscriptionModifyConfig

struct

The parameters for modifying a Subscription (OPC 10000-4 5.13.3, Table 88).

ModifySubscription replaces the WHOLE parameter set, so a field left unset here is NOT left alone by the server - it would be reset. The SDK therefore re-sends every unset field from the values retained at create (or at the last successful modify), and only the fields stated here change.

Public attributes

double publishingIntervalMs

The requested publishing interval in milliseconds.

std::optional< std::uint32_t > lifetimeCount

The requested lifetime count, or unset to keep the value the server currently holds.

std::optional< std::uint32_t > maxKeepAliveCount

The requested keep-alive count, or unset to keep the value the server currently holds.

std::optional< std::uint32_t > maxNotificationsPerPublish

The requested per-Publish notification cap, or unset to keep the value the server currently holds.

std::optional< std::uint8_t > priority

The requested priority, or unset to keep the value the server currently holds.

ua::client::SetTriggeringResult

struct

The per-link outcome of a SetTriggering call (CL-MI-029, OPC UA Part 4 section 5.12.5.2 Table 78).

The server returns a StatusCode array for the links added and a StatusCode array for the links removed; each array is positionally paired with its input list, so addResults[i] is the outcome of linksToAdd[i] and removeResults[i] the outcome of linksToRemove[i]. A per-link Bad is surfaced here at its index WITHOUT failing the call as a whole - the call is bad only on a transport/service-level fault.

Public attributes

std::vector< ua::StatusCode > addResults

per-link results, paired with the linksToAdd input order.

std::vector< ua::StatusCode > removeResults

per-link results, paired with the linksToRemove input order.

ua::client::MonitoredItemHandles

struct

Parallel ServerHandle / ClientHandle arrays returned by Server.GetMonitoredItems (Part 5 section 9.1).

serverHandles[i] and clientHandles[i] describe the same monitored item.

Public attributes

std::vector< ua::IntegerId > serverHandles

The server handles.

std::vector< ua::IntegerId > clientHandles

The client handles.

ua::client::Subscription

class

A move-only handle to a client-side Subscription (section 7.4).

The SubscriptionsPipeline owns the underlying state and survives reconnect via TransferSubscriptions (default) or recreate (per policy). Item-level modify / set-mode / delete are SELF-ACTING on the returned MonitoredItem (T14) - they are not methods here.

Member types

ua::Result< std::vector< MonitoredItemResult > > BulkMonitorResult

A bulk-add result: per-item results in the same order as the input vector.

Functions

Subscription(Subscription &&) noexcept=default

Returns or updates the subscription.

Subscription & operator=(Subscription &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~Subscription()=default
void monitor_async(MonitorRequest request, DataChangeCallback onData, std::function< void(MonitoredItemResult)> callback) noexcept

Attaches a data-change monitor; the callback delivers the returned MonitoredItem (or a bad Result)

  • request (MonitorRequest) - The request.
  • onData (DataChangeCallback) - The on data.
  • callback (std::function< void(MonitoredItemResult)>) - Completion callback that receives the operation result. on the executor. Notifications for the item are delivered to onData on the executor. Never throws.
MonitoredItem monitor_sync(MonitorRequest request, DataChangeCallback onData)
  • request (MonitorRequest) - The request.
  • onData (DataChangeCallback) - The on data.

Returns: The requested value. Blocking monitor_async.

MonitoredItemResult try_monitor_sync(MonitorRequest request, DataChangeCallback onData) noexcept
  • request (MonitorRequest) - The request.
  • onData (DataChangeCallback) - The on data.

Returns: The requested value. Blocking monitor_async. Never throws.

void monitor_event_async(EventMonitorRequest request, EventCallback onEvent, std::function< void(MonitoredItemResult)> callback) noexcept

Attaches an event monitor (dedicated EventMonitorRequest with its REQUIRED ua::EventFilter, T17).

MonitoredItem monitor_event_sync(EventMonitorRequest request, EventCallback onEvent)

Returns: The requested value. Blocking monitor_event_async.

MonitoredItemResult try_monitor_event_sync(EventMonitorRequest request, EventCallback onEvent) noexcept

Returns: The requested value. Blocking monitor_event_async. Never throws.

void monitor_many_async(std::vector< MonitorRequest > requests, DataChangeCallback onData, std::function< void(BulkMonitorResult)> callback) noexcept
std::vector< MonitoredItemResult > monitor_many_sync(std::vector< MonitorRequest > requests, DataChangeCallback onData)

Returns: The requested value. Blocking monitor_many_async.

BulkMonitorResult try_monitor_many_sync(std::vector< MonitorRequest > requests, DataChangeCallback onData) noexcept

Returns: The requested value. Blocking monitor_many_async. Never throws.

void set_triggering_async(MonitoredItem trigger, std::vector< MonitoredItem > linksToAdd, std::vector< MonitoredItem > linksToRemove, std::function< void(ua::Result< SetTriggeringResult >)> callback) noexcept

Configures the trigger relationship between trigger and the linked items.

SetTriggeringResult set_triggering_sync(const MonitoredItem &trigger, const std::vector< MonitoredItem > &linksToAdd, const std::vector< MonitoredItem > &linksToRemove)
  • trigger (const MonitoredItem &) - The trigger.
  • linksToAdd (const std::vector< MonitoredItem > &) - The links to add.
  • linksToRemove (const std::vector< MonitoredItem > &) - The links to remove.

Returns: The requested value. Blocking set_triggering_async.

ua::Result< SetTriggeringResult > try_set_triggering_sync(const MonitoredItem &trigger, const std::vector< MonitoredItem > &linksToAdd, const std::vector< MonitoredItem > &linksToRemove) noexcept
  • trigger (const MonitoredItem &) - The trigger.
  • linksToAdd (const std::vector< MonitoredItem > &) - The links to add.
  • linksToRemove (const std::vector< MonitoredItem > &) - The links to remove.

Returns: The operation result, including status and diagnostic detail on failure. Blocking set_triggering_async. Never throws.

void get_monitored_items_async(std::function< void(ua::Result< MonitoredItemHandles >)> callback) noexcept

Calls Server.GetMonitoredItems through the Connection/Session that owns this Subscription and returns.

MonitoredItemHandles get_monitored_items_sync()

Returns: The requested value. Blocking get_monitored_items_async.

ua::Result< MonitoredItemHandles > try_get_monitored_items_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Blocking get_monitored_items_async. Never throws.

void resend_data_async(std::function< void(ua::VoidResult)> callback) noexcept
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Calls Server.ResendData through the Connection/Session that owns this Subscription. Never throws.
void resend_data_sync()

Blocking resend_data_async.

ua::VoidResult try_resend_data_sync() noexcept

Returns: The requested value. Blocking resend_data_async. Never throws.

void modify_async(SubscriptionModifyConfig config, std::function< void(ua::VoidResult)> callback) noexcept
void modify_sync(SubscriptionModifyConfig config)
ua::VoidResult try_modify_sync(SubscriptionModifyConfig config) noexcept

Returns: The requested value. Blocking modify_async. Never throws.

void set_publishing_mode_async(bool enabled, std::function< void(ua::VoidResult)> callback) noexcept
  • enabled (bool) - The enabled.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Enables / disables publishing for the Subscription. Never throws.
void set_publishing_mode_sync(bool enabled)
  • enabled (bool) - The enabled. Blocking set_publishing_mode_async.
ua::VoidResult try_set_publishing_mode_sync(bool enabled) noexcept
  • enabled (bool) - The enabled.

Returns: The requested value. Blocking set_publishing_mode_async. Never throws.

void close_async(std::function< void(ua::VoidResult)> callback) noexcept
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Deletes the Subscription server-side (DeleteSubscriptions) and deregisters it from the pipeline. Never throws.
void close_sync()

Blocking close_async.

ua::VoidResult try_close_sync() noexcept

Returns: The requested value. Blocking close_async. Never throws.

ua::IntegerId server_subscription_id() const noexcept

Returns: The requested value. The server-assigned Subscription id.

ua::Duration publishing_interval() const noexcept

Returns: The requested value. The server-revised publishing interval (ms). Captured at create and UPDATED on every Good modify_async to the modify's revised value (CL-SUB-011), so it always reflects the current server cadence. Thread-safe; shared across handle copies.

bool is_publishing_enabled() const noexcept

Returns: True when the requested condition is satisfied. Whether publishing is currently enabled (updated on set_publishing_mode_async success).

std::size_t item_count() const noexcept

Returns: The requested value. The number of monitored items created through this handle (v1: not decremented on item delete).

ua::client::Connection

class

The principal user-facing handle in the managed (tier-1/2) client API (section 7.2).

One Connection represents one logical (endpoint, identity, security) tuple. It is a move-only handle (shared_ptr<ConnectionImpl> pimpl) over a strand-serialized orchestrator that owns the managed SecureChannel/Session pair, the reconnect FSM, the keep-alive poll, and the Subscriptions pipeline. Not directly constructible: a Connection is produced by the client machinery (the connect path) and, in tests, by the detail::ConnectionHandleFactory wrap seam.

Connection itself keeps a narrow surface - lifecycle, state accessors, and the most-common read_value / write_value conveniences - and delegates its wire-shaped breadth to the ServiceSet sub-accessor (service_requests()) and its Subscription lifecycle to the Subscriptions sub-accessor (subscriptions()), each a lazy value handle over the same ConnectionImpl (section 7.2A / section 7.4).

Functions

Connection(Connection &&) noexcept=default

Returns or updates the connection.

Connection & operator=(Connection &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~Connection()=default

Releases this handle's reference to the underlying Connection.

void close_async(std::function< void(ua::VoidResult)> callback) noexcept

Gracefully closes the Connection: drains the dispatch gate, closes the tier-0 session, transitions to.

void close_sync()

Gracefully closes the Connection, blocking until complete.

ua::VoidResult try_close_sync() noexcept

Returns: The requested value. Gracefully closes the Connection, blocking until complete. Never throws.

void reactivate_async(UserIdentity newIdentity, std::function< void(ua::VoidResult)> callback) noexcept

Re-authenticates the live Session with a new user identity without replacing the Session or its Subscriptions.

void reactivate_sync(UserIdentity newIdentity)

Re-authenticates the live Session, blocking until complete.

ua::VoidResult try_reactivate_sync(UserIdentity newIdentity) noexcept

Returns: The requested value. Re-authenticates the live Session, blocking until complete. Never throws.

ConnectionState state() const

Returns: The requested value. The current lifecycle state (from the atomic cross-strand snapshot). Reports Connecting before the bootstrap snapshot is first published and Closed on a moved-from handle.

ua::Result< ua::NodeId > session_id() const

Returns: The operation result, including status and diagnostic detail on failure. The server-assigned session identifier, or a bad Result (Bad_SessionIdInvalid) before the session has been created on the server / on a moved-from handle.

std::shared_ptr< const NamespaceTable > namespace_table() const

The current immutable NamespaceTable snapshot, or null before the bootstrap NamespaceArray read.

Returns: An immutable snapshot of the current state. completes / on a moved-from handle. Republished on every visible state change.

std::shared_ptr< const ServerTable > server_table() const

The current immutable, Session-scoped ServerTable snapshot, or null before bootstrap completes / on a.

Returns: An immutable snapshot of the current state. moved-from handle. ServerIndex lookups are local, non-blocking cache reads.

void set_connection_observer(std::shared_ptr< ConnectionObserver > observer) noexcept
  • observer (std::shared_ptr< ConnectionObserver >) - Observer to install; an empty pointer removes the observer. Registers the connection / session lifecycle observer for this Connection (section 7.8).
void set_subscription_observer(std::shared_ptr< SubscriptionObserver > observer) noexcept
  • observer (std::shared_ptr< SubscriptionObserver >) - Observer to install; an empty pointer removes the observer. Registers the Subscription / MonitoredItem lifecycle observer for this Connection (section 7.8).
void set_security_observer(std::shared_ptr< SecurityObserver > observer) noexcept
  • observer (std::shared_ptr< SecurityObserver >) - Observer to install; an empty pointer removes the observer. Registers the certificate security observer for this Connection (section 7.8).
void set_type_observer(std::shared_ptr< TypeObserver > observer) noexcept
  • observer (std::shared_ptr< TypeObserver >) - Observer to install; an empty pointer removes the observer. Registers the type-system observer for this Connection (section 7.8).
void set_address_space_observer(std::shared_ptr< AddressSpaceObserver > observer) noexcept
  • observer (std::shared_ptr< AddressSpaceObserver >) - Observer to install; an empty pointer removes the observer. Registers the address-space model / semantic-change observer for this Connection (section 7.8).
void set_server_state_observer(std::shared_ptr< ServerStateObserver > observer) noexcept
  • observer (std::shared_ptr< ServerStateObserver >) - Observer to install; an empty pointer removes the observer. Registers the server-state / progress / device-failure observer for this Connection (section 7.8).
void set_alarm_observer(std::shared_ptr< AlarmObserver > observer) noexcept
  • observer (std::shared_ptr< AlarmObserver >) - Observer to install; an empty pointer removes the observer. Registers the Alarms & Conditions observer for this Connection (section 7.8).
ServiceSet service_requests()

Returns: The requested value. The wire-shaped service-set sub-accessor (the 17 managed wire ops, section 7.2A). A lightweight value handle over the same ConnectionImpl.

Subscriptions subscriptions()

Returns: The requested value. The Subscription-lifecycle sub-accessor (section 7.4). A lightweight value handle over the same ConnectionImpl; the pipeline owns the Subscriptions and they survive reconnect.

void create_subscription_async(SubscriptionConfig config, std::function< void(ua::Result< Subscription >)> callback) noexcept

Creates a Subscription on the server (thin convenience for subscriptions().create_async, section 7.4).

Subscription create_subscription_sync(SubscriptionConfig config)

Returns: The requested value. Synchronously create subscription. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< Subscription > try_create_subscription_sync(SubscriptionConfig config) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to create subscription sync without throwing.

void read_value_async(ua::NodeId node, std::function< void(ua::Result< ua::DataValue >)> callback) noexcept

Reads a Node's Value attribute (the most common case), decoded to a ua::DataValue (section 7.2).

  • node (ua::NodeId) - Target node identifier.
  • callback (std::function< void(ua::Result< ua::DataValue >)>) - Completion callback that receives the operation result. Composes a single-node Value Read through the managed wire-op funnel and returns results[0]. The outer Result is bad on a service-level failure; the value quality lives on DataValue::status() (the two-layer model - the service status and the value quality are kept distinct, section 7.2).
ua::DataValue read_value_sync(ua::NodeId node)

Reads a Node's Value attribute, blocking until complete.

Returns: The requested value.

ua::Result< ua::DataValue > try_read_value_sync(ua::NodeId node) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Reads a Node's Value attribute, blocking until complete. Never throws.

void read_value_async(ua::ExpandedNodeId node, std::function< void(ua::Result< ua::DataValue >)> callback) noexcept
ua::DataValue read_value_sync(ua::ExpandedNodeId node)

Reads a URI-tagged Node's Value attribute, blocking until complete.

Returns: The requested value.

ua::Result< ua::DataValue > try_read_value_sync(ua::ExpandedNodeId node) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Reads a URI-tagged Node's Value attribute, blocking until complete. Never throws.

void read_value_checked_async(ua::NodeId node, std::function< void(ua::Result< ua::DataValue >)> callback) noexcept
  • node (ua::NodeId) - Target node identifier.
  • callback (std::function< void(ua::Result< ua::DataValue >)>) - Completion callback that receives the operation result. Reads a Node's Value attribute, validated against its declared DataType (section 5.8.3). Delivers the DataValue on Accept / fail-open, or a bad Result (Bad_TypeMismatch) on a proven type mismatch.
ua::DataValue read_value_checked_sync(ua::NodeId node)

Reads a Node's Value attribute validated against its declared DataType, blocking until complete.

Returns: The requested value.

ua::Result< ua::DataValue > try_read_value_checked_sync(ua::NodeId node) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Reads a Node's Value attribute validated against its declared DataType, blocking until complete. Never throws.

void read_value_async(ua::NodeId node, std::function< void(ua::Result< T >)> callback) noexcept

Reads a Node's Value attribute and decodes it to a native T; a Bad-severity value quality flattens.

T read_value_sync(ua::NodeId node)

Reads a Node's Value attribute decoded to T, blocking until complete.

Returns: The requested value.

ua::Result< T > try_read_value_sync(ua::NodeId node) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Reads a Node's Value attribute decoded to T, blocking until complete. Never throws.

void read_value_async(ua::ExpandedNodeId node, std::function< void(ua::Result< T >)> callback) noexcept

Reads a URI-tagged Node's Value attribute decoded to a native T; resolves the NamespaceUri.

T read_value_sync(ua::ExpandedNodeId node)

Reads a URI-tagged Node's Value attribute decoded to T, blocking until complete.

Returns: The requested value.

ua::Result< T > try_read_value_sync(ua::ExpandedNodeId node) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Reads a URI-tagged Node's Value attribute decoded to T, blocking until complete. Never throws.

void write_value_async(ua::NodeId node, ua::Variant value, std::function< void(ua::VoidResult)> callback) noexcept

Writes a Node's Value attribute (the most common case, section 7.2).

  • node (ua::NodeId) - Target node identifier.
  • value (ua::Variant) - Value to write or evaluate.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Composes a single Write of value to the node's Value attribute through the managed wire-op funnel and flattens the per-item write status into the returned VoidResult.
void write_value_sync(ua::NodeId node, ua::Variant value)

Writes a Node's Value attribute, blocking until complete.

ua::VoidResult try_write_value_sync(ua::NodeId node, ua::Variant value) noexcept

Returns: The requested value. Writes a Node's Value attribute, blocking until complete. Never throws.

void write_value_async(ua::ExpandedNodeId node, ua::Variant value, std::function< void(ua::VoidResult)> callback) noexcept

Writes a URI-tagged Node's Value attribute; resolves the NamespaceUri per-Session before dispatch.

void write_value_sync(ua::ExpandedNodeId node, ua::Variant value)

Writes a URI-tagged Node's Value attribute, blocking until complete.

ua::VoidResult try_write_value_sync(ua::ExpandedNodeId node, ua::Variant value) noexcept

Returns: The requested value. Writes a URI-tagged Node's Value attribute, blocking until complete. Never throws.

void write_value_checked_async(ua::NodeId node, ua::Variant value, std::function< void(ua::VoidResult)> callback) noexcept
  • node (ua::NodeId) - Target node identifier.
  • value (ua::Variant) - Value to write or evaluate.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Writes a Node's Value, refusing a strict-subtype value locally when the target is NoSubDataTypes (section 8.58).
void write_value_checked_sync(ua::NodeId node, ua::Variant value)

Writes a Node's Value with the NoSubDataTypes check, blocking until complete.

ua::VoidResult try_write_value_checked_sync(ua::NodeId node, ua::Variant value) noexcept

Returns: The requested value. Writes a Node's Value with the NoSubDataTypes check, blocking until complete. Never throws.

TypedAccess typed()

The typed-value convenience sub-accessor (section 7.2A) - arbitrary-attribute read/write, bulk.

Returns: The requested value. reads/writes, browse-path translation, and typed method calls. A lightweight value handle over the same ConnectionImpl (lazy singleton, idempotent).

EventSubscriber events()

Returns: The requested value. The per-Connection collapsing event backbone (section 8.13). Returns a move-only EventSubscriber value handle over the lazily-constructed, co-owned detail::EventSubscriberImpl (own private strand). N logical consumers coalesce onto one server-side event MonitoredItem; inbound events are demultiplexed client-side to each consumer's callback by its filter.

AlarmConditionTracker alarms()

Returns: The requested value. The per-Connection Alarm & Condition tracker (section 8.8). Returns a move-only AlarmConditionTracker value handle over a no-own-strand sub-object of the event subsystem (constructed by + co-owned with the detail::EventSubscriberImpl, running on ITS strand). Ensures the events subscriber exists first.

HistoryFacade history()

The flattened, one-hop per-Connection facade for the Historical Access service set (section 8.9, D2).

Returns: The requested value. Returns a move-only HistoryFacade value handle over the same tier-1 wire seam; history reads (read_raw_async to HistoryReadCursor) and writes (update_data_async to HistoryUpdateResult) are reached directly off it (no reader()/updater() sub-hop).

FileTransferClient files()

Returns: The requested value. The per-Connection facade for the File Transfer service set (section 8.10). Returns a copyable FileTransferClient value handle over the same tier-1 wire seam; open_async hands back a move-only, close-on-destruct FileHandle carrying the server fileHandle, and read_all_async drives the Open to Read* to Close sequence with a bounded aggregate ceiling (section 9.6.23.2).

DataAccessAccessor data_access() noexcept

Returns: The requested value. The per-Connection tier-2 DataAccess factory (section 8.18.1.a). Returns a copyable DataAccessAccessor value handle over the same tier-1 wire seam; each typed factory (analog_item_async, etc.) performs the DA Property pre-flight (Browse HasProperty + Read each Property Value) then yields a fully-populated typed handle that combines the Variable's typed Value with its resolved DA Properties.

PropertyAccessor node(ua::NodeId nodeId) noexcept

The per-Connection, per-NodeId generic Property accessor escape hatch (section 8.18.1.d, CL-AC-022).

Returns: The requested value. Returns a copyable PropertyAccessor value handle over the same tier-1 wire seam; read_property_async Browses one level (HasProperty), matches a BrowseName, and Reads the matched child's Value Attribute.

StateMachineAccessor state_machine_accessor() noexcept

Returns: The requested value. The per-Connection tier-2 StateMachine typed-access factory (section 8.18.1.b). Returns a copyable StateMachineAccessor value handle over the same tier-1 wire seam; each factory (state_machine_async / finite_state_machine_async / program_state_machine_async) performs the address-space pre-flight (Browse the machine's CurrentState / LastTransition + topology) then yields a fully-resolved typed handle over the Part-5 / Part-10 state-machine hierarchy.

ServerDiagnosticsAccessor server_diagnostics() noexcept

Returns: The requested value. The per-Connection tier-2 ServerDiagnostics typed-read accessor (section 8.18.1.c). Returns a copyable ServerDiagnosticsAccessor value handle over the same tier-1 wire seam; summary_async reads the ServerDiagnosticsSummary, the array reads (sessions_async, etc.) read the diagnostic arrays with a cached EnabledFlag + disabled-advisory, and set_enabled_flag_async toggles diagnostics. Every copy shares one EnabledFlag TTL cache. CL-BASEDIAG-004 subscribe-over-poll is deferred to Slice 10d-4.

ua::client::ConnectionConfig

struct

Per-Connection configuration for Client::connect_async (client design section 7.7).

A POD with sensible defaults: an anonymous, auto-reconnecting connect needs only endpointUrl (plus the security fields for a secured endpoint). connect_async is the power-user entry - it takes this pre-built config and assumes the caller has already done any discovery + trust-decision work. For the discovery-driven alternative that resolves the endpoint and the trust decision for you, see ua::client::Client::easy_connect_async and ua::client::EasyConnectPolicy (client design section 7.3A).

Every field on this struct reaches the Connection it configures - there is no field here that silently does nothing. The event-subscriber policy described in the full section 7.7 design is the one piece still absent, and it is absent from the struct rather than present-and-inert. Reverse-connect via connect_async is deferred (use the reverse-connect listener API).

Public attributes

std::string endpointUrl

OPC UA endpoint URL to connect to (e.g. opc.tcp://host:4840).

EndpointSelection endpointSelection

How endpointUrl is selected. Defaults to EndpointSelection::ExactUrl (verbatim, no discovery).

ua::MessageSecurityMode securityMode

Sign / SignAndEncrypt / None for the SecureChannel.

ua::SecurityPolicyId securityPolicyId

Security policy governing the channel's crypto.

std::shared_ptr< const ua::X509Certificate > serverCertificate

Server certificate (from a prior GetEndpoints call).

std::shared_ptr< ua::CertificateStore > trustStoreOverride

Optional per-connect trust-store override - when set, OPN server-certificate validation uses THIS store instead of the client's runtime store (bootstrap trust, CL-PULLCRT-001).

bool relaxHostNameCheck

When false (default), a CreateSession endpointUrl HostName that does not match the server certificate fails the connection and closes the SecureChannel.

std::optional< std::chrono::milliseconds > channelLifetime

Requested SecureChannel lifetime. nullopt uses the client's configured default.

std::optional< std::chrono::milliseconds > connectTimeout

Overall timeout for the connect operation (channel open + CreateSession + ActivateSession + bootstrap).

UserIdentity identity

User identity to authenticate the session with. Defaults to AnonymousIdentity.

std::string userTokenPolicyId

Identifier of the server UserTokenPolicy to activate under.

std::optional< std::string > sessionName

Human-readable session name reported to the server, where it appears in logs, the session diagnostics nodes and audit events.

std::optional< std::chrono::milliseconds > sessionTimeout

Requested session timeout. nullopt uses the client's configured default.

std::vector< ua::String > localeIds

Preferred locale identifiers, in priority order, for server-returned localised text.

AuditEntryIdProvider auditEntryIdProvider

Optional per-request audit identifier provider.

std::optional< ReconnectPolicy > reconnect

Automatic-reconnect policy.

KeepAlivePolicy keepAlive

Keep-alive poll policy (only meaningful when reconnect is engaged - a miss drives the FSM).

bool queueOnReconnect

When true, wire ops submitted while the Connection is Reconnecting are queued and flushed on recovery; when false they fail fast with Bad_SessionNotActivated.

std::optional< std::size_t > pendingQueueLimit

Bound on the reconnect pending queue (oldest-evicted when exceeded).

std::chrono::milliseconds maxQueueAge

Stale-request budget: a queued op older than this is completed Bad_Timeout rather than replayed on recovery.

AddressSpaceCachePolicy addressSpaceCache

The optional per-Connection address-space cache policy (RegisterNodes alias substitution + static-attribute / Browse-result caching).

ClientDiagnosticPolicy diagnostics

The per-Connection diagnostics policy: whether decoded server diagnostics fire the error-chain observer (ClientDiagnosticPolicy::emitOnErrorChainObserver, default on) and the decoded-chain depth cap (ClientDiagnosticPolicy::maxChainDepth).

SubscriptionFallbackPolicy subscriptionFallback

When a CreateSubscription fails and this policy permits, the Connection transparently replaces the would-be Subscription with a timer-driven bulk-Read polling driver that feeds the user's MonitoredItem callbacks - the user's ua::client::Subscription / ua::client::MonitoredItem handles stay valid and unaware.

TypeResolutionPolicy typeResolution

The per-Connection type-resolution policy: how the Connection's TypeResolver populates its registry (TypeResolutionMode - Lazy decode-and-defer by default, or Eager / EagerThenLazy pre-scanning the interest set named by TypeResolutionPolicy::eagerTypes at connect time), the per-resolve timeout, whether a typed read WAITS for resolution or returns a placeholder (TypeResolutionPolicy::tier2WaitForResolution), and the decode-and-defer budgets.

std::shared_ptr< ConnectionObserver > connectionObserver

The connection observer.

std::shared_ptr< SubscriptionObserver > subscriptionObserver

The subscription observer.

std::shared_ptr< TypeObserver > typeObserver

The type observer.

std::shared_ptr< AddressSpaceObserver > addressSpaceObserver

The address space observer.

std::shared_ptr< ServerStateObserver > serverStateObserver

The server state observer.

std::shared_ptr< AlarmObserver > alarmObserver

The alarm observer.

ua::client::CoreClient

class

Tier-0 root of the OPC UA Client SDK - unmanaged, wire-shaped request/response.

Provides factory methods and the open_channel operation that orchestrates TCP connect -> HEL/ACK -> OPN to produce an open SecureChannel handle. Also owns reverse-connect listeners and drives cascading shutdown of every channel and listener it created.

A CoreClient gives you the wire and nothing else: none of the managed-session semantics (NodeId namespace remap, queue-on-reconnect, default request timeout, ErrorDetail wrapping) apply to anything reached through it. That is the point - certification harnesses, protocol-level debugging and bespoke flows need the unmanaged surface. Application code normally wants the tier-1 Client instead, and can still drop down here via Client::core().

Move-only handle wrapping a shared CoreClientImpl. Methods are safe to call from any thread; each posts its work to the executor supplied at create.

SecureChannel, CreateConfig, CombinedConfig

Member types

ua::Result< SecureChannel > SecureChannelResult

Result of an open-channel operation: the open SecureChannel or an ErrorDetail.

std::function< void(SecureChannelResult)> OpenChannelCallback

Callback receiving the outcome of open_channel_async.

std::function< void(ua::VoidResult)> ShutdownCallback

Callback receiving the outcome of shutdown_async.

ua::Result< CoreClient > CreateResult

The created Client on success, or an ErrorDetail on failure.

Static functions

CoreClient create(boost::asio::any_io_executor executor, CreateConfig config, std::shared_ptr< const ua::Crypto > crypto={}, std::shared_ptr< ua::CertificateStore > certStore={}, std::shared_ptr< ua::LogSink > logSink=nullptr, ua::LogLevel logLevel=ua::LogLevel::Info)

Creates a Client with explicit configuration and optional crypto and certificate store.

  • executor (boost::asio::any_io_executor) - Asio executor on which the client posts all of its work; must outlive the returned Client.
  • config (CreateConfig) - Client creation configuration.
  • crypto (std::shared_ptr< const ua::Crypto >) - Crypto provider to use; if null, a default provider is created.
  • certStore (std::shared_ptr< ua::CertificateStore >) - Certificate store to use; if null, a default store is created.
  • logSink (std::shared_ptr< ua::LogSink >) - Structured-log sink installed at construction, or null to disable logging. Fixed for the client's lifetime (no runtime sink setter); the level stays adjustable via set_log_level().
  • logLevel (ua::LogLevel) - Minimum level to emit (only meaningful when logSink is set).

Returns: A ready-to-use Client.

CreateResult try_create(boost::asio::any_io_executor executor, CreateConfig config, std::shared_ptr< const ua::Crypto > crypto={}, std::shared_ptr< ua::CertificateStore > certStore={}, std::shared_ptr< ua::LogSink > logSink=nullptr, ua::LogLevel logLevel=ua::LogLevel::Info) noexcept

Creates a Client, returning a bad CreateResult instead of throwing on failure.

Returns: The created Client, or an ErrorDetail on failure. Never throws.

Functions

CoreClient(CoreClient &&) noexcept=default

Move-constructs from other, transferring ownership of the shared CoreClientImpl.

CoreClient & operator=(CoreClient &&) noexcept=default

Move-assigns from other, transferring ownership of the shared CoreClientImpl.

Returns: Reference to this Client.

~CoreClient()
void open_channel_async(OpenChannelConfig config, OpenChannelCallback callback) noexcept

Opens a SecureChannel to the configured endpoint.

  • config (OpenChannelConfig) - Endpoint, security, lifetime, and timeout parameters.
  • callback (OpenChannelCallback) - Receives the outcome: on success the SecureChannelResult holds the open SecureChannel; on failure it carries an ErrorDetail. This overload never throws.
SecureChannel open_channel_sync(OpenChannelConfig config)

Opens a SecureChannel, blocking until the operation completes.

  • config (OpenChannelConfig) - Endpoint, security, lifetime, and timeout parameters.

Returns: The open SecureChannel.

SecureChannelResult try_open_channel_sync(OpenChannelConfig config) noexcept

Opens a SecureChannel, blocking until the operation completes.

  • config (OpenChannelConfig) - Endpoint, security, lifetime, and timeout parameters.

Returns: The open SecureChannel, or an ErrorDetail on failure. Never throws.

void register_structure_type(const ua::NodeId &encodingId, ua::StructureFactory::CreateMethod factory)

Registers a custom structure type with the client's UA Binary decoder.

  • encodingId (const ua::NodeId &) - Binary encoding NodeId that identifies the structure on the wire.
  • factory (ua::StructureFactory::CreateMethod) - Creates a fresh instance of the structure to decode into.
void start_reverse_connect_async(client::ReverseConnectListenerConfig config, std::function< void(client::ReverseConnectHandleResult)> callback) noexcept

Starts a reverse-connect listener that accepts inbound server connections.

client::ReverseConnectHandle start_reverse_connect_sync(client::ReverseConnectListenerConfig config)

Starts a reverse-connect listener, blocking until it is established.

Returns: A ReverseConnectHandle identifying the new listener.

client::ReverseConnectHandleResult try_start_reverse_connect_sync(client::ReverseConnectListenerConfig config) noexcept

Starts a reverse-connect listener, blocking until it is established.

Returns: A ReverseConnectHandle, or an ErrorDetail on failure. Never throws.

void stop_reverse_connect_async(client::ReverseConnectHandle handle, std::function< void(VoidResult)> callback) noexcept

Stops a single reverse-connect listener.

void stop_reverse_connect_sync(client::ReverseConnectHandle handle)

Stops a single reverse-connect listener, blocking until complete.

VoidResult try_stop_reverse_connect_sync(client::ReverseConnectHandle handle) noexcept

Stops a single reverse-connect listener, blocking until complete.

Returns: A VoidResult - success, or an ErrorDetail on failure. Never throws.

void stop_all_reverse_connects_async(std::function< void(VoidResult)> callback) noexcept

Stops every reverse-connect listener owned by this client.

void stop_all_reverse_connects_sync()

Stops every reverse-connect listener owned by this client, blocking until complete.

VoidResult try_stop_all_reverse_connects_sync() noexcept

Stops every reverse-connect listener owned by this client, blocking until complete.

Returns: A VoidResult - success, or an ErrorDetail on failure. Never throws.

void shutdown_async(ShutdownCallback callback) noexcept

Initiates cascading client shutdown.

  • callback (ShutdownCallback) - Receives a VoidResult once shutdown completes. Never throws.
void shutdown_sync()

Performs cascading shutdown, blocking until complete.

ua::VoidResult try_shutdown_sync() noexcept

Performs cascading shutdown, blocking until complete.

Returns: A VoidResult - success, or an ErrorDetail on failure. Never throws.

const CombinedConfig & config() const

Returns the frozen combined configuration for this client instance.

Returns: Reference valid for the lifetime of this Client.

std::shared_ptr< const ua::Crypto > crypto() const

Returns the crypto provider backing this client.

Returns: Shared crypto provider; never null.

void set_log_level(ua::LogLevel level)

Sets the minimum severity at which records are emitted to the current log sink.

  • level (ua::LogLevel) - Minimum severity to emit; records below this level are dropped.

ua::client::DataItemValue

struct

The base fields shared by every DA typed value (client design section 8.18.1.a).

value carries the decoded Variable Value Attribute plus its quality StatusCode verbatim (CL-DA-015 - DA StatusCodes are never remapped by the typed accessor).

Public attributes

ua::DataValue value

CL-DA-001 - typed Value + quality StatusCode (surfaced verbatim, CL-DA-015)

std::optional< std::string > definition

CL-DA-017 - vendor-opaque pass-through (never parsed)

std::optional< std::int16_t > valuePrecision

CL-DA-002 - informational rounding bound (not applied)

ua::client::AnalogItemValue

struct

AnalogItemType typed value (client design section 8.18.1.a).

euRange is Mandatory on the type; instrumentRange (CL-DA-016) and engineeringUnits (CL-DA-014) are Optional and left nullopt when absent.

Public attributes

std::optional< ua::Range > euRange

CL-DA-001 - Mandatory; typical operating range.

std::optional< ua::Range > instrumentRange

CL-DA-016 - distinct from euRange; physical instrument bounds.

std::optional< ua::EUInformation > engineeringUnits

CL-DA-014 - decoded EUInformation (units not translated)

ua::client::TwoStateDiscreteValue

struct

TwoStateDiscreteType typed value (client design section 8.18.1.a).

trueState / falseState are the Mandatory display texts for the two boolean states.

Public attributes

bool state

the decoded boolean Value

ua::LocalizedText trueState

display text for the true state (Mandatory Property)

ua::LocalizedText falseState

display text for the false state (Mandatory Property)

ua::client::MultiStateDiscreteValue

struct

MultiStateDiscreteType typed value (client design section 8.18.1.a).

currentName is nullopt when rawIndex is outside the resolved enumStrings range (CL-DA-008); rawIndex is always surfaced.

Public attributes

std::uint32_t rawIndex

the decoded UInteger Value (always surfaced)

std::vector< ua::LocalizedText > enumStrings

the Mandatory EnumStrings Property (scalar array, CL-DA-009)

std::optional< ua::LocalizedText > currentName

CL-DA-008 - nullopt when rawIndex >= enumStrings.size()

ua::client::MultiStateValueDiscreteValue

struct

MultiStateValueDiscreteType typed value (client design section 8.18.1.a).

currentName is nullopt when rawValue matches no enumValues entry (CL-DA-008); rawValue is always surfaced.

Public attributes

std::int64_t rawValue

the decoded Number Value (always surfaced)

std::vector< ua::EnumValueType > enumValues

the Mandatory EnumValues Property (value + display text)

std::optional< ua::LocalizedText > currentName

CL-DA-008 - nullopt when rawValue matches no entry.

ua::client::AnalogItemHandle

class

A copyable value handle to an AnalogItemType Variable (client design section 8.18.1.a).

Built async by DataAccessAccessor::analog_item_async after the DA Property pre-flight; copies share the resolved Property snapshot. The handle binds to its originating Connection's wire seam by a weak_ptr (never a weak_ptr<ConnectionImpl>, section 8.2A.13): every op locks it and completes Bad_ConnectionClosed if the Connection is gone. Not strand-serialized: each op posts through the tier-1 wire seam (which serializes on the Connection strand internally) and delivers its completion on the Connection executor.

Functions

AnalogItemHandle()=default

Constructs an invalid sentinel handle (every op fast-fails Bad_InvalidState).

void read_async(std::function< void(AnalogItemValueResult)> callback) noexcept

Reads the Variable's Value Attribute and combines it with the cached DA Properties into a typed.

  • callback (std::function< void(AnalogItemValueResult)>) - Completion callback that receives the operation result. AnalogItemValue. The DA quality StatusCode is surfaced verbatim in value.value.status() (CL-DA-015).
AnalogItemValue read_sync()

Returns: The requested value. Synchronously read. Blocks until the operation completes.

ua::Result< AnalogItemValue > try_read_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read sync without throwing.

void write_value_async(ua::Variant newValue, std::function< void(ua::VoidResult)> callback) noexcept
  • newValue (ua::Variant) - The new value.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Writes newValue to the Variable's Value Attribute (CL-DA-007). A thin passthrough - the server's accept / reject / clamp behaviour is server-defined and surfaced verbatim (chained beneath the write source tag on a Bad response).
void write_value_sync(ua::Variant newValue)
  • newValue (ua::Variant) - The value to write. Synchronously write value. Blocks until the operation completes.
ua::VoidResult try_write_value_sync(ua::Variant newValue) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to write value sync without throwing.

void refresh_properties_async(std::function< void(ua::VoidResult)> callback) noexcept

Explicitly re-resolves the DA Properties (the MANUAL refresh path), alongside the automatic SemanticChange invalidation now wired via the in-band SemanticsChanged status bit (CL-DA-010) and the.

  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. SemanticChangeEventType event path (CL-DA-011). Atomically replaces the cached snapshot shared by every copy of this handle.
void refresh_properties_sync()

Synchronously refresh properties.

ua::VoidResult try_refresh_properties_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to refresh properties sync without throwing.

ua::Result< ua::DataChangeFilter > make_percent_deadband_filter(double percent) const noexcept
  • percent (double) - The percent.

Returns: The operation result, including status and diagnostic detail on failure. Builds a PercentDeadband-typed ua::DataChangeFilter (CL-DA-003..006). percent outside [0, 100] to Bad_DeadbandFilterInvalid (CL-DA-004); a resolved EURange absent to Bad_FilterNotAllowed (CL-DA-005). The SDK does NOT compute an absolute band locally - the wire carries PercentDeadband and the server is the authoritative computer; EURange presence is a precondition only. For an array Variable the same single filter is used (CL-DA-006).

ua::NodeId node_id() const noexcept

Returns: The Variable NodeId this handle targets (empty NodeId when the handle is a sentinel).

ua::client::TwoStateDiscreteHandle

class

A copyable value handle to a TwoStateDiscreteType Variable (client design section 8.18.1.a).

See AnalogItemHandle for the shared lifetime / seam-locking contract.

Functions

TwoStateDiscreteHandle()=default
void read_async(std::function< void(TwoStateDiscreteValueResult)> callback) noexcept
TwoStateDiscreteValue read_sync()

Returns: The requested value. Synchronously read. Blocks until the operation completes.

ua::Result< TwoStateDiscreteValue > try_read_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read sync without throwing.

void write_value_async(ua::Variant newValue, std::function< void(ua::VoidResult)> callback) noexcept
void write_value_sync(ua::Variant newValue)
  • newValue (ua::Variant) - The value to write. Synchronously write value. Blocks until the operation completes.
ua::VoidResult try_write_value_sync(ua::Variant newValue) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to write value sync without throwing.

void refresh_properties_async(std::function< void(ua::VoidResult)> callback) noexcept
void refresh_properties_sync()

Synchronously refresh properties.

ua::VoidResult try_refresh_properties_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to refresh properties sync without throwing.

ua::NodeId node_id() const noexcept

Returns: The requested value. Returns or updates the node id.

ua::client::MultiStateDiscreteHandle

class

A copyable value handle to a MultiStateDiscreteType Variable (client design section 8.18.1.a).

See AnalogItemHandle for the shared lifetime / seam-locking contract.

Functions

MultiStateDiscreteHandle()=default
void read_async(std::function< void(MultiStateDiscreteValueResult)> callback) noexcept
MultiStateDiscreteValue read_sync()

Returns: The requested value. Synchronously read. Blocks until the operation completes.

ua::Result< MultiStateDiscreteValue > try_read_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read sync without throwing.

void write_value_async(ua::Variant newValue, std::function< void(ua::VoidResult)> callback) noexcept
void write_value_sync(ua::Variant newValue)
  • newValue (ua::Variant) - The value to write. Synchronously write value. Blocks until the operation completes.
ua::VoidResult try_write_value_sync(ua::Variant newValue) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to write value sync without throwing.

void refresh_properties_async(std::function< void(ua::VoidResult)> callback) noexcept
void refresh_properties_sync()

Synchronously refresh properties.

ua::VoidResult try_refresh_properties_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to refresh properties sync without throwing.

ua::NodeId node_id() const noexcept

Returns: The requested value. Returns or updates the node id.

ua::client::MultiStateValueDiscreteHandle

class

A copyable value handle to a MultiStateValueDiscreteType Variable (client design section 8.18.1.a).

When the resolved node is a MultiStateDictionaryEntryDiscreteBaseType (OPC 10000-19 section 7.1) it additionally exposes write_via_dictionary_async (CL-DA-012), which selects a state from the cached EnumDictionaryEntries reference table and writes it through the ValueAsDictionaryEntries Property. See AnalogItemHandle for the shared lifetime / seam-locking contract.

Functions

MultiStateValueDiscreteHandle()=default
void read_async(std::function< void(MultiStateValueDiscreteValueResult)> callback) noexcept
MultiStateValueDiscreteValue read_sync()

Returns: The requested value. Synchronously read. Blocks until the operation completes.

ua::Result< MultiStateValueDiscreteValue > try_read_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read sync without throwing.

void write_via_dictionary_async(std::size_t state_index, std::size_t dictionary_index, std::function< void(ua::VoidResult)> callback) noexcept

CL-DA-012 - writes one state via the MultiStateDictionaryEntryDiscreteBaseType dictionary path (OPC 10000-19 section 7.1).

void write_via_dictionary_sync(std::size_t state_index, std::size_t dictionary_index)
  • state_index (std::size_t) - The state index.
  • dictionary_index (std::size_t) - Dictionary representation column. Synchronously write via dictionary. Blocks until the operation completes.
ua::VoidResult try_write_via_dictionary_sync(std::size_t state_index, std::size_t dictionary_index) noexcept
  • state_index (std::size_t) - The state index.
  • dictionary_index (std::size_t) - Dictionary representation column.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to write via dictionary sync without throwing.

void write_via_dictionary_async(std::size_t state_index, std::function< void(ua::VoidResult)> callback) noexcept
  • state_index (std::size_t) - The state index.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. CL-DA-012 convenience overload - forwards to the two-index form with dictionary_index = 0. All dictionary columns of a state's row identify the same state, so column 0 is a safe default.
void write_via_dictionary_sync(std::size_t state_index)
  • state_index (std::size_t) - The state index. Synchronously write via dictionary. Blocks until the operation completes.
ua::VoidResult try_write_via_dictionary_sync(std::size_t state_index) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to write via dictionary sync without throwing.

void refresh_properties_async(std::function< void(ua::VoidResult)> callback) noexcept
void refresh_properties_sync()

Synchronously refresh properties.

ua::VoidResult try_refresh_properties_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to refresh properties sync without throwing.

ua::NodeId node_id() const noexcept

Returns: The requested value. Returns or updates the node id.

ua::client::DataAccessAccessor

class

The per-Connection tier-2 factory for the DA typed handles (client design section 8.18.1.a).

A lightweight, copyable value handle over the same tier-1 wire seam as its parent Connection, reached via Connection::data_access(). Each factory performs the address-space pre-flight (Browse for the Variable's HasProperty children + one batched Read of the matched Property Values) then yields a fully-populated typed handle. A Mandatory Property missing to Bad with source client.tier2.data_access.property_resolution_failed (CL-DA-001).

Cycle-safe (section 9.8.3). The accessor and every handle hold only weak_ptr seam roles (detail::WireOps + detail::SupportOps), never a weak_ptr<ConnectionImpl>: a Phase-2 fake need only implement the two roles (section 8.2A.13). Locks are taken per op and bailed if gone.

Functions

DataAccessAccessor(const DataAccessAccessor &)=default

Returns or updates the data access accessor.

DataAccessAccessor & operator=(const DataAccessAccessor &)=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

DataAccessAccessor(DataAccessAccessor &&) noexcept=default

Returns or updates the data access accessor.

DataAccessAccessor & operator=(DataAccessAccessor &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~DataAccessAccessor()=default
void analog_item_async(ua::NodeId nodeId, std::function< void(AnalogItemHandleResult)> callback) noexcept
AnalogItemHandle analog_item_sync(ua::NodeId nodeId)

Returns: The requested value. Synchronously analog item. Blocks until the operation completes.

ua::Result< AnalogItemHandle > try_analog_item_sync(ua::NodeId nodeId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to analog item sync without throwing.

void base_analog_async(ua::NodeId nodeId, std::function< void(AnalogItemHandleResult)> callback) noexcept
  • nodeId (ua::NodeId) - Target node identifier.
  • callback (std::function< void(AnalogItemHandleResult)>) - Completion callback that receives the operation result. Resolves a AnalogItemHandle for a BaseAnalogType Variable (CL-DA-001). BaseAnalogType has no Mandatory Property (EURange / EngineeringUnits / InstrumentRange are all Optional on the base type), so unlike analog_item_async this succeeds even when the node exposes none of them.
AnalogItemHandle base_analog_sync(ua::NodeId nodeId)

Returns: The requested value. Synchronously base analog. Blocks until the operation completes.

ua::Result< AnalogItemHandle > try_base_analog_sync(ua::NodeId nodeId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to base analog sync without throwing.

void analog_unit_async(ua::NodeId nodeId, std::function< void(AnalogItemHandleResult)> callback) noexcept

Resolves a AnalogItemHandle for an AnalogUnitType Variable (CL-DA-001, OPC 10000-8.

  • nodeId (ua::NodeId) - Target node identifier.
  • callback (std::function< void(AnalogItemHandleResult)>) - Completion callback that receives the operation result. section 5.3.2.4). AnalogUnitType derives from BaseAnalogType and mandates ONLY EngineeringUnits - EURange is Optional here (contrast analog_item_async / analog_unit_range_async, which require EURange).
AnalogItemHandle analog_unit_sync(ua::NodeId nodeId)

Returns: The requested value. Synchronously analog unit. Blocks until the operation completes.

ua::Result< AnalogItemHandle > try_analog_unit_sync(ua::NodeId nodeId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to analog unit sync without throwing.

void analog_unit_range_async(ua::NodeId nodeId, std::function< void(AnalogItemHandleResult)> callback) noexcept

Resolves a AnalogItemHandle for an AnalogUnitRangeType Variable (CL-DA-001, OPC 10000-8.

  • nodeId (ua::NodeId) - Target node identifier.
  • callback (std::function< void(AnalogItemHandleResult)>) - Completion callback that receives the operation result. section 5.3.2.5). Derives from AnalogItemType and additionally mandates EngineeringUnits, so BOTH EURange and EngineeringUnits must resolve.
AnalogItemHandle analog_unit_range_sync(ua::NodeId nodeId)

Returns: The requested value. Synchronously analog unit range. Blocks until the operation completes.

ua::Result< AnalogItemHandle > try_analog_unit_range_sync(ua::NodeId nodeId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to analog unit range sync without throwing.

void two_state_discrete_async(ua::NodeId nodeId, std::function< void(TwoStateDiscreteHandleResult)> callback) noexcept
TwoStateDiscreteHandle two_state_discrete_sync(ua::NodeId nodeId)

Returns: The requested value. Synchronously two state discrete. Blocks until the operation completes.

ua::Result< TwoStateDiscreteHandle > try_two_state_discrete_sync(ua::NodeId nodeId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to two state discrete sync without throwing.

void multi_state_discrete_async(ua::NodeId nodeId, std::function< void(MultiStateDiscreteHandleResult)> callback) noexcept
MultiStateDiscreteHandle multi_state_discrete_sync(ua::NodeId nodeId)

Returns: The requested value. Synchronously multi state discrete. Blocks until the operation completes.

ua::Result< MultiStateDiscreteHandle > try_multi_state_discrete_sync(ua::NodeId nodeId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to multi state discrete sync without throwing.

void multi_state_value_discrete_async(ua::NodeId nodeId, std::function< void(MultiStateValueDiscreteHandleResult)> callback) noexcept
MultiStateValueDiscreteHandle multi_state_value_discrete_sync(ua::NodeId nodeId)

Returns: The requested value. Synchronously multi state value discrete. Blocks until the operation completes.

ua::Result< MultiStateValueDiscreteHandle > try_multi_state_value_discrete_sync(ua::NodeId nodeId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to multi state value discrete sync without throwing.

void multi_state_dictionary_entry_async(ua::NodeId nodeId, std::function< void(MultiStateValueDiscreteHandleResult)> callback) noexcept

Resolves a MultiStateValueDiscreteHandle for a MultiStateDictionaryEntryDiscreteBaseType Variable.

  • nodeId (ua::NodeId) - Target node identifier.
  • callback (std::function< void(MultiStateValueDiscreteHandleResult)>) - Completion callback that receives the operation result. (CL-DA-001, OPC 10000-19 section 7.1). MSDE-DBT is a MultiStateValueDiscreteType subtype that additionally mandates EnumDictionaryEntries, so unlike multi_state_value_discrete_async this rejects a node lacking that Property (in addition to the inherited Mandatory EnumValues).
MultiStateValueDiscreteHandle multi_state_dictionary_entry_sync(ua::NodeId nodeId)

Returns: The requested value. Synchronously multi state dictionary entry. Blocks until the operation completes.

ua::Result< MultiStateValueDiscreteHandle > try_multi_state_dictionary_entry_sync(ua::NodeId nodeId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to multi state dictionary entry sync without throwing.

ua::client::FindServersOptions

struct

Filter/options for Discovery::find_servers_async (client design section 7.6).

Public attributes

std::vector< std::string > mServerUris

serverUris filter (Part 4 section 5.4.2.2).

std::vector< std::string > mLocaleIds

Preferred locale ids for localized text in the response (server default if empty).

std::optional< std::chrono::milliseconds > mTimeout

Per-call timeout; nullopt uses the client default.

ua::client::GetEndpointsOptions

struct

Filter/options for Discovery::get_endpoints_async (client design section 7.6).

Public attributes

std::vector< std::string > mProfileUris

Transport profile URI filter. Empty = return all endpoints.

std::vector< std::string > mLocaleIds

Preferred locale ids for localized text in the response (server default if empty).

std::optional< std::chrono::milliseconds > mTimeout

Per-call timeout; nullopt uses the client default.

ua::client::FindServersOnNetworkOptions

struct

Options for Discovery::find_servers_on_network_async (client design section 7.6).

Carries the pagination inputs (CL-DISC-013); auto-pagination / counter-reset detection is a later slice.

Public attributes

std::uint32_t mStartingRecordId

Only records with an identifier greater than this are returned. 0 starts from the beginning.

std::uint32_t mMaxRecordsToReturn

Maximum records to return. 0 = server default (no client cap).

std::vector< std::string > mServerCapabilityFilter

Server-capability filter (AND-combined by the LDS-ME). Empty = no capability filter.

std::optional< std::chrono::milliseconds > mTimeout

Per-call timeout; nullopt uses the client default.

ua::client::GdsServerFilter

struct

Filters and pagination inputs for Discovery::gds_query_servers_async (Part 12 section 6.6.11).

Public attributes

std::uint32_t mStartingRecordId

Only records with an identifier greater than this value are returned; 0 starts at the beginning.

std::uint32_t mMaxRecordsToReturn

Maximum records to return; 0 means no limit.

std::string mApplicationName

LIKE-pattern filter for the default ApplicationName; empty disables this filter.

std::string mApplicationUri

LIKE-pattern filter for ApplicationUri; empty disables this filter.

std::string mProductUri

LIKE-pattern filter for ProductUri; empty disables this filter.

std::vector< std::string > mServerCapabilities

Required Server capabilities (AND-combined); empty disables this filter.

ua::client::GdsApplicationFilter

struct

Conjunctive filters and pagination inputs for QueryApplications (Part 12 section 6.6.10).

Every populated field is AND-combined by the GDS; every entry in mCapabilities is itself required.

Public attributes

std::uint32_t mStartingRecordId

0 starts at the first record.

std::uint32_t mMaxRecordsToReturn

0 means no limit.

std::string mApplicationName

LIKE-pattern; empty disables this filter.

std::string mApplicationUri

LIKE-pattern; empty disables this filter.

std::uint32_t mApplicationType

Bit mask: 0x1 Servers, 0x2 Clients, 0 all.

std::string mProductUri

LIKE-pattern; empty disables this filter.

std::vector< std::string > mCapabilities

Ordered conjunctive requirements; empty disables.

ua::client::ManualEndpointConfig

struct

Administrator-supplied endpoint parameters for the cached-endpoint (discovery-disabled) path (CL-DISC-001, client design section 7.6 / section 7.7).

Lets an operator connect without invoking GetEndpoints.

Public attributes

std::string mEndpointUrl

The endpoint URL to connect to (required).

std::string mSecurityPolicyUri

The security policy URI governing the channel (required - an empty policy is rejected).

ua::MessageSecurityMode mSecurityMode

The message security mode.

ua::ByteString mServerCertificate

The server's application-instance certificate (DER).

ua::client::Discovery

class

The Client-level (tier-1) Discovery facade (client design section 7.6).

Not bound to any Connection: each query opens (and closes) its own ephemeral None-policy channel to the target discovery URL via the underlying client, issues the session-less request (Part 4 section 5.4), and closes the channel. Obtained from Client::discovery(); a lightweight value handle (copyable). The facade holds no per-call state, so repeat invocation is always safe (CL-DISC-007).

Member types

ua::Result< std::vector< ua::ApplicationDescription > > FindServersResult

Result of FindServers: the discovered servers, or an ua::ErrorDetail.

std::function< void(FindServersResult)> FindServersCallback

Callback receiving the outcome of find_servers_async.

ua::Result< std::vector< ua::EndpointDescription > > GetEndpointsResult

Result of GetEndpoints: the endpoint descriptions, or an ua::ErrorDetail.

std::function< void(GetEndpointsResult)> GetEndpointsCallback

Callback receiving the outcome of get_endpoints_async.

ua::Result< FindServersOnNetworkReply > FindServersOnNetworkResult

Result of FindServersOnNetwork: the FindServersOnNetworkReply, or an ua::ErrorDetail.

std::function< void(FindServersOnNetworkResult)> FindServersOnNetworkCallback

Callback receiving the outcome of find_servers_on_network_async.

ua::Result< GdsQueryServersReply > GdsQueryServersResult

Callback invoked for gds query servers result notifications.

std::function< void(GdsQueryServersResult)> GdsQueryServersCallback

Callback invoked for gds query servers callback notifications.

ua::Result< GdsQueryApplicationsReply > GdsQueryApplicationsResult

Callback invoked for gds query applications result notifications.

std::function< void(GdsQueryApplicationsResult)> GdsQueryApplicationsCallback

Callback invoked for gds query applications callback notifications.

ua::Result< std::shared_ptr< ua::mdns::MdnsBrowser > > MdnsBrowseResult

Result of starting an mDNS browse: the live browse handle, or an ua::ErrorDetail.

Functions

void find_servers_async(std::string discoveryUrl, FindServersOptions options, FindServersCallback callback) noexcept

Queries the servers known to a discovery endpoint (FindServers).

  • discoveryUrl (std::string) - The discovery endpoint URL (used verbatim - no hard-coded default, CL-DISC-002).
  • options (FindServersOptions) - Filter/options (serverUris, locales, timeout).
  • callback (FindServersCallback) - Receives the servers or an ua::ErrorDetail. Never throws.
std::vector< ua::ApplicationDescription > find_servers_sync(std::string discoveryUrl, FindServersOptions options)

Returns: The requested value. Blocking FindServers.

FindServersResult try_find_servers_sync(std::string discoveryUrl, FindServersOptions options) noexcept

Returns: The requested value. Blocking FindServers, never throws. Must not run on the client's executor.

void get_endpoints_async(std::string discoveryUrl, GetEndpointsOptions options, GetEndpointsCallback callback) noexcept

Queries the endpoint descriptions of a server (GetEndpoints).

  • discoveryUrl (std::string) - The discovery endpoint URL (used verbatim, CL-DISC-002).
  • options (GetEndpointsOptions) - Filter/options (profile URIs, locales, timeout).
  • callback (GetEndpointsCallback) - Receives the endpoints or an ua::ErrorDetail. Never throws.
std::vector< ua::EndpointDescription > get_endpoints_sync(std::string discoveryUrl, GetEndpointsOptions options)

Returns: The requested value. Blocking GetEndpoints.

GetEndpointsResult try_get_endpoints_sync(std::string discoveryUrl, GetEndpointsOptions options) noexcept

Returns: The requested value. Blocking GetEndpoints, never throws. Must not run on the client's executor.

void find_servers_on_network_async(std::string ldsMeUrl, FindServersOnNetworkOptions options, FindServersOnNetworkCallback callback) noexcept

Queries the mDNS-registered servers via an LDS-ME (FindServersOnNetwork).

  • ldsMeUrl (std::string) - The LDS-ME endpoint URL (used verbatim, CL-DISC-002).
  • options (FindServersOnNetworkOptions) - Pagination and capability-filter inputs.
  • callback (FindServersOnNetworkCallback) - Receives the records or an ua::ErrorDetail. Never throws.
FindServersOnNetworkReply find_servers_on_network_sync(std::string ldsMeUrl, FindServersOnNetworkOptions options)

Returns: The requested value. Blocking FindServersOnNetwork.

FindServersOnNetworkResult try_find_servers_on_network_sync(std::string ldsMeUrl, FindServersOnNetworkOptions options) noexcept

Returns: The requested value. Blocking FindServersOnNetwork, never throws. Must not run on the client's executor.

void gds_query_servers_async(ConnectionConfig connectionConfig, GdsServerFilter filter, GdsQueryServersCallback callback) noexcept

Runs one QueryServers action sequence against a GDS.

  • connectionConfig (ConnectionConfig) - The connection config.
  • filter (GdsServerFilter) - Filter applied to the operation.
  • callback (GdsQueryServersCallback) - Completion callback that receives the operation result. Every invocation opens a fresh Session/Connection using connectionConfig, resolves the standard GDS Directory/QueryServers nodes from the live namespace table, invokes the Method, and gracefully closes the Session and SecureChannel before firing callback. No GDS Connection is retained or pooled between invocations (CL-DISC-016, Part 12 section 6.3).
GdsQueryServersReply gds_query_servers_sync(ConnectionConfig connectionConfig, GdsServerFilter filter)

Returns: The requested value. Synchronously gds query servers.

GdsQueryServersResult try_gds_query_servers_sync(ConnectionConfig connectionConfig, GdsServerFilter filter) noexcept

Returns: The requested value. Attempts to gds query servers sync without throwing.

void gds_query_applications_async(ConnectionConfig connectionConfig, GdsApplicationFilter filter, GdsQueryApplicationsCallback callback) noexcept
  • connectionConfig (ConnectionConfig) - The connection config.
  • filter (GdsApplicationFilter) - Filter applied to the operation.
  • callback (GdsQueryApplicationsCallback) - Completion callback that receives the operation result. Runs one QueryApplications action sequence on a fresh GDS Session. Filter fields and capability order are passed verbatim; the Session/Connection is closed before callback fires.
GdsQueryApplicationsReply gds_query_applications_sync(ConnectionConfig connectionConfig, GdsApplicationFilter filter)

Returns: The requested value. Synchronously gds query applications.

GdsQueryApplicationsResult try_gds_query_applications_sync(ConnectionConfig connectionConfig, GdsApplicationFilter filter) noexcept

Returns: The requested value. Attempts to gds query applications sync without throwing.

ua::Result< ua::EndpointDescription > configure_endpoint(ManualEndpointConfig config) const noexcept

Builds an ua::EndpointDescription directly from administrator-supplied parameters, WITHOUT invoking any Discovery Service.

Returns: The constructed EndpointDescription, or a bad Result whose ua::ErrorDetail names the missing required field (empty endpoint URL or empty security policy URI). Never throws.

MdnsBrowseResult start_mdns_browse(ua::mdns::MdnsBrowseConfig config) noexcept

Starts a direct mDNS browse for OPC UA servers (no LDS).

Returns: The browse handle, or a bad Result carrying the transport's ua::ErrorDetail. This failing branch never prevents the LDS query paths from working (CL-DISC-006). Never throws.

ua::client::EasyConnectPolicy

struct

Inputs to Client::easy_connect_async - the discovery-driven connect path (client design section 7.3A).

connect_async is the power-user entry: it takes a fully-built ConnectionConfig and assumes the caller has already done the discovery and trust-decision work. EasyConnectPolicy is the other end of that trade - name a URL, and the SDK performs GetEndpoints, ranks the endpoints by security, validates the server certificate, asks you about it if it is not trusted, and connects.

The happy path for a trusted server is one line: autoconnection=client.easy_connect_sync(EasyConnectPolicy{.endpointUrl=url});

Endpoint ranking here is the same ordering that EndpointSelection::AutoBest applies inside connect_async; what this policy adds on top is the discovery hand-off and the trust-prompt exchange. Client::easy_connect_async, TrustDecision, default_easy_connect_ranker

Static functions

EasyConnectPolicy accept_all_for_development(std::string endpointUrl)

A policy that auto-accepts an untrusted server certificate, for development against self-signed or TOFU servers.

  • endpointUrl (std::string) - Discovery URL to connect to.

Returns: A policy whose trustPrompt returns TrustDecision::AcceptForThisSession.

Public attributes

std::string endpointUrl

Discovery URL to query and connect to (e.g. opc.tcp://host:4840). Required.

UserIdentity identity

User identity for the session. Defaults to anonymous.

std::function< TrustDecision(const ua::X509Certificate &serverCertificate, ua::StatusCode validationFailureReason)> trustPrompt

Invoked when the chosen endpoint's server certificate fails validation on a trust class (Bad_CertificateUntrusted / Bad_CertificateChainIncomplete) - never for any other failure, which fails straight through unprompted.

std::function< int(const ua::EndpointDescription &)> ranker

Scores each endpoint returned by GetEndpoints; the highest score wins.

bool allowAnonymousFirstConnect

Permits a None/None endpoint to win for bootstrap-onboarding ("trust on first use") flows.

std::optional< std::chrono::milliseconds > timeout

Deadline applied SEPARATELY to the discovery call and to the connect - it is not one budget spanning the path.

std::function< void(ConnectionConfig &)> customize

Applied to the assembled ConnectionConfig immediately before connecting, after endpoint, identity and trust are resolved.

ua::client::EventSubscription

struct

The parameters for one event-consumer subscription (section 8.13.1).

The notifier defaults to the Server Object; an absent filter means "events of BaseEventType" (i.e. everything the server emits on the notifier). All N consumers on the same notifier COALESCE onto one backbone MonitoredItem - the union of their filters is what hits the wire; each consumer's callback fires only for events matching ITS filter.

Public attributes

ua::NodeId notifier

default: the Server Object

std::optional< ua::EventFilter > filter

nullopt == OfType(BaseEventType) (match-all on the notifier)

std::optional< std::uint32_t > queueSize

default: policy default (1000)

std::optional< ua::Duration > publishingInterval

default: backbone-shared

bool discardOldest

The discard oldest.

bool requestDedicatedBackbone

force a fresh backbone MI on its own Subscription

ua::client::EventSubscriberInfo

struct

Cross-strand observability snapshot of the subscriber (Rule 3 info-snapshot).

Public attributes

std::size_t backboneCount

The backbone count.

std::size_t consumerCount

The consumer count.

std::size_t trackerCount

The tracker count.

std::size_t lastPublishEventFieldListCount

The last publish event field list count.

ua::client::EventSubscriber

class

The public value handle (move-only shared_ptr pimpl) users obtain from Connection::events() (returned BY VALUE, section 7.2).

It forwards its consumer API one-hop to the private strand component detail::EventSubscriberImpl (T23), which owns the event subsystem's OWN private strand and implements detail::MonitoredItemOwner (section 7.4) - so an event MonitoredItem's self-actions route there. Only the consumer methods live here; the tracker hooks, publish-demux, reconnect, and session feeds live on the Impl. ConnectionImpl and the (future) pipeline co-own the same Impl.

Functions

EventSubscriber(EventSubscriber &&) noexcept=default

Returns or updates the event subscriber.

EventSubscriber & operator=(EventSubscriber &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~EventSubscriber()=default
void subscribe_async(EventSubscription subscription, EventNotificationCallback onEvent, std::function< void(SubscribeResult)> callback) noexcept
  • subscription (EventSubscription) - The subscription.
  • onEvent (EventNotificationCallback) - The on event.
  • callback (std::function< void(SubscribeResult)>) - Completion callback that receives the operation result. Subscribes onEvent to events matching subscription's filter on its notifier. Coalesces onto the shared backbone; the returned MonitoredItem (kind() == Event) self-acts through the owner seam. Rejects an empty (non-null but zero-SelectClause) filter with Bad_EventFilterInvalid (CL-MI-016). Rejects InView, RelatedTo, and unknown whereClause operators locally with Bad_FilterOperatorInvalid; basic operators and OfType are permitted (CL-MI-023). The callback runs on the executor. Never throws.
void subscribe_to_type_async(ua::NodeId eventType, EventNotificationCallback onEvent, std::function< void(SubscribeResult)> callback) noexcept

Convenience: subscribe to events of type eventType (and its subtypes), with the standard.

  • eventType (ua::NodeId) - The event type.
  • onEvent (EventNotificationCallback) - The on event.
  • callback (std::function< void(SubscribeResult)>) - Completion callback that receives the operation result. BaseEventType mandatory SelectClauses already populated. Never throws.
ua::client::MonitoredItem subscribe_to_type_sync(ua::NodeId eventType, EventNotificationCallback onEvent)
  • eventType (ua::NodeId) - The eventtype.
  • onEvent (EventNotificationCallback) - The onevent.

Returns: The requested value. Synchronously subscribe to type. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::client::MonitoredItem > try_subscribe_to_type_sync(ua::NodeId eventType, EventNotificationCallback onEvent) noexcept
  • eventType (ua::NodeId) - The eventtype.
  • onEvent (EventNotificationCallback) - The onevent.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to subscribe to type sync without throwing.

void unsubscribe_async(MonitoredItem item, std::function< void(ua::VoidResult)> callback) noexcept
  • item (MonitoredItem) - The item.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Event-consumer teardown. Equivalent to item.delete_async() on the returned handle (both route through detail::MonitoredItemOwner::mi_delete_async on the Impl): drop THIS consumer and recompute the composite backbone filter (a ModifyMonitoredItems iff it changed) - it must NOT DeleteMonitoredItems the shared backbone and kill the other consumers. Never throws.
MonitoredItem subscribe_sync(EventSubscription subscription, EventNotificationCallback onEvent)
  • subscription (EventSubscription) - The subscription.
  • onEvent (EventNotificationCallback) - The on event.

Returns: The requested value. Blocking subscribe_async.

SubscribeResult try_subscribe_sync(EventSubscription subscription, EventNotificationCallback onEvent) noexcept
  • subscription (EventSubscription) - The subscription.
  • onEvent (EventNotificationCallback) - The on event.

Returns: The requested value. Blocking subscribe_async. Never throws.

void unsubscribe_sync(MonitoredItem item)
ua::VoidResult try_unsubscribe_sync(MonitoredItem item) noexcept

Returns: The requested value. Blocking unsubscribe_async. Never throws.

std::shared_ptr< const EventSubscriberInfo > info() const noexcept

Returns: An immutable snapshot of the current state. Cross-strand info snapshot (atomic-load; any thread).

ua::client::FileHandle

class

A move-only handle to one server-allocated fileHandle (client design section 8.10, CL-FILE-001).

FileHandle owns the close-on-destruct obligation for exactly one open FileType fileHandle: dropping a live handle fires a fire-and-forget FileType.Close against the originating Connection. It is therefore move-only (section 7.0: any handle that releases a server resource on destruction is move-only) - copying would duplicate the close-on-destruct obligation on one fileHandle, so the copy operations are deleted and the close-duty transfers exactly once on move. Move-ASSIGNMENT first fires Close on any live handle it displaces (else the displaced server fileHandle would leak), then adopts the source. A moved-from handle is inert (its dtor is a no-op).

The handle binds to its originating Connection's wire seam by a weak_ptr (CL-MULTI): every op locks it and completes Bad_ConnectionClosed if the Connection is gone, and the handle cannot be smuggled onto a different Connection (it is move-only, so there is no copy to transfer).

Each op follows the section 7.0 async / sync / try_sync triple: *_async - never throws; the callback receives a Result<...> on the executor. sync - blocks; returns the bare value; throws UaException on a bad Result. try_sync - blocks; returns Result<...>; never throws.

The sync / try_sync variants block the calling thread; they MUST NOT be called from the Connection's executor thread.

Functions

FileHandle()=default

Constructs an invalid sentinel handle (is_valid() == false; every op fast-fails, dtor is a no-op).

FileHandle(FileHandle &&) noexcept=default

Returns or updates the file handle.

FileHandle & operator=(FileHandle &&other) noexcept
  • other (FileHandle &&) - The other.

Returns: A reference to this object. Fires Close on any live handle this displaces (exactly-once close-duty) before adopting other.

~FileHandle()

Fires a fire-and-forget FileType.Close when the handle is live and not already closed (CL-FILE-001).

bool is_valid() const noexcept

Returns: True iff the handle owns a not-yet-closed server fileHandle (false once closed or moved-from).

ua::NodeId file_node() const noexcept

Returns: The FileType Object NodeId the handle was opened on (empty NodeId when moved-from).

FileOpenMode mode() const noexcept

Returns: The FileOpenMode the handle was opened with.

std::uint32_t max_byte_string_length() const noexcept

Returns: The per-read/write cap resolved at Open (CL-FILE-002): the FileType instance's optional MaxByteStringLength, otherwise ServerCapabilities.MaxByteStringLength, otherwise the configured 64 KiB safe default.

void read_async(std::uint32_t maxBytes, std::function< void(ByteStringResult)> callback) noexcept
  • maxBytes (std::uint32_t) - The max bytes.
  • callback (std::function< void(ByteStringResult)>) - Completion callback that receives the operation result. Reads up to maxBytes bytes (capped at max_byte_string_length, CL-FILE-002). An empty ByteString is end-of-file (CL-FILE-003), surfaced verbatim (the caller / read_all decides).
ua::ByteString read_sync(std::uint32_t maxBytes)

Returns: The requested value. Synchronously read.

ByteStringResult try_read_sync(std::uint32_t maxBytes) noexcept

Returns: The requested value. Attempts to read sync without throwing.

void write_async(ua::ByteString data, std::function< void(ua::VoidResult)> callback) noexcept
  • data (ua::ByteString) - The data.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Writes data at the handle's current position. Rejects locally with Bad_InvalidState if the handle was opened read-only (CL-FILE-004).
void write_sync(ua::ByteString data)
ua::VoidResult try_write_sync(ua::ByteString data) noexcept

Returns: The requested value. Attempts to write sync without throwing.

void get_position_async(std::function< void(UInt64Result)> callback) noexcept
std::uint64_t get_position_sync()

Returns: The requested value. Synchronously get position.

UInt64Result try_get_position_sync() noexcept

Returns: The requested value. Attempts to get position sync without throwing.

void set_position_async(std::uint64_t position, std::function< void(ua::VoidResult)> callback) noexcept
void set_position_sync(std::uint64_t position)
  • position (std::uint64_t) - The position. Synchronously set position.
ua::VoidResult try_set_position_sync(std::uint64_t position) noexcept

Returns: The requested value. Attempts to set position sync without throwing.

void close_async(std::function< void(ua::VoidResult)> callback) noexcept
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Closes the handle now (idempotent, CL-FILE-001). After a close, further reads/writes fail Bad_InvalidState. Completes Good even when the wire Close reports bad (the server discards the handle on Session-end); a bad wire Close is logged at the wire boundary, not surfaced.
void close_sync()

Synchronously close.

ua::VoidResult try_close_sync() noexcept

Returns: The requested value. Attempts to close sync without throwing.

ua::client::FileSystemEntry

struct

Public file system entry API.

Public attributes

ua::NodeId nodeId

The node id.

ua::QualifiedName browseName

The browse name.

ua::LocalizedText displayName

The display name.

FileSystemEntryKind kind

The kind.

ua::client::FileTransferClient

class

The per-Connection tier-2 facade for the File Transfer service set (client design section 8.10).

A lightweight, copyable value handle over the same tier-1 wire seam (detail::WireOps) as its parent Connection, reached via Connection::files(). It holds no strand state of its own; every method composes the correct FileType Method Call and forwards it through the wire seam (which serializes on the Connection strand internally). Completions are delivered on the Connection executor.

Cycle-safe (section 9.8.3). Neither the facade nor the per-handle detail::FileHandleState holds a strong shared_ptr back to the owning facade / ConnectionImpl: the only back-reference is a weak_ptr to the wire seam, locked per op and bailed if gone. Every internal async completion weak-captures the per-handle state and bails cleanly if the handle was dropped mid-flight - no dangling deref, no self-owning cycle.

The sync / try_sync variants block the calling thread; they MUST NOT be called from the Connection's executor thread.

Functions

FileTransferClient(const FileTransferClient &)=default

Returns or updates the file transfer client.

FileTransferClient & operator=(const FileTransferClient &)=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

FileTransferClient(FileTransferClient &&) noexcept=default

Returns or updates the file transfer client.

FileTransferClient & operator=(FileTransferClient &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~FileTransferClient()=default
void open_async(ua::NodeId fileNode, FileOpenMode mode, std::function< void(FileHandleResult)> callback) noexcept

Opens the FileType Object fileNode in mode and hands back a FileHandle carrying the.

  • fileNode (ua::NodeId) - The file node.
  • mode (FileOpenMode) - The mode.
  • callback (std::function< void(FileHandleResult)>) - Completion callback that receives the operation result. server-allocated fileHandle (CL-FILE-001). Rejects locally with Bad_InvalidArgument if mode contains neither Read nor Write (CL-FILE-004). A failed Open constructs no handle (no Close is owed).
FileHandle open_sync(ua::NodeId fileNode, FileOpenMode mode)

Returns: The requested value. Synchronously open.

FileHandleResult try_open_sync(ua::NodeId fileNode, FileOpenMode mode) noexcept

Returns: The requested value. Attempts to open sync without throwing.

void read_all_async(ua::NodeId fileNode, std::function< void(ByteStringResult)> callback) noexcept

One-shot read of the whole file: Open(Read) to loop Read to EOF to Close (CL-FILE-002/-003).

  • fileNode (ua::NodeId) - The file node.
  • callback (std::function< void(ByteStringResult)>) - Completion callback that receives the operation result. Accumulates into a single ByteString. Honours an aggregate ceiling (max_read_all_bytes, section 9.6.23.2): a file whose accumulated bytes would exceed the ceiling terminates with a bad Result (source client.tier2.file_transfer.read_all) rather than reading unbounded into memory. The internally-owned handle is dropped on completion, firing the fire-and-forget Close.
ua::ByteString read_all_sync(ua::NodeId fileNode)

Returns: The requested value. Synchronously read all.

ByteStringResult try_read_all_sync(ua::NodeId fileNode) noexcept

Returns: The requested value. Attempts to read all sync without throwing.

void write_all_async(ua::NodeId fileNode, ua::ByteString data, std::function< void(ua::VoidResult)> callback) noexcept

Writes all data using cap-sized sequential FileType.Write calls: read UserWritable,.

  • fileNode (ua::NodeId) - The file node.
  • data (ua::ByteString) - The data.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Open(Write|EraseExisting), write every chunk, then Close (CL-FILE-004). A false UserWritable rejects locally before Open.
void write_all_sync(ua::NodeId fileNode, ua::ByteString data)
ua::VoidResult try_write_all_sync(ua::NodeId fileNode, ua::ByteString data) noexcept

Returns: The requested value. Attempts to write all sync without throwing.

void list_directory_async(ua::NodeId directoryNode, std::function< void(FileSystemEntryListResult)> callback) noexcept

Browses every forward Organizes child and classifies it from TypeDefinition, never BrowseName.

std::vector< FileSystemEntry > list_directory_sync(ua::NodeId directoryNode)
  • directoryNode (ua::NodeId) - The directory node.

Returns: The requested value. Synchronously list directory.

FileSystemEntryListResult try_list_directory_sync(ua::NodeId directoryNode) noexcept
  • directoryNode (ua::NodeId) - The directory node.

Returns: The requested value. Attempts to list directory sync without throwing.

void create_directory_async(ua::NodeId directoryNode, ua::String name, std::function< void(NodeIdResult)> callback) noexcept
  • directoryNode (ua::NodeId) - The directory node.
  • name (ua::String) - The name.
  • callback (std::function< void(NodeIdResult)>) - Completion callback that receives the operation result. Calls the directory object's resolved instance CreateDirectory Method (Part 20 section 4.3.3).
ua::NodeId create_directory_sync(ua::NodeId directoryNode, ua::String name)

Returns: The requested value. Synchronously create directory.

NodeIdResult try_create_directory_sync(ua::NodeId directoryNode, ua::String name) noexcept

Returns: The requested value. Attempts to create directory sync without throwing.

void create_file_async(ua::NodeId directoryNode, ua::String name, std::function< void(NodeIdResult)> callback) noexcept

Calls the directory object's resolved instance CreateFile Method with requestFileOpen=false

  • directoryNode (ua::NodeId) - The directory node.
  • name (ua::String) - The name.
  • callback (std::function< void(NodeIdResult)>) - Completion callback that receives the operation result. (Part 20 section 4.3.4), returning the created FileType NodeId. Use open_* afterwards when an SDK-owned, close-on-destruct FileHandle is required; this prevents an unowned raw server handle from escaping.
ua::NodeId create_file_sync(ua::NodeId directoryNode, ua::String name)

Returns: The requested value. Synchronously create file.

NodeIdResult try_create_file_sync(ua::NodeId directoryNode, ua::String name) noexcept

Returns: The requested value. Attempts to create file sync without throwing.

void delete_async(ua::NodeId directoryNode, ua::NodeId objectToDelete, std::function< void(ua::VoidResult)> callback) noexcept
  • directoryNode (ua::NodeId) - The directory node.
  • objectToDelete (ua::NodeId) - The object to delete.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Calls DeleteFileSystemObject on the parent directory; never uses DeleteNodes (Part 20 section 4.3.5).
void delete_sync(ua::NodeId directoryNode, ua::NodeId objectToDelete)
  • directoryNode (ua::NodeId) - The directory node.
  • objectToDelete (ua::NodeId) - The object to delete. Synchronously delete.
ua::VoidResult try_delete_sync(ua::NodeId directoryNode, ua::NodeId objectToDelete) noexcept
  • directoryNode (ua::NodeId) - The directory node.
  • objectToDelete (ua::NodeId) - The object to delete.

Returns: The requested value. Attempts to delete sync without throwing.

void move_or_copy_async(ua::NodeId sourceDirectoryNode, ua::NodeId objectToMoveOrCopy, ua::NodeId targetDirectoryNode, bool createCopy, ua::String newName, std::function< void(NodeIdResult)> callback) noexcept
  • sourceDirectoryNode (ua::NodeId) - The source directory node.
  • objectToMoveOrCopy (ua::NodeId) - The object to move or copy.
  • targetDirectoryNode (ua::NodeId) - The target directory node.
  • createCopy (bool) - The create copy.
  • newName (ua::String) - The new name.
  • callback (std::function< void(NodeIdResult)>) - Completion callback that receives the operation result. Calls MoveOrCopy on the source parent directory (Part 20 section 4.3.6).
ua::NodeId move_or_copy_sync(ua::NodeId sourceDirectoryNode, ua::NodeId objectToMoveOrCopy, ua::NodeId targetDirectoryNode, bool createCopy, ua::String newName)
  • sourceDirectoryNode (ua::NodeId) - The source directory node.
  • objectToMoveOrCopy (ua::NodeId) - The object to move or copy.
  • targetDirectoryNode (ua::NodeId) - The target directory node.
  • createCopy (bool) - The create copy.
  • newName (ua::String) - The new name.

Returns: The requested value. Synchronously move or copy.

NodeIdResult try_move_or_copy_sync(ua::NodeId sourceDirectoryNode, ua::NodeId objectToMoveOrCopy, ua::NodeId targetDirectoryNode, bool createCopy, ua::String newName) noexcept
  • sourceDirectoryNode (ua::NodeId) - The source directory node.
  • objectToMoveOrCopy (ua::NodeId) - The object to move or copy.
  • targetDirectoryNode (ua::NodeId) - The target directory node.
  • createCopy (bool) - The create copy.
  • newName (ua::String) - The new name.

Returns: The requested value. Attempts to move or copy sync without throwing.

std::uint64_t max_read_all_bytes() const noexcept

Returns: The aggregate read_all_async ceiling in bytes (section 9.6.23.2; default 64 MiB).

void set_max_read_all_bytes(std::uint64_t ceiling) noexcept
  • ceiling (std::uint64_t) - The ceiling. Overrides the aggregate read_all_async ceiling (section 9.6.23.2). Advanced use.

ua::client::TimeRange

struct

A historical time-range selector shared by the Raw / Modified / Processed reads and the range delete (client design section 8.9.1).

A default-constructed ua::DateTime (the OPC UA null sentinel) means "unspecified" for startTime / endTime; 0 means "unspecified" for numValuesPerNode.

Functions

bool startSpecified() const

Returns: True iff startTime is specified (not the null sentinel).

bool endSpecified() const

Returns: True iff endTime is specified (not the null sentinel).

bool countSpecified() const

Returns: True iff numValuesPerNode is specified (non-zero).

Public attributes

ua::DateTime startTime

The inclusive start of the range (null = unspecified).

ua::DateTime endTime

The exclusive end of the range (null = unspecified).

std::uint32_t numValuesPerNode

The maximum values to return per node (0 = unspecified; Raw / Modified only).

ua::client::HistoryReadOptions

struct

The optional shaping applied to a history read (client design section 8.9.1).

Public attributes

ua::TimestampsToReturn timestampsToReturn

Which timestamps the server should return.

bool returnBounds

Whether a Raw read should return the bounding values (ignored for Modified - hard-coded false, CL-HIST-007).

std::optional< ua::AggregateConfiguration > aggregateConfiguration

Per-call AggregateConfiguration override for a processed read (CL-HIST-014, section 8.9.1).

ua::client::HistoryUpdateResult

struct

The tier-2 shape of a per-node HistoryUpdate result (client design section 8.9.1, CL-HIST-021).

Mirrors the wire HistoryUpdateResult one-for-one: the per-node operation status, the per-update-value operation results (preserved verbatim - a per-entry Bad is value-quality, not a service failure, CL-HIST-023), and the optional diagnostics.

Public attributes

ua::StatusCode statusCode

The per-node operation-level status (a bad code here is NOT a service failure - the outer Result is still Good; the node's action did not succeed, CL-HIST-021).

std::vector< ua::StatusCode > operationResults

The per-update-value operation results (== the input vector length for data writes; per-timestamp for deletes).

std::vector< ua::DiagnosticInfo > diagnosticInfos

The optional per-value diagnostics (server-discretionary per returnDiagnostics).

ua::client::HistoryFacade

class

The flattened, one-hop per-Connection facade for Historical Access (client design section 8.9, D2).

A lightweight move-only value handle over the same tier-1 wire seam (detail::WireOps) as its parent Connection, reached via Connection::history(). Per the ratified D2 flatten, the history reads and writes are DIRECT methods (no reader() / updater() sub-hop), so a history WRITE is reachable in one hop (conn.history().update_data_async(...)). It owns no strand state of its own; every method composes the correct HistoryReadDetails / HistoryUpdateDetails ExtensibleParameter and forwards through the wire seam's history_read_async / history_update_async (single ErrorDetail wrap - the facade never double-wraps).

Each operation follows the async / sync / try_sync triple (section 7.0): *_async - never throws; the callback receives a Result<...> on the executor. sync - blocks; returns the bare value; throws UaException on a bad service Result. try_sync - blocks; returns Result<...>; never throws.

The sync / try_sync variants block the calling thread on the async completion. They MUST NOT be called from the Connection's executor thread.

Functions

HistoryFacade(const HistoryFacade &)=default

Returns or updates the history facade.

HistoryFacade & operator=(const HistoryFacade &)=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

HistoryFacade(HistoryFacade &&) noexcept=default

Returns or updates the history facade.

HistoryFacade & operator=(HistoryFacade &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~HistoryFacade()=default
void read_raw_async(ua::NodeId node, TimeRange range, HistoryReadOptions options, std::function< void(ua::Result< HistoryReadCursor >)> callback) noexcept

Reads raw historical values over a time range by composing ReadRawModifiedDetails { isReadModified=false } (CL-HIST-007).

HistoryReadCursor read_raw_sync(ua::NodeId node, TimeRange range, HistoryReadOptions options={})

Returns: The requested value. Synchronously read raw.

ua::Result< HistoryReadCursor > try_read_raw_sync(ua::NodeId node, TimeRange range, HistoryReadOptions options={}) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read raw sync without throwing.

void read_modified_async(ua::NodeId node, TimeRange range, HistoryReadOptions options, std::function< void(ua::Result< HistoryReadCursor >)> callback) noexcept

Reads modified historical values over a time range by composing ReadRawModifiedDetails { isReadModified=true, returnBounds=false } (CL-HIST-007).

HistoryReadCursor read_modified_sync(ua::NodeId node, TimeRange range, HistoryReadOptions options={})

Returns: The requested value. Synchronously read modified.

ua::Result< HistoryReadCursor > try_read_modified_sync(ua::NodeId node, TimeRange range, HistoryReadOptions options={}) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read modified sync without throwing.

void read_at_time_async(ua::NodeId node, std::vector< ua::DateTime > requestedTimes, HistoryReadOptions options, std::function< void(ua::Result< HistoryReadCursor >)> callback) noexcept
HistoryReadCursor read_at_time_sync(ua::NodeId node, std::vector< ua::DateTime > requestedTimes, HistoryReadOptions options={})

Returns: The requested value. Synchronously read at time.

ua::Result< HistoryReadCursor > try_read_at_time_sync(ua::NodeId node, std::vector< ua::DateTime > requestedTimes, HistoryReadOptions options={}) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read at time sync without throwing.

void read_processed_async(ua::NodeId node, TimeRange range, ua::NodeId aggregateType, ua::Duration processingInterval, HistoryReadOptions options, std::function< void(ua::Result< HistoryReadCursor >)> callback) noexcept

Reads a single aggregate over a time range (composes ReadProcessedDetails with one aggregate,.

  • node (ua::NodeId) - Target node identifier.
  • range (TimeRange) - Index or time range to access.
  • aggregateType (ua::NodeId) - The aggregate function NodeId (e.g. ua::client::aggregate::Average); passed through verbatim (CL-HIST-006).
  • processingInterval (ua::Duration) - The aggregation interval in milliseconds.
  • options (HistoryReadOptions) - Options controlling the operation.
  • callback (std::function< void(ua::Result< HistoryReadCursor >)>) - Completion callback that receives the operation result. CL-HIST-005). Pre-flight: {start, end} specified and start != end (CL-HIST-004).
HistoryReadCursor read_processed_sync(ua::NodeId node, TimeRange range, ua::NodeId aggregateType, ua::Duration processingInterval, HistoryReadOptions options={})

Returns: The requested value. Synchronously read processed.

ua::Result< HistoryReadCursor > try_read_processed_sync(ua::NodeId node, TimeRange range, ua::NodeId aggregateType, ua::Duration processingInterval, HistoryReadOptions options={}) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read processed sync without throwing.

void read_annotations_async(ua::NodeId node, std::vector< ua::DateTime > requestedTimes, HistoryReadOptions options, std::function< void(ua::Result< HistoryReadCursor >)> callback) noexcept

Reads historical annotations at specific timestamps (composes ReadAnnotationDataDetails, NS0 i=659,.

HistoryReadCursor read_annotations_sync(ua::NodeId node, std::vector< ua::DateTime > requestedTimes, HistoryReadOptions options={})

Returns: The requested value. Synchronously read annotations.

ua::Result< HistoryReadCursor > try_read_annotations_sync(ua::NodeId node, std::vector< ua::DateTime > requestedTimes, HistoryReadOptions options={}) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read annotations sync without throwing.

void is_history_capable_async(ua::NodeId node, std::function< void(ua::Result< bool >)> callback) noexcept
  • node (ua::NodeId) - Target node identifier.
  • callback (std::function< void(ua::Result< bool >)>) - Completion callback that receives the operation result. Reports whether node advertises historical-data reads through AccessLevel.HistoryRead (OPC 10000-11 section 5.2.4, CL-HIST-001).
bool is_history_capable_sync(ua::NodeId node)

Returns: True when the requested condition is satisfied. Synchronously is history capable.

ua::Result< bool > try_is_history_capable_sync(ua::NodeId node) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to is history capable sync without throwing.

void historical_configurations_async(ua::NodeId historicalDataNode, std::function< void(ua::Result< std::vector< ua::NodeId > >)> callback) noexcept
std::vector< ua::NodeId > historical_configurations_sync(ua::NodeId historicalDataNode)
  • historicalDataNode (ua::NodeId) - The historical data node.

Returns: The requested value. Synchronously historical configurations.

ua::Result< std::vector< ua::NodeId > > try_historical_configurations_sync(ua::NodeId historicalDataNode) noexcept
  • historicalDataNode (ua::NodeId) - The historical data node.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to historical configurations sync without throwing.

void is_history_writable_async(ua::NodeId node, std::function< void(ua::Result< bool >)> callback) noexcept
  • node (ua::NodeId) - Target node identifier.
  • callback (std::function< void(ua::Result< bool >)>) - Completion callback that receives the operation result. Reports whether node advertises historical-data updates through AccessLevel.HistoryWrite (OPC 10000-11 section 5.2.4, CL-HIST-020).
bool is_history_writable_sync(ua::NodeId node)

Returns: True when the requested condition is satisfied. Synchronously is history writable.

ua::Result< bool > try_is_history_writable_sync(ua::NodeId node) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to is history writable sync without throwing.

void update_data_async(ua::NodeId node, std::vector< ua::DataValue > values, ua::PerformUpdateType performType, std::function< void(ua::Result< HistoryUpdateResult >)> callback) noexcept
HistoryUpdateResult update_data_sync(ua::NodeId node, std::vector< ua::DataValue > values, ua::PerformUpdateType performType)

Returns: The requested value. Synchronously update data.

ua::Result< HistoryUpdateResult > try_update_data_sync(ua::NodeId node, std::vector< ua::DataValue > values, ua::PerformUpdateType performType) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to update data sync without throwing.

void insert_data_async(ua::NodeId node, std::vector< ua::DataValue > values, std::function< void(ua::Result< HistoryUpdateResult >)> callback) noexcept
HistoryUpdateResult insert_data_sync(ua::NodeId node, std::vector< ua::DataValue > values)

Returns: The requested value. Synchronously insert data.

ua::Result< HistoryUpdateResult > try_insert_data_sync(ua::NodeId node, std::vector< ua::DataValue > values) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to insert data sync without throwing.

void replace_data_async(ua::NodeId node, std::vector< ua::DataValue > values, std::function< void(ua::Result< HistoryUpdateResult >)> callback) noexcept
HistoryUpdateResult replace_data_sync(ua::NodeId node, std::vector< ua::DataValue > values)

Returns: The requested value. Synchronously replace data.

ua::Result< HistoryUpdateResult > try_replace_data_sync(ua::NodeId node, std::vector< ua::DataValue > values) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to replace data sync without throwing.

void delete_raw_modified_async(ua::NodeId node, TimeRange range, bool isDeleteModified, std::function< void(ua::Result< HistoryUpdateResult >)> callback) noexcept

Deletes raw / modified historical values over a time range (composes DeleteRawModifiedDetails, NS0.

HistoryUpdateResult delete_raw_modified_sync(ua::NodeId node, TimeRange range, bool isDeleteModified)
  • node (ua::NodeId) - Target node identifier.
  • range (TimeRange) - Index or time range to access.
  • isDeleteModified (bool) - The is delete modified.

Returns: The requested value. Synchronously delete raw modified.

ua::Result< HistoryUpdateResult > try_delete_raw_modified_sync(ua::NodeId node, TimeRange range, bool isDeleteModified) noexcept
  • node (ua::NodeId) - Target node identifier.
  • range (TimeRange) - Index or time range to access.
  • isDeleteModified (bool) - The is delete modified.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to delete raw modified sync without throwing.

void delete_at_time_async(ua::NodeId node, std::vector< ua::DateTime > requestedTimes, std::function< void(ua::Result< HistoryUpdateResult >)> callback) noexcept
HistoryUpdateResult delete_at_time_sync(ua::NodeId node, std::vector< ua::DateTime > requestedTimes)

Returns: The requested value. Synchronously delete at time.

ua::Result< HistoryUpdateResult > try_delete_at_time_sync(ua::NodeId node, std::vector< ua::DateTime > requestedTimes) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to delete at time sync without throwing.

ua::client::HistoryReadCursor

class

A forward, per-page cursor over historical DataValues (client design section 8.9).

HistoryReadCursor hides the HistoryRead / continuation-point dance behind a forward-iterator shape: next_async yields one page (a std::vector<ua::DataValue>) at a time, transparently re-sending the cached continuation point (CL-HIST-008/-013) when the caller asks for more. The cursor idiom is unified with BrowseCursor (section 7.5): the same has_more predicate name, the same section 7.0 async / sync / try_sync triple on next_async, and the same close-on-destruct + explicit-close_async continuation-point release (a release-only HistoryRead, CL-HIST-009). Element granularity is per-page (a vector) here - vs the browse cursor's per-Entry - an intentional, kept difference (history pages are the natural unit).

Move-only: the moved-from cursor releases its continuation point on drop. Not directly constructible; obtained from HistoryFacade::read_*.

A HistoryReadCursor is a forward iterator: issue one next_async (or a *_sync variant) at a time and await its completion before issuing the next. Overlapping advances are rejected. The sync / try_sync variants block the calling thread; they MUST NOT be called from the Connection's executor thread.

Functions

HistoryReadCursor(HistoryReadCursor &&) noexcept=default

Returns or updates the history read cursor.

HistoryReadCursor & operator=(HistoryReadCursor &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~HistoryReadCursor()

Posts a release-only HistoryRead (releaseContinuationPoints = true) to free the server's continuation point (CL-HIST-009).

bool has_more() const noexcept

Returns: True iff more pages remain to yield - a buffered first page is still pending, or a non-null continuation point is held. False once the cursor is drained or closed.

void next_async(std::function< void(ua::Result< std::vector< ua::DataValue > >)> callback) noexcept

Fetches the next page of historical values.

ua::Result< std::vector< ua::DataValue > > try_next_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Blocking try_* bridge over next_async; never throws. MUST NOT run on the executor thread.

std::vector< ua::DataValue > next_sync()

Returns: The requested value. Blocking bridge over next_async; throws UaException on a bad Result. MUST NOT run on the executor thread.

void close_async(std::function< void(ua::VoidResult)> callback) noexcept

Explicitly releases the continuation point now (a release-only HistoryRead).

ua::VoidResult try_close_sync() noexcept

Returns: The requested value. Blocking try_* bridge over close_async; never throws. MUST NOT run on the executor thread.

void close_sync()

Blocking bridge over close_async; throws UaException on a bad Result.

ua::mdns::ServiceRecord

struct

One resolved multicast-DNS service instance (client design section 7.6).

Assembled from the (PTR, SRV, TXT, A/AAAA) record set for a single OPC UA service instance.

Public attributes

std::string mServiceName

Fully-qualified service instance name, e.g. "MyServer._opcua-tcp._tcp.local.".

std::string mHostName

Resolved SRV target host name (the A/AAAA owner), e.g. "uaserver.example.com".

std::vector< std::string > mAddresses

Resolved IPv4/IPv6 addresses for mHostName (may be empty if only the host name is known).

std::uint16_t mPort

SRV port.

std::vector< std::string > mTxt

Raw TXT record entries (key=value, verbatim). Per Part 12 Annex C these carry path, caps, etc.

std::chrono::steady_clock::time_point mSeenAt

Local monotonic time this record was last (re)observed; used for TTL/goodbye bookkeeping.

ua::mdns::MdnsBrowseConfig

struct

Parameters for an mDNS browse (client design section 7.6).

Public attributes

OpcUaTransportScheme mScheme

The OPC UA transport scheme; selects the queried service type per Part 12 Annex C.3.

std::string mInterfaceAddress

Optional multicast interface address to bind (empty = default system interface).

ua::mdns::MdnsBrowser

class

A live mDNS browse handle (client design section 7.6).

Records arrive/expire via the registered callbacks; the browse continues until close_async completes. Move via the owning shared_ptr.

Member types

std::function< void(ServiceRecord)> DiscoveredCallback

Fired when a service instance is first sighted or its record set is refreshed.

std::function< void(std::string serviceName)> LostCallback

Fired when a service instance expires (TTL elapsed or explicit goodbye record).

Functions

~MdnsBrowser()=default
void set_callbacks(DiscoveredCallback discovered, LostCallback lost)=0
  • discovered (DiscoveredCallback) - The discovered.
  • lost (LostCallback) - The lost. Installs the discovered/lost callbacks. Both may be empty (no notification for that event). Callbacks are delivered on the transport's executor and must not block.
void close_async(std::function< void(ua::VoidResult)> callback)=0
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Stops the browse and releases its socket/strand. Idempotent. The callback fires on completion and never throws.

ua::mdns::MdnsTransport

class

The abstract mDNS transport contract (client design section 7.6 / section 8.12).

A concrete transport starts a browse for a service type and hands back a MdnsBrowser whose callbacks fire as records arrive.

Functions

~MdnsTransport()=default
ua::Result< std::shared_ptr< MdnsBrowser > > start_browse(std::string serviceType, MdnsBrowseConfig config)=0

Starts a browse for serviceType (typically "_opcua-tcp._tcp.local.").

  • serviceType (std::string) - Fully-qualified mDNS service type to browse.
  • config (MdnsBrowseConfig) - Browse parameters (interface, scheme).

Returns: On success the browse handle; on failure a bad Result carrying an ua::ErrorDetail. The transport MUST NOT throw; failures are reported through the Result.

ua::client::NamespaceTable

class

A per-Connection immutable snapshot of the server's Server.NamespaceArray.

Holds the NamespaceUri and NamespaceIndex mapping the client needs to (a) translate a NodeId built against one snapshot into another snapshot's index space across a reconnect (translate), (b) resolve an ExpandedNodeId.namespaceUri over the encoded index per the codec invariant (resolve_local, CL-VIEW-018), and (c) produce server.namespace.<uri> source tags for the DiagnosticInfo decoder (source_tag_for_namespace_uri, CL-DIAG-007).

Immutable and value-typed. Every field is fixed at construction; there are no mutators. A server renumbering its namespaces across Sessions is modelled by replacement - ConnectionImpl atomic-stores a fresh snapshot - never by mutating an existing one. Consequently every accessor is a pure, non-blocking read that is safe from any thread once a std::shared_ptr<const NamespaceTable> snapshot has been taken; the snapshot stays valid for the duration of an operation even if ConnectionImpl installs a newer instance mid-flight.

One per Connection (CL-MULTI-001..003): there is no static or cross-Connection state, so two Connections to servers that number the same URI differently never interfere.

Construct via create, which validates the array (index 0 must be the NS0 URI) and returns a shared, const snapshot.

Static functions

Result< std::shared_ptr< const NamespaceTable > > create(std::vector< std::string > uris, std::optional< std::uint32_t > urisVersion, std::uint64_t generation)

Creates a validated, shared, immutable snapshot from a decoded NamespaceArray.

Returns: A good Result holding the snapshot; or Bad_UnexpectedError chained with client.namespace_table.ns0_missing when uris is empty or uris[0] is not the NS0 URI; or Bad_UnexpectedError chained with client.namespace_table.too_large when uris cannot be indexed by a UInt16.

Functions

std::optional< NamespaceIndex > lookup_index(std::string_view uri) const noexcept

Returns the index mapped to uri, or std::nullopt if uri is not in this snapshot.

  • uri (std::string_view) - Namespace URI to look up (heterogeneous lookup - no allocation).

Returns: The mapped NamespaceIndex, or std::nullopt.

std::optional< std::string_view > lookup_uri(NamespaceIndex idx) const noexcept

Returns the URI at idx, or std::nullopt if idx is out of range.

  • idx (NamespaceIndex) - Namespace index to look up.

Returns: A string_view into this snapshot's storage (valid for the snapshot's lifetime), or std::nullopt if idx >= size.

std::size_t size() const noexcept

Returns the number of namespaces in this snapshot (always >= 1 - NS0 is present).

Returns: The namespace count.

std::uint64_t generation() const noexcept

Returns this snapshot's generation counter (monotonic across re-reads on one Connection).

Returns: The generation assigned by ConnectionImpl at construction.

std::optional< std::uint32_t > uris_version() const noexcept

Returns the server's Server.UrisVersion, or std::nullopt if the server does not publish it.

Returns: The UrisVersion counter (CL-BASE-001), or std::nullopt if the server did not publish it.

Result< NodeId > translate(const NodeId &node, const NamespaceTable &sourceTable) const noexcept

Translates a NodeId built against sourceTable into this snapshot's index space.

  • node (const NodeId &) - The NodeId to translate; its index is interpreted against sourceTable.
  • sourceTable (const NamespaceTable &) - The snapshot node's index was built against.

Returns: A good Result<NodeId> in this snapshot's index space; or Bad_NodeIdUnknown chained with client.namespace_table.uri_unresolved when the source URI is absent here; or Bad_NodeIdInvalid chained with client.namespace_table.index_out_of_range when node's index is out of sourceTable's range.

Result< NodeId > resolve_local(const ExpandedNodeId &expanded) const noexcept

Resolves an ExpandedNodeId to a local NodeId per the CL-VIEW-018 codec invariant.

  • expanded (const ExpandedNodeId &) - The ExpandedNodeId to resolve.

Returns: A good Result<NodeId> at this snapshot's local index; or Bad_NodeIdUnknown chained with client.namespace_table.uri_unresolved (the unresolved URI preserved verbatim in the ErrorDetail) when a non-empty URI is absent here; or Bad_NodeIdInvalid chained with client.namespace_table.index_out_of_range when the URI is empty and the encoded index is out of range.

std::string source_tag_for_namespace_uri(std::string_view uri) const

Builds the DiagnosticInfo source tag for uri (CL-DIAG-007).

  • uri (std::string_view) - The namespace URI carried by a decoded DiagnosticInfo layer.

Returns: "server.namespace." + uri when uri is in this snapshot, else "server.unknown." + uri. The literal URI is always preserved.

~NamespaceTable()=default

ua::client::NumericRangeBuilder

class

Builds validated NumericRange wire values for tier-2 client operations.

Both entry points enforce the Part 4 section 7.27 grammar. When expectedDimensions is supplied, the builder also requires exactly that many comma-separated dimensions. The returned NumericRange is ready to pass to a tier-1 request; tier-1 itself intentionally continues to accept raw wire-shaped strings.

Static functions

ua::Result< ua::NumericRange > from_string(ua::NumericRange range, std::optional< std::size_t > expectedDimensions=std::nullopt) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Validates an existing wire-form NumericRange without normalising it.

ua::Result< ua::NumericRange > from_dimensions(std::vector< ua::DimensionRange > dimensions, std::optional< std::size_t > expectedDimensions=std::nullopt) noexcept

Encodes structured inclusive dimension ranges into a valid NumericRange.

Returns: The operation result, including status and diagnostic detail on failure. A dimension whose bounds are equal is encoded as a single index; otherwise low:high is emitted and low must be strictly less than high.

ua::client::PropertyAccessor

class

The per-Connection, per-NodeId generic Property accessor (client design section 8.18.1.d, CL-AC-022).

A lightweight, copyable value handle over the same tier-1 wire seam as its parent Connection, reached via Connection::node(NodeId). It is the one-shot escape hatch surfaced by section 8.8's AlarmConditionTracker pass: Browse one level for HasProperty children, match the requested BrowseName, Read the matched child's Value Attribute. No child matches to Bad_NotFound.

Cycle-safe (section 9.8.3). Holds only weak_ptr seam roles (detail::WireOps + detail::SupportOps), never a weak_ptr<ConnectionImpl>: every op locks them and completes Bad_ConnectionClosed if the Connection is gone.

The AddressSpaceCache (section 8.7) is not wired here yet, so read_property_uncached_async and the cache-honouring default read_property_async behave identically for now; the cache-aware split is a documented no-op until the cache lands.

Functions

PropertyAccessor(const PropertyAccessor &)=default

Returns or updates the property accessor.

PropertyAccessor & operator=(const PropertyAccessor &)=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

PropertyAccessor(PropertyAccessor &&) noexcept=default

Returns or updates the property accessor.

PropertyAccessor & operator=(PropertyAccessor &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~PropertyAccessor()=default
void read_property_async(BrowseName propertyName, std::function< void(DataValueResult)> callback) noexcept

CL-AC-022 - Browse one level (HasProperty), match propertyName, Read the matched child's Value.

ua::DataValue read_property_sync(BrowseName propertyName)

Returns: The requested value. Synchronously read property. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::DataValue > try_read_property_sync(BrowseName propertyName) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read property sync without throwing.

void read_property_path_async(std::vector< BrowseName > path, std::function< void(DataValueResult)> callback) noexcept
  • path (std::vector< BrowseName >) - The path.
  • callback (std::function< void(DataValueResult)>) - Completion callback that receives the operation result. Multi-hop Property path (e.g. ["ShelvingState", "CurrentState", "Id"]). Each segment is resolved by a one-level hierarchical Browse; the final segment's Value Attribute is Read. Bad_NotFound when any segment fails to match.
ua::DataValue read_property_path_sync(std::vector< BrowseName > path)

Returns: The requested value. Synchronously read property path. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::DataValue > try_read_property_path_sync(std::vector< BrowseName > path) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read property path sync without throwing.

void read_property_uncached_async(BrowseName propertyName, std::function< void(DataValueResult)> callback) noexcept
  • propertyName (BrowseName) - The property name.
  • callback (std::function< void(DataValueResult)>) - Completion callback that receives the operation result. The cache-bypassing variant of read_property_async. Identical behaviour until the AddressSpaceCache (section 8.7) is wired - the cache-aware split is a documented no-op for now.
ua::DataValue read_property_uncached_sync(BrowseName propertyName)

Returns: The requested value. Synchronously read property uncached. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::DataValue > try_read_property_uncached_sync(BrowseName propertyName) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read property uncached sync without throwing.

ua::NodeId node_id() const noexcept

Returns: The NodeId this accessor targets (empty NodeId when the accessor is a sentinel).

ua::client::CertificateGroupConfig

struct

One certificate group the manager renews (section 8.1A.1).

A group pairs a GDS certificate-group Object with the certificate type to request under it.

Public attributes

ua::NodeId certificateGroupId

The GDS CertificateGroup Object NodeId (default: DefaultApplicationGroup).

ua::NodeId certificateTypeId

The certificate type Object NodeId (default: RSA-SHA256 application certificate).

bool useNewKeyPair

When true, drive StartNewKeyPairRequest (server generates the key pair); otherwise StartSigningRequest (client-generated CSR).

ua::ByteString certificateRequest

DER-encoded PKCS #10 request for StartSigningRequest. Required when useNewKeyPair is false.

std::string subjectName

Subject for StartNewKeyPairRequest. Empty lets the CertificateManager derive a suitable default.

std::vector< std::string > domainNames

DNS names for StartNewKeyPairRequest. Empty lets the CertificateManager use registered discovery URLs.

std::string privateKeyFormat

Requested private-key encoding for StartNewKeyPairRequest (Part 12 mandates PEM and PFX support).

std::string privateKeyPassword

Optional password protecting the returned private-key blob.

ua::client::PullCertManagementConfig

struct

Configuration for a PullCertificateManager (section 8.1A.1).

Const after the manager is constructed.

Public attributes

std::string gdsEndpointUrl

The gds endpoint url.

std::shared_ptr< ua::CertificateStore > bootstrapTrustStore

Validates the GDS server cert during OPN.

std::shared_ptr< ua::CertificateStore > runtimeCertStore

Destination of the pulled own-cert + TrustList (CL-PULLCRT-005 / CL-PULLCRT-006).

ua::NodeId applicationId

Application record identifier assigned by the GDS and passed to every Start/Finish request.

std::optional< ua::MessageSecurityMode > requestedGdsSecurityMode

Optional override of the GDS channel SecurityMode.

ua::SecurityPolicyId gdsSecurityPolicyId

The security policy for the GDS channel.

std::shared_ptr< const ua::X509Certificate > gdsServerCertificate

The GDS server's application-instance certificate, encrypted to during the SignAndEncrypt OPN and validated against bootstrapTrustStore.

std::chrono::seconds updateFrequency

section 3.13.6 default: full cycle cadence.

std::chrono::seconds minCycleBackoff

floor after a cycle failure.

std::chrono::seconds maxCycleBackoff

ceiling of the exponential retry backoff.

double cycleBackoffJitterPct

The cycle backoff jitter pct.

std::chrono::milliseconds pollInitialDelay

first FinishRequest poll delay.

std::size_t pollMaxRepeat

bounded burst before persisting + deferring to the next cycle.

double pollBackoffMultiplier

Multiplier applied to successive FinishRequest poll delays.

double pollJitterPct

Fractional jitter applied to successive poll delays.

bool checkLastUpdateTimeBeforeDownload

The check last update time before download.

bool treatLastUpdateTimeMissingAsForceDownload

The treat last update time missing as force download.

bool renewApplicationCertificate

Whether each cycle also requests a renewed Application Instance Certificate. Set false for a TrustList-only deployment; changed TrustLists are still committed and immediately revalidated.

bool revalidateImmediatelyOnCommit

Immediate revalidation pass after every commit; false defers to the SecurityToken-renewal revalidation alone (CL-SECADMIN-004).

std::vector< CertificateGroupConfig > certificateGroups

empty to a single default group.

ua::client::PendingRequestInfo

struct

One in-flight Start to Finish request, surfaced for diagnostics (section 8.1A.1).

Public attributes

ua::NodeId certificateGroupId

The certificate group id.

ua::NodeId certificateTypeId

The certificate type id.

ua::NodeId requestId

The request id.

ua::DateTime persistedAt

The persisted at.

ua::client::PullCertManagementInfo

struct

The cross-strand pull-cert diagnostics snapshot (section 8.1A.1).

Replaced atomically after every state-affecting mutation; read lock-free via PullCertificateManager::pull_cert_info.

Public attributes

PullCertManagementState state

The state.

std::optional< ua::DateTime > lastSuccessfulCycleAt

The last successful cycle at.

std::optional< ua::DateTime > lastTrustListCommitAt

The last trust list commit at.

std::optional< ua::DateTime > lastCertCommitAt

The last cert commit at.

std::uint32_t failureCount

The failure count.

std::shared_ptr< const ua::ErrorDetail > lastError

section 8.1A.5 error chain from the most recent terminal cycle failure (null on no error).

std::vector< PendingRequestInfo > pendingRequests

The pending requests.

ua::client::PullCertificateManager

class

The public tier-2 Pull-Model certificate-management handle (section 8.1A.1).

Held by the user via shared_ptr (returned from Client::start_pull_cert_management); dropping it stops the manager. It is a thin forwarder over the strand-bearing detail::PullCertificateManagerImpl (own strand).

Functions

~PullCertificateManager()
std::shared_ptr< const PullCertManagementInfo > pull_cert_info() const noexcept

Returns: An immutable snapshot of the current state. Diagnostics - the cross-strand snapshot (lock-free; Rule 4). Never null.

void force_cycle_async(std::function< void(ua::VoidResult)> callback) noexcept
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Forces a cycle out-of-band (admin tool / smoke test). Resolves Good when the cycle completes (success or failure both Good - the result is in pull_cert_info().lastError). Coalesces if a cycle is already running. Never throws.
void stop_async(std::function< void(ua::VoidResult)> callback) noexcept
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Idempotent stop. Cancels timers, drains in-flight RPCs (by generation), closes the GDS Connection. Any pending force_cycle_async callbacks complete Cancelled. Never throws.

ua::client::BackoffPolicy

struct

Exponential-with-jitter backoff schedule for reconnect attempts.

next(attempt) returns the delay before the given 1-based attempt as clamp(base * factor^(attempt-1), base, max) scaled by a random +/-jitterPct jitter.

Saturating by construction. With maxAttempts unset the attempt index is unbounded, and base_ms * factor^(attempt-1) overflows int64 milliseconds around attempt 54 - which would wrap the delay to a tiny value and collapse the backoff into a reconnect storm. next therefore stops scaling as soon as the running value reaches max; it never computes the raw power first.

Functions

std::chrono::milliseconds next(std::size_t attempt) const

Returns the delay before 1-based attempt (attempt 0 is treated as attempt 1).

Returns: The delay to wait before that attempt.

Public attributes

std::chrono::milliseconds base

Delay before the first reconnect attempt.

std::chrono::milliseconds max

Hard ceiling on the pre-jitter delay.

double jitterPct

Fractional jitter applied to the clamped delay (0.25 = +/-25%). 0 disables jitter (deterministic).

double factor

Growth factor per attempt (2.0 = binary exponential).

ua::client::ReconnectPolicy

struct

Policy governing automatic reconnect (ConnectionConfig.reconnect; unset = single-shot connect).

Public attributes

BackoffPolicy backoff

Backoff schedule between attempts.

std::optional< std::size_t > maxAttempts

Maximum reconnect attempts before terminal failure; unset means retry forever.

SubscriptionRecovery subscriptionRecovery

How subscriptions are recovered after a reconnect.

std::optional< std::chrono::milliseconds > perStepTimeout

Per-step deadline guarding a stuck reconnect step; unset uses the default service timeout.

std::size_t shutdownBackoffMultiplier

Multiplier applied to the backoff while a server-announced shutdown is in effect (CL-SESS-025).

std::chrono::milliseconds minHealthyDwell

Minimum time a reconnect must stay Active before it counts as a genuine recovery (storm guard, section 8.3.4).

ua::client::KeepAlivePolicy

struct

Keep-alive poll policy (section 8.2A.6, CL-RECONN-009 / CL-SESS-025).

While the Connection is Active the orchestrator polls Server.ServerStatus.State on this interval to detect a silently-dead link (a half-open TCP / hung server / black-hole) that issues no Publishes to signal a drop - the independent liveness signal the Publish-fatal path cannot cover on a subscription-less Connection. Keep-alive is a reconnect-adjacent concern (a miss drives the reconnect FSM), so it travels with ReconnectPolicy; a single-shot Connection with no reconnect wiring has nothing to do on a miss.

Public attributes

std::chrono::milliseconds interval

Interval between keep-alive polls. <= 0 DISABLES the keep-alive timer (opt-out / single-shot).

std::size_t missedBeforeReconnect

Consecutive missed polls before a KeepAliveMissed reconnect is triggered (0 is treated as 1).

ua::client::TransportDropped

struct

The transport connection was lost (socket closed / reset).

ua::client::KeepAliveMissed

struct

The KeepAlive poll missed KeepAlivePolicy.missedBeforeReconnect consecutive reads.

ua::client::SecurityFailure

struct

A security-class failure was observed (bad/untrusted certificate, policy rejected, ...).

ua::client::SessionInvalid

struct

The Session is no longer valid on the server (Bad_SessionIdInvalid).

ua::client::CertRotated

struct

The client's application-instance certificate was rotated (CL-RECONN-006).

ua::client::ServerShutdown

struct

The server announced a shutdown (ServerState = Shutdown); reconnect is deferred (CL-SESS-025).

ua::client::RedundancySwitchInfo

struct

A redundant-server switch was requested; carries the redundancy triple the tier-2 paths need.

Public attributes

ua::RedundancySupport mode

The server set's redundancy support level.

std::string fromUri

URI of the server the connection was on.

std::string toUri

URI of the server the connection switched to.

ua::client::ReconnectOutcome

struct

The result of a completed reconnect, delivered to ConnectionObserver::on_reconnected.

Public attributes

bool sessionPreserved

ActivateSession on the existing sessionId succeeded (no new Session was created).

bool subscriptionsTransferred

TransferSubscriptions succeeded (as opposed to recreating subscriptions).

std::size_t monitoredItemsRecreated

The number of monitored items that had to be recreated.

std::optional< ReconnectCause > cause

The cause the completed reconnect was driven by (nullopt = unknown / not reported).

ua::client::ExpectedServer

struct

A Server permitted to reverse-connect to this listener.

Describes one entry in the listener's allow-list: an incoming ReverseHello is accepted only if its ServerUri matches mServerUri and the advertised EndpointUrl is one of mEndpointUrls.

Public attributes

std::string mServerUri

ApplicationUri of the Server, matched against the ReverseHello ServerUri.

std::vector< std::string > mEndpointUrls

EndpointUrls the Server may advertise in its ReverseHello EndpointUrl field.

ua::client::ReverseConnectListenerConfig

struct

Settings for a reverse connect listener that accepts Server-initiated connections.

Passed to ua::client::CoreClient::start_reverse_connect_async (and its sync variants) to open a listener that binds locally and waits for Servers in mExpectedServers to dial in with a ReverseHello.

Public attributes

ua::transport::BindAddress mBind

Transport-qualified local address the listener binds to and accepts on.

std::vector< ExpectedServer > mExpectedServers

Allow-list of Servers permitted to reverse-connect to this listener.

uint32_t mMaxQueuedConnections

Maximum number of validated reverse connections queued awaiting open_channel.

std::chrono::seconds mInitialMessageTimeout

Time allowed to receive the initial ReverseHello after TCP accept (spec C4).

ua::client::ReverseConnectHandle

struct

Opaque handle identifying an active reverse connect listener.

Returned by ua::client::CoreClient::start_reverse_connect_async (and its sync variants) and passed back to stop a specific listener. The handle is a small value type that may be freely copied, stored, and compared; it owns no resources and remains valid until the corresponding listener is stopped. A default-constructed handle (value == 0) refers to no listener.

Public attributes

std::uint64_t value

Opaque listener identifier; 0 denotes no listener.

ua::client::ServerDiagnosticsAccessor

class

The per-Connection tier-2 accessor for Server.ServerDiagnostics (client design section 8.18.1.c).

A lightweight, copyable value handle over the same tier-1 wire seam as its parent ua::client::Connection, reached via Connection::server_diagnostics().

Cycle-safe (section 9.8.3). The accessor holds only weak_ptr seam roles (detail::WireOps + detail::SupportOps), never a weak_ptr<ConnectionImpl> (section 8.2A.13). Locks are taken per op and a boundary failure is delivered on the executor if the Connection is gone.

Cache lifetime (section 8.18.2). The EnabledFlag TTL cache lives on the accessor value handle, so the 60 s staleness benefit accrues only while the caller HOLDS one accessor across calls. The throwaway idiom connection.server_diagnostics().sessions_async(cb) builds a fresh accessor (fresh cache) per call, so it re-reads the flag every time; hold an accessor (auto diag = connection.server_diagnostics();) to reuse the cache.

Functions

Returns or updates the server diagnostics accessor.

ServerDiagnosticsAccessor & operator=(const ServerDiagnosticsAccessor &)=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

ServerDiagnosticsAccessor(ServerDiagnosticsAccessor &&) noexcept=default

Returns or updates the server diagnostics accessor.

ServerDiagnosticsAccessor & operator=(ServerDiagnosticsAccessor &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~ServerDiagnosticsAccessor()=default
void summary_async(std::function< void(ServerDiagnosticsSummaryResult)> callback) noexcept

CL-BASEDIAG-002 - Reads Server.ServerDiagnostics.ServerDiagnosticsSummary (a Variant holding an ExtensionObject of ServerDiagnosticsSummaryDataType) and decodes it with the generated decoder (no.

  • callback (std::function< void(ServerDiagnosticsSummaryResult)>) - Completion callback that receives the operation result. projection / renaming). A Bad service response or a Bad DataValue quality surfaces via the Result with source client.tier2.server_diagnostics.summary.
ua::ServerDiagnosticsSummaryDataType summary_sync()

Returns: The requested value. Synchronously summary. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::ServerDiagnosticsSummaryDataType > try_summary_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to summary sync without throwing.

void sessions_async(std::function< void(SessionDiagnosticsArrayResult)> callback) noexcept

CL-BASEDIAG-003 - Reads the SessionDiagnosticsArray (a Variant array of SessionDiagnosticsDataType

  • callback (std::function< void(SessionDiagnosticsArrayResult)>) - Completion callback that receives the operation result. ExtensionObjects). If the cached EnabledFlag is absent / stale (>60 s) the flag is batch-Read alongside; when it resolves false a disabled-advisory is logged (source client.tier2.server_diagnostics.diagnostics_disabled). The array result is delivered regardless of the flag (data + advisory, not a blocked call).
std::vector< ua::SessionDiagnosticsDataType > sessions_sync()

Returns: The requested value. Synchronously sessions. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< std::vector< ua::SessionDiagnosticsDataType > > try_sessions_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to sessions sync without throwing.

void sessions_security_async(std::function< void(SessionSecurityDiagnosticsArrayResult)> callback) noexcept
std::vector< ua::SessionSecurityDiagnosticsDataType > sessions_security_sync()

Returns: The requested value. Synchronously sessions security. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< std::vector< ua::SessionSecurityDiagnosticsDataType > > try_sessions_security_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to sessions security sync without throwing.

void subscriptions_async(std::function< void(SubscriptionDiagnosticsArrayResult)> callback) noexcept
std::vector< ua::SubscriptionDiagnosticsDataType > subscriptions_sync()

Returns: The requested value. Synchronously subscriptions. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< std::vector< ua::SubscriptionDiagnosticsDataType > > try_subscriptions_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to subscriptions sync without throwing.

void sampling_intervals_async(std::function< void(SamplingIntervalDiagnosticsArrayResult)> callback) noexcept
std::vector< ua::SamplingIntervalDiagnosticsDataType > sampling_intervals_sync()

Returns: The requested value. Synchronously sampling intervals. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< std::vector< ua::SamplingIntervalDiagnosticsDataType > > try_sampling_intervals_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to sampling intervals sync without throwing.

void set_enabled_flag_async(bool enabled, std::function< void(ua::VoidResult)> callback) noexcept
  • enabled (bool) - The enabled.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Writes Server.ServerDiagnostics.EnabledFlag. The server may reject with Bad_UserAccessDenied when the caller's identity lacks privilege - that status is surfaced verbatim (chained beneath source client.tier2.server_diagnostics.set_enabled_flag). On success the local TTL cache is refreshed with the written value.
void set_enabled_flag_sync(bool enabled)
  • enabled (bool) - The enabled. Synchronously set enabled flag. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.
ua::VoidResult try_set_enabled_flag_sync(bool enabled) noexcept
  • enabled (bool) - The enabled.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to set enabled flag sync without throwing.

void subscribe_sessions_async(SessionsArrayCallback onSessions, std::function< void(ua::client::MonitoredItemResult)> callback) noexcept

CL-BASEDIAG-004 - subscribe-over-poll for the SessionDiagnosticsArray.

ua::client::MonitoredItem subscribe_sessions_sync(SessionsArrayCallback onSessions)
  • onSessions (SessionsArrayCallback) - The onsessions.

Returns: The requested value. Synchronously subscribe sessions. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::client::MonitoredItem > try_subscribe_sessions_sync(SessionsArrayCallback onSessions) noexcept
  • onSessions (SessionsArrayCallback) - The onsessions.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to subscribe sessions sync without throwing.

void subscribe_subscriptions_async(SubscriptionsArrayCallback onSubscriptions, std::function< void(ua::client::MonitoredItemResult)> callback) noexcept
  • onSubscriptions (SubscriptionsArrayCallback) - The on subscriptions.
  • callback (std::function< void(ua::client::MonitoredItemResult)>) - Completion callback that receives the operation result. CL-BASEDIAG-004 - subscribe-over-poll for the SubscriptionDiagnosticsArray. Same contract as subscribe_sessions_async, decoding each notification into the SubscriptionDiagnosticsArray.
ua::client::MonitoredItem subscribe_subscriptions_sync(SubscriptionsArrayCallback onSubscriptions)
  • onSubscriptions (SubscriptionsArrayCallback) - The onsubscriptions.

Returns: The requested value. Synchronously subscribe subscriptions. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::client::MonitoredItem > try_subscribe_subscriptions_sync(SubscriptionsArrayCallback onSubscriptions) noexcept
  • onSubscriptions (SubscriptionsArrayCallback) - The onsubscriptions.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to subscribe subscriptions sync without throwing.

ua::client::ServerTable

class

Immutable, Session-scoped snapshot of Server.ServerArray (OPC 10000-5 section 6.3.1).

Static functions

ua::Result< std::shared_ptr< const ServerTable > > create(std::vector< std::string > uris, std::uint64_t generation)

Returns: The operation result, including status and diagnostic detail on failure. Creates a validated snapshot. Empty tables and arrays beyond the UInt32 index domain are rejected.

Functions

std::optional< std::string_view > lookup_uri(ServerIndex index) const noexcept
  • index (ServerIndex) - The index.

Returns: The requested value. Returns the URI at index, or null when the index is outside this snapshot.

std::optional< ServerIndex > lookup_index(std::string_view uri) const noexcept

Returns: The requested value. Returns the first index carrying uri, or null when absent.

ua::Result< std::string > resolve_server_uri(const ua::ExpandedNodeId &expanded) const noexcept
  • expanded (const ua::ExpandedNodeId &) - The expanded.

Returns: The operation result, including status and diagnostic detail on failure. Resolves an ExpandedNodeId's ServerIndex to its Server URI without altering the NodeId.

std::size_t size() const noexcept

Returns: The requested value. Number of entries in the snapshot. A valid table always has at least the local Server at index 0.

std::uint64_t generation() const noexcept

Returns: The requested value. Session generation assigned by ConnectionImpl (0 initially, incremented on Session re-bootstrap).

~ServerTable()=default

ua::client::ServiceSet

class

The wire-shaped service-set surface of a managed Connection (section 7.2A).

A lightweight move-only value handle over the same ConnectionImpl as its parent Connection (reached via Connection::service_requests(), parallel to tier-0's Session::view() / Session::attributes()). It owns no state of its own and is not directly constructible; every method forwards straight through to ConnectionImpl's already-built, gated, ErrorDetail-wrapping wire-op funnel (section 7.2 invoke_wire_op). Relative to a raw tier-0 Session the managed surface adds: paused/queued dispatch during reconnect (ConnectionConfig.queueOnReconnect), automatic NodeId namespace-index renumbering via the NamespaceTable, the default service timeout, and a single ErrorDetail wrap (section 7.10) - all applied ONCE inside the funnel, so this handle never double-wraps.

Each operation follows the async / sync / try_sync triple (section 7.0): *_async - never throws; the callback receives a Result<Response> on the executor. sync - blocks; returns the bare Response; throws UaException on a bad service Result. try_sync - blocks; returns Result<Response>; never throws.

The sync / try_sync variants block the calling thread on the async completion. They MUST NOT be called from the Connection's executor thread (that would deadlock the executor). Public methods may be called from any thread; the underlying ConnectionImpl posts to its private strand internally.

Functions

ServiceSet(ServiceSet &&) noexcept=default

Returns or updates the service set.

ServiceSet & operator=(ServiceSet &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~ServiceSet()=default
void read_async(ua::ReadRequest request, std::function< void(ua::Result< ua::ReadResponse >)> callback) noexcept
ua::ReadResponse read_sync(ua::ReadRequest request)

Returns: The requested value. Synchronously read.

ua::Result< ua::ReadResponse > try_read_sync(ua::ReadRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read sync without throwing.

void write_async(ua::WriteRequest request, std::function< void(ua::Result< ua::WriteResponse >)> callback) noexcept
ua::WriteResponse write_sync(ua::WriteRequest request)

Returns: The requested value. Synchronously write.

ua::Result< ua::WriteResponse > try_write_sync(ua::WriteRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to write sync without throwing.

void browse_async(ua::BrowseRequest request, std::function< void(ua::Result< ua::BrowseResponse >)> callback) noexcept
ua::BrowseResponse browse_sync(ua::BrowseRequest request)

Returns: The requested value. Synchronously browse.

ua::Result< ua::BrowseResponse > try_browse_sync(ua::BrowseRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to browse sync without throwing.

void browse_next_async(ua::BrowseNextRequest request, std::function< void(ua::Result< ua::BrowseNextResponse >)> callback) noexcept
ua::BrowseNextResponse browse_next_sync(ua::BrowseNextRequest request)

Returns: The requested value. Synchronously browse next.

ua::Result< ua::BrowseNextResponse > try_browse_next_sync(ua::BrowseNextRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to browse next sync without throwing.

void translate_browse_paths_async(ua::TranslateBrowsePathsToNodeIdsRequest request, std::function< void(ua::Result< ua::TranslateBrowsePathsToNodeIdsResponse >)> callback) noexcept
ua::TranslateBrowsePathsToNodeIdsResponse translate_browse_paths_sync(ua::TranslateBrowsePathsToNodeIdsRequest request)

Returns: The requested value. Synchronously translate browse paths.

ua::Result< ua::TranslateBrowsePathsToNodeIdsResponse > try_translate_browse_paths_sync(ua::TranslateBrowsePathsToNodeIdsRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to translate browse paths sync without throwing.

void call_async(ua::CallRequest request, std::function< void(ua::Result< ua::CallResponse >)> callback) noexcept
ua::CallResponse call_sync(ua::CallRequest request)

Returns: The requested value. Synchronously call.

ua::Result< ua::CallResponse > try_call_sync(ua::CallRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to call sync without throwing.

void register_nodes_async(ua::RegisterNodesRequest request, std::function< void(ua::Result< ua::RegisterNodesResponse >)> callback) noexcept
ua::RegisterNodesResponse register_nodes_sync(ua::RegisterNodesRequest request)

Returns: The requested value. Synchronously register nodes.

ua::Result< ua::RegisterNodesResponse > try_register_nodes_sync(ua::RegisterNodesRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to register nodes sync without throwing.

void unregister_nodes_async(ua::UnregisterNodesRequest request, std::function< void(ua::Result< ua::UnregisterNodesResponse >)> callback) noexcept
ua::UnregisterNodesResponse unregister_nodes_sync(ua::UnregisterNodesRequest request)

Returns: The requested value. Synchronously unregister nodes.

ua::Result< ua::UnregisterNodesResponse > try_unregister_nodes_sync(ua::UnregisterNodesRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to unregister nodes sync without throwing.

void history_read_async(ua::HistoryReadRequest request, std::function< void(ua::Result< ua::HistoryReadResponse >)> callback) noexcept
ua::HistoryReadResponse history_read_sync(ua::HistoryReadRequest request)

Returns: The requested value. Synchronously history read.

ua::Result< ua::HistoryReadResponse > try_history_read_sync(ua::HistoryReadRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to history read sync without throwing.

void history_update_async(ua::HistoryUpdateRequest request, std::function< void(ua::Result< ua::HistoryUpdateResponse >)> callback) noexcept
ua::HistoryUpdateResponse history_update_sync(ua::HistoryUpdateRequest request)

Returns: The requested value. Synchronously history update.

ua::Result< ua::HistoryUpdateResponse > try_history_update_sync(ua::HistoryUpdateRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to history update sync without throwing.

void query_first_async(ua::QueryFirstRequest request, std::function< void(ua::Result< ua::QueryFirstResponse >)> callback) noexcept
ua::QueryFirstResponse query_first_sync(ua::QueryFirstRequest request)

Returns: The requested value. Synchronously query first.

ua::Result< ua::QueryFirstResponse > try_query_first_sync(ua::QueryFirstRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to query first sync without throwing.

void query_next_async(ua::QueryNextRequest request, std::function< void(ua::Result< ua::QueryNextResponse >)> callback) noexcept
ua::QueryNextResponse query_next_sync(ua::QueryNextRequest request)

Returns: The requested value. Synchronously query next.

ua::Result< ua::QueryNextResponse > try_query_next_sync(ua::QueryNextRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to query next sync without throwing.

void add_nodes_async(ua::AddNodesRequest request, std::function< void(ua::Result< ua::AddNodesResponse >)> callback) noexcept
ua::AddNodesResponse add_nodes_sync(ua::AddNodesRequest request)

Returns: The requested value. Synchronously add nodes.

ua::Result< ua::AddNodesResponse > try_add_nodes_sync(ua::AddNodesRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to add nodes sync without throwing.

void add_references_async(ua::AddReferencesRequest request, std::function< void(ua::Result< ua::AddReferencesResponse >)> callback) noexcept
ua::AddReferencesResponse add_references_sync(ua::AddReferencesRequest request)

Returns: The requested value. Synchronously add references.

ua::Result< ua::AddReferencesResponse > try_add_references_sync(ua::AddReferencesRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to add references sync without throwing.

void delete_nodes_async(ua::DeleteNodesRequest request, std::function< void(ua::Result< ua::DeleteNodesResponse >)> callback) noexcept
ua::DeleteNodesResponse delete_nodes_sync(ua::DeleteNodesRequest request)

Returns: The requested value. Synchronously delete nodes.

ua::Result< ua::DeleteNodesResponse > try_delete_nodes_sync(ua::DeleteNodesRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to delete nodes sync without throwing.

void delete_references_async(ua::DeleteReferencesRequest request, std::function< void(ua::Result< ua::DeleteReferencesResponse >)> callback) noexcept
ua::DeleteReferencesResponse delete_references_sync(ua::DeleteReferencesRequest request)

Returns: The requested value. Synchronously delete references.

ua::Result< ua::DeleteReferencesResponse > try_delete_references_sync(ua::DeleteReferencesRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to delete references sync without throwing.

void cancel_async(ua::CancelRequest request, std::function< void(ua::Result< ua::CancelResponse >)> callback) noexcept
ua::CancelResponse cancel_sync(ua::CancelRequest request)

Returns: The requested value. Synchronously cancel.

ua::Result< ua::CancelResponse > try_cancel_sync(ua::CancelRequest request) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to cancel sync without throwing.

ua::client::SessionAttributeServices

class

Non-owning accessor for the OPC UA Attribute Service Set on a Session.

Exposes the Read, HistoryRead, Write, and HistoryUpdate services as a callback-canonical *_async method plus throwing sync and non-throwing try_sync convenience wrappers. The accessor holds only a weak reference to its owning session: it never keeps the session alive, and operations invoked after the session is destroyed complete with an ErrorDetail rather than dereferencing a dangling owner. Obtain instances from a Session; do not construct directly.

Member types

ua::Result< ua::ReadResponse > ReadResponseResult

Result of a Read service call: a ReadResponse or an ErrorDetail.

std::function< void(ReadResponseResult)> ReadCallback

Completion callback for read_async, receiving the ReadResponseResult.

ua::Result< ua::HistoryReadResponse > HistoryReadResponseResult

Result of a HistoryRead call: a HistoryReadResponse or an ErrorDetail.

std::function< void(HistoryReadResponseResult)> HistoryReadCallback

Completion callback for history_read_async, receiving the HistoryReadResponseResult.

ua::Result< ua::WriteResponse > WriteResponseResult

Result of a Write service call: a WriteResponse or an ErrorDetail.

std::function< void(WriteResponseResult)> WriteCallback

Completion callback for write_async, receiving the WriteResponseResult.

ua::Result< ua::HistoryUpdateResponse > HistoryUpdateResponseResult

Result of a HistoryUpdate call: a HistoryUpdateResponse or an ErrorDetail.

std::function< void(HistoryUpdateResponseResult)> HistoryUpdateCallback

Completion callback for history_update_async, receiving the HistoryUpdateResponseResult.

Functions

void read_async(ua::ReadRequest request, ReadCallback callback) noexcept

Reads node attributes via the OPC UA Read service.

  • request (ua::ReadRequest) - Nodes and attributes to read.
  • callback (ReadCallback) - Receives the outcome: on success the Result holds the ReadResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::ReadResponse read_sync(ua::ReadRequest request)

Reads node attributes via the OPC UA Read service, blocking until complete.

Returns: The service response.

ReadResponseResult try_read_sync(ua::ReadRequest request) noexcept

Reads node attributes via the OPC UA Read service, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void history_read_async(ua::HistoryReadRequest request, HistoryReadCallback callback) noexcept

Reads historical values or events via the OPC UA HistoryRead service.

  • request (ua::HistoryReadRequest) - History read details, nodes, and any continuation points.
  • callback (HistoryReadCallback) - Receives the outcome: on success the Result holds the HistoryReadResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::HistoryReadResponse history_read_sync(ua::HistoryReadRequest request)

Reads history via the OPC UA HistoryRead service, blocking until complete.

Returns: The service response.

HistoryReadResponseResult try_history_read_sync(ua::HistoryReadRequest request) noexcept

Reads history via the OPC UA HistoryRead service, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void write_async(ua::WriteRequest request, WriteCallback callback) noexcept

Writes node attribute values via the OPC UA Write service.

  • request (ua::WriteRequest) - Nodes, attributes, and values to write.
  • callback (WriteCallback) - Receives the outcome: on success the Result holds the WriteResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::WriteResponse write_sync(ua::WriteRequest request)

Writes node attribute values via the OPC UA Write service, blocking until complete.

Returns: The service response.

WriteResponseResult try_write_sync(ua::WriteRequest request) noexcept

Writes node attribute values via the OPC UA Write service, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void history_update_async(ua::HistoryUpdateRequest request, HistoryUpdateCallback callback) noexcept

Inserts, replaces, or deletes history via the OPC UA HistoryUpdate service.

  • request (ua::HistoryUpdateRequest) - History update details describing the modifications to apply.
  • callback (HistoryUpdateCallback) - Receives the outcome: on success the Result holds the HistoryUpdateResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::HistoryUpdateResponse history_update_sync(ua::HistoryUpdateRequest request)

Updates history via the OPC UA HistoryUpdate service, blocking until complete.

Returns: The service response.

HistoryUpdateResponseResult try_history_update_sync(ua::HistoryUpdateRequest request) noexcept

Updates history via the OPC UA HistoryUpdate service, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

ua::client::SessionDiscoveryServices

class

Non-owning accessor for OPC UA Discovery Service Set operations on a Session.

Groups the discovery services (GetEndpoints, FindServers, FindServersOnNetwork, RegisterServer, RegisterServer2) into one handle obtained from a Session. The accessor holds only a weak reference to the owning session; it does not extend the session's lifetime. If the session has been destroyed, async calls complete with an error ErrorDetail and sync calls report the same failure rather than dereferencing the expired session.

Member types

ua::Result< ua::GetEndpointsResponse > GetEndpointsResponseResult

Result delivered by the GetEndpoints variants: a GetEndpointsResponse or an error.

std::function< void(GetEndpointsResponseResult)> GetEndpointsCallback

Completion callback for get_endpoints_async.

ua::Result< ua::FindServersResponse > FindServersResponseResult

Result delivered by the FindServers variants: a FindServersResponse or an error.

std::function< void(FindServersResponseResult)> FindServersCallback

Completion callback for find_servers_async.

ua::Result< ua::FindServersOnNetworkResponse > FindServersOnNetworkResponseResult

Result delivered by the FindServersOnNetwork variants: a FindServersOnNetworkResponse or an error.

std::function< void(FindServersOnNetworkResponseResult)> FindServersOnNetworkCallback

Completion callback for find_servers_on_network_async.

ua::Result< ua::RegisterServerResponse > RegisterServerResponseResult

Result delivered by the RegisterServer variants: a RegisterServerResponse or an error.

std::function< void(RegisterServerResponseResult)> RegisterServerCallback

Completion callback for register_server_async.

ua::Result< ua::RegisterServer2Response > RegisterServer2ResponseResult

Result delivered by the RegisterServer2 variants: a RegisterServer2Response or an error.

std::function< void(RegisterServer2ResponseResult)> RegisterServer2Callback

Completion callback for register_server2_async.

Functions

void get_endpoints_async(ua::GetEndpointsRequest request, GetEndpointsCallback callback) noexcept

Requests the endpoint descriptions of a server (GetEndpoints service).

  • request (ua::GetEndpointsRequest) - GetEndpoints request to send; consumed by value.
  • callback (GetEndpointsCallback) - Receives the outcome: on success the Result holds the GetEndpointsResponse; on failure it carries an ErrorDetail (including the case where the owning session has expired). This overload never throws.
ua::GetEndpointsResponse get_endpoints_sync(ua::GetEndpointsRequest request)

Requests the endpoint descriptions of a server, blocking until complete.

Returns: The GetEndpoints response.

GetEndpointsResponseResult try_get_endpoints_sync(ua::GetEndpointsRequest request) noexcept

Requests the endpoint descriptions of a server, blocking until complete.

Returns: The GetEndpoints response, or an ErrorDetail on failure. Never throws.

void find_servers_async(ua::FindServersRequest request, FindServersCallback callback) noexcept

Requests the set of servers known to a discovery server (FindServers service).

  • request (ua::FindServersRequest) - FindServers request to send; consumed by value.
  • callback (FindServersCallback) - Receives the outcome: on success the Result holds the FindServersResponse; on failure it carries an ErrorDetail (including the case where the owning session has expired). This overload never throws.
ua::FindServersResponse find_servers_sync(ua::FindServersRequest request)

Requests the set of servers known to a discovery server, blocking until complete.

Returns: The FindServers response.

FindServersResponseResult try_find_servers_sync(ua::FindServersRequest request) noexcept

Requests the set of servers known to a discovery server, blocking until complete.

Returns: The FindServers response, or an ErrorDetail on failure. Never throws.

void find_servers_on_network_async(ua::FindServersOnNetworkRequest request, FindServersOnNetworkCallback callback) noexcept

Requests the servers registered with the network mDNS discovery server (FindServersOnNetwork service).

  • request (ua::FindServersOnNetworkRequest) - FindServersOnNetwork request to send; consumed by value.
  • callback (FindServersOnNetworkCallback) - Receives the outcome: on success the Result holds the FindServersOnNetworkResponse; on failure it carries an ErrorDetail (including the case where the owning session has expired). This overload never throws.
ua::FindServersOnNetworkResponse find_servers_on_network_sync(ua::FindServersOnNetworkRequest request)

Requests the servers registered with the network mDNS discovery server, blocking until complete.

Returns: The FindServersOnNetwork response.

FindServersOnNetworkResponseResult try_find_servers_on_network_sync(ua::FindServersOnNetworkRequest request) noexcept

Requests the servers registered with the network mDNS discovery server, blocking until complete.

Returns: The FindServersOnNetwork response, or an ErrorDetail on failure. Never throws.

void register_server_async(ua::RegisterServerRequest request, RegisterServerCallback callback) noexcept

Registers a server with a discovery server (RegisterServer service).

  • request (ua::RegisterServerRequest) - RegisterServer request to send; consumed by value.
  • callback (RegisterServerCallback) - Receives the outcome: on success the Result holds the RegisterServerResponse; on failure it carries an ErrorDetail (including the case where the owning session has expired). This overload never throws.
ua::RegisterServerResponse register_server_sync(ua::RegisterServerRequest request)

Registers a server with a discovery server, blocking until complete.

Returns: The RegisterServer response.

RegisterServerResponseResult try_register_server_sync(ua::RegisterServerRequest request) noexcept

Registers a server with a discovery server, blocking until complete.

Returns: The RegisterServer response, or an ErrorDetail on failure. Never throws.

void register_server2_async(ua::RegisterServer2Request request, RegisterServer2Callback callback) noexcept

Registers a server with a discovery server, carrying multicast discovery configuration (RegisterServer2 service).

  • request (ua::RegisterServer2Request) - RegisterServer2 request to send; consumed by value.
  • callback (RegisterServer2Callback) - Receives the outcome: on success the Result holds the RegisterServer2Response; on failure it carries an ErrorDetail (including the case where the owning session has expired). This overload never throws.
ua::RegisterServer2Response register_server2_sync(ua::RegisterServer2Request request)

Registers a server with a discovery server, carrying multicast discovery configuration, blocking until complete.

Returns: The RegisterServer2 response.

RegisterServer2ResponseResult try_register_server2_sync(ua::RegisterServer2Request request) noexcept

Registers a server with a discovery server, carrying multicast discovery configuration, blocking until complete.

Returns: The RegisterServer2 response, or an ErrorDetail on failure. Never throws.

ua::client::SessionMethodServices

class

Non-owning accessor for OPC UA Method Service Set operations on a Session.

Provides the Call service, which invokes one or more Methods on the server. Instances are vended by a Session and hold only a weak reference to the owning session's implementation; they do not extend its lifetime and become inert once the session is gone. Copyable as a lightweight handle.

Member types

ua::Result< ua::CallResponse > CallResponseResult

Result of a Call service invocation: a CallResponse, or an ErrorDetail on failure.

std::function< void(CallResponseResult)> CallCallback

Callback receiving the outcome of call_async.

Functions

void call_async(ua::CallRequest request, CallCallback callback) noexcept

Invokes one or more Methods on the server via the Call service.

  • request (ua::CallRequest) - The Call request listing the Methods to invoke. Consumed by value.
  • callback (CallCallback) - Receives the outcome: on success the Result holds the CallResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::CallResponse call_sync(ua::CallRequest request)

Invokes one or more Methods on the server, blocking until complete.

  • request (ua::CallRequest) - The Call request listing the Methods to invoke. Consumed by value.

Returns: The service response.

CallResponseResult try_call_sync(ua::CallRequest request) noexcept

Invokes one or more Methods on the server, blocking until complete.

  • request (ua::CallRequest) - The Call request listing the Methods to invoke. Consumed by value.

Returns: The service response, or an ErrorDetail on failure. Never throws.

ua::dynamic_types::SessionModelAccess

class

Client-side TypeModelAccess that reads and browses an information model over a Session.

Satisfies read_async and browse_async by issuing OPC UA Read, Browse, and BrowseNext service calls on a borrowed client ua::client::Session, adapting the batch-oriented TypeModelAccess contract onto the live service surface.

Two layers of multiplexing are handled internally and are invisible to callers: Operation-limit chunking: on first use the server's MaxNodesPerRead / MaxNodesPerBrowse limits are read and cached, then large batches are split across as many service calls as the limits require. Continuation-point handling: BrowseNext is looped until every continuation point is released, merging the partial responses into one complete BrowseResult per input.

The object is a borrowing view, not an owner: it holds the Session by reference and does not extend its lifetime. The cached operation limits are mutable state, so a single instance is not safe for concurrent use from multiple threads.

Inherits the TypeModelAccess lifetime contract - the borrowed Session and this object must both outlive every outstanding callback.

Functions

SessionModelAccess(ua::client::Session &session)

Constructs a model-access view over an existing client Session.

  • session (ua::client::Session &) - Session through which Read/Browse/BrowseNext service calls are issued. Borrowed by reference and not owned; it must outlive this object and any flow it starts. Session is move-only by design, so this view never copies or moves it.
void read_async(std::vector< ua::ReadValueId > nodesToRead, ReadCallback complete) override

Reads one or more attribute values over the Session.

  • nodesToRead (std::vector< ua::ReadValueId >) - Attributes to read; each entry names a NodeId and AttributeId.
  • complete (ReadCallback) - Receives the outcome on an unspecified worker thread - do not block it. On success the ua::Result holds one ua::DataValue per input; on failure it carries an ua::ErrorDetail. Never throws.
void browse_async(std::vector< ua::BrowseDescription > nodesToBrowse, BrowseCallback complete) override

Browses references from one or more nodes over the Session.

  • nodesToBrowse (std::vector< ua::BrowseDescription >) - Nodes to browse; each entry names a NodeId, browse direction, reference-type filter, and related options.
  • complete (BrowseCallback) - Receives the outcome on an unspecified worker thread - do not block it. On success the ua::Result holds one ua::BrowseResult per input; on failure it carries an ua::ErrorDetail. Never throws.

ua::client::SessionMonitoredItemServices

class

Non-owning accessor for the OPC UA MonitoredItem Service Set on a Session.

Exposes the CreateMonitoredItems, ModifyMonitoredItems, SetMonitoringMode, SetTriggering, and DeleteMonitoredItems services. Obtained from the owning Session, which retains ownership; this accessor holds only a weak reference to the session implementation. Operations invoked after the owning session has been destroyed complete with a bad Result rather than dereferencing a dangling pointer.

Each service is offered as a three-variant trio: a callback-canonical *_async form and the sync / try_sync blocking convenience wrappers for external consumers.

Member types

ua::Result< ua::CreateMonitoredItemsResponse > CreateMonitoredItemsResponseResult

Result delivered for a CreateMonitoredItems request.

std::function< void(CreateMonitoredItemsResponseResult)> CreateMonitoredItemsCallback

Callback receiving the outcome of a CreateMonitoredItems request.

ua::Result< ua::ModifyMonitoredItemsResponse > ModifyMonitoredItemsResponseResult

Result delivered for a ModifyMonitoredItems request.

std::function< void(ModifyMonitoredItemsResponseResult)> ModifyMonitoredItemsCallback

Callback receiving the outcome of a ModifyMonitoredItems request.

ua::Result< ua::SetMonitoringModeResponse > SetMonitoringModeResponseResult

Result delivered for a SetMonitoringMode request.

std::function< void(SetMonitoringModeResponseResult)> SetMonitoringModeCallback

Callback receiving the outcome of a SetMonitoringMode request.

ua::Result< ua::SetTriggeringResponse > SetTriggeringResponseResult

Result delivered for a SetTriggering request.

std::function< void(SetTriggeringResponseResult)> SetTriggeringCallback

Callback receiving the outcome of a SetTriggering request.

ua::Result< ua::DeleteMonitoredItemsResponse > DeleteMonitoredItemsResponseResult

Result delivered for a DeleteMonitoredItems request.

std::function< void(DeleteMonitoredItemsResponseResult)> DeleteMonitoredItemsCallback

Callback receiving the outcome of a DeleteMonitoredItems request.

Functions

void create_monitored_items_async(ua::CreateMonitoredItemsRequest request, CreateMonitoredItemsCallback callback) noexcept

Creates monitored items within an existing subscription.

  • request (ua::CreateMonitoredItemsRequest) - The CreateMonitoredItems request to send.
  • callback (CreateMonitoredItemsCallback) - Receives the outcome: on success the Result holds the CreateMonitoredItemsResponse (whose per-item results report each item's individual status); on failure it carries an ErrorDetail. This overload never throws.
ua::CreateMonitoredItemsResponse create_monitored_items_sync(ua::CreateMonitoredItemsRequest request)

Creates monitored items within an existing subscription, blocking until complete.

Returns: The CreateMonitoredItems response.

CreateMonitoredItemsResponseResult try_create_monitored_items_sync(ua::CreateMonitoredItemsRequest request) noexcept

Creates monitored items within an existing subscription, blocking until complete.

Returns: The CreateMonitoredItems response, or an ErrorDetail on failure. Never throws.

void modify_monitored_items_async(ua::ModifyMonitoredItemsRequest request, ModifyMonitoredItemsCallback callback) noexcept

Modifies the monitoring parameters of existing monitored items.

  • request (ua::ModifyMonitoredItemsRequest) - The ModifyMonitoredItems request to send.
  • callback (ModifyMonitoredItemsCallback) - Receives the outcome: on success the Result holds the ModifyMonitoredItemsResponse (whose per-item results report each item's individual status); on failure it carries an ErrorDetail. This overload never throws.
ua::ModifyMonitoredItemsResponse modify_monitored_items_sync(ua::ModifyMonitoredItemsRequest request)

Modifies the monitoring parameters of existing monitored items, blocking until complete.

Returns: The ModifyMonitoredItems response.

ModifyMonitoredItemsResponseResult try_modify_monitored_items_sync(ua::ModifyMonitoredItemsRequest request) noexcept

Modifies the monitoring parameters of existing monitored items, blocking until complete.

Returns: The ModifyMonitoredItems response, or an ErrorDetail on failure. Never throws.

void set_monitoring_mode_async(ua::SetMonitoringModeRequest request, SetMonitoringModeCallback callback) noexcept

Sets the monitoring mode (Disabled, Sampling, or Reporting) of monitored items.

  • request (ua::SetMonitoringModeRequest) - The SetMonitoringMode request to send.
  • callback (SetMonitoringModeCallback) - Receives the outcome: on success the Result holds the SetMonitoringModeResponse (whose per-item results report each item's individual status); on failure it carries an ErrorDetail. This overload never throws.
ua::SetMonitoringModeResponse set_monitoring_mode_sync(ua::SetMonitoringModeRequest request)

Sets the monitoring mode of monitored items, blocking until complete.

Returns: The SetMonitoringMode response.

SetMonitoringModeResponseResult try_set_monitoring_mode_sync(ua::SetMonitoringModeRequest request) noexcept

Sets the monitoring mode of monitored items, blocking until complete.

Returns: The SetMonitoringMode response, or an ErrorDetail on failure. Never throws.

void set_triggering_async(ua::SetTriggeringRequest request, SetTriggeringCallback callback) noexcept

Configures the triggering links between a triggering item and its triggered items.

  • request (ua::SetTriggeringRequest) - The SetTriggering request to send.
  • callback (SetTriggeringCallback) - Receives the outcome: on success the Result holds the SetTriggeringResponse (whose per-link results report each add/remove link's individual status); on failure it carries an ErrorDetail. This overload never throws.
ua::SetTriggeringResponse set_triggering_sync(ua::SetTriggeringRequest request)

Configures triggering links between monitored items, blocking until complete.

Returns: The SetTriggering response.

SetTriggeringResponseResult try_set_triggering_sync(ua::SetTriggeringRequest request) noexcept

Configures triggering links between monitored items, blocking until complete.

Returns: The SetTriggering response, or an ErrorDetail on failure. Never throws.

void delete_monitored_items_async(ua::DeleteMonitoredItemsRequest request, DeleteMonitoredItemsCallback callback) noexcept

Deletes monitored items from a subscription.

  • request (ua::DeleteMonitoredItemsRequest) - The DeleteMonitoredItems request to send.
  • callback (DeleteMonitoredItemsCallback) - Receives the outcome: on success the Result holds the DeleteMonitoredItemsResponse (whose per-item results report each item's individual status); on failure it carries an ErrorDetail. This overload never throws.
ua::DeleteMonitoredItemsResponse delete_monitored_items_sync(ua::DeleteMonitoredItemsRequest request)

Deletes monitored items from a subscription, blocking until complete.

Returns: The DeleteMonitoredItems response.

DeleteMonitoredItemsResponseResult try_delete_monitored_items_sync(ua::DeleteMonitoredItemsRequest request) noexcept

Deletes monitored items from a subscription, blocking until complete.

Returns: The DeleteMonitoredItems response, or an ErrorDetail on failure. Never throws.

ua::client::SessionNodeManagementServices

class

Non-owning accessor for OPC UA NodeManagement Service Set operations on a Session.

Provides the AddNodes, AddReferences, DeleteNodes, and DeleteReferences services, which mutate the server's address space. Instances are vended by a Session and hold only a weak reference to the owning session's implementation; they do not extend its lifetime and become inert once the session is gone. Copyable as a lightweight handle.

Member types

ua::Result< ua::AddNodesResponse > AddNodesResponseResult

Result of an AddNodes service invocation: an AddNodesResponse, or an ErrorDetail on failure.

std::function< void(AddNodesResponseResult)> AddNodesCallback

Callback receiving the outcome of add_nodes_async.

ua::Result< ua::AddReferencesResponse > AddReferencesResponseResult

Result of an AddReferences service invocation: an AddReferencesResponse, or an ErrorDetail on failure.

std::function< void(AddReferencesResponseResult)> AddReferencesCallback

Callback receiving the outcome of add_references_async.

ua::Result< ua::DeleteNodesResponse > DeleteNodesResponseResult

Result of a DeleteNodes service invocation: a DeleteNodesResponse, or an ErrorDetail on failure.

std::function< void(DeleteNodesResponseResult)> DeleteNodesCallback

Callback receiving the outcome of delete_nodes_async.

ua::Result< ua::DeleteReferencesResponse > DeleteReferencesResponseResult

Result of a DeleteReferences service invocation: a DeleteReferencesResponse, or an ErrorDetail on failure.

std::function< void(DeleteReferencesResponseResult)> DeleteReferencesCallback

Callback receiving the outcome of delete_references_async.

Functions

void add_nodes_async(ua::AddNodesRequest request, AddNodesCallback callback) noexcept

Adds one or more Nodes to the server's address space via the AddNodes service.

  • request (ua::AddNodesRequest) - The AddNodes request listing the Nodes to add. Consumed by value.
  • callback (AddNodesCallback) - Receives the outcome: on success the Result holds the AddNodesResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::AddNodesResponse add_nodes_sync(ua::AddNodesRequest request)

Adds one or more Nodes to the server's address space, blocking until complete.

  • request (ua::AddNodesRequest) - The AddNodes request listing the Nodes to add. Consumed by value.

Returns: The service response.

AddNodesResponseResult try_add_nodes_sync(ua::AddNodesRequest request) noexcept

Adds one or more Nodes to the server's address space, blocking until complete.

  • request (ua::AddNodesRequest) - The AddNodes request listing the Nodes to add. Consumed by value.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void add_references_async(ua::AddReferencesRequest request, AddReferencesCallback callback) noexcept

Adds one or more References to the server's address space via the AddReferences service.

  • request (ua::AddReferencesRequest) - The AddReferences request listing the References to add. Consumed by value.
  • callback (AddReferencesCallback) - Receives the outcome: on success the Result holds the AddReferencesResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::AddReferencesResponse add_references_sync(ua::AddReferencesRequest request)

Adds one or more References to the server's address space, blocking until complete.

Returns: The service response.

AddReferencesResponseResult try_add_references_sync(ua::AddReferencesRequest request) noexcept

Adds one or more References to the server's address space, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void delete_nodes_async(ua::DeleteNodesRequest request, DeleteNodesCallback callback) noexcept

Removes one or more Nodes from the server's address space via the DeleteNodes service.

  • request (ua::DeleteNodesRequest) - The DeleteNodes request listing the Nodes to remove. Consumed by value.
  • callback (DeleteNodesCallback) - Receives the outcome: on success the Result holds the DeleteNodesResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::DeleteNodesResponse delete_nodes_sync(ua::DeleteNodesRequest request)

Removes one or more Nodes from the server's address space, blocking until complete.

Returns: The service response.

DeleteNodesResponseResult try_delete_nodes_sync(ua::DeleteNodesRequest request) noexcept

Removes one or more Nodes from the server's address space, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void delete_references_async(ua::DeleteReferencesRequest request, DeleteReferencesCallback callback) noexcept

Removes one or more References from the server's address space via the DeleteReferences service.

  • request (ua::DeleteReferencesRequest) - The DeleteReferences request listing the References to remove. Consumed by value.
  • callback (DeleteReferencesCallback) - Receives the outcome: on success the Result holds the DeleteReferencesResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::DeleteReferencesResponse delete_references_sync(ua::DeleteReferencesRequest request)

Removes one or more References from the server's address space, blocking until complete.

Returns: The service response.

DeleteReferencesResponseResult try_delete_references_sync(ua::DeleteReferencesRequest request) noexcept

Removes one or more References from the server's address space, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

ua::client::SessionQueryServices

class

Non-owning accessor for the OPC UA Query Service Set on a Session.

Exposes the QueryFirst and QueryNext services, which query the server's address space for nodes matching a content filter and page large result sets through a continuation point. Obtained from a Session; it holds a weak reference to the owning session and does not extend the session's lifetime. Operations issued after the session has been destroyed fail with an ErrorDetail (async / try variants) or throw (sync variants) rather than dangling.

Member types

ua::Result< ua::QueryFirstResponse > QueryFirstResponseResult

Result of a QueryFirst operation: the QueryFirstResponse or an ErrorDetail.

std::function< void(QueryFirstResponseResult)> QueryFirstCallback

Completion callback for query_first_async, receiving the QueryFirst outcome.

ua::Result< ua::QueryNextResponse > QueryNextResponseResult

Result of a QueryNext operation: the QueryNextResponse or an ErrorDetail.

std::function< void(QueryNextResponseResult)> QueryNextCallback

Completion callback for query_next_async, receiving the QueryNext outcome.

Functions

void query_first_async(ua::QueryFirstRequest request, QueryFirstCallback callback) noexcept

Begins a query of the server address space and completes asynchronously.

  • request (ua::QueryFirstRequest) - The QueryFirst request: the node-types view, content filter and paging limits to query.
  • callback (QueryFirstCallback) - Receives the outcome: on success the Result holds the QueryFirstResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::QueryFirstResponse query_first_sync(ua::QueryFirstRequest request)

Begins a query of the server address space, blocking until complete.

Returns: The QueryFirst response.

QueryFirstResponseResult try_query_first_sync(ua::QueryFirstRequest request) noexcept

Begins a query of the server address space, blocking until complete.

Returns: The QueryFirstResponse, or an ErrorDetail on failure. Never throws.

void query_next_async(ua::QueryNextRequest request, QueryNextCallback callback) noexcept

Retrieves the next page of a query, or releases its continuation point, completing asynchronously.

  • request (ua::QueryNextRequest) - The QueryNext request, carrying the continuation point and whether to release it instead of fetching more results.
  • callback (QueryNextCallback) - Receives the outcome: on success the Result holds the QueryNextResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::QueryNextResponse query_next_sync(ua::QueryNextRequest request)

Retrieves the next page of a query, or releases its continuation point, blocking until complete.

Returns: The QueryNext response.

QueryNextResponseResult try_query_next_sync(ua::QueryNextRequest request) noexcept

Retrieves the next page of a query, or releases its continuation point, blocking until complete.

Returns: The QueryNextResponse, or an ErrorDetail on failure. Never throws.

ua::client::SessionSubscriptionServices

class

Non-owning accessor for OPC UA Subscription Service Set operations on a Session.

Provides the Subscription services - CreateSubscription, ModifySubscription, SetPublishingMode, Publish, Republish, TransferSubscriptions and DeleteSubscriptions - used to manage subscriptions and exchange Notification Messages with the server. Instances are vended by a Session and hold only a weak reference to the owning session's implementation; they do not extend its lifetime and become inert once the session is gone. Copyable as a lightweight handle.

Member types

ua::Result< ua::CreateSubscriptionResponse > CreateSubscriptionResponseResult

Result of a CreateSubscription invocation: a CreateSubscriptionResponse, or an ErrorDetail on failure.

std::function< void(CreateSubscriptionResponseResult)> CreateSubscriptionCallback

Callback receiving the outcome of create_subscription_async.

ua::Result< ua::ModifySubscriptionResponse > ModifySubscriptionResponseResult

Result of a ModifySubscription invocation: a ModifySubscriptionResponse, or an ErrorDetail on failure.

std::function< void(ModifySubscriptionResponseResult)> ModifySubscriptionCallback

Callback receiving the outcome of modify_subscription_async.

ua::Result< ua::SetPublishingModeResponse > SetPublishingModeResponseResult

Result of a SetPublishingMode invocation: a SetPublishingModeResponse, or an ErrorDetail on failure.

std::function< void(SetPublishingModeResponseResult)> SetPublishingModeCallback

Callback receiving the outcome of set_publishing_mode_async.

ua::Result< ua::PublishResponse > PublishResponseResult

Result of a Publish invocation: a PublishResponse, or an ErrorDetail on failure.

std::function< void(PublishResponseResult)> PublishCallback

Callback receiving the outcome of publish_async.

ua::Result< ua::RepublishResponse > RepublishResponseResult

Result of a Republish invocation: a RepublishResponse, or an ErrorDetail on failure.

std::function< void(RepublishResponseResult)> RepublishCallback

Callback receiving the outcome of republish_async.

ua::Result< ua::TransferSubscriptionsResponse > TransferSubscriptionsResponseResult

Result of a TransferSubscriptions invocation: a TransferSubscriptionsResponse, or an ErrorDetail on failure.

std::function< void(TransferSubscriptionsResponseResult)> TransferSubscriptionsCallback

Callback receiving the outcome of transfer_subscriptions_async.

ua::Result< ua::DeleteSubscriptionsResponse > DeleteSubscriptionsResponseResult

Result of a DeleteSubscriptions invocation: a DeleteSubscriptionsResponse, or an ErrorDetail on failure.

std::function< void(DeleteSubscriptionsResponseResult)> DeleteSubscriptionsCallback

Callback receiving the outcome of delete_subscriptions_async.

Functions

void create_subscription_async(ua::CreateSubscriptionRequest request, CreateSubscriptionCallback callback) noexcept

Creates a subscription on the server via the CreateSubscription service.

  • request (ua::CreateSubscriptionRequest) - The CreateSubscription request. Consumed by value.
  • callback (CreateSubscriptionCallback) - Receives the outcome: on success the Result holds the CreateSubscriptionResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::CreateSubscriptionResponse create_subscription_sync(ua::CreateSubscriptionRequest request)

Creates a subscription on the server, blocking until complete.

Returns: The service response.

CreateSubscriptionResponseResult try_create_subscription_sync(ua::CreateSubscriptionRequest request) noexcept

Creates a subscription on the server, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void modify_subscription_async(ua::ModifySubscriptionRequest request, ModifySubscriptionCallback callback) noexcept

Modifies an existing subscription's parameters via the ModifySubscription service.

  • request (ua::ModifySubscriptionRequest) - The ModifySubscription request. Consumed by value.
  • callback (ModifySubscriptionCallback) - Receives the outcome: on success the Result holds the ModifySubscriptionResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::ModifySubscriptionResponse modify_subscription_sync(ua::ModifySubscriptionRequest request)

Modifies an existing subscription's parameters, blocking until complete.

Returns: The service response.

ModifySubscriptionResponseResult try_modify_subscription_sync(ua::ModifySubscriptionRequest request) noexcept

Modifies an existing subscription's parameters, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void set_publishing_mode_async(ua::SetPublishingModeRequest request, SetPublishingModeCallback callback) noexcept

Enables or disables sending of NotificationMessages for one or more subscriptions.

  • request (ua::SetPublishingModeRequest) - The SetPublishingMode request listing the target subscriptions. Consumed by value.
  • callback (SetPublishingModeCallback) - Receives the outcome: on success the Result holds the SetPublishingModeResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::SetPublishingModeResponse set_publishing_mode_sync(ua::SetPublishingModeRequest request)

Enables or disables NotificationMessage sending for subscriptions, blocking until complete.

Returns: The service response.

SetPublishingModeResponseResult try_set_publishing_mode_sync(ua::SetPublishingModeRequest request) noexcept

Enables or disables NotificationMessage sending for subscriptions, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void publish_async(ua::PublishRequest request, PublishCallback callback) noexcept

Acknowledges prior NotificationMessages and requests the next one via the Publish service.

  • request (ua::PublishRequest) - The Publish request carrying acknowledgements for previously received messages. Consumed by value.
  • callback (PublishCallback) - Receives the outcome: on success the Result holds the PublishResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::PublishResponse publish_sync(ua::PublishRequest request)

Acknowledges prior NotificationMessages and requests the next one, blocking until complete.

  • request (ua::PublishRequest) - The Publish request carrying acknowledgements. Consumed by value.

Returns: The service response.

PublishResponseResult try_publish_sync(ua::PublishRequest request) noexcept

Acknowledges prior NotificationMessages and requests the next one, blocking until complete.

  • request (ua::PublishRequest) - The Publish request carrying acknowledgements. Consumed by value.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void republish_async(ua::RepublishRequest request, RepublishCallback callback) noexcept

Requests a specific NotificationMessage be re-sent from a subscription's retransmission queue.

  • request (ua::RepublishRequest) - The Republish request naming the subscription and sequence number. Consumed by value.
  • callback (RepublishCallback) - Receives the outcome: on success the Result holds the RepublishResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::RepublishResponse republish_sync(ua::RepublishRequest request)

Requests a specific NotificationMessage be re-sent, blocking until complete.

  • request (ua::RepublishRequest) - The Republish request naming the subscription and sequence number. Consumed by value.

Returns: The service response.

RepublishResponseResult try_republish_sync(ua::RepublishRequest request) noexcept

Requests a specific NotificationMessage be re-sent, blocking until complete.

  • request (ua::RepublishRequest) - The Republish request naming the subscription and sequence number. Consumed by value.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void transfer_subscriptions_async(ua::TransferSubscriptionsRequest request, TransferSubscriptionsCallback callback) noexcept

Transfers one or more subscriptions to this session via the TransferSubscriptions service.

  • request (ua::TransferSubscriptionsRequest) - The TransferSubscriptions request listing the subscriptions to transfer. Consumed by value.
  • callback (TransferSubscriptionsCallback) - Receives the outcome: on success the Result holds the TransferSubscriptionsResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::TransferSubscriptionsResponse transfer_subscriptions_sync(ua::TransferSubscriptionsRequest request)

Transfers one or more subscriptions to this session, blocking until complete.

Returns: The service response.

TransferSubscriptionsResponseResult try_transfer_subscriptions_sync(ua::TransferSubscriptionsRequest request) noexcept

Transfers one or more subscriptions to this session, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

void delete_subscriptions_async(ua::DeleteSubscriptionsRequest request, DeleteSubscriptionsCallback callback) noexcept

Deletes one or more subscriptions and their MonitoredItems via the DeleteSubscriptions service.

  • request (ua::DeleteSubscriptionsRequest) - The DeleteSubscriptions request listing the subscriptions to delete. Consumed by value.
  • callback (DeleteSubscriptionsCallback) - Receives the outcome: on success the Result holds the DeleteSubscriptionsResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::DeleteSubscriptionsResponse delete_subscriptions_sync(ua::DeleteSubscriptionsRequest request)

Deletes one or more subscriptions and their MonitoredItems, blocking until complete.

Returns: The service response.

DeleteSubscriptionsResponseResult try_delete_subscriptions_sync(ua::DeleteSubscriptionsRequest request) noexcept

Deletes one or more subscriptions and their MonitoredItems, blocking until complete.

Returns: The service response, or an ErrorDetail on failure. Never throws.

ua::client::SessionViewServices

class

Non-owning accessor for OPC UA View Service Set operations on a Session.

Groups the View Service Set requests - Browse, BrowseNext, TranslateBrowsePathsToNodeIds, RegisterNodes and UnregisterNodes - exposed by an owning Session. The accessor holds only a weak reference to the session implementation and does not extend its lifetime; calling any operation after the owning session has been destroyed fails with an ErrorDetail (or throws, for the *_sync variants) rather than dangling. Obtain an instance from the session; it is not independently constructible.

Member types

ua::Result< ua::BrowseResponse > BrowseResponseResult

Result of a Browse operation: a BrowseResponse on success, an ErrorDetail on failure.

std::function< void(BrowseResponseResult)> BrowseCallback

Callback invoked with the outcome of browse_async.

ua::Result< ua::BrowseNextResponse > BrowseNextResponseResult

Result of a BrowseNext operation: a BrowseNextResponse on success, an ErrorDetail on failure.

std::function< void(BrowseNextResponseResult)> BrowseNextCallback

Callback invoked with the outcome of browse_next_async.

ua::Result< ua::TranslateBrowsePathsToNodeIdsResponse > TranslateResponseResult

Result of a TranslateBrowsePathsToNodeIds operation: a TranslateBrowsePathsToNodeIdsResponse on success, an ErrorDetail on failure.

std::function< void(TranslateResponseResult)> TranslateCallback

Callback invoked with the outcome of translate_browse_paths_async.

ua::Result< ua::RegisterNodesResponse > RegisterNodesResponseResult

Result of a RegisterNodes operation: a RegisterNodesResponse on success, an ErrorDetail on failure.

std::function< void(RegisterNodesResponseResult)> RegisterNodesCallback

Callback invoked with the outcome of register_nodes_async.

ua::Result< ua::UnregisterNodesResponse > UnregisterNodesResponseResult

Result of an UnregisterNodes operation: an UnregisterNodesResponse on success, an ErrorDetail on failure.

std::function< void(UnregisterNodesResponseResult)> UnregisterNodesCallback

Callback invoked with the outcome of unregister_nodes_async.

Functions

void browse_async(ua::BrowseRequest request, BrowseCallback callback) noexcept

Browses references of one or more nodes.

  • request (ua::BrowseRequest) - The Browse request describing the nodes and the references to follow.
  • callback (BrowseCallback) - Receives the outcome: on success the Result holds a BrowseResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::BrowseResponse browse_sync(ua::BrowseRequest request)

Browses references of one or more nodes, blocking until the response arrives.

  • request (ua::BrowseRequest) - The Browse request describing the nodes and the references to follow.

Returns: The Browse response.

BrowseResponseResult try_browse_sync(ua::BrowseRequest request) noexcept

Browses references of one or more nodes, blocking until the response arrives.

  • request (ua::BrowseRequest) - The Browse request describing the nodes and the references to follow.

Returns: The Browse response, or an ErrorDetail on failure. Never throws.

void browse_next_async(ua::BrowseNextRequest request, BrowseNextCallback callback) noexcept

Continues a Browse that returned a continuation point.

  • request (ua::BrowseNextRequest) - The BrowseNext request carrying the continuation point(s) to resume from.
  • callback (BrowseNextCallback) - Receives the outcome: on success the Result holds a BrowseNextResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::BrowseNextResponse browse_next_sync(ua::BrowseNextRequest request)

Continues a Browse that returned a continuation point, blocking until the response arrives.

  • request (ua::BrowseNextRequest) - The BrowseNext request carrying the continuation point(s) to resume from.

Returns: The BrowseNext response.

BrowseNextResponseResult try_browse_next_sync(ua::BrowseNextRequest request) noexcept

Continues a Browse that returned a continuation point, blocking until the response arrives.

  • request (ua::BrowseNextRequest) - The BrowseNext request carrying the continuation point(s) to resume from.

Returns: The BrowseNext response, or an ErrorDetail on failure. Never throws.

void translate_browse_paths_async(ua::TranslateBrowsePathsToNodeIdsRequest request, TranslateCallback callback) noexcept

Translates relative browse paths into the target node ids.

  • request (ua::TranslateBrowsePathsToNodeIdsRequest) - The request listing the browse paths to translate.
  • callback (TranslateCallback) - Receives the outcome: on success the Result holds a TranslateBrowsePathsToNodeIdsResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::TranslateBrowsePathsToNodeIdsResponse translate_browse_paths_sync(ua::TranslateBrowsePathsToNodeIdsRequest request)

Translates relative browse paths into the target node ids, blocking until complete.

Returns: The TranslateBrowsePathsToNodeIds response.

TranslateResponseResult try_translate_browse_paths_sync(ua::TranslateBrowsePathsToNodeIdsRequest request) noexcept

Translates relative browse paths into the target node ids, blocking until complete.

Returns: The TranslateBrowsePathsToNodeIds response, or an ErrorDetail on failure. Never throws.

void register_nodes_async(ua::RegisterNodesRequest request, RegisterNodesCallback callback) noexcept

Registers nodes for optimised repeated access.

  • request (ua::RegisterNodesRequest) - The request listing the nodes to register.
  • callback (RegisterNodesCallback) - Receives the outcome: on success the Result holds a RegisterNodesResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::RegisterNodesResponse register_nodes_sync(ua::RegisterNodesRequest request)

Registers nodes for optimised repeated access, blocking until complete.

Returns: The RegisterNodes response holding the registered node ids.

RegisterNodesResponseResult try_register_nodes_sync(ua::RegisterNodesRequest request) noexcept

Registers nodes for optimised repeated access, blocking until complete.

Returns: The RegisterNodes response holding the registered node ids, or an ErrorDetail on failure. Never throws.

void unregister_nodes_async(ua::UnregisterNodesRequest request, UnregisterNodesCallback callback) noexcept

Releases nodes previously registered with register_nodes_async.

  • request (ua::UnregisterNodesRequest) - The request listing the registered node ids to release.
  • callback (UnregisterNodesCallback) - Receives the outcome: on success the Result holds an UnregisterNodesResponse; on failure it carries an ErrorDetail. This overload never throws.
ua::UnregisterNodesResponse unregister_nodes_sync(ua::UnregisterNodesRequest request)

Releases nodes previously registered with register_nodes_sync, blocking until complete.

Returns: The UnregisterNodes response.

UnregisterNodesResponseResult try_unregister_nodes_sync(ua::UnregisterNodesRequest request) noexcept

Releases nodes previously registered with register_nodes_sync, blocking until complete.

Returns: The UnregisterNodes response, or an ErrorDetail on failure. Never throws.

ua::client::StateVariable

struct

A decoded StateVariableType snapshot (client design section 8.18.1.b, CL-SM-001).

name mirrors the CurrentState LocalizedText Value; id is the Id Property's NodeId (state identity, CL-SM-003); statusCode carries the CurrentState DataValue quality verbatim (CL-SM-002 - Bad_StateNotActive surfaces here while the outer Result stays Good).

Public attributes

ua::LocalizedText name

CL-SM-001 - CurrentState LocalizedText; empty when its quality is Bad.

std::optional< ua::NodeId > id

CL-SM-003 - state identity (Mandatory Id Property NodeId)

std::optional< std::uint32_t > number

CL-SM-005 - FiniteStateVariableType (not resolved v1)

ua::StatusCode statusCode

CL-SM-002 - the CurrentState quality StatusCode (surfaced verbatim)

std::optional< ua::DateTime > sourceTimestamp

the CurrentState DataValue source timestamp

ua::client::TransitionVariable

struct

A decoded TransitionVariableType snapshot (client design section 8.18.1.b, CL-SM-004).

Returned by StateMachineHandle::last_transition_async.

Public attributes

ua::LocalizedText name

the LastTransition LocalizedText value

std::optional< ua::NodeId > id

the Id Property NodeId (transition identity)

std::optional< std::uint32_t > number

Optional Number Property (not resolved v1)

std::optional< ua::DateTime > transitionTime

CL-SM-004 - the TransitionTime Property value.

std::optional< ua::DateTime > effectiveTransitionTime

Optional (not resolved v1)

ua::client::AvailableState

struct

One state in a FiniteStateMachineType's cached topology (client design section 8.18.1.b, CL-SM-005).

stateId is the state object's NodeId. On a subtype this may be the distinct replicated Object; StateMachineHandle::current_state_is_async resolves it to the first-definition NodeId (CL-SM-006).

Public attributes

ua::NodeId stateId

CL-SM-005 - the state object NodeId (the "Id" the current state compares against)

ua::LocalizedText name

the state display name; empty when enrichment could not read it

std::optional< std::uint32_t > number

the StateNumber Property; empty when unresolved

ua::client::AvailableTransition

struct

One transition in a FiniteStateMachineType's cached topology (client design section 8.18.1.b, CL-SM-005).

Public attributes

ua::NodeId transitionId

CL-SM-005 - the transition object NodeId.

ua::LocalizedText name

the transition display name; empty when enrichment could not read it

std::optional< std::uint32_t > number

the TransitionNumber Property; empty when unresolved

std::optional< ua::NodeId > fromStateId

the FromState reference target; empty when unresolved

std::optional< ua::NodeId > toStateId

the ToState reference target; empty when unresolved

ua::client::TopologyProvenance

struct

Why a FiniteStateMachineHandle's cached topology looks the way it does.

AvailableStates and AvailableTransitions are Optional (OPC 10000-16 4.4.2), so an empty topology is a legitimate Good answer and an empty vector alone cannot say whether the server published the array at all. These flags separate the two, and separate a metadata field the server does not have from one the SDK could not resolve.

Public attributes

bool statesPublished

The server published an AvailableStates Variable and the SDK read it.

bool transitionsPublished

The server published an AvailableTransitions Variable and the SDK read it.

bool enrichmentComplete

Every best-effort enrichment step succeeded.

ua::client::TransitionEventNotification

struct

A decoded TransitionEventType notification delivered to a TransitionEventCallback (client design section 8.18.1.b, CL-SM-010/011).

sourceNode is the emitting state-machine Object (the CL-SM-011 demux key); transitionId / fromStateId / toStateId are the Id Properties of the event's Transition / FromState / ToState fields; transitionName is the Transition LocalizedText; time is the BaseEventType Time.

Public attributes

ua::NodeId sourceNode

CL-SM-011 - the emitting (sub-)state-machine identity (demux key)

ua::NodeId transitionId

the Transition.Id Property NodeId

ua::LocalizedText transitionName

the Transition field LocalizedText value

ua::NodeId fromStateId

the FromState.Id Property NodeId

ua::NodeId toStateId

the ToState.Id Property NodeId

ua::DateTime time

the BaseEventType Time field

ua::client::StateMachineHandle

class

A copyable value handle to a StateMachineType instance (client design section 8.18.1.b).

Built async by StateMachineAccessor::state_machine_async after the address-space pre-flight; copies share the cached resolution. The handle binds to its originating Connection's wire seam by a weak_ptr (never a weak_ptr<ConnectionImpl>, section 8.2A.13): every op locks it and completes Bad_ConnectionClosed if the Connection is gone. Not strand-serialized: each op posts through the tier-1 wire seam (which serializes on the Connection strand internally) and delivers its completion on the Connection executor.

Functions

StateMachineHandle()=default

Constructs an invalid sentinel handle (every op fast-fails).

StateMachineHandle(const StateMachineHandle &)=default

Returns or updates the state machine handle.

StateMachineHandle & operator=(const StateMachineHandle &)=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

StateMachineHandle(StateMachineHandle &&) noexcept=default

Returns or updates the state machine handle.

StateMachineHandle & operator=(StateMachineHandle &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~StateMachineHandle()=default
void current_state_async(std::function< void(StateVariableResult)> callback) noexcept

CL-SM-001 - Reads <machine>.CurrentState (a StateVariableType) Value + its Id Property in one.

  • callback (std::function< void(StateVariableResult)>) - Completion callback that receives the operation result. batched Read. StateVariable::name is the CurrentState LocalizedText; StateVariable::id is the Id Property NodeId. CL-SM-002: when the CurrentState DataValue.status_code is Bad (e.g. Bad_StateNotActive) the value is still decoded and surfaced in StateVariable::statusCode and the outer Result is Good.
StateVariable current_state_sync()

Returns: The requested value. Synchronously current state. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< StateVariable > try_current_state_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to current state sync without throwing.

void last_transition_async(std::function< void(TransitionVariableResult)> callback) noexcept

CL-SM-004 - Reads <machine>.LastTransition (a TransitionVariableType) + its Id /.

  • callback (std::function< void(TransitionVariableResult)>) - Completion callback that receives the operation result. TransitionTime Properties. If LastTransition is absent (Optional on StateMachineType) delivers Bad_NotFound with source client.tier2.state_machine.last_transition_not_present.
TransitionVariable last_transition_sync()

Returns: The requested value. Synchronously last transition. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< TransitionVariable > try_last_transition_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to last transition sync without throwing.

void current_state_is_async(ua::NodeId expectedStateId, std::function< void(ua::Result< bool >)> callback) noexcept

CL-SM-003 / CL-SM-006 - Reads CurrentState.Id and compares it to expectedStateId by state-object.

  • expectedStateId (ua::NodeId) - The expected state id.
  • callback (std::function< void(ua::Result< bool >)>) - Completion callback that receives the operation result. identity (LocalizedText matching is not used - locale-fragile). Raw NodeId equality is the fast path. Otherwise both State Object NodeIds are resolved through their owning finite-state-machine ObjectType hierarchy to the Object where the State was first defined, so a caller may supply either the subtype's required replica or the supertype-origin NodeId.
bool current_state_is_sync(ua::NodeId expectedStateId)
  • expectedStateId (ua::NodeId) - The expectedstateid.

Returns: The requested value. Synchronously current state is. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< bool > try_current_state_is_sync(ua::NodeId expectedStateId) noexcept
  • expectedStateId (ua::NodeId) - The expectedstateid.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to current state is sync without throwing.

ua::NodeId machine_id() const noexcept

Returns: The state-machine Object NodeId this handle targets (empty NodeId when the handle is a sentinel).

ua::client::FiniteStateMachineHandle

class

A copyable value handle to a FiniteStateMachineType instance (client design section 8.18.1.b).

Adds the cached state/transition topology resolved at construction (CL-SM-005). See StateMachineHandle for the shared lifetime / seam-locking contract.

Functions

FiniteStateMachineHandle()=default
std::vector< AvailableState > available_states() const noexcept

Returns: The requested value. CL-SM-005 - the cached AvailableStates topology (resolved at construction; empty on a sentinel).

std::vector< AvailableTransition > available_transitions() const noexcept

Returns: The requested value. CL-SM-005 - the cached AvailableTransitions topology (resolved at construction; empty on a sentinel).

TopologyProvenance topology_provenance() const noexcept

Returns: Which topology arrays the server published, and whether enrichment completed. Read this before concluding anything from an empty or sparse topology: an empty vector alone cannot separate "the server publishes none" from "the SDK did not find what the server published". See TopologyProvenance. A sentinel handle reports everything unpublished with enrichment complete.

void refresh_topology_async(std::function< void(ua::VoidResult)> callback) noexcept
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. CL-SM-005 - re-resolves the AvailableStates / AvailableTransitions topology on demand (e.g. after an on_model_change for this machine). Atomically replaces the cached snapshot shared by every copy.
void refresh_topology_sync()

Synchronously refresh topology.

ua::VoidResult try_refresh_topology_sync() noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to refresh topology sync without throwing.

ua::client::ProgramStateMachineHandle

class

A copyable value handle to a Part-10 ProgramStateMachineType instance (client design section 8.18.1.b).

Adds the method pre-flight (Executable Attribute) + the local state-method matrix guard around the wire Call. See StateMachineHandle for the shared lifetime / seam-locking contract.

Functions

ProgramStateMachineHandle()=default
void can_invoke_async(ProgramMethod method, std::function< void(ua::Result< bool >)> callback) noexcept

CL-SM-007 - Reads the resolved method node's Executable Attribute and delivers the decoded boolean.

bool can_invoke_sync(ProgramMethod method)
  • method (ProgramMethod) - The method.

Returns: The requested value. Synchronously can invoke. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< bool > try_can_invoke_sync(ProgramMethod method) noexcept
  • method (ProgramMethod) - The method.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to can invoke sync without throwing.

void invoke_async(ProgramMethod method, std::vector< ua::Variant > args, std::function< void(ua::Result< ua::CallMethodResult >)> callback) noexcept

CL-SM-007/008/009 - invokes method with args.

ua::CallMethodResult invoke_sync(ProgramMethod method, std::vector< ua::Variant > args)

Returns: The requested value. Synchronously invoke. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::CallMethodResult > try_invoke_sync(ProgramMethod method, std::vector< ua::Variant > args) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to invoke sync without throwing.

ProgramStateMachineHandle skip_local_state_check() const noexcept

CL-SM-009 override -.

Returns: a copy of this handle whose invoke_async bypasses the local state-method matrix check (use case: a custom subtype whose transitions do not match the standard Part-10 matrix). The Executable pre-flight and the wire Call are unchanged.

ua::client::StateMachineAccessor

class

The per-Connection tier-2 factory for the StateMachine typed handles (client design section 8.18.1.b).

A lightweight, copyable value handle over the same tier-1 wire seam as its parent Connection, reached via Connection::state_machine_accessor(). Each factory performs the address-space pre-flight then yields a fully-resolved typed handle.

Cycle-safe (section 9.8.3). The accessor and every handle hold only weak_ptr seam roles (detail::WireOps + detail::SupportOps), never a weak_ptr<ConnectionImpl> (section 8.2A.13). Locks are taken per op and bailed if gone.

Functions

StateMachineAccessor(const StateMachineAccessor &)=default

Returns or updates the state machine accessor.

StateMachineAccessor & operator=(const StateMachineAccessor &)=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

StateMachineAccessor(StateMachineAccessor &&) noexcept=default

Returns or updates the state machine accessor.

StateMachineAccessor & operator=(StateMachineAccessor &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~StateMachineAccessor()=default
void state_machine_async(ua::NodeId machineId, std::function< void(StateMachineHandleResult)> callback) noexcept
  • machineId (ua::NodeId) - The machine id.
  • callback (std::function< void(StateMachineHandleResult)>) - Completion callback that receives the operation result. CL-SM-001/002 - builds a base StateMachineHandle for machineId (resolves CurrentState + LastTransition + their Properties).
StateMachineHandle state_machine_sync(ua::NodeId machineId)

Returns: The requested value. Synchronously state machine. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< StateMachineHandle > try_state_machine_sync(ua::NodeId machineId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to state machine sync without throwing.

void finite_state_machine_async(ua::NodeId machineId, std::function< void(FiniteStateMachineHandleResult)> callback) noexcept
FiniteStateMachineHandle finite_state_machine_sync(ua::NodeId machineId)

Returns: The requested value. Synchronously finite state machine. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< FiniteStateMachineHandle > try_finite_state_machine_sync(ua::NodeId machineId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to finite state machine sync without throwing.

void program_state_machine_async(ua::NodeId machineId, std::function< void(ProgramStateMachineHandleResult)> callback) noexcept
ProgramStateMachineHandle program_state_machine_sync(ua::NodeId machineId)

Returns: The requested value. Synchronously program state machine. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ProgramStateMachineHandle > try_program_state_machine_sync(ua::NodeId machineId) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to program state machine sync without throwing.

void subscribe_transitions_async(ua::NodeId machineId, TransitionEventCallback onTransition, std::function< void(ua::client::MonitoredItemResult)> callback) noexcept

CL-SM-010/011 - subscribes to TransitionEventType events on machineId.

ua::client::MonitoredItem subscribe_transitions_sync(ua::NodeId machineId, TransitionEventCallback onTransition)
  • machineId (ua::NodeId) - The machineid.
  • onTransition (TransitionEventCallback) - The ontransition.

Returns: The requested value. Synchronously subscribe transitions. Blocks the calling thread until the operation completes, so it must not be called from the executor thread that has to run the completion.

ua::Result< ua::client::MonitoredItem > try_subscribe_transitions_sync(ua::NodeId machineId, TransitionEventCallback onTransition) noexcept
  • machineId (ua::NodeId) - The machineid.
  • onTransition (TransitionEventCallback) - The ontransition.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to subscribe transitions sync without throwing.

ua::client::SubscriptionFallbackPolicy

struct

Governs whether a Connection transparently replaces a Subscription the server could NOT create with a timer-driven bulk-Read polling driver that feeds the user's MonitoredItem callbacks (client design section 7.7 / section 8.4, CL-SUB-019).

The swap is transparent: the user's ua::client::Subscription / ua::client::MonitoredItem handles stay valid and unaware.

The default (Mode::Disabled) preserves the pre-fallback behaviour exactly: a failed CreateSubscription surfaces its bad status to the caller and no polling driver starts.

Member types

Mode (enum)

When the polled-Read fallback engages on a failed CreateSubscription.

  • Disabled - Never engage a fallback - a failed CreateSubscription surfaces its bad status verbatim (the default, == today's behaviour).
  • OptIn - Engage ONLY when the server reports the Subscription service is unsupported (Bad_ServiceUnsupported); any other failure surfaces verbatim.
  • Auto - Engage on ANY CreateSubscription failure.

Public attributes

Mode mode

The active engagement mode. Defaults to Mode::Disabled.

ua::client::Subscriptions

class

The Subscription-lifecycle accessor of a managed Connection (section 7.4).

A lightweight move-only value handle over the same ConnectionImpl as its parent Connection (reached via Connection::subscriptions(), parallel to service_requests()). Subscriptions are tier-1 core lifecycle: the SubscriptionsPipeline owns them and they survive reconnect via TransferSubscriptions (default) or recreate. This handle creates a Subscription on the server and enumerates the live (reconnect-surviving) set.

The create_sync / try_create_sync variants block the calling thread on the async completion; they MUST NOT be called from the Connection's executor thread.

Functions

Subscriptions(Subscriptions &&) noexcept=default

Returns or updates the subscriptions.

Subscriptions & operator=(Subscriptions &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~Subscriptions()=default
void create_async(SubscriptionConfig config, std::function< void(ua::Result< Subscription >)> callback) noexcept

Creates a Subscription on the server and registers it with the reconnect-surviving pipeline (section 7.4).

Subscription create_sync(SubscriptionConfig config)

Creates a Subscription, blocking until complete.

Returns: The requested value.

ua::Result< Subscription > try_create_sync(SubscriptionConfig config) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Creates a Subscription, blocking until complete. Never throws.

std::vector< Subscription > list() const

Enumerates the live (reconnect-surviving) Subscription handles.

Returns: A Subscription handle for every currently-registered Subscription (empty when none).

ua::client::TranslatedNodeId

struct

The flattened outcome of a single relative-path translation - tier-2 sugar over the wire ua::BrowsePathResult (TypedAccess::translate_browse_path, section 7.2A / CL-VIEW-014/015/019).

The tier-2 convenience flattens results[0].targets[0] of a TranslateBrowsePathsToNodeIds response: an EMPTY target set on a service-Good response surfaces as a bad Result<TranslatedNodeId>{Bad_NoMatch} (CL-VIEW-014); a PARTIAL or cross-server resolution surfaces as a GOOD Result whose is_fully_resolved is false (the maintainer's OPEN-VIEW-4 policy: partial is DATA, not an error - the caller inspects remainingPathIndex). The SDK never auto-connects to resolve a residual on another server (CL-VIEW-019); a cross-server target is surfaced verbatim as its ExpandedNodeId.

Functions

bool is_fully_resolved() const noexcept

Returns: True when the requested condition is satisfied. True when the whole relative path resolved to targetId (remainingPathIndex == kFullyResolved).

bool is_local() const noexcept

Returns: True when the requested condition is satisfied. True when targetId is a LOCAL node (serverIndex == 0 and an empty namespaceUri), so local_node_id is meaningful.

const ua::NodeId & local_node_id() const noexcept

Returns: A reference to this object. The resolved target as a plain ua::NodeId. Meaningful only when is_local is true; for a cross-server target the returned NodeId is the server-relative node without its ExpandedNodeId server/namespace context (read targetId directly for a cross-server target).

Public attributes

ua::ExpandedNodeId targetId

The resolved target.

std::uint32_t remainingPathIndex

The index of the FIRST relative-path element that was NOT resolved, or kFullyResolved when the whole path resolved (CL-VIEW-015).

Static attributes

constexpr std::uint32_t kFullyResolved

The sentinel remainingPathIndex value meaning "the whole relative path resolved to @ref targetId" (the wire UInt32.max).

ua::client::TypeDeferPolicy

struct

The decode-and-defer budget knobs (client design section 9.2 / section 9.8 override 2, GATED-LAZY).

These bound the resolve fan-out and the advisory bookkeeping so a malformed or adversarial response carrying many unknown encodings cannot drive unbounded resolve / re-decode work or grow the advisory dedup structure without limit (DoS guard, section 9.6.18.4).

Public attributes

std::size_t maxDistinctUnresolvedTypesPerMessage

Ceiling on the number of distinct unresolved encoding types the codec will attempt to resolve for one message.

std::size_t maxReDecodePasses

The bounded re-decode-after-resolution budget: at most this many placeholder re-decode passes over one message (section 9.8 override 2 fixes this at 1).

std::size_t advisoryDedupCap

LRU ceiling on the advisory "fallback used / unresolved type" dedup set (section 9.6.18.4).

ua::client::TypeResolutionPolicy

struct

Per-Connection type-resolution tunables (client design section 8.6; the struct section 9.8.3 completed with the three previously-missing fields resolutionTimeout / tier2WaitForResolution / eagerScanBudget).

Public attributes

TypeResolutionMode mode

The resolution mode (Lazy / Eager / EagerThenLazy).

std::vector< ua::NodeId > eagerTypes

Explicit eager interest: these DataType (or encoding) NodeIds are resolved at connect time.

bool allowDictionaryFallback

Deprecated .bsd-style DataTypeDictionary fallback, consulted only when DataTypeDefinition is absent (CL-ADDRSP-011).

std::chrono::milliseconds resolutionTimeout

Per-resolve_async deadline (section 9.6.18.3/.6).

bool tier2WaitForResolution

Whether a tier-2 typed read BLOCKS until resolution completes (default) or returns immediately with an UnresolvedExtensionObject placeholder (section 9.6.18.3).

std::size_t eagerScanBudget

Cap on the connect-time eager scan (section 9.6.18.7).

TypeDeferPolicy defer

The decode-and-defer budget (section 9.2 / section 9.8 override 2).

ua::client::VariableMetadata

struct

Optional Variable metadata whose absence has normative meaning.

accessLevelEx == std::nullopt means the Server did not provide the optional AccessLevelEx Attribute; callers must not infer that access is atomic.

Functions

bool nonatomic_read() const noexcept

Returns: True when the requested condition is satisfied. Returns or updates the nonatomic read.

bool nonatomic_write() const noexcept

Returns: True when the requested condition is satisfied. Returns or updates the nonatomic write.

Public attributes

std::optional< ua::AccessLevelExType > accessLevelEx

The access level ex.

ua::client::MethodInputMetadata

struct

Introspected Method input metadata (OPC 10000-3 section section 5.7.1-5.7.3).

Public attributes

std::vector< ua::Argument > inputArguments

The input arguments.

std::size_t trailingOptionalCount

The trailing optional count.

ua::client::TypedAccess

class

The typed-value convenience surface of a managed Connection (section 7.2A) - pure sugar over the wire-shaped service set.

A lightweight move-only value handle over the same ConnectionImpl as its parent Connection (reached via Connection::typed(), parallel to Connection::service_requests()). It owns no state of its own and is not directly constructible; every method builds a wire request from typed inputs and forwards it through ConnectionImpl's already-built, gated, ErrorDetail-wrapping wire-op funnel (section 7.2 invoke_wire_op), then decodes the response into typed outputs. The single tier-1 gate + NamespaceTable remap + ErrorDetail wrap (section 7.10) are applied ONCE inside the funnel, so this handle never double-wraps.

Each operation follows the async / sync / try_sync triple (section 7.0): *_async - never throws; the callback receives the typed Result on the executor. sync - blocks; returns the bare value; throws UaException on a bad service Result. try_sync - blocks; returns the typed Result; never throws.

The sync / try_sync variants block the calling thread on the async completion. They MUST NOT be called from the Connection's executor thread. Public methods may be called from any thread; the underlying ConnectionImpl posts to its private strand internally.

Functions

TypedAccess(TypedAccess &&) noexcept=default

Returns or updates the typed access.

TypedAccess & operator=(TypedAccess &&) noexcept=default

Returns: A reference to this object. Supports value-handle comparison or assignment.

~TypedAccess()=default
void read_attribute_async(ua::NodeId node, ua::AttributeId attribute, std::function< void(ua::Result< ua::DataValue >)> callback) noexcept

Reads a single arbitrary attribute of a Node, decoded to a ua::DataValue.

  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • callback (std::function< void(ua::Result< ua::DataValue >)>) - Completion callback that receives the operation result. Composes a single-node Read of attribute and returns results[0]. The outer Result is bad only on a service-level failure; the value quality lives on DataValue::status() (two-layer).
void read_attribute_async(ua::NodeId node, ua::AttributeId attribute, ua::String indexRange, std::function< void(ua::Result< ua::DataValue >)> callback) noexcept

Reads a single arbitrary attribute using indexRange.

  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • indexRange (ua::String) - The index range.
  • callback (std::function< void(ua::Result< ua::DataValue >)>) - Completion callback that receives the operation result. The raw-string convenience is validated through NumericRangeBuilder before any wire Read. Callers constructing ranges programmatically should use that builder and pass its successful wire value here.
ua::DataValue read_attribute_sync(ua::NodeId node, ua::AttributeId attribute)
  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.

Returns: The requested value. Synchronously read attribute.

ua::DataValue read_attribute_sync(ua::NodeId node, ua::AttributeId attribute, ua::String indexRange)
  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • indexRange (ua::String) - The index range.

Returns: The requested value. Synchronously read attribute.

ua::Result< ua::DataValue > try_read_attribute_sync(ua::NodeId node, ua::AttributeId attribute) noexcept
  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read attribute sync without throwing.

ua::Result< ua::DataValue > try_read_attribute_sync(ua::NodeId node, ua::AttributeId attribute, ua::String indexRange) noexcept
  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • indexRange (ua::String) - The index range.

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read attribute sync without throwing.

void read_value_with_encoding_async(ua::NodeId node, ua::QualifiedName dataEncoding, std::function< void(ua::Result< ua::DataValue >)> callback) noexcept

Reads a Variable Value using an explicitly requested OPC UA DataEncoding.

  • node (ua::NodeId) - Target node identifier.
  • dataEncoding (ua::QualifiedName) - The data encoding.
  • callback (std::function< void(ua::Result< ua::DataValue >)>) - Completion callback that receives the operation result. The returned ExtensionObject body encoding is checked against dataEncoding. A server that returns a different encoding is rejected with BadDecodingError. This dedicated Value-only API prevents accidentally setting DataEncoding on a non-Value attribute, which Part 4 defines as an error.
ua::DataValue read_value_with_encoding_sync(ua::NodeId node, ua::QualifiedName dataEncoding)

Returns: The requested value. Synchronously read value with encoding.

ua::Result< ua::DataValue > try_read_value_with_encoding_sync(ua::NodeId node, ua::QualifiedName dataEncoding) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read value with encoding sync without throwing.

void read_variable_metadata_async(ua::NodeId node, std::function< void(ua::Result< VariableMetadata >)> callback) noexcept

Reads the optional metadata governing a Variable's access semantics.

VariableMetadata read_variable_metadata_sync(ua::NodeId node)

Returns: The requested value. Synchronously read variable metadata.

ua::Result< VariableMetadata > try_read_variable_metadata_sync(ua::NodeId node) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read variable metadata sync without throwing.

void write_attribute_async(ua::NodeId node, ua::AttributeId attribute, ua::DataValue value, std::function< void(ua::VoidResult)> callback) noexcept

Writes a single arbitrary attribute of a Node from a ua::DataValue.

  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • value (ua::DataValue) - Value to write or evaluate.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. Composes a single Write and flattens the per-item write status into the returned VoidResult.
void write_attribute_async(ua::NodeId node, ua::AttributeId attribute, ua::String indexRange, ua::DataValue value, std::function< void(ua::VoidResult)> callback) noexcept

Writes a single arbitrary attribute using indexRange.

  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • indexRange (ua::String) - The index range.
  • value (ua::DataValue) - Value to write or evaluate.
  • callback (std::function< void(ua::VoidResult)>) - Completion callback that receives the operation result. The range is syntax-validated locally. For a Value write, an enabled address-space cache that has observed AccessLevelEx.WriteFullArrayOnly rejects the operation before Write I/O; without cached knowledge the request falls through to the server.
void write_attribute_sync(ua::NodeId node, ua::AttributeId attribute, ua::DataValue value)
  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • value (ua::DataValue) - Value to write or evaluate. Synchronously write attribute.
void write_attribute_sync(ua::NodeId node, ua::AttributeId attribute, ua::String indexRange, ua::DataValue value)
  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • indexRange (ua::String) - The index range.
  • value (ua::DataValue) - Value to write or evaluate. Synchronously write attribute.
ua::VoidResult try_write_attribute_sync(ua::NodeId node, ua::AttributeId attribute, ua::DataValue value) noexcept
  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • value (ua::DataValue) - Value to write or evaluate.

Returns: The requested value. Attempts to write attribute sync without throwing.

ua::VoidResult try_write_attribute_sync(ua::NodeId node, ua::AttributeId attribute, ua::String indexRange, ua::DataValue value) noexcept
  • node (ua::NodeId) - Target node identifier.
  • attribute (ua::AttributeId) - Attribute to access.
  • indexRange (ua::String) - The index range.
  • value (ua::DataValue) - Value to write or evaluate.

Returns: The requested value. Attempts to write attribute sync without throwing.

void read_values_async(std::vector< ua::NodeId > nodes, std::function< void(ua::Result< std::vector< ua::DataValue > >)> callback) noexcept

Reads the Value attribute of many Nodes in a single Read round-trip.

std::vector< ua::DataValue > read_values_sync(std::vector< ua::NodeId > nodes)

Returns: The requested value. Synchronously read values.

ua::Result< std::vector< ua::DataValue > > try_read_values_sync(std::vector< ua::NodeId > nodes) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read values sync without throwing.

void read_values_atomicity_checked_async(std::vector< ua::NodeId > nodes, std::function< void(ua::Result< std::vector< ua::DataValue > >)> callback) noexcept

Reads Values in one batch after inspecting every participant's AccessLevelEx.

  • nodes (std::vector< ua::NodeId >) - The nodes.
  • callback (std::function< void(ua::Result< std::vector< ua::DataValue > >)>) - Completion callback that receives the operation result. When any present AccessLevelEx sets NonatomicRead, the values are still returned unchanged and ConnectionObserver::on_advisory_diagnostic is emitted to state that internal batch consistency is not guaranteed. Missing AccessLevelEx remains unknown and does not fabricate an atomicity guarantee.
std::vector< ua::DataValue > read_values_atomicity_checked_sync(std::vector< ua::NodeId > nodes)

Returns: The requested value. Synchronously read values atomicity checked.

ua::Result< std::vector< ua::DataValue > > try_read_values_atomicity_checked_sync(std::vector< ua::NodeId > nodes) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to read values atomicity checked sync without throwing.

void dictionary_entries_for_async(ua::NodeId source, std::function< void(ua::Result< std::vector< BrowseCursor::Entry > >)> callback) noexcept

Follows forward HasDictionaryEntry references and returns only conformant Object targets.

std::vector< BrowseCursor::Entry > dictionary_entries_for_sync(ua::NodeId source)

Returns: The requested value. Synchronously dictionary entries for.

ua::Result< std::vector< BrowseCursor::Entry > > try_dictionary_entries_for_sync(ua::NodeId source) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to dictionary entries for sync without throwing.

void write_values_async(std::vector< std::pair< ua::NodeId, ua::Variant > > pairs, std::function< void(ua::Result< std::vector< ua::VoidResult > >)> callback) noexcept

Writes the Value attribute of many (Node, value) pairs in a single Write round-trip.

std::vector< ua::VoidResult > write_values_sync(std::vector< std::pair< ua::NodeId, ua::Variant > > pairs)

Returns: The requested value. Synchronously write values.

ua::Result< std::vector< ua::VoidResult > > try_write_values_sync(std::vector< std::pair< ua::NodeId, ua::Variant > > pairs) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to write values sync without throwing.

void read_values_async(std::vector< ua::NodeId > nodes, std::function< void(ua::Result< std::vector< ua::Result< T > > >)> callback) noexcept

Reads the Value attribute of many Nodes and decodes each to a native T via ua::Variant::to.

std::vector< ua::Result< T > > read_values_sync(std::vector< ua::NodeId > nodes)

Returns: The operation result, including status and diagnostic detail on failure. Synchronously read values.

ua::Result< std::vector< ua::Result< T > > > try_read_values_sync(std::vector< ua::NodeId > nodes) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Blocking try_* bridge over read_values_async<T>. Header-inline (self-contained promise/future) because it is a template; never throws. MUST NOT run on the executor thread.

void translate_browse_path_async(ua::NodeId start, ua::RelativePath relativePath, std::function< void(ua::Result< TranslatedNodeId >)> callback) noexcept

Resolves a relative path under a start node in a single TranslateBrowsePathsToNodeIds round-trip and flattens the outcome to a TranslatedNodeId (section 7.2A / CL-VIEW-014/015/019).

  • start (ua::NodeId) - The start.
  • relativePath (ua::RelativePath) - The relative path.
  • callback (std::function< void(ua::Result< TranslatedNodeId >)>) - Completion callback that receives the operation result. Convenience over the wire-shaped translate_browse_paths for the common one-path case: builds a single BrowsePath{start, relativePath} request and flattens results[0].targets[0]. A service-Good response with an EMPTY target set surfaces as a bad Result{Bad_NoMatch} (CL-VIEW-014); a bad per-path status propagates as the bad Result. A PARTIAL or cross-server resolution surfaces as a GOOD Result whose TranslatedNodeId::is_fully_resolved is false (OPEN-VIEW-4: partial is data, not an error) - the SDK never auto-connects to resolve a residual on another server (CL-VIEW-019).
TranslatedNodeId translate_browse_path_sync(ua::NodeId start, ua::RelativePath relativePath)

Returns: The requested value. Synchronously translate browse path.

ua::Result< TranslatedNodeId > try_translate_browse_path_sync(ua::NodeId start, ua::RelativePath relativePath) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to translate browse path sync without throwing.

void translate_browse_path_async(ua::ExpandedNodeId start, ua::RelativePath relativePath, std::function< void(ua::Result< TranslatedNodeId >)> callback) noexcept

Resolves a local ua::ExpandedNodeId start against the current Session NamespaceTable, then.

TranslatedNodeId translate_browse_path_sync(ua::ExpandedNodeId start, ua::RelativePath relativePath)

Returns: The requested value. Synchronously translate browse path.

ua::Result< TranslatedNodeId > try_translate_browse_path_sync(ua::ExpandedNodeId start, ua::RelativePath relativePath) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to translate browse path sync without throwing.

void call_method_async(ua::NodeId object, ua::NodeId method, std::vector< ua::Variant > arguments, std::function< void(ua::Result< ua::CallResult >)> callback) noexcept

Invokes a Method on an Object, passing arguments as the positional input arguments.

ua::CallResult call_method_sync(ua::NodeId object, ua::NodeId method, std::vector< ua::Variant > arguments)

Returns: The requested value. Synchronously call method.

ua::Result< ua::CallResult > try_call_method_sync(ua::NodeId object, ua::NodeId method, std::vector< ua::Variant > arguments) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to call method sync without throwing.

void inspect_method_inputs_async(ua::NodeId method, std::function< void(ua::Result< MethodInputMetadata >)> callback) noexcept

Reads a Method's InputArguments Property and correlates.

MethodInputMetadata inspect_method_inputs_sync(ua::NodeId method)

Returns: The requested value. Synchronously inspect method inputs.

ua::Result< MethodInputMetadata > try_inspect_method_inputs_sync(ua::NodeId method) noexcept

Returns: The operation result, including status and diagnostic detail on failure. Attempts to inspect method inputs sync without throwing.

BrowseCursor browse(ua::NodeId start, BrowseOptions options={})

Opens a forward-iterator BrowseCursor over the references from start (section 7.5).

  • start (ua::NodeId) - The node to browse the references of.
  • options (BrowseOptions) - The walk parameters (direction / reference type / node-class mask / result mask).

Returns: A move-only BrowseCursor.

ua::client::AnonymousIdentity

struct

Anonymous user identity, requiring no credentials.

Selects the server's anonymous user-token policy. The session is activated without authenticating a user; the server applies whatever permissions it grants to anonymous access.

ua::client::UsernamePasswordIdentity

struct

Username and password credentials for a session.

Selects the server's UserName user-token policy. The SDK encrypts the password as required by the negotiated security policy before it is sent.

Public attributes

std::string mUsername

Account name presented to the server.

std::string mPassword

Secret for mUsername; encrypted on the wire by the SDK.

bool mAllowUnencryptedPassword

Hard opt-in for the unencrypted-password configuration (CL-IDENT-009, Part 4 section 7.41.4 / Table 193).

ua::client::X509Identity

struct

X.509 certificate credentials with the matching signing key pair.

Selects the server's Certificate user-token policy. The SDK signs the activation challenge with mKeyPair to prove possession of the private key bound to mCertificate.

Public attributes

std::shared_ptr< const ua::X509Certificate > mCertificate

User certificate presented to the server.

std::shared_ptr< const ua::AsymmetricKeyPair > mKeyPair

Key pair whose private key matches mCertificate, used to sign the activation proof.

ua::client::IssuedTokenIdentity

struct

Issued-token credentials carrying an opaque, application-managed security token.

Selects the server's IssuedToken user-token policy. The token bytes are treated as opaque and encrypted on the wire under the same rules as a UserName token.

Public attributes

ua::ByteString mTokenData

Opaque issued-token bytes; encrypted on the wire by the SDK.

Enumerations

ua::client::MonitoredItemKind

enum

Whether a monitored item observes data changes or events (immutable, set at construction - T13).

ua::client::DataIntegrityKind

enum

The class of server-side invariant violation surfaced by AlarmObserver::on_data_integrity_warning (section 7.8; produced by the section 8.8 AlarmConditionTracker - CL-AC-023/025).

  • LimitInequality - CL-AC-023 - a limit ordering invariant (HighLimit <= HighHighLimit, ...) is violated.
  • NonExclusiveCrossGroup - CL-AC-025 - overlapping non-exclusive limit groups are simultaneously active.

ua::client::SystemStatusOrigin

enum

Identifies whether a SystemStatusChangeEvent describes the OPC UA Server itself or an underlying system.

ua::client::EndpointSelection

enum

How the endpoint named by ConnectionConfig::endpointUrl is selected (client design section 7.7).

  • ExactUrl - Use ConnectionConfig::endpointUrl and the explicit security fields verbatim - no discovery round-trip.
  • AutoBest - Pick the highest securityLevel endpoint whose SecurityPolicy is supported, using a session-less GetEndpoints call before the final SecureChannel is opened.
  • FirstMatching - Pick the first returned endpoint matching ConnectionConfig::securityMode and ConnectionConfig::securityPolicyId.

ua::client::ConnectMode

enum

Determines how the TCP connection for the SecureChannel is established.

  • Normal - Client initiates the TCP connection (default, normal behaviour).
  • Reverse - Client waits for a Server to reverse-connect.

ua::client::TrustDecision

enum

The application's answer to "the server's certificate is not trusted - now what?".

  • Reject - Abandon the connect.
  • AcceptForThisSession - Connect, trusting this certificate for THIS Connection only.
  • AcceptAndPersist - Write the certificate to the store's trusted-certificates directory, re-validate, and connect.

ua::client::FileOpenMode

enum

Part 20 section 4.2.2 Open-mode bit flags.

ua::client::FileSystemEntryKind

enum

The file system entry kind.

ua::client::PullCertManagementState

enum

The lifecycle state of the manager's cycle FSM (section 8.1A.4). Surfaced in ua::client::PullCertManagementInfo::state; the transition table is the authority.

  • Idle - Cycle armed via the update-frequency timer; no I/O in flight.
  • BootstrappingGds - Opening the GDS Connection.
  • RefreshingTrustList - GetTrustList + conditional Open(Read) + drain + commit-scratch.
  • RequestingCert - Per-group StartSigningRequest / StartNewKeyPairRequest in flight.
  • Polling - FinishRequest poll loop with bounded burst.
  • Persisting - Atomic write of the cert + key + trust list.
  • Revalidating - Broadcasting revalidation to every open Connection.
  • Failed - Last cycle errored; retry armed on the update-frequency timer.
  • Closed - Terminal.

ua::client::PullCertLifecycleEvent

enum

Lifecycle event fired to the observer (section 8.1A.1).

Was this page helpful?