uatools 1.0.0
 
Loading...
Searching...
No Matches
icomm_adapter_generic_v2.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <algorithm>
4#include <atomic>
5#include <chrono>
6#include <cstdint>
7#include <functional>
8#include <memory>
9#include <optional>
10#include <string>
11#include <utility>
12#include <variant>
13#include <vector>
14
15// =============================================================================
16// Protocol-agnostic communication adapter interface (contract version 2)
17//
18// Scope: the value-oriented CONTROL plane (read / write / call / browse /
19// subscribe) over arbitrary protocols (OPC UA, RTMS, Modbus, REST, MQTT, GenICam
20// (control/status), ...).
21// Bulk media streaming (e.g. GenICam image acquisition) is intentionally OUT
22// OF SCOPE and belongs to a peer interface composed alongside this one, not
23// derived from it.
24//
25// Design rules:
26// 1. A field lives in a core type only if EVERY conceivable adapter can
27// honor it meaningfully. Protocol-specific knobs go in `properties`
28// or optional fields.
29// 2. The interface grows by ADDITION. After the first adapter ships, new
30// methods MUST carry default implementations (return Unsupported), never
31// pure-virtual, so existing implementers keep compiling. Pre-first-adapter
32// breaking changes are free and acceptable (hence the version bumps).
33// 3. Sync-only for v1; async is a pure ADDITION later (Read + ReadAsync
34// coexist trivially because RequestOptions::cancellation already exists).
35// Document this expectation explicitly so it survives turnover.
36//
37// THREAD-SAFETY CONTRACT (binding):
38// * const query methods (Is*, Get*) are callable from any thread at any
39// time.
40// * Read / Write / Call / Browse / Discover may be called concurrently
41// with each other and with active subscriptions; implementations
42// serialize as needed.
43// * Configure / Connect / Disconnect must NOT run concurrently with each
44// other or with data operations; the caller owns lifecycle ordering.
45// * Handlers (subscription + connection-state) run on the adapter's
46// internal thread(s); see each handler's contract below.
47// =============================================================================
48
50
51inline constexpr std::uint32_t kContractVersion = 2;
52
53using Address = std::string;
54using RequestId = std::string;
55
56// -----------------------------------------------------------------------------
57// PropertyMap: contiguous storage (avoids per-node heap allocs / fragmentation
58// for the typical <10-entry case) WHILE preserving map semantics: unique keys
59// and a lookup API. This keeps the performance win without silently allowing
60// duplicate keys the way a raw vector<pair> would.
61// -----------------------------------------------------------------------------
63public:
64 using value_type = std::pair<std::string, std::string>;
65 using storage = std::vector<value_type>;
66 using iterator = storage::iterator;
67 using const_iterator = storage::const_iterator;
68
69 PropertyMap() = default;
70 PropertyMap(std::initializer_list<value_type> init) {
71 for (const auto& kv : init) Set(kv.first, kv.second);
72 }
73
74 // Insert or overwrite. Guarantees key uniqueness.
75 void Set(std::string key, std::string val) {
76 auto it = Find(key);
77 if (it != m_items.end()) it->second = std::move(val);
78 else m_items.emplace_back(std::move(key), std::move(val));
79 }
80
81 const std::string* Get(std::string_view key) const {
82 auto it = Find(key);
83 return it == m_items.end() ? nullptr : &it->second;
84 }
85
86 std::string GetOr(std::string_view key, std::string_view fallback) const {
87 auto* v = Get(key);
88 return v ? *v : std::string(fallback);
89 }
90
91 bool Contains(std::string_view key) const {
92 return Find(key) != m_items.end();
93 }
94
95 bool Erase(std::string_view key) {
96 auto it = Find(key);
97 if (it == m_items.end()) return false;
98 m_items.erase(it);
99 return true;
100 }
101
102 bool Empty() const { return m_items.empty(); }
103 std::size_t Size() const { return m_items.size(); }
104 void Reserve(std::size_t n) { m_items.reserve(n); }
105
106 // Range-for support — lowercase to match the std::begin/std::end
107 // contract that range-for desugars to.
108 iterator begin() { return m_items.begin(); }
109 iterator end() { return m_items.end(); }
110 const_iterator begin() const { return m_items.begin(); }
111 const_iterator end() const { return m_items.end(); }
112
113private:
114 const_iterator Find(std::string_view key) const {
115 return std::find_if(m_items.begin(), m_items.end(),
116 [&](const value_type& kv) { return kv.first == key; });
117 }
118 iterator Find(std::string_view key) {
119 return std::find_if(m_items.begin(), m_items.end(),
120 [&](const value_type& kv) { return kv.first == key; });
121 }
122 storage m_items;
123};
124
125// -----------------------------------------------------------------------------
126// RAII handle: ties registration lifetime to scope, eliminating the
127// handler-outlives-target teardown trap. Move-only; Reset() detaches early.
128//
129// Used for ONE-OFF observers that don't have a natural identity (the
130// connection-state handler is the canonical case). NOT used for
131// subscriptions — those are identified by node Address; see Subscribe().
132// -----------------------------------------------------------------------------
133class [[nodiscard]] RegistrationToken {
134public:
135 using UnregisterCallback = std::function<void()>;
136
137 RegistrationToken() = default;
139 : m_on_destruct(std::move(on_destruct)) {}
140 ~RegistrationToken() { if (m_on_destruct) m_on_destruct(); }
141
145 RegistrationToken& operator=(RegistrationToken&&) noexcept = default;
146
147 void Reset() { m_on_destruct = nullptr; }
148
149private:
150 UnregisterCallback m_on_destruct;
151};
152
153// -----------------------------------------------------------------------------
154// Cooperative cancellation — the seam off which async + abort hangs. Sync
155// adapters that cannot interrupt a blocking call MAY ignore it but must say
156// so. Carrying this in RequestOptions from v1 means a later ReadAsync()
157// addition does not require changing the sync API.
158// -----------------------------------------------------------------------------
160public:
161 CancellationToken() = default;
162 explicit CancellationToken(std::shared_ptr<std::atomic_bool> flag)
163 : m_flag(std::move(flag)) {}
164 bool Cancelled() const {
165 return m_flag && m_flag->load(std::memory_order_acquire);
166 }
167private:
168 std::shared_ptr<std::atomic_bool> m_flag;
169};
170
172public:
173 CancellationSource() : m_flag(std::make_shared<std::atomic_bool>(false)) {}
174 CancellationToken Token() const { return CancellationToken(m_flag); }
175 void Cancel() { m_flag->store(true, std::memory_order_release); }
176 bool Cancelled() const { return m_flag->load(std::memory_order_acquire); }
177private:
178 std::shared_ptr<std::atomic_bool> m_flag;
179};
180
197
198// -----------------------------------------------------------------------------
199// Value: universal payload.
200// * monostate = empty / no-value (write-only nodes, failed reads, defaults).
201// * vector<uint8_t> = raw byte blob / register block.
202// * vector<bool> = boolean ARRAY (distinct from a blob). Kept despite the
203// proxy-reference quirk so a Boolean[] from e.g. OPC UA has an honest type
204// rather than being conflated with a byte blob. Treat with the usual
205// vector<bool> care (no element addresses); convert at the adapter edge.
206//
207// The order of alternatives is part of the ABI when interfacing with the
208// implementation layer (variantConverter.hpp uses std::variant::index()
209// numerically). APPEND-ONLY — never reorder existing entries.
210// -----------------------------------------------------------------------------
211using Value = std::variant<
212 std::monostate,
213 bool,
214 std::int32_t,
215 std::uint32_t,
216 std::int64_t,
217 std::uint64_t,
218 float,
219 double,
220 std::string,
221 std::vector<std::uint8_t>,
222 std::vector<bool>,
223 std::vector<std::int32_t>,
224 std::vector<std::uint32_t>,
225 std::vector<std::int64_t>,
226 std::vector<std::uint64_t>,
227 std::vector<float>,
228 std::vector<double>,
229 std::vector<std::string>,
231
232struct Result {
233 // Transport/batch-level status. Per-item structs carry their own status,
234 // independent of this, so a batch can succeed overall with some items failed.
236 std::string message;
237 explicit operator bool() const { return status == Status::Ok; }
238};
239
241 std::chrono::milliseconds timeout{5000};
242 std::optional<RequestId> request_id;
243 std::optional<CancellationToken> cancellation;
244 PropertyMap properties; // protocol-specific request knobs
245};
246
247struct DataValue {
250 std::string message;
251 // Single universal timestamp; protocols with extra clocks (e.g. OPC UA
252 // server_timestamp) record them in `properties` under documented keys.
253 std::optional<std::chrono::system_clock::time_point> timestamp;
255};
256
258 std::string endpoint;
259 PropertyMap properties; // auth / security / tuning — any scheme fits here
260};
261
269
271 std::string endpoint;
272 std::string protocol;
273 std::string adapter_name;
274 std::string adapter_version;
277};
278
283
284// Fired on the adapter's internal thread when the link transitions.
285// RESUBSCRIPTION CONTRACT: unless an adapter documents otherwise,
286// subscriptions DO NOT survive a Faulted transition; on recovery the caller
287// must resubscribe. Handler must be non-blocking and must not call
288// Configure / Connect / Disconnect.
295using ConnectionStateHandler = std::function<void(const ConnectionStateChange&)>;
296
297// -----------------------------------------------------------------------------
298// Discover: find connectable endpoints (pre-connection). All protocol-specific
299// request knobs go through options.properties — there is no second bag.
300// -----------------------------------------------------------------------------
302 std::optional<std::string> query;
304};
306 std::string endpoint;
307 std::string protocol;
308 std::string name;
310};
312 std::vector<DiscoveredEndpoint> endpoints;
313};
314
315// -----------------------------------------------------------------------------
316// Browse: inspect the address space of a CONNECTED endpoint. cursor / has_more
317// page large address spaces: pass the returned cursor back to continue.
318//
319// `include_values=true` instructs the adapter to also populate
320// NodeDescriptor::value for each leaf node, where supported. This covers the
321// "scan everything and tell me what's there" use case (e.g. GenIcam feature
322// enumeration with current values) in a single round trip; with false (the
323// default) Browse is metadata-only and cheap.
324// -----------------------------------------------------------------------------
326 std::optional<Address> root;
327 bool recursive = false;
328 bool include_values = false;
329 std::optional<std::string> cursor;
331};
334 std::string name;
335 std::optional<Address> parent;
336 bool has_children = false;
337 // Present iff BrowseRequest::include_values was true AND the node carries
338 // a readable value. Absent for category/container nodes and write-only
339 // leaves.
340 std::optional<DataValue> value;
341 PropertyMap properties; // "access", "type", "display_name", ...
342};
344 std::vector<NodeDescriptor> nodes;
345 std::optional<std::string> cursor;
346 bool has_more = false;
347};
348
349// -----------------------------------------------------------------------------
350// Read
351// -----------------------------------------------------------------------------
357 std::vector<ReadItem> items;
359};
360struct ReadItemResult : Result { // item status, independent of batch status
362 std::optional<DataValue> data;
363};
365 std::vector<ReadItemResult> items;
366};
367
368// -----------------------------------------------------------------------------
369// Write — batch items are INDEPENDENT and NON-ATOMIC unless documented;
370// inspect per-item results.
371// -----------------------------------------------------------------------------
378 std::vector<WriteItem> items;
380};
381struct WriteItemResult : Result { // item status, independent of batch status
383};
385 std::vector<WriteItemResult> items;
386};
387
388// -----------------------------------------------------------------------------
389// Call (method / command / RPC) — optional capability.
390//
391// Replaces the previous `Rpc()` name. "Call" is the neutral verb across
392// protocols: OPC UA calls Methods, Modbus calls function codes, REST calls
393// endpoints, DDS issues request/reply. "Method" was considered but is
394// OPC UA-specific vocabulary; this contract is protocol-agnostic.
395// -----------------------------------------------------------------------------
397 std::string name; // may be empty for positional protocols
399};
406 std::string name;
408};
410 std::vector<CallArgumentResult> output_arguments;
411};
412
413// -----------------------------------------------------------------------------
414// Subscribe / Unsubscribe.
415//
416// Subscriptions are identified by node Address. The adapter manages
417// server-side subscription containers internally; the caller never sees
418// them.
419//
420// Re-subscribing an already-subscribed node REPLACES its callback and
421// options. There is one subscription per (adapter, node); callers that
422// need fan-out to multiple consumers build a small dispatcher on top.
423//
424// SUBSCRIPTION HANDLER THREADING CONTRACT (binding):
425// * Invoked on the adapter's internal delivery thread(s), not the
426// caller's.
427// * Must be non-blocking and must not throw.
428// * Unsubscribe(...) from within the handler is SAFE; honored after
429// the current invocation returns; no re-entry afterwards.
430// * Connect / Disconnect / Configure from within the handler is NOT
431// safe.
432// * After Unsubscribe / UnsubscribeAll / Disconnect returns, no further
433// invocations for the affected nodes occur and any in-flight
434// invocation has completed (these calls block until drained).
435// * Backpressure default: drop oldest; adapters may offer alternatives
436// via SubscribeOpts::properties.
437// -----------------------------------------------------------------------------
439 // Backpressure: protocol-agnostic, every adapter can honor these.
440 std::uint32_t queue_size{1};
441 bool discard_oldest{true};
442
443 // Protocol-specific tuning (e.g. OPC UA sampling_interval_ms,
444 // publishing_interval_ms; Modbus poll_interval_ms; ...). Documented
445 // keys per adapter.
447};
448
453using SubscriptionHandler = std::function<void(const Notification&)>;
454
459 std::vector<SubscribeItemResult> items;
460};
461
466 std::vector<UnsubscribeItemResult> items;
467};
468
469// -----------------------------------------------------------------------------
470// Capabilities — runtime feature negotiation. Lets backends honestly say
471// "I don't do Browse" rather than every adapter being forced to stub
472// every operation.
473// -----------------------------------------------------------------------------
475 bool discover = false;
476 bool browse = false;
477 bool read = false;
478 bool write = false;
479 bool call = false;
480 bool subscribe = false;
481 bool batch = false;
482 bool cancellation = false;
485};
486
487// =============================================================================
488// Core interface.
489//
490// LIFECYCLE CONTRACT:
491// * Configure only while Disconnected (else InvalidState).
492// * Connect requires a prior successful Configure (else InvalidState).
493// * Connect / Disconnect are idempotent w.r.t. target state and block
494// until it is reached or failure is determined.
495// * Data ops require Connected (else NotConnected).
496// * Unimplemented optional ops return Status::Unsupported; consult
497// GetCapabilities() to avoid relying on them.
498//
499// SYNC-ONLY NOTE:
500// This v1 surface is synchronous. Future async additions (ReadAsync,
501// WriteAsync, …) are pure additions that coexist with the sync methods.
502// The CancellationToken field in RequestOptions exists from day one
503// so sync calls are interruptible AND so adding async later does not
504// require a contract break.
505// =============================================================================
507public:
508 virtual ~ICommAdapter() = default;
509
510 virtual std::uint32_t GetContractVersion() const { return kContractVersion; }
511
512 virtual Capabilities GetCapabilities() const = 0;
513
514 // --- Lifecycle ---
515 virtual Result Configure(const ConnectionOptions& options) = 0;
516 virtual Result Connect() = 0;
517 virtual Result Disconnect() = 0;
519 virtual bool IsConnected() const = 0;
520
521 // RAII registration: unregistration is guaranteed when the returned token
522 // leaves scope (or via Reset()). See ConnectionStateHandler contract.
523 virtual RegistrationToken
525
526 // --- Synchronous data plane ---
527 virtual DiscoverResult Discover(const DiscoverRequest& request) = 0;
528 virtual BrowseResult Browse(const BrowseRequest& request) = 0;
529 virtual ReadResult Read(const ReadRequest& request) = 0;
530 virtual WriteResult Write(const WriteRequest& request) = 0;
531 virtual CallResult Call(const CallRequest& request) = 0;
532
533 // --- Pub / Sub (per-node identity, no SubscriptionId in public API) ---
534
535 // Subscribe to data changes on one or more nodes. Re-subscribing an
536 // already-subscribed node replaces its callback and options. Per-node
537 // statuses appear in the returned `items` vector; the overall Result
538 // reflects transport-level errors only.
539 virtual SubscribeResult Subscribe(const std::vector<Address>& nodes,
540 SubscriptionHandler handler,
541 const SubscribeOpts& opts = {}) = 0;
542
543 // Unsubscribe one or more nodes. Nodes that were not subscribed are
544 // silently ignored (idempotent). Per-node statuses returned.
545 virtual UnsubscribeResult
546 Unsubscribe(const std::vector<Address>& nodes) = 0;
547
548 // Convenience: drop all subscriptions in one call. Equivalent to
549 // calling Unsubscribe() with the full set of currently-subscribed
550 // nodes.
551 virtual Result UnsubscribeAll() = 0;
552};
553
554} // namespace eso::uatools::protocol::base
CancellationToken Token() const
Definition icomm_adapter_generic_v2.hpp:174
void Cancel()
Definition icomm_adapter_generic_v2.hpp:175
bool Cancelled() const
Definition icomm_adapter_generic_v2.hpp:176
CancellationSource()
Definition icomm_adapter_generic_v2.hpp:173
Definition icomm_adapter_generic_v2.hpp:159
CancellationToken(std::shared_ptr< std::atomic_bool > flag)
Definition icomm_adapter_generic_v2.hpp:162
bool Cancelled() const
Definition icomm_adapter_generic_v2.hpp:164
Definition icomm_adapter_generic_v2.hpp:506
virtual BrowseResult Browse(const BrowseRequest &request)=0
virtual ConnectionStatus GetConnectionStatus() const =0
virtual Capabilities GetCapabilities() const =0
virtual RegistrationToken SetConnectionStateHandler(ConnectionStateHandler handler)=0
virtual CallResult Call(const CallRequest &request)=0
virtual UnsubscribeResult Unsubscribe(const std::vector< Address > &nodes)=0
virtual DiscoverResult Discover(const DiscoverRequest &request)=0
virtual Result Configure(const ConnectionOptions &options)=0
virtual SubscribeResult Subscribe(const std::vector< Address > &nodes, SubscriptionHandler handler, const SubscribeOpts &opts={})=0
virtual std::uint32_t GetContractVersion() const
Definition icomm_adapter_generic_v2.hpp:510
virtual ReadResult Read(const ReadRequest &request)=0
virtual WriteResult Write(const WriteRequest &request)=0
Definition icomm_adapter_generic_v2.hpp:62
iterator begin()
Definition icomm_adapter_generic_v2.hpp:108
storage::iterator iterator
Definition icomm_adapter_generic_v2.hpp:66
bool Contains(std::string_view key) const
Definition icomm_adapter_generic_v2.hpp:91
void Reserve(std::size_t n)
Definition icomm_adapter_generic_v2.hpp:104
bool Empty() const
Definition icomm_adapter_generic_v2.hpp:102
bool Erase(std::string_view key)
Definition icomm_adapter_generic_v2.hpp:95
void Set(std::string key, std::string val)
Definition icomm_adapter_generic_v2.hpp:75
const std::string * Get(std::string_view key) const
Definition icomm_adapter_generic_v2.hpp:81
const_iterator begin() const
Definition icomm_adapter_generic_v2.hpp:110
std::vector< value_type > storage
Definition icomm_adapter_generic_v2.hpp:65
std::string GetOr(std::string_view key, std::string_view fallback) const
Definition icomm_adapter_generic_v2.hpp:86
PropertyMap(std::initializer_list< value_type > init)
Definition icomm_adapter_generic_v2.hpp:70
storage::const_iterator const_iterator
Definition icomm_adapter_generic_v2.hpp:67
std::size_t Size() const
Definition icomm_adapter_generic_v2.hpp:103
const_iterator end() const
Definition icomm_adapter_generic_v2.hpp:111
iterator end()
Definition icomm_adapter_generic_v2.hpp:109
std::pair< std::string, std::string > value_type
Definition icomm_adapter_generic_v2.hpp:64
Definition icomm_adapter_generic_v2.hpp:133
RegistrationToken & operator=(const RegistrationToken &)=delete
std::function< void()> UnregisterCallback
Definition icomm_adapter_generic_v2.hpp:135
RegistrationToken(const RegistrationToken &)=delete
~RegistrationToken()
Definition icomm_adapter_generic_v2.hpp:140
RegistrationToken(RegistrationToken &&) noexcept=default
void Reset()
Definition icomm_adapter_generic_v2.hpp:147
RegistrationToken(UnregisterCallback on_destruct)
Definition icomm_adapter_generic_v2.hpp:138
Definition icomm_adapter_generic_v2.hpp:49
std::variant< std::monostate, bool, std::int32_t, std::uint32_t, std::int64_t, std::uint64_t, float, double, std::string, std::vector< std::uint8_t >, std::vector< bool >, std::vector< std::int32_t >, std::vector< std::uint32_t >, std::vector< std::int64_t >, std::vector< std::uint64_t >, std::vector< float >, std::vector< double >, std::vector< std::string >, PropertyMap > Value
Definition icomm_adapter_generic_v2.hpp:211
ConnectionState
Definition icomm_adapter_generic_v2.hpp:262
@ Disconnecting
Definition icomm_adapter_generic_v2.hpp:266
@ Faulted
Definition icomm_adapter_generic_v2.hpp:267
@ Connected
Definition icomm_adapter_generic_v2.hpp:265
@ Connecting
Definition icomm_adapter_generic_v2.hpp:264
@ Disconnected
Definition icomm_adapter_generic_v2.hpp:263
std::function< void(const ConnectionStateChange &)> ConnectionStateHandler
Definition icomm_adapter_generic_v2.hpp:295
std::function< void(const Notification &)> SubscriptionHandler
Definition icomm_adapter_generic_v2.hpp:453
constexpr std::uint32_t kContractVersion
Definition icomm_adapter_generic_v2.hpp:51
Status
Definition icomm_adapter_generic_v2.hpp:181
@ AlreadyConnected
Definition icomm_adapter_generic_v2.hpp:185
@ TypeMismatch
Definition icomm_adapter_generic_v2.hpp:190
@ NotFound
Definition icomm_adapter_generic_v2.hpp:188
@ NotConnected
Definition icomm_adapter_generic_v2.hpp:184
@ InternalError
Definition icomm_adapter_generic_v2.hpp:195
@ BadRequest
Definition icomm_adapter_generic_v2.hpp:187
@ Cancelled
Definition icomm_adapter_generic_v2.hpp:192
@ Ok
Definition icomm_adapter_generic_v2.hpp:182
@ TransportError
Definition icomm_adapter_generic_v2.hpp:194
@ Unsupported
Definition icomm_adapter_generic_v2.hpp:191
@ Timeout
Definition icomm_adapter_generic_v2.hpp:183
@ AccessDenied
Definition icomm_adapter_generic_v2.hpp:189
@ RemoteError
Definition icomm_adapter_generic_v2.hpp:193
@ InvalidState
Definition icomm_adapter_generic_v2.hpp:186
std::string RequestId
Definition icomm_adapter_generic_v2.hpp:54
std::string Address
Definition icomm_adapter_generic_v2.hpp:53
Definition errors.hpp:12
Definition icomm_adapter_generic_v2.hpp:325
bool include_values
Definition icomm_adapter_generic_v2.hpp:328
bool recursive
Definition icomm_adapter_generic_v2.hpp:327
std::optional< std::string > cursor
Definition icomm_adapter_generic_v2.hpp:329
std::optional< Address > root
Definition icomm_adapter_generic_v2.hpp:326
RequestOptions options
Definition icomm_adapter_generic_v2.hpp:330
Definition icomm_adapter_generic_v2.hpp:343
bool has_more
Definition icomm_adapter_generic_v2.hpp:346
std::optional< std::string > cursor
Definition icomm_adapter_generic_v2.hpp:345
std::vector< NodeDescriptor > nodes
Definition icomm_adapter_generic_v2.hpp:344
Definition icomm_adapter_generic_v2.hpp:405
DataValue data
Definition icomm_adapter_generic_v2.hpp:407
std::string name
Definition icomm_adapter_generic_v2.hpp:406
Definition icomm_adapter_generic_v2.hpp:396
Value value
Definition icomm_adapter_generic_v2.hpp:398
std::string name
Definition icomm_adapter_generic_v2.hpp:397
Definition icomm_adapter_generic_v2.hpp:400
Address method
Definition icomm_adapter_generic_v2.hpp:401
RequestOptions options
Definition icomm_adapter_generic_v2.hpp:403
std::vector< CallArgument > input_arguments
Definition icomm_adapter_generic_v2.hpp:402
Definition icomm_adapter_generic_v2.hpp:409
std::vector< CallArgumentResult > output_arguments
Definition icomm_adapter_generic_v2.hpp:410
Definition icomm_adapter_generic_v2.hpp:474
bool write
Definition icomm_adapter_generic_v2.hpp:478
bool batch
Definition icomm_adapter_generic_v2.hpp:481
bool discover
Definition icomm_adapter_generic_v2.hpp:475
bool cancellation
Definition icomm_adapter_generic_v2.hpp:482
bool call
Definition icomm_adapter_generic_v2.hpp:479
bool read
Definition icomm_adapter_generic_v2.hpp:477
bool browse
Definition icomm_adapter_generic_v2.hpp:476
bool subscribe
Definition icomm_adapter_generic_v2.hpp:480
bool connection_state_events
Definition icomm_adapter_generic_v2.hpp:483
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:484
Definition icomm_adapter_generic_v2.hpp:270
std::uint32_t contract_version
Definition icomm_adapter_generic_v2.hpp:275
std::string adapter_version
Definition icomm_adapter_generic_v2.hpp:274
std::string adapter_name
Definition icomm_adapter_generic_v2.hpp:273
std::string endpoint
Definition icomm_adapter_generic_v2.hpp:271
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:276
Definition icomm_adapter_generic_v2.hpp:257
std::string endpoint
Definition icomm_adapter_generic_v2.hpp:258
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:259
Definition icomm_adapter_generic_v2.hpp:289
ConnectionState current
Definition icomm_adapter_generic_v2.hpp:291
std::string message
Definition icomm_adapter_generic_v2.hpp:293
Status reason
Definition icomm_adapter_generic_v2.hpp:292
ConnectionState previous
Definition icomm_adapter_generic_v2.hpp:290
Definition icomm_adapter_generic_v2.hpp:279
ConnectionState state
Definition icomm_adapter_generic_v2.hpp:280
std::optional< ConnectionInfo > info
Definition icomm_adapter_generic_v2.hpp:281
Definition icomm_adapter_generic_v2.hpp:247
Value value
Definition icomm_adapter_generic_v2.hpp:248
std::string message
Definition icomm_adapter_generic_v2.hpp:250
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:254
Status status
Definition icomm_adapter_generic_v2.hpp:249
std::optional< std::chrono::system_clock::time_point > timestamp
Definition icomm_adapter_generic_v2.hpp:253
Definition icomm_adapter_generic_v2.hpp:301
std::optional< std::string > query
Definition icomm_adapter_generic_v2.hpp:302
RequestOptions options
Definition icomm_adapter_generic_v2.hpp:303
Definition icomm_adapter_generic_v2.hpp:311
std::vector< DiscoveredEndpoint > endpoints
Definition icomm_adapter_generic_v2.hpp:312
Definition icomm_adapter_generic_v2.hpp:305
std::string endpoint
Definition icomm_adapter_generic_v2.hpp:306
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:309
std::string name
Definition icomm_adapter_generic_v2.hpp:308
Definition icomm_adapter_generic_v2.hpp:332
Address address
Definition icomm_adapter_generic_v2.hpp:333
std::optional< DataValue > value
Definition icomm_adapter_generic_v2.hpp:340
std::optional< Address > parent
Definition icomm_adapter_generic_v2.hpp:335
std::string name
Definition icomm_adapter_generic_v2.hpp:334
bool has_children
Definition icomm_adapter_generic_v2.hpp:336
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:341
Definition icomm_adapter_generic_v2.hpp:449
Address address
Definition icomm_adapter_generic_v2.hpp:450
DataValue data
Definition icomm_adapter_generic_v2.hpp:451
Definition icomm_adapter_generic_v2.hpp:360
std::optional< DataValue > data
Definition icomm_adapter_generic_v2.hpp:362
Address address
Definition icomm_adapter_generic_v2.hpp:361
Definition icomm_adapter_generic_v2.hpp:352
Address address
Definition icomm_adapter_generic_v2.hpp:353
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:354
Definition icomm_adapter_generic_v2.hpp:356
std::vector< ReadItem > items
Definition icomm_adapter_generic_v2.hpp:357
RequestOptions options
Definition icomm_adapter_generic_v2.hpp:358
Definition icomm_adapter_generic_v2.hpp:364
std::vector< ReadItemResult > items
Definition icomm_adapter_generic_v2.hpp:365
Definition icomm_adapter_generic_v2.hpp:240
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:244
std::optional< CancellationToken > cancellation
Definition icomm_adapter_generic_v2.hpp:243
std::chrono::milliseconds timeout
Definition icomm_adapter_generic_v2.hpp:241
std::optional< RequestId > request_id
Definition icomm_adapter_generic_v2.hpp:242
Definition icomm_adapter_generic_v2.hpp:232
Status status
Definition icomm_adapter_generic_v2.hpp:235
std::string message
Definition icomm_adapter_generic_v2.hpp:236
Definition icomm_adapter_generic_v2.hpp:455
Address address
Definition icomm_adapter_generic_v2.hpp:456
Definition icomm_adapter_generic_v2.hpp:438
bool discard_oldest
Definition icomm_adapter_generic_v2.hpp:441
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:446
std::uint32_t queue_size
Definition icomm_adapter_generic_v2.hpp:440
Definition icomm_adapter_generic_v2.hpp:458
std::vector< SubscribeItemResult > items
Definition icomm_adapter_generic_v2.hpp:459
Definition icomm_adapter_generic_v2.hpp:462
Address address
Definition icomm_adapter_generic_v2.hpp:463
Definition icomm_adapter_generic_v2.hpp:465
std::vector< UnsubscribeItemResult > items
Definition icomm_adapter_generic_v2.hpp:466
Definition icomm_adapter_generic_v2.hpp:381
Address address
Definition icomm_adapter_generic_v2.hpp:382
Definition icomm_adapter_generic_v2.hpp:372
Value value
Definition icomm_adapter_generic_v2.hpp:374
Address address
Definition icomm_adapter_generic_v2.hpp:373
PropertyMap properties
Definition icomm_adapter_generic_v2.hpp:375
Definition icomm_adapter_generic_v2.hpp:377
RequestOptions options
Definition icomm_adapter_generic_v2.hpp:379
std::vector< WriteItem > items
Definition icomm_adapter_generic_v2.hpp:378
Definition icomm_adapter_generic_v2.hpp:384
std::vector< WriteItemResult > items
Definition icomm_adapter_generic_v2.hpp:385