open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
types_composed.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <initializer_list>
5#include <string_view>
6#include <type_traits>
7#include <utility> // forward, move
8#include <variant>
9
11#include "open62541pp/common.hpp" // AttributeId, TimestampsToReturn, ...
12#include "open62541pp/config.hpp"
14#include "open62541pp/detail/traits.hpp" // IsOneOf
15#include "open62541pp/detail/types_conversion.hpp" // toNative, toNativeArray
16#include "open62541pp/detail/types_handling.hpp" // deallocateArray, copyArray
17#include "open62541pp/nodeids.hpp" // ReferenceTypeId
18#include "open62541pp/span.hpp"
19#include "open62541pp/typeregistry.hpp" // getDataType
20#include "open62541pp/types.hpp"
22
23#ifndef UA_DEFAULT_ATTRIBUTES_DEFINED
24#define UA_DEFAULT_ATTRIBUTES_DEFINED
25extern "C" {
33UA_EXPORT extern const UA_ViewAttributes UA_ViewAttributes_default;
34}
35#endif
36
37// NOLINTBEGIN(cppcoreguidelines-macro-usage)
38#define UAPP_GETTER(Type, getterName, member) \
39 Type getterName() const noexcept { \
40 return handle()->member; \
41 }
42#define UAPP_GETTER_CAST(Type, getterName, member) \
43 Type getterName() const noexcept { \
44 return static_cast<Type>(handle()->member); \
45 }
46
47#define UAPP_GETTER_WRAPPER_CONST(Type, getterName, member) \
48 const Type& getterName() const noexcept { \
49 return asWrapper<Type>(handle()->member); \
50 }
51#define UAPP_GETTER_WRAPPER_NONCONST(Type, getterName, member) \
52 Type& getterName() noexcept { \
53 return asWrapper<Type>(handle()->member); \
54 }
55#define UAPP_GETTER_WRAPPER(Type, getterName, member) \
56 UAPP_GETTER_WRAPPER_CONST(Type, getterName, member) \
57 UAPP_GETTER_WRAPPER_NONCONST(Type, getterName, member)
58
59#define UAPP_GETTER_SPAN(Type, getterName, memberArray, memberSize) \
60 Span<const Type> getterName() const noexcept { \
61 return {handle()->memberArray, handle()->memberSize}; \
62 } \
63 Span<Type> getterName() noexcept { \
64 return {handle()->memberArray, handle()->memberSize}; \
65 }
66#define UAPP_GETTER_SPAN_WRAPPER(Type, getterName, memberArray, memberSize) \
67 Span<const Type> getterName() const noexcept { \
68 return {asWrapper<Type>(handle()->memberArray), handle()->memberSize}; \
69 } \
70 Span<Type> getterName() noexcept { \
71 return {asWrapper<Type>(handle()->memberArray), handle()->memberSize}; \
72 }
73
74// NOLINTEND(cppcoreguidelines-macro-usage)
75
76namespace opcua {
77
78/**
79 * @addtogroup Wrapper
80 * @{
81 */
82
83/**
84 * UA_EnumValueType wrapper class.
85 * @see https://reference.opcfoundation.org/Core/Part3/v105/docs/8.39
86 */
87class EnumValueType : public TypeWrapper<UA_EnumValueType, UA_TYPES_ENUMVALUETYPE> {
88public:
90
91 EnumValueType(int64_t value, LocalizedText displayName, LocalizedText description) {
92 handle()->value = value;
93 handle()->displayName = detail::toNative(std::move(displayName));
94 handle()->description = detail::toNative(std::move(description));
95 }
96
97 UAPP_GETTER(int64_t, getValue, value)
100};
101
102/**
103 * UA_ApplicationDescription wrapper class.
104 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.2
105 */
107 : public TypeWrapper<UA_ApplicationDescription, UA_TYPES_APPLICATIONDESCRIPTION> {
108public:
110
111 UAPP_GETTER_WRAPPER(String, getApplicationUri, applicationUri)
112 UAPP_GETTER_WRAPPER(String, getProductUri, productUri)
113 UAPP_GETTER_WRAPPER(LocalizedText, getApplicationName, applicationName)
114 UAPP_GETTER(UA_ApplicationType, getApplicationType, applicationType)
115 UAPP_GETTER_WRAPPER(String, getGatewayServerUri, gatewayServerUri)
116 UAPP_GETTER_WRAPPER(String, getDiscoveryProfileUri, discoveryProfileUri)
117 UAPP_GETTER_SPAN_WRAPPER(String, getDiscoveryUrls, discoveryUrls, discoveryUrlsSize)
118};
119
120/**
121 * UA_RequestHeader wrapper class.
122 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.33
123 */
124class RequestHeader : public TypeWrapper<UA_RequestHeader, UA_TYPES_REQUESTHEADER> {
125public:
127
129 NodeId authenticationToken,
130 DateTime timestamp,
131 uint32_t requestHandle,
132 uint32_t returnDiagnostics,
133 std::string_view auditEntryId,
134 uint32_t timeoutHint,
135 ExtensionObject additionalHeader
136 ) {
137 handle()->authenticationToken = detail::toNative(std::move(authenticationToken));
138 handle()->timestamp = timestamp;
139 handle()->requestHandle = requestHandle;
140 handle()->returnDiagnostics = returnDiagnostics;
141 handle()->auditEntryId = detail::toNative(auditEntryId);
142 handle()->timeoutHint = timeoutHint;
143 handle()->additionalHeader = detail::toNative(std::move(additionalHeader));
144 }
145
146 UAPP_GETTER_WRAPPER(NodeId, getAuthenticationToken, authenticationToken)
147 UAPP_GETTER_WRAPPER(DateTime, getTimestamp, timestamp)
148 UAPP_GETTER(uint32_t, getRequestHandle, requestHandle)
149 UAPP_GETTER(uint32_t, getReturnDiagnostics, returnDiagnostics)
150 UAPP_GETTER_WRAPPER(String, getAuditEntryId, auditEntryId)
151 UAPP_GETTER(uint32_t, getTimeoutHint, timeoutHint)
152 UAPP_GETTER_WRAPPER(ExtensionObject, getAdditionalHeader, additionalHeader)
153};
154
155/**
156 * UA_ResponseHeader wrapper class.
157 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.34
158 */
159class ResponseHeader : public TypeWrapper<UA_ResponseHeader, UA_TYPES_RESPONSEHEADER> {
160public:
162
163 UAPP_GETTER_WRAPPER(DateTime, getTimestamp, timestamp)
164 UAPP_GETTER(uint32_t, getRequestHandle, requestHandle)
165 UAPP_GETTER(StatusCode, getServiceResult, serviceResult)
166 UAPP_GETTER_WRAPPER(DiagnosticInfo, getServiceDiagnostics, serviceDiagnostics)
167 UAPP_GETTER_SPAN_WRAPPER(String, getStringTable, stringTable, stringTableSize)
168 UAPP_GETTER_WRAPPER(ExtensionObject, getAdditionalHeader, additionalHeader)
169};
170
171/**
172 * User identity token type.
173 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.43
174 */
175enum class UserTokenType : int32_t {
176 // clang-format off
177 Anonymous = 0, ///< No token is required
178 Username = 1, ///< A username/password token
179 Certificate = 2, ///< An X.509 v3 certificate token
180 IssuedToken = 3, ///< Any token issued by an authorization service
181 // clang-format on
182};
183
184/**
185 * UA_UserTokenPolicy wrapper class.
186 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.42
187 */
188class UserTokenPolicy : public TypeWrapper<UA_UserTokenPolicy, UA_TYPES_USERTOKENPOLICY> {
189public:
190 using TypeWrapper::TypeWrapper;
191
193 std::string_view policyId,
194 UserTokenType tokenType,
195 std::string_view issuedTokenType,
196 std::string_view issuerEndpointUrl,
197 std::string_view securityPolicyUri
198 ) {
199 handle()->policyId = detail::toNative(policyId);
200 handle()->tokenType = static_cast<UA_UserTokenType>(tokenType);
201 handle()->issuedTokenType = detail::toNative(issuedTokenType);
202 handle()->issuerEndpointUrl = detail::toNative(issuerEndpointUrl);
203 handle()->securityPolicyUri = detail::toNative(securityPolicyUri);
204 }
205
206 UAPP_GETTER_WRAPPER(String, getPolicyId, policyId)
207 UAPP_GETTER_CAST(UserTokenType, getTokenType, tokenType)
208 UAPP_GETTER_WRAPPER(String, getIssuedTokenType, issuedTokenType)
209 UAPP_GETTER_WRAPPER(String, getIssuerEndpointUrl, issuerEndpointUrl)
210 UAPP_GETTER_WRAPPER(String, getSecurityPolicyUri, securityPolicyUri)
211};
212
213/**
214 * UA_EndpointDescription wrapper class.
215 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.14
216 */
218 : public TypeWrapper<UA_EndpointDescription, UA_TYPES_ENDPOINTDESCRIPTION> {
219public:
220 using TypeWrapper::TypeWrapper;
221
222 UAPP_GETTER_WRAPPER(String, getEndpointUrl, endpointUrl)
224 UAPP_GETTER_WRAPPER(ByteString, getServerCertificate, serverCertificate)
225 UAPP_GETTER(UA_MessageSecurityMode, getSecurityMode, securityMode)
226 UAPP_GETTER_WRAPPER(String, getSecurityPolicyUri, securityPolicyUri)
228 UserTokenPolicy, getUserIdentityTokens, userIdentityTokens, userIdentityTokensSize
230 UAPP_GETTER_WRAPPER(String, getTransportProfileUri, transportProfileUri)
231 UAPP_GETTER(UA_Byte, getSecurityLevel, securityLevel)
232};
233
234/* --------------------------------------- Node attributes -------------------------------------- */
235
236/**
237 * Node attributes mask.
238 * Bitmask used in the node attributes parameters to specify which attributes are set.
239 * @see UA_NodeAttributesMask
240 */
241enum class NodeAttributesMask : uint32_t {
242 // clang-format off
243 None = 0,
244 AccessLevel = 1,
245 ArrayDimensions = 2,
246 BrowseName = 4,
247 ContainsNoLoops = 8,
248 DataType = 16,
249 Description = 32,
250 DisplayName = 64,
251 EventNotifier = 128,
252 Executable = 256,
253 Historizing = 512,
254 InverseName = 1024,
255 IsAbstract = 2048,
257 NodeClass = 8192,
258 NodeId = 16384,
259 Symmetric = 32768,
260 UserAccessLevel = 65536,
261 UserExecutable = 131072,
262 UserWriteMask = 262144,
263 ValueRank = 524288,
264 WriteMask = 1048576,
265 Value = 2097152,
266 DataTypeDefinition = 4194304,
267 RolePermissions = 8388608,
268 AccessRestrictions = 16777216,
269 All = 33554431,
270 BaseNode = 26501220,
271 Object = 26501348,
272 ObjectType = 26503268,
273 Variable = 26571383,
274 VariableType = 28600438,
275 Method = 26632548,
276 ReferenceType = 26537060,
277 View = 26501356,
278 // clang-format on
279};
280
281template <>
282struct IsBitmaskEnum<NodeAttributesMask> : std::true_type {};
283
284// Specifialized macros to generate getters/setters for `UA_*Attribute` classes.
285// The `specifiedAttributes` mask is automatically updated in the setter methods.
286// A fluent interface is used for the setter methods.
287
288// NOLINTBEGIN(cppcoreguidelines-macro-usage)
289#define UAPP_NODEATTR(Type, suffix, member, flag) \
290 UAPP_GETTER(Type, get##suffix, member) \
291 auto& set##suffix(Type member) noexcept { \
292 handle()->specifiedAttributes |= flag; \
293 handle()->member = member; \
294 return *this; \
295 }
296#define UAPP_NODEATTR_BITMASK(Type, suffix, member, flag) \
297 UAPP_GETTER(Type, get##suffix, member) \
298 auto& set##suffix(Type member) noexcept { \
299 handle()->specifiedAttributes |= flag; \
300 handle()->member = member.get(); \
301 return *this; \
302 }
303#define UAPP_NODEATTR_CAST(Type, suffix, member, flag) \
304 UAPP_GETTER_CAST(Type, get##suffix, member) \
305 auto& set##suffix(Type member) noexcept { \
306 handle()->specifiedAttributes |= flag; \
307 handle()->member = static_cast<decltype(handle()->member)>(member); \
308 return *this; \
309 }
310#define UAPP_NODEATTR_WRAPPER(Type, suffix, member, flag) \
311 UAPP_GETTER_WRAPPER_CONST(Type, get##suffix, member) \
312 auto& set##suffix(const Type& member) { \
313 handle()->specifiedAttributes |= flag; \
314 asWrapper<Type>(handle()->member) = member; \
315 return *this; \
316 }
317#define UAPP_NODEATTR_ARRAY(Type, suffix, member, memberSize, flag) \
318 UAPP_GETTER_SPAN(Type, get##suffix, member, memberSize) \
319 auto& set##suffix(Span<const Type> member) { \
320 const auto& dataType = opcua::getDataType<Type>(); \
321 handle()->specifiedAttributes |= flag; \
322 detail::deallocateArray(handle()->member, handle()->memberSize, dataType); \
323 handle()->member = detail::copyArray(member.data(), member.size(), dataType); \
324 handle()->memberSize = member.size(); \
325 return *this; \
326 }
327#define UAPP_NODEATTR_COMMON \
328 UAPP_GETTER(Bitmask<NodeAttributesMask>, getSpecifiedAttributes, specifiedAttributes) \
329 UAPP_NODEATTR_WRAPPER( \
330 LocalizedText, DisplayName, displayName, UA_NODEATTRIBUTESMASK_DISPLAYNAME \
331 ) \
332 UAPP_NODEATTR_WRAPPER( \
333 LocalizedText, Description, description, UA_NODEATTRIBUTESMASK_DESCRIPTION \
334 ) \
335 UAPP_NODEATTR_BITMASK( \
336 Bitmask<WriteMask>, WriteMask, writeMask, UA_NODEATTRIBUTESMASK_WRITEMASK \
337 ) \
338 UAPP_NODEATTR_BITMASK( \
339 Bitmask<WriteMask>, UserWriteMask, userWriteMask, UA_NODEATTRIBUTESMASK_USERWRITEMASK \
340 )
341
342// NOLINTEND(cppcoreguidelines-macro-usage)
343
344/**
345 * UA_NodeAttributes wrapper class.
346 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24
347 */
348class NodeAttributes : public TypeWrapper<UA_NodeAttributes, UA_TYPES_NODEATTRIBUTES> {
349public:
350 using TypeWrapper::TypeWrapper;
351
353};
354
355/**
356 * UA_ObjectAttributes wrapper class.
357 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24.2
358 */
359class ObjectAttributes : public TypeWrapper<UA_ObjectAttributes, UA_TYPES_OBJECTATTRIBUTES> {
360public:
361 using TypeWrapper::TypeWrapper;
362
363 /// Construct with default attribute definitions.
366
369 Bitmask<EventNotifier>, EventNotifier, eventNotifier, UA_NODEATTRIBUTESMASK_EVENTNOTIFIER
371};
372
373/**
374 * UA_VariableAttributes wrapper class.
375 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24.3
376 */
377class VariableAttributes : public TypeWrapper<UA_VariableAttributes, UA_TYPES_VARIABLEATTRIBUTES> {
378public:
379 using TypeWrapper::TypeWrapper;
380
381 /// Construct with default attribute definitions.
384
386 UAPP_NODEATTR_WRAPPER(Variant, Value, value, UA_NODEATTRIBUTESMASK_VALUE)
387
388 /// @see Variant::fromScalar
389 template <typename... Args>
390 auto& setValueScalar(Args&&... args) {
391 return setValue(Variant::fromScalar(std::forward<Args>(args)...));
392 }
393
394 /// @see Variant::fromArray
395 template <typename... Args>
396 auto& setValueArray(Args&&... args) {
397 return setValue(Variant::fromArray(std::forward<Args>(args)...));
398 }
399
400 UAPP_NODEATTR_WRAPPER(NodeId, DataType, dataType, UA_NODEATTRIBUTESMASK_DATATYPE)
401
402 /// @overload
403 /// Deduce the `dataType` from the template type.
404 template <typename T>
405 auto& setDataType() {
406 return setDataType(asWrapper<NodeId>(opcua::getDataType<T>().typeId));
407 }
408
409 UAPP_NODEATTR_CAST(ValueRank, ValueRank, valueRank, UA_NODEATTRIBUTESMASK_VALUERANK)
411 uint32_t,
412 ArrayDimensions,
413 arrayDimensions,
414 arrayDimensionsSize,
415 UA_NODEATTRIBUTESMASK_ARRAYDIMENSIONS
418 Bitmask<AccessLevel>, AccessLevel, accessLevel, UA_NODEATTRIBUTESMASK_ACCESSLEVEL
422 UserAccessLevel,
423 userAccessLevel,
424 UA_NODEATTRIBUTESMASK_USERACCESSLEVEL
427 double,
428 MinimumSamplingInterval,
429 minimumSamplingInterval,
430 UA_NODEATTRIBUTESMASK_MINIMUMSAMPLINGINTERVAL
432 UAPP_NODEATTR(bool, Historizing, historizing, UA_NODEATTRIBUTESMASK_HISTORIZING)
433};
434
435/**
436 * UA_MethodAttributes wrapper class.
437 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24.4
438 */
439class MethodAttributes : public TypeWrapper<UA_MethodAttributes, UA_TYPES_METHODATTRIBUTES> {
440public:
441 using TypeWrapper::TypeWrapper;
442
443 /// Construct with default attribute definitions.
446
448 UAPP_NODEATTR(bool, Executable, executable, UA_NODEATTRIBUTESMASK_EXECUTABLE)
449 UAPP_NODEATTR(bool, UserExecutable, userExecutable, UA_NODEATTRIBUTESMASK_USEREXECUTABLE)
450};
451
452/**
453 * UA_ObjectTypeAttributes wrapper class.
454 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24.5
455 */
457 : public TypeWrapper<UA_ObjectTypeAttributes, UA_TYPES_OBJECTTYPEATTRIBUTES> {
458public:
459 using TypeWrapper::TypeWrapper;
460
461 /// Construct with default attribute definitions.
464
466 UAPP_NODEATTR(bool, IsAbstract, isAbstract, UA_NODEATTRIBUTESMASK_ISABSTRACT)
467};
468
469/**
470 * UA_VariableAttributes wrapper class.
471 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24.6
472 */
474 : public TypeWrapper<UA_VariableTypeAttributes, UA_TYPES_VARIABLETYPEATTRIBUTES> {
475public:
476 using TypeWrapper::TypeWrapper;
477
478 /// Construct with default attribute definitions.
481
483 UAPP_NODEATTR_WRAPPER(Variant, Value, value, UA_NODEATTRIBUTESMASK_VALUE)
484
485 /// @see Variant::fromScalar
486 template <typename... Args>
487 auto& setValueScalar(Args&&... args) {
488 return setValue(Variant::fromScalar(std::forward<Args>(args)...));
489 }
490
491 /// @see Variant::fromArray
492 template <typename... Args>
493 auto& setValueArray(Args&&... args) {
494 return setValue(Variant::fromArray(std::forward<Args>(args)...));
495 }
496
497 UAPP_NODEATTR_WRAPPER(NodeId, DataType, dataType, UA_NODEATTRIBUTESMASK_DATATYPE)
498
499 /// @overload
500 /// Deduce the `dataType` from the template type.
501 template <typename T>
502 auto& setDataType() {
503 return setDataType(asWrapper<NodeId>(opcua::getDataType<T>().typeId));
504 }
505
506 UAPP_NODEATTR_CAST(ValueRank, ValueRank, valueRank, UA_NODEATTRIBUTESMASK_VALUERANK)
508 uint32_t,
509 ArrayDimensions,
510 arrayDimensions,
511 arrayDimensionsSize,
512 UA_NODEATTRIBUTESMASK_ARRAYDIMENSIONS
514 UAPP_NODEATTR(bool, IsAbstract, isAbstract, UA_NODEATTRIBUTESMASK_ISABSTRACT)
515};
516
517/**
518 * UA_ReferenceTypeAttributes wrapper class.
519 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24.7
520 */
522 : public TypeWrapper<UA_ReferenceTypeAttributes, UA_TYPES_REFERENCETYPEATTRIBUTES> {
523public:
524 using TypeWrapper::TypeWrapper;
525
526 /// Construct with default attribute definitions.
529
531 UAPP_NODEATTR(bool, IsAbstract, isAbstract, UA_NODEATTRIBUTESMASK_ISABSTRACT)
532 UAPP_NODEATTR(bool, Symmetric, symmetric, UA_NODEATTRIBUTESMASK_SYMMETRIC)
534 LocalizedText, InverseName, inverseName, UA_NODEATTRIBUTESMASK_INVERSENAME
536};
537
538/**
539 * UA_DataTypeAttributes wrapper class.
540 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24.8
541 */
542class DataTypeAttributes : public TypeWrapper<UA_DataTypeAttributes, UA_TYPES_DATATYPEATTRIBUTES> {
543public:
544 using TypeWrapper::TypeWrapper;
545
546 /// Construct with default attribute definitions.
549
551 UAPP_NODEATTR(bool, IsAbstract, isAbstract, UA_NODEATTRIBUTESMASK_ISABSTRACT)
552};
553
554/**
555 * UA_ViewAttributes wrapper class.
556 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.24.9
557 */
558class ViewAttributes : public TypeWrapper<UA_ViewAttributes, UA_TYPES_VIEWATTRIBUTES> {
559public:
560 using TypeWrapper::TypeWrapper;
561
562 /// Construct with default attribute definitions.
565
567 UAPP_NODEATTR(bool, IsAbstract, containsNoLoops, UA_NODEATTRIBUTESMASK_CONTAINSNOLOOPS)
569 Bitmask<EventNotifier>, EventNotifier, eventNotifier, UA_NODEATTRIBUTESMASK_EVENTNOTIFIER
571};
572
573#undef UAPP_NODEATTR
574#undef UAPP_NODEATTR_WRAPPER
575#undef UAPP_NODEATTR_ARRAY
576#undef UAPP_NODEATTR_COMMON
577
578/* ---------------------------------------------------------------------------------------------- */
579
580/**
581 * UA_UserIdentityToken wrapper class.
582 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41
583 */
584class UserIdentityToken : public TypeWrapper<UA_UserIdentityToken, UA_TYPES_USERIDENTITYTOKEN> {
585public:
586 using TypeWrapper::TypeWrapper;
587
588 UAPP_GETTER_WRAPPER(String, getPolicyId, policyId)
589};
590
591/**
592 * UA_AnonymousIdentityToken wrapper class.
593 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41.3
594 */
596 : public TypeWrapper<UA_AnonymousIdentityToken, UA_TYPES_ANONYMOUSIDENTITYTOKEN> {
597public:
598 using TypeWrapper::TypeWrapper;
599
600 UAPP_GETTER_WRAPPER(String, getPolicyId, policyId)
601};
602
603/**
604 * UA_UserNameIdentityToken wrapper class.
605 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41.4
606 */
608 : public TypeWrapper<UA_UserNameIdentityToken, UA_TYPES_USERNAMEIDENTITYTOKEN> {
609public:
610 using TypeWrapper::TypeWrapper;
611
613 std::string_view userName,
614 std::string_view password,
615 std::string_view encryptionAlgorithm = {}
616 ) {
617 handle()->userName = detail::toNative(userName);
618 handle()->password = detail::toNative(password);
619 handle()->encryptionAlgorithm = detail::toNative(encryptionAlgorithm);
620 }
621
622 UAPP_GETTER_WRAPPER(String, getPolicyId, policyId)
623 UAPP_GETTER_WRAPPER(String, getUserName, userName)
624 UAPP_GETTER_WRAPPER(ByteString, getPassword, password)
625 UAPP_GETTER_WRAPPER(String, getEncryptionAlgorithm, encryptionAlgorithm)
626};
627
628/**
629 * UA_X509IdentityToken wrapper class.
630 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41.5
631 */
632class X509IdentityToken : public TypeWrapper<UA_X509IdentityToken, UA_TYPES_X509IDENTITYTOKEN> {
633public:
634 using TypeWrapper::TypeWrapper;
635
636 explicit X509IdentityToken(ByteString certificateData) {
637 handle()->certificateData = detail::toNative(std::move(certificateData));
638 }
639
640 UAPP_GETTER_WRAPPER(String, getPolicyId, policyId)
641 UAPP_GETTER_WRAPPER(ByteString, getCertificateData, certificateData)
642};
643
644/**
645 * UA_IssuedIdentityToken wrapper class.
646 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.41.6
647 */
649 : public TypeWrapper<UA_IssuedIdentityToken, UA_TYPES_ISSUEDIDENTITYTOKEN> {
650public:
651 using TypeWrapper::TypeWrapper;
652
653 explicit IssuedIdentityToken(ByteString tokenData, std::string_view encryptionAlgorithm = {}) {
654 handle()->tokenData = detail::toNative(std::move(tokenData));
655 handle()->encryptionAlgorithm = detail::toNative(encryptionAlgorithm);
656 }
657
658 UAPP_GETTER_WRAPPER(String, getPolicyId, policyId)
659 UAPP_GETTER_WRAPPER(ByteString, getTokenData, tokenData)
660 UAPP_GETTER_WRAPPER(String, getEncryptionAlgorithm, encryptionAlgorithm)
661};
662
663/**
664 * UA_AddNodesItem wrapper class.
665 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.2
666 */
667class AddNodesItem : public TypeWrapper<UA_AddNodesItem, UA_TYPES_ADDNODESITEM> {
668public:
669 using TypeWrapper::TypeWrapper;
670
672 ExpandedNodeId parentNodeId,
673 NodeId referenceTypeId,
674 ExpandedNodeId requestedNewNodeId,
675 QualifiedName browseName,
676 NodeClass nodeClass,
677 ExtensionObject nodeAttributes,
678 ExpandedNodeId typeDefinition
679 ) {
680 handle()->parentNodeId = detail::toNative(std::move(parentNodeId));
681 handle()->referenceTypeId = detail::toNative(std::move(referenceTypeId));
682 handle()->requestedNewNodeId = detail::toNative(std::move(requestedNewNodeId));
683 handle()->browseName = detail::toNative(std::move(browseName));
684 handle()->nodeClass = static_cast<UA_NodeClass>(nodeClass);
685 handle()->nodeAttributes = detail::toNative(std::move(nodeAttributes));
686 handle()->typeDefinition = detail::toNative(std::move(typeDefinition));
687 }
688
689 UAPP_GETTER_WRAPPER(ExpandedNodeId, getParentNodeId, parentNodeId)
690 UAPP_GETTER_WRAPPER(NodeId, getReferenceTypeId, referenceTypeId)
691 UAPP_GETTER_WRAPPER(ExpandedNodeId, getRequestedNewNodeId, requestedNewNodeId)
692 UAPP_GETTER_WRAPPER(QualifiedName, getBrowseName, browseName)
693 UAPP_GETTER_CAST(NodeClass, getNodeClass, nodeClass)
694 UAPP_GETTER_WRAPPER(ExtensionObject, getNodeAttributes, nodeAttributes)
695 UAPP_GETTER_WRAPPER(ExpandedNodeId, getTypeDefinition, typeDefinition)
696};
697
698/**
699 * UA_AddNodesResult wrapper class.
700 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.2
701 */
702class AddNodesResult : public TypeWrapper<UA_AddNodesResult, UA_TYPES_ADDNODESRESULT> {
703public:
704 using TypeWrapper::TypeWrapper;
705
706 UAPP_GETTER(StatusCode, getStatusCode, statusCode)
707 UAPP_GETTER_WRAPPER(NodeId, getAddedNodeId, addedNodeId)
708};
709
710/**
711 * UA_AddNodesRequest wrapper class.
712 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.2
713 */
714class AddNodesRequest : public TypeWrapper<UA_AddNodesRequest, UA_TYPES_ADDNODESREQUEST> {
715public:
716 using TypeWrapper::TypeWrapper;
717
719 handle()->requestHeader = detail::toNative(std::move(requestHeader));
720 handle()->nodesToAddSize = nodesToAdd.size();
721 handle()->nodesToAdd = detail::toNativeArray(nodesToAdd);
722 }
723
724 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
725 UAPP_GETTER_SPAN_WRAPPER(AddNodesItem, getNodesToAdd, nodesToAdd, nodesToAddSize)
726};
727
728/**
729 * UA_AddNodesResponse wrapper class.
730 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.2
731 */
732class AddNodesResponse : public TypeWrapper<UA_AddNodesResponse, UA_TYPES_ADDNODESRESPONSE> {
733public:
734 using TypeWrapper::TypeWrapper;
735
736 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
737 UAPP_GETTER_SPAN_WRAPPER(AddNodesResult, getResults, results, resultsSize)
739 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
741};
742
743/**
744 * UA_AddReferencesItem wrapper class.
745 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.3
746 */
747class AddReferencesItem : public TypeWrapper<UA_AddReferencesItem, UA_TYPES_ADDREFERENCESITEM> {
748public:
749 using TypeWrapper::TypeWrapper;
750
752 NodeId sourceNodeId,
753 NodeId referenceTypeId,
754 bool isForward,
755 std::string_view targetServerUri,
756 ExpandedNodeId targetNodeId,
757 NodeClass targetNodeClass
758 ) {
759 handle()->sourceNodeId = detail::toNative(std::move(sourceNodeId));
760 handle()->referenceTypeId = detail::toNative(std::move(referenceTypeId));
761 handle()->isForward = isForward;
762 handle()->targetServerUri = detail::toNative(targetServerUri);
763 handle()->targetNodeId = detail::toNative(std::move(targetNodeId));
764 handle()->targetNodeClass = static_cast<UA_NodeClass>(targetNodeClass);
765 }
766
767 UAPP_GETTER_WRAPPER(NodeId, getSourceNodeId, sourceNodeId)
768 UAPP_GETTER_WRAPPER(NodeId, getReferenceTypeId, referenceTypeId)
769 UAPP_GETTER(bool, getIsForward, isForward)
770 UAPP_GETTER_WRAPPER(String, getTargetServerUri, targetServerUri)
771 UAPP_GETTER_WRAPPER(ExpandedNodeId, getTargetNodeId, targetNodeId)
772 UAPP_GETTER_CAST(NodeClass, getTargetNodeClass, targetNodeClass)
773};
774
775/**
776 * UA_AddReferencesRequest wrapper class.
777 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.3
778 */
780 : public TypeWrapper<UA_AddReferencesRequest, UA_TYPES_ADDREFERENCESREQUEST> {
781public:
782 using TypeWrapper::TypeWrapper;
783
785 RequestHeader requestHeader, Span<const AddReferencesItem> referencesToAdd
786 ) {
787 handle()->requestHeader = detail::toNative(std::move(requestHeader));
788 handle()->referencesToAddSize = referencesToAdd.size();
789 handle()->referencesToAdd = detail::toNativeArray(referencesToAdd);
790 }
791
792 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
794 AddReferencesItem, getReferencesToAdd, referencesToAdd, referencesToAddSize
796};
797
798/**
799 * UA_AddReferencesResponse wrapper class.
800 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.3
801 */
803 : public TypeWrapper<UA_AddReferencesResponse, UA_TYPES_ADDREFERENCESRESPONSE> {
804public:
805 using TypeWrapper::TypeWrapper;
806
807 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
808 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getResults, results, resultsSize)
810 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
812};
813
814/**
815 * UA_DeleteNodesItem wrapper class.
816 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.4
817 */
818class DeleteNodesItem : public TypeWrapper<UA_DeleteNodesItem, UA_TYPES_DELETENODESITEM> {
819public:
820 using TypeWrapper::TypeWrapper;
821
822 DeleteNodesItem(NodeId nodeId, bool deleteTargetReferences) {
823 handle()->nodeId = detail::toNative(std::move(nodeId));
824 handle()->deleteTargetReferences = deleteTargetReferences;
825 }
826
827 UAPP_GETTER_WRAPPER(NodeId, getNodeId, nodeId)
828 UAPP_GETTER(bool, getDeleteTargetReferences, deleteTargetReferences)
829};
830
831/**
832 * UA_DeleteNodesRequest wrapper class.
833 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.4
834 */
835class DeleteNodesRequest : public TypeWrapper<UA_DeleteNodesRequest, UA_TYPES_DELETENODESREQUEST> {
836public:
837 using TypeWrapper::TypeWrapper;
838
840 handle()->requestHeader = detail::toNative(std::move(requestHeader));
841 handle()->nodesToDeleteSize = nodesToDelete.size();
842 handle()->nodesToDelete = detail::toNativeArray(nodesToDelete);
843 }
844
845 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
846 UAPP_GETTER_SPAN_WRAPPER(DeleteNodesItem, getNodesToDelete, nodesToDelete, nodesToDeleteSize)
847};
848
849/**
850 * UA_DeleteNodesResponse wrapper class.
851 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.4
852 */
854 : public TypeWrapper<UA_DeleteNodesResponse, UA_TYPES_DELETENODESRESPONSE> {
855public:
856 using TypeWrapper::TypeWrapper;
857
858 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
859 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getResults, results, resultsSize)
861 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
863};
864
865/**
866 * UA_DeleteReferencesItem wrapper class.
867 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.5
868 */
870 : public TypeWrapper<UA_DeleteReferencesItem, UA_TYPES_DELETEREFERENCESITEM> {
871public:
872 using TypeWrapper::TypeWrapper;
873
875 NodeId sourceNodeId,
876 NodeId referenceTypeId,
877 bool isForward,
878 ExpandedNodeId targetNodeId,
879 bool deleteBidirectional
880 ) {
881 handle()->sourceNodeId = detail::toNative(std::move(sourceNodeId));
882 handle()->referenceTypeId = detail::toNative(std::move(referenceTypeId));
883 handle()->isForward = isForward;
884 handle()->targetNodeId = detail::toNative(std::move(targetNodeId));
885 handle()->deleteBidirectional = deleteBidirectional;
886 }
887
888 UAPP_GETTER_WRAPPER(NodeId, getSourceNodeId, sourceNodeId)
889 UAPP_GETTER_WRAPPER(NodeId, getReferenceTypeId, referenceTypeId)
890 UAPP_GETTER(bool, getIsForward, isForward)
891 UAPP_GETTER_WRAPPER(ExpandedNodeId, getTargetNodeId, targetNodeId)
892 UAPP_GETTER(bool, getDeleteBidirectional, deleteBidirectional)
893};
894
895/**
896 * UA_DeleteReferencesRequest wrapper class.
897 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.5
898 */
900 : public TypeWrapper<UA_DeleteReferencesRequest, UA_TYPES_DELETEREFERENCESREQUEST> {
901public:
902 using TypeWrapper::TypeWrapper;
903
905 RequestHeader requestHeader, Span<const DeleteReferencesItem> referencesToDelete
906 ) {
907 handle()->requestHeader = detail::toNative(std::move(requestHeader));
908 handle()->referencesToDeleteSize = referencesToDelete.size();
909 handle()->referencesToDelete = detail::toNativeArray(referencesToDelete);
910 }
911
912 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
914 DeleteReferencesItem, getReferencesToDelete, referencesToDelete, referencesToDeleteSize
916};
917
918/**
919 * UA_DeleteReferencesResponse wrapper class.
920 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.7.5
921 */
923 : public TypeWrapper<UA_DeleteReferencesResponse, UA_TYPES_DELETEREFERENCESRESPONSE> {
924public:
925 using TypeWrapper::TypeWrapper;
926
927 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
928 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getResults, results, resultsSize)
930 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
932};
933
934/**
935 * UA_ViewDescription wrapper class.
936 */
937class ViewDescription : public TypeWrapper<UA_ViewDescription, UA_TYPES_VIEWDESCRIPTION> {
938public:
939 using TypeWrapper::TypeWrapper;
940
941 ViewDescription(NodeId viewId, DateTime timestamp, uint32_t viewVersion) {
942 handle()->viewId = detail::toNative(std::move(viewId));
943 handle()->timestamp = timestamp;
944 handle()->viewVersion = viewVersion;
945 }
946
947 UAPP_GETTER_WRAPPER(NodeId, getViewId, viewId)
948 UAPP_GETTER_WRAPPER(DateTime, getTimestamp, timestamp)
949 UAPP_GETTER(uint32_t, getViewVersion, viewVersion)
950};
951
952/**
953 * Browse result mask.
954 *
955 * The enum can be used as a bitmask and allows bitwise operations, e.g.:
956 * @code
957 * auto mask = BrowseResultMask::ReferenceTypeId | BrowseResultMask::IsForward;
958 * @endcode
959 *
960 * @see UA_BrowseResultMask
961 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.8.2
962 */
977
978template <>
979struct IsBitmaskEnum<BrowseResultMask> : std::true_type {};
980
981/**
982 * UA_BrowseDescription wrapper class.
983 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.8.2
984 */
985class BrowseDescription : public TypeWrapper<UA_BrowseDescription, UA_TYPES_BROWSEDESCRIPTION> {
986public:
987 using TypeWrapper::TypeWrapper;
988
990 NodeId nodeId,
991 BrowseDirection browseDirection,
992 NodeId referenceTypeId = ReferenceTypeId::References,
993 bool includeSubtypes = true,
994 Bitmask<NodeClass> nodeClassMask = NodeClass::Unspecified,
995 Bitmask<BrowseResultMask> resultMask = BrowseResultMask::All
996 ) {
997 handle()->nodeId = detail::toNative(std::move(nodeId));
998 handle()->browseDirection = static_cast<UA_BrowseDirection>(browseDirection);
999 handle()->referenceTypeId = detail::toNative(std::move(referenceTypeId));
1000 handle()->includeSubtypes = includeSubtypes;
1001 handle()->nodeClassMask = nodeClassMask.get();
1002 handle()->resultMask = resultMask.get();
1003 }
1004
1005 UAPP_GETTER_WRAPPER(NodeId, getNodeId, nodeId)
1006 UAPP_GETTER_CAST(BrowseDirection, getBrowseDirection, browseDirection)
1007 UAPP_GETTER_WRAPPER(NodeId, getReferenceTypeId, referenceTypeId)
1008 UAPP_GETTER(bool, getIncludeSubtypes, includeSubtypes)
1009 UAPP_GETTER(Bitmask<NodeClass>, getNodeClassMask, nodeClassMask)
1010 UAPP_GETTER(Bitmask<BrowseResultMask>, getResultMask, resultMask)
1011};
1012
1013/**
1014 * UA_BrowseRequest wrapper class.
1015 */
1016class BrowseRequest : public TypeWrapper<UA_BrowseRequest, UA_TYPES_BROWSEREQUEST> {
1017public:
1018 using TypeWrapper::TypeWrapper;
1019
1021 RequestHeader requestHeader,
1022 ViewDescription view,
1023 uint32_t requestedMaxReferencesPerNode,
1024 Span<const BrowseDescription> nodesToBrowse
1025 ) {
1026 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1027 handle()->view = detail::toNative(std::move(view));
1028 handle()->requestedMaxReferencesPerNode = requestedMaxReferencesPerNode;
1029 handle()->nodesToBrowseSize = nodesToBrowse.size();
1030 handle()->nodesToBrowse = detail::toNativeArray(nodesToBrowse);
1031 }
1032
1033 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1035 UAPP_GETTER(uint32_t, getRequestedMaxReferencesPerNode, requestedMaxReferencesPerNode)
1036 UAPP_GETTER_SPAN_WRAPPER(BrowseDescription, getNodesToBrowse, nodesToBrowse, nodesToBrowseSize)
1037};
1038
1039/**
1040 * UA_ReferenceDescription wrapper class.
1041 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.30
1042 */
1044 : public TypeWrapper<UA_ReferenceDescription, UA_TYPES_REFERENCEDESCRIPTION> {
1045public:
1046 using TypeWrapper::TypeWrapper;
1047
1048 UAPP_GETTER_WRAPPER(NodeId, getReferenceTypeId, referenceTypeId)
1049 UAPP_GETTER(bool, getIsForward, isForward)
1051 UAPP_GETTER_WRAPPER(QualifiedName, getBrowseName, browseName)
1052 UAPP_GETTER_WRAPPER(LocalizedText, getDisplayName, displayName)
1053 UAPP_GETTER_CAST(NodeClass, getNodeClass, nodeClass)
1054 UAPP_GETTER_WRAPPER(ExpandedNodeId, getTypeDefinition, typeDefinition)
1055};
1056
1057/**
1058 * UA_BrowseResult wrapper class.
1059 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.6
1060 */
1061class BrowseResult : public TypeWrapper<UA_BrowseResult, UA_TYPES_BROWSERESULT> {
1062public:
1063 using TypeWrapper::TypeWrapper;
1064
1065 UAPP_GETTER(StatusCode, getStatusCode, statusCode)
1066 UAPP_GETTER_WRAPPER(ByteString, getContinuationPoint, continuationPoint)
1067 UAPP_GETTER_SPAN_WRAPPER(ReferenceDescription, getReferences, references, referencesSize)
1068};
1069
1070/**
1071 * UA_BrowseResponse wrapper class.
1072 */
1073class BrowseResponse : public TypeWrapper<UA_BrowseResponse, UA_TYPES_BROWSERESPONSE> {
1074public:
1075 using TypeWrapper::TypeWrapper;
1076
1077 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1078 UAPP_GETTER_SPAN_WRAPPER(BrowseResult, getResults, results, resultsSize)
1080 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
1082};
1083
1084/**
1085 * UA_BrowseNextRequest wrapper class.
1086 */
1087class BrowseNextRequest : public TypeWrapper<UA_BrowseNextRequest, UA_TYPES_BROWSENEXTREQUEST> {
1088public:
1089 using TypeWrapper::TypeWrapper;
1090
1092 RequestHeader requestHeader,
1093 bool releaseContinuationPoints,
1094 Span<const ByteString> continuationPoints
1095 ) {
1096 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1097 handle()->releaseContinuationPoints = releaseContinuationPoints;
1098 handle()->continuationPointsSize = continuationPoints.size();
1099 handle()->continuationPoints = detail::toNativeArray(continuationPoints);
1100 }
1101
1102 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1103 UAPP_GETTER(bool, getReleaseContinuationPoints, releaseContinuationPoints)
1105 ByteString, getContinuationPoints, continuationPoints, continuationPointsSize
1107};
1108
1109/**
1110 * UA_BrowseNextResponse wrapper class.
1111 */
1112class BrowseNextResponse : public TypeWrapper<UA_BrowseNextResponse, UA_TYPES_BROWSENEXTRESPONSE> {
1113public:
1114 using TypeWrapper::TypeWrapper;
1115
1116 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1117 UAPP_GETTER_SPAN_WRAPPER(BrowseResult, getResults, results, resultsSize)
1119 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
1121};
1122
1123/**
1124 * UA_RelativePathElement wrapper class.
1125 */
1127 : public TypeWrapper<UA_RelativePathElement, UA_TYPES_RELATIVEPATHELEMENT> {
1128public:
1129 using TypeWrapper::TypeWrapper;
1130
1132 NodeId referenceTypeId, bool isInverse, bool includeSubtypes, QualifiedName targetName
1133 ) {
1134 handle()->referenceTypeId = detail::toNative(std::move(referenceTypeId));
1135 handle()->isInverse = isInverse;
1136 handle()->includeSubtypes = includeSubtypes;
1137 handle()->targetName = detail::toNative(std::move(targetName));
1138 }
1139
1140 UAPP_GETTER_WRAPPER(NodeId, getReferenceTypeId, referenceTypeId)
1141 UAPP_GETTER(bool, getIsInverse, isInverse)
1142 UAPP_GETTER(bool, getIncludeSubtypes, includeSubtypes)
1143 UAPP_GETTER_WRAPPER(QualifiedName, getTargetName, targetName)
1144};
1145
1146/**
1147 * UA_RelativePath wrapper class.
1148 */
1149class RelativePath : public TypeWrapper<UA_RelativePath, UA_TYPES_RELATIVEPATH> {
1150public:
1151 using TypeWrapper::TypeWrapper;
1152
1153 RelativePath(std::initializer_list<RelativePathElement> elements)
1154 : RelativePath({elements.begin(), elements.size()}) {}
1155
1157 handle()->elementsSize = elements.size();
1158 handle()->elements = detail::toNativeArray(elements);
1159 }
1160
1161 UAPP_GETTER_SPAN_WRAPPER(RelativePathElement, getElements, elements, elementsSize)
1162};
1163
1164/**
1165 * UA_BrowsePath wrapper class.
1166 */
1167class BrowsePath : public TypeWrapper<UA_BrowsePath, UA_TYPES_BROWSEPATH> {
1168public:
1169 using TypeWrapper::TypeWrapper;
1170
1171 BrowsePath(NodeId startingNode, RelativePath relativePath) {
1172 handle()->startingNode = detail::toNative(std::move(startingNode));
1173 handle()->relativePath = detail::toNative(std::move(relativePath));
1174 }
1175
1176 UAPP_GETTER_WRAPPER(NodeId, getStartingNode, startingNode)
1177 UAPP_GETTER_WRAPPER(RelativePath, getRelativePath, relativePath)
1178};
1179
1180/**
1181 * UA_BrowsePathTarget wrapper class.
1182 */
1183class BrowsePathTarget : public TypeWrapper<UA_BrowsePathTarget, UA_TYPES_BROWSEPATHTARGET> {
1184public:
1185 using TypeWrapper::TypeWrapper;
1186
1187 UAPP_GETTER_WRAPPER(ExpandedNodeId, getTargetId, targetId)
1188 UAPP_GETTER(uint32_t, getRemainingPathIndex, remainingPathIndex)
1189};
1190
1191/**
1192 * UA_BrowsePathResult wrapper class.
1193 */
1194class BrowsePathResult : public TypeWrapper<UA_BrowsePathResult, UA_TYPES_BROWSEPATHRESULT> {
1195public:
1196 using TypeWrapper::TypeWrapper;
1197
1198 UAPP_GETTER(StatusCode, getStatusCode, statusCode)
1199 UAPP_GETTER_SPAN_WRAPPER(BrowsePathTarget, getTargets, targets, targetsSize)
1200};
1201
1202/**
1203 * UA_TranslateBrowsePathsToNodeIdsRequest wrapper class.
1204 */
1206 : public TypeWrapper<
1208 UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSREQUEST> {
1209public:
1210 using TypeWrapper::TypeWrapper;
1211
1213 RequestHeader requestHeader, Span<const BrowsePath> browsePaths
1214 ) {
1215 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1216 handle()->browsePathsSize = browsePaths.size();
1217 handle()->browsePaths = detail::toNativeArray(browsePaths);
1218 }
1219
1220 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1221 UAPP_GETTER_SPAN_WRAPPER(BrowsePath, getBrowsePaths, browsePaths, browsePathsSize)
1222};
1223
1224/**
1225 * UA_TranslateBrowsePathsToNodeIdsResponse wrapper class.
1226 */
1228 : public TypeWrapper<
1230 UA_TYPES_TRANSLATEBROWSEPATHSTONODEIDSRESPONSE> {
1231public:
1232 using TypeWrapper::TypeWrapper;
1233
1234 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1235 UAPP_GETTER_SPAN_WRAPPER(BrowsePathResult, getResults, results, resultsSize)
1237 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
1239};
1240
1241/**
1242 * UA_RegisterNodesRequest wrapper class.
1243 */
1245 : public TypeWrapper<UA_RegisterNodesRequest, UA_TYPES_REGISTERNODESREQUEST> {
1246public:
1247 using TypeWrapper::TypeWrapper;
1248
1250 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1251 handle()->nodesToRegisterSize = nodesToRegister.size();
1252 handle()->nodesToRegister = detail::toNativeArray(nodesToRegister);
1253 }
1254
1255 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1256 UAPP_GETTER_SPAN_WRAPPER(NodeId, getNodesToRegister, nodesToRegister, nodesToRegisterSize)
1257};
1258
1259/**
1260 * UA_RegisterNodesResponse wrapper class.
1261 */
1263 : public TypeWrapper<UA_RegisterNodesResponse, UA_TYPES_REGISTERNODESRESPONSE> {
1264public:
1265 using TypeWrapper::TypeWrapper;
1266
1267 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1268 UAPP_GETTER_SPAN_WRAPPER(NodeId, getRegisteredNodeIds, registeredNodeIds, registeredNodeIdsSize)
1269};
1270
1271/**
1272 * UA_UnregisterNodesRequest wrapper class.
1273 */
1275 : public TypeWrapper<UA_UnregisterNodesRequest, UA_TYPES_UNREGISTERNODESREQUEST> {
1276public:
1277 using TypeWrapper::TypeWrapper;
1278
1279 UnregisterNodesRequest(RequestHeader requestHeader, Span<const NodeId> nodesToUnregister) {
1280 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1281 handle()->nodesToUnregisterSize = nodesToUnregister.size();
1282 handle()->nodesToUnregister = detail::toNativeArray(nodesToUnregister);
1283 }
1284
1285 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1286 UAPP_GETTER_SPAN_WRAPPER(NodeId, getNodesToUnregister, nodesToUnregister, nodesToUnregisterSize)
1287};
1288
1289/**
1290 * UA_UnregisterNodesResponse wrapper class.
1291 */
1293 : public TypeWrapper<UA_UnregisterNodesResponse, UA_TYPES_UNREGISTERNODESRESPONSE> {
1294public:
1295 using TypeWrapper::TypeWrapper;
1296
1297 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1298};
1299
1300/**
1301 * UA_ReadValueId wrapper class.
1302 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.29
1303 */
1304class ReadValueId : public TypeWrapper<UA_ReadValueId, UA_TYPES_READVALUEID> {
1305public:
1306 using TypeWrapper::TypeWrapper;
1307
1309 NodeId nodeId,
1310 AttributeId attributeId,
1311 std::string_view indexRange = {},
1312 QualifiedName dataEncoding = {}
1313 ) {
1314 handle()->nodeId = detail::toNative(std::move(nodeId));
1315 handle()->attributeId = detail::toNative(attributeId);
1316 handle()->indexRange = detail::toNative(indexRange);
1317 handle()->dataEncoding = detail::toNative(std::move(dataEncoding));
1318 }
1319
1320 UAPP_GETTER_WRAPPER(NodeId, getNodeId, nodeId)
1321 UAPP_GETTER_CAST(AttributeId, getAttributeId, attributeId)
1322 UAPP_GETTER_WRAPPER(String, getIndexRange, indexRange)
1323 UAPP_GETTER_WRAPPER(QualifiedName, getDataEncoding, dataEncoding)
1324};
1325
1326/**
1327 * UA_ReadRequest wrapper class.
1328 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.10.2
1329 */
1330class ReadRequest : public TypeWrapper<UA_ReadRequest, UA_TYPES_READREQUEST> {
1331public:
1332 using TypeWrapper::TypeWrapper;
1333
1335 RequestHeader requestHeader,
1336 double maxAge,
1337 TimestampsToReturn timestampsToReturn,
1338 Span<const ReadValueId> nodesToRead
1339 ) {
1340 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1341 handle()->maxAge = maxAge;
1342 handle()->timestampsToReturn = static_cast<UA_TimestampsToReturn>(timestampsToReturn);
1343 handle()->nodesToReadSize = nodesToRead.size();
1344 handle()->nodesToRead = detail::toNativeArray(nodesToRead);
1345 }
1346
1347 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1348 UAPP_GETTER(double, getMaxAge, maxAge)
1349 UAPP_GETTER_CAST(TimestampsToReturn, getTimestampsToReturn, timestampsToReturn)
1350 UAPP_GETTER_SPAN_WRAPPER(ReadValueId, getNodesToRead, nodesToRead, nodesToReadSize)
1351};
1352
1353/**
1354 * UA_ReadResponse wrapper class.
1355 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.10.2
1356 */
1357class ReadResponse : public TypeWrapper<UA_ReadResponse, UA_TYPES_READRESPONSE> {
1358public:
1359 using TypeWrapper::TypeWrapper;
1360
1361 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1362 UAPP_GETTER_SPAN_WRAPPER(DataValue, getResults, results, resultsSize)
1364 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
1366};
1367
1368/**
1369 * UA_WriteValue wrapper class.
1370 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.10.4
1371 */
1372class WriteValue : public TypeWrapper<UA_WriteValue, UA_TYPES_WRITEVALUE> {
1373public:
1374 using TypeWrapper::TypeWrapper;
1375
1377 NodeId nodeId, AttributeId attributeId, std::string_view indexRange, DataValue value
1378 ) {
1379 handle()->nodeId = detail::toNative(std::move(nodeId));
1380 handle()->attributeId = detail::toNative(attributeId);
1381 handle()->indexRange = detail::toNative(indexRange);
1382 handle()->value = detail::toNative(std::move(value));
1383 }
1384
1385 UAPP_GETTER_WRAPPER(NodeId, getNodeId, nodeId)
1386 UAPP_GETTER_CAST(AttributeId, getAttributeId, attributeId)
1387 UAPP_GETTER_WRAPPER(String, getIndexRange, indexRange)
1389};
1390
1391/**
1392 * UA_WriteRequest wrapper class.
1393 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.10.4
1394 */
1395class WriteRequest : public TypeWrapper<UA_WriteRequest, UA_TYPES_WRITEREQUEST> {
1396public:
1397 using TypeWrapper::TypeWrapper;
1398
1400 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1401 handle()->nodesToWriteSize = nodesToWrite.size();
1402 handle()->nodesToWrite = detail::toNativeArray(nodesToWrite);
1403 }
1404
1405 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1406 UAPP_GETTER_SPAN_WRAPPER(WriteValue, getNodesToWrite, nodesToWrite, nodesToWriteSize)
1407};
1408
1409/**
1410 * UA_WriteResponse wrapper class.
1411 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.10.4
1412 */
1413class WriteResponse : public TypeWrapper<UA_WriteResponse, UA_TYPES_WRITERESPONSE> {
1414public:
1415 using TypeWrapper::TypeWrapper;
1416
1417 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1418 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getResults, results, resultsSize)
1420 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
1422};
1423
1424/**
1425 * UA_BuildInfo wrapper class.
1426 * @see https://reference.opcfoundation.org/Core/Part5/v105/docs/12.4
1427 */
1428class BuildInfo : public TypeWrapper<UA_BuildInfo, UA_TYPES_BUILDINFO> {
1429public:
1430 using TypeWrapper::TypeWrapper;
1431
1433 std::string_view productUri,
1434 std::string_view manufacturerName,
1435 std::string_view productName,
1436 std::string_view softwareVersion,
1437 std::string_view buildNumber,
1438 DateTime buildDate
1439 ) {
1440 handle()->productUri = detail::toNative(productUri);
1441 handle()->manufacturerName = detail::toNative(manufacturerName);
1442 handle()->productName = detail::toNative(productName);
1443 handle()->softwareVersion = detail::toNative(softwareVersion);
1444 handle()->buildNumber = detail::toNative(buildNumber);
1445 handle()->buildDate = detail::toNative(std::move(buildDate));
1446 }
1447
1448 UAPP_GETTER_WRAPPER(String, getProductUri, productUri);
1449 UAPP_GETTER_WRAPPER(String, getManufacturerName, manufacturerName);
1450 UAPP_GETTER_WRAPPER(String, getProductName, productName);
1451 UAPP_GETTER_WRAPPER(String, getSoftwareVersion, softwareVersion);
1452 UAPP_GETTER_WRAPPER(String, getBuildNumber, buildNumber);
1453 UAPP_GETTER_WRAPPER(DateTime, getBuildDate, buildDate)
1454};
1455
1456/* ------------------------------------------- Method ------------------------------------------- */
1457
1458#ifdef UA_ENABLE_METHODCALLS
1459
1460/**
1461 * UA_Argument wrapper class.
1462 * @see https://reference.opcfoundation.org/Core/Part3/v105/docs/8.6
1463 */
1464class Argument : public TypeWrapper<UA_Argument, UA_TYPES_ARGUMENT> {
1465public:
1466 using TypeWrapper::TypeWrapper;
1467
1469 std::string_view name,
1470 LocalizedText description,
1471 NodeId dataType,
1472 ValueRank valueRank = {},
1473 Span<const uint32_t> arrayDimensions = {}
1474 ) {
1475 handle()->name = detail::toNative(name);
1476 handle()->description = detail::toNative(std::move(description));
1477 handle()->dataType = detail::toNative(std::move(dataType));
1478 handle()->valueRank = detail::toNative(valueRank);
1479 handle()->arrayDimensionsSize = arrayDimensions.size();
1480 handle()->arrayDimensions = detail::toNativeArray(arrayDimensions);
1481 }
1482
1484 UAPP_GETTER_WRAPPER(LocalizedText, getDescription, description)
1485 UAPP_GETTER_WRAPPER(NodeId, getDataType, dataType)
1486 UAPP_GETTER_CAST(ValueRank, getValueRank, valueRank)
1487 UAPP_GETTER_SPAN(uint32_t, getArrayDimensions, arrayDimensions, arrayDimensionsSize)
1488};
1489
1490/**
1491 * UA_CallMethodRequest wrapper class.
1492 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.11.2
1493 */
1494class CallMethodRequest : public TypeWrapper<UA_CallMethodRequest, UA_TYPES_CALLMETHODREQUEST> {
1495public:
1496 using TypeWrapper::TypeWrapper;
1497
1498 CallMethodRequest(NodeId objectId, NodeId methodId, Span<const Variant> inputArguments) {
1499 handle()->objectId = detail::toNative(std::move(objectId));
1500 handle()->methodId = detail::toNative(std::move(methodId));
1501 handle()->inputArgumentsSize = inputArguments.size();
1502 handle()->inputArguments = detail::toNativeArray(inputArguments);
1503 }
1504
1505 UAPP_GETTER_WRAPPER(NodeId, getObjectId, objectId)
1506 UAPP_GETTER_WRAPPER(NodeId, getMethodId, methodId)
1507 UAPP_GETTER_SPAN_WRAPPER(Variant, getInputArguments, inputArguments, inputArgumentsSize)
1508};
1509
1510/**
1511 * UA_CallMethodResult wrapper class.
1512 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.11.2
1513 */
1514class CallMethodResult : public TypeWrapper<UA_CallMethodResult, UA_TYPES_CALLMETHODRESULT> {
1515public:
1516 using TypeWrapper::TypeWrapper;
1517
1518 UAPP_GETTER_WRAPPER(StatusCode, getStatusCode, statusCode)
1520 StatusCode, getInputArgumentResults, inputArgumentResults, inputArgumentResultsSize
1524 getInputArgumentDiagnosticInfos,
1525 inputArgumentDiagnosticInfos,
1526 inputArgumentDiagnosticInfosSize
1528 UAPP_GETTER_SPAN_WRAPPER(Variant, getOutputArguments, outputArguments, outputArgumentsSize)
1529};
1530
1531/**
1532 * UA_CallRequest wrapper class.
1533 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.11.2
1534 */
1535class CallRequest : public TypeWrapper<UA_CallRequest, UA_TYPES_CALLREQUEST> {
1536public:
1537 using TypeWrapper::TypeWrapper;
1538
1540 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1541 handle()->methodsToCallSize = methodsToCall.size();
1542 handle()->methodsToCall = detail::toNativeArray(methodsToCall);
1543 }
1544
1545 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1546 UAPP_GETTER_SPAN_WRAPPER(CallMethodRequest, getMethodsToCall, methodsToCall, methodsToCallSize)
1547};
1548
1549/**
1550 * UA_CallResponse wrapper class.
1551 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.11.2
1552 */
1553class CallResponse : public TypeWrapper<UA_CallResponse, UA_TYPES_CALLRESPONSE> {
1554public:
1555 using TypeWrapper::TypeWrapper;
1556
1557 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1558 UAPP_GETTER_SPAN_WRAPPER(CallMethodResult, getResults, results, resultsSize)
1560 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
1562};
1563
1564#endif // UA_ENABLE_METHODCALLS
1565
1566/* ---------------------------------------- Subscriptions --------------------------------------- */
1567
1568#ifdef UA_ENABLE_SUBSCRIPTIONS
1569
1570/**
1571 * Filter operator.
1572 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.3
1573 */
1574enum class FilterOperator : int32_t {
1575 // clang-format off
1576 Equals = 0,
1577 IsNull = 1,
1578 GreaterThan = 2,
1579 LessThan = 3,
1581 LessThanOrEqual = 5,
1582 Like = 6,
1583 Not = 7,
1584 Between = 8,
1585 InList = 9,
1586 And = 10,
1587 Or = 11,
1588 Cast = 12,
1589 InView = 13,
1590 OfType = 14,
1591 RelatedTo = 15,
1592 BitwiseAnd = 16,
1593 BitwiseOr = 17,
1594 // clang-format on
1595};
1596
1597/**
1598 * UA_ElementOperand wrapper class.
1599 * Reference a sub-element in the ContentFilter elements array by index.
1600 * The index must be greater than the element index it is part of.
1601 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.4.2
1602 */
1603class ElementOperand : public TypeWrapper<UA_ElementOperand, UA_TYPES_ELEMENTOPERAND> {
1604public:
1605 using TypeWrapper::TypeWrapper;
1606
1607 explicit ElementOperand(uint32_t index) {
1608 handle()->index = index;
1609 }
1610
1611 UAPP_GETTER(uint32_t, getIndex, index)
1612};
1613
1614/**
1615 * UA_LiteralOperand wrapper class.
1616 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.4.3
1617 */
1618class LiteralOperand : public TypeWrapper<UA_LiteralOperand, UA_TYPES_LITERALOPERAND> {
1619private:
1620 template <typename T>
1621 using EnableIfLiteral =
1622 std::enable_if_t<!detail::IsOneOf<T, Variant, UA_LiteralOperand, LiteralOperand>::value>;
1623
1624public:
1625 using TypeWrapper::TypeWrapper;
1626
1627 explicit LiteralOperand(Variant value) {
1628 handle()->value = detail::toNative(std::move(value));
1629 }
1630
1631 template <typename T, typename = EnableIfLiteral<T>>
1632 explicit LiteralOperand(T&& literal)
1633 : LiteralOperand(Variant::fromScalar(std::forward<T>(literal))) {}
1634
1636};
1637
1638/**
1639 * UA_AttributeOperand wrapper class.
1640 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.4.4
1641 */
1642class AttributeOperand : public TypeWrapper<UA_AttributeOperand, UA_TYPES_ATTRIBUTEOPERAND> {
1643public:
1644 using TypeWrapper::TypeWrapper;
1645
1647 NodeId nodeId,
1648 std::string_view alias,
1649 RelativePath browsePath,
1650 AttributeId attributeId,
1651 std::string_view indexRange = {}
1652 ) {
1653 handle()->nodeId = detail::toNative(std::move(nodeId));
1654 handle()->alias = detail::toNative(alias);
1655 handle()->browsePath = detail::toNative(std::move(browsePath));
1656 handle()->attributeId = detail::toNative(attributeId);
1657 handle()->indexRange = detail::toNative(indexRange);
1658 }
1659
1660 UAPP_GETTER_WRAPPER(NodeId, getNodeId, nodeId)
1661 UAPP_GETTER_WRAPPER(String, getAlias, alias)
1662 UAPP_GETTER_WRAPPER(RelativePath, getBrowsePath, browsePath)
1663 UAPP_GETTER_CAST(AttributeId, getAttributeId, attributeId)
1664 UAPP_GETTER_WRAPPER(String, getIndexRange, indexRange)
1665};
1666
1667/**
1668 * UA_SimpleAttributeOperand wrapper class.
1669 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.4.5
1670 */
1672 : public TypeWrapper<UA_SimpleAttributeOperand, UA_TYPES_SIMPLEATTRIBUTEOPERAND> {
1673public:
1674 using TypeWrapper::TypeWrapper;
1675
1677 NodeId typeDefinitionId,
1678 Span<const QualifiedName> browsePath,
1679 AttributeId attributeId,
1680 std::string_view indexRange = {}
1681 ) {
1682 handle()->typeDefinitionId = detail::toNative(std::move(typeDefinitionId));
1683 handle()->browsePathSize = browsePath.size();
1684 handle()->browsePath = detail::toNativeArray(browsePath);
1685 handle()->attributeId = detail::toNative(attributeId);
1686 handle()->indexRange = detail::toNative(indexRange);
1687 }
1688
1689 UAPP_GETTER_WRAPPER(NodeId, getTypeDefinitionId, typeDefinitionId)
1690 UAPP_GETTER_SPAN_WRAPPER(QualifiedName, getBrowsePath, browsePath, browsePathSize)
1691 UAPP_GETTER_CAST(AttributeId, getAttributeId, attributeId)
1692 UAPP_GETTER_WRAPPER(String, getIndexRange, indexRange)
1693};
1694
1695/**
1696 * Filter operand.
1697 *
1698 * The FilterOperand is an extensible parameter and can be of type:
1699 * - ElementOperand
1700 * - LiteralOperand
1701 * - AttributeOperand
1702 * - SimpleAttributeOperand
1703 * - ExtensionObject (other types)
1704 *
1705 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.4
1706 */
1707using FilterOperand = std::variant<
1713
1714/**
1715 * UA_ContentFilterElement wrapper class.
1716 *
1717 * ContentFilterElements compose a filter criteria with an operator and its operands.
1718 * ContentFilterElements can be composed to ContentFilter objects with the `&&`/`||` operators and
1719 * negated with the `!` operator.
1720 *
1721 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.1
1722 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/B.1
1723 */
1725 : public TypeWrapper<UA_ContentFilterElement, UA_TYPES_CONTENTFILTERELEMENT> {
1726public:
1727 using TypeWrapper::TypeWrapper;
1728
1730
1731 UAPP_GETTER_CAST(FilterOperator, getFilterOperator, filterOperator)
1732 UAPP_GETTER_SPAN_WRAPPER(ExtensionObject, getFilterOperands, filterOperands, filterOperandsSize)
1733};
1734
1735/**
1736 * UA_ContentFilter wrapper class.
1737 *
1738 * A collection of ContentFilterElement objects that define a filter criteria. The ContentFilter has
1739 * a tree-like structure with references to sub-elements (of type ElementOperand). The evaluation of
1740 * the ContentFilter starts with the first entry of the elements.
1741 * ContentFilter objects can be composed with `&&`/`||` operators and negated with the `!` operator.
1742 *
1743 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.1
1744 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/B.1
1745 */
1746class ContentFilter : public TypeWrapper<UA_ContentFilter, UA_TYPES_CONTENTFILTER> {
1747public:
1748 using TypeWrapper::TypeWrapper;
1749
1750 ContentFilter(std::initializer_list<ContentFilterElement> elements);
1752
1753 UAPP_GETTER_SPAN_WRAPPER(ContentFilterElement, getElements, elements, elementsSize)
1754};
1755
1758
1763
1768
1769/**
1770 * Data change trigger.
1771 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.10
1772 */
1773enum class DataChangeTrigger : int32_t {
1774 // clang-format off
1775 Status = 0,
1776 StatusValue = 1,
1778 // clang-format on
1779};
1780
1781/**
1782 * Deadband type.
1783 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.22.2
1784 */
1785enum class DeadbandType : int32_t {
1786 // clang-format off
1787 None = 0,
1788 Absolute = 1,
1789 Percent = 2,
1790 // clang-format on
1791};
1792
1793/**
1794 * UA_DataChangeFilter wrapper class.
1795 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.22.2
1796 */
1797class DataChangeFilter : public TypeWrapper<UA_DataChangeFilter, UA_TYPES_DATACHANGEFILTER> {
1798public:
1799 using TypeWrapper::TypeWrapper;
1800
1801 DataChangeFilter(DataChangeTrigger trigger, DeadbandType deadbandType, double deadbandValue) {
1802 handle()->trigger = static_cast<UA_DataChangeTrigger>(trigger);
1803 handle()->deadbandType = detail::toNative(deadbandType);
1804 handle()->deadbandValue = deadbandValue;
1805 }
1806
1808 UAPP_GETTER_CAST(DeadbandType, getDeadbandType, deadbandType)
1809 UAPP_GETTER(double, getDeadbandValue, deadbandValue)
1810};
1811
1812/**
1813 * UA_EventFilter wrapper class.
1814 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.22.3
1815 */
1816class EventFilter : public TypeWrapper<UA_EventFilter, UA_TYPES_EVENTFILTER> {
1817public:
1818 using TypeWrapper::TypeWrapper;
1819
1821 handle()->selectClausesSize = selectClauses.size();
1822 handle()->selectClauses = detail::toNativeArray(selectClauses);
1823 handle()->whereClause = detail::toNative(std::move(whereClause));
1824 }
1825
1827 SimpleAttributeOperand, getSelectClauses, selectClauses, selectClausesSize
1829 UAPP_GETTER_WRAPPER(ContentFilter, getWhereClause, whereClause)
1830};
1831
1833
1834/**
1835 * UA_AggregateFilter wrapper class.
1836 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.22.4
1837 */
1838class AggregateFilter : public TypeWrapper<UA_AggregateFilter, UA_TYPES_AGGREGATEFILTER> {
1839public:
1840 using TypeWrapper::TypeWrapper;
1841
1843 DateTime startTime,
1844 NodeId aggregateType,
1845 double processingInterval,
1846 AggregateConfiguration aggregateConfiguration
1847 ) {
1848 handle()->startTime = detail::toNative(std::move(startTime));
1849 handle()->aggregateType = detail::toNative(std::move(aggregateType));
1850 handle()->processingInterval = processingInterval;
1851 handle()->aggregateConfiguration = aggregateConfiguration; // TODO: make wrapper?
1852 }
1853
1854 UAPP_GETTER_WRAPPER(DateTime, getStartTime, startTime)
1855 UAPP_GETTER_WRAPPER(NodeId, getAggregateType, aggregateType)
1856 UAPP_GETTER(double, getProcessingInterval, processingInterval)
1857 UAPP_GETTER(AggregateConfiguration, getAggregateConfiguration, aggregateConfiguration)
1858};
1859
1860/**
1861 * UA_MonitoringParameters wrapper class.
1862 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.21
1863 */
1865 : public TypeWrapper<UA_MonitoringParameters, UA_TYPES_MONITORINGPARAMETERS> {
1866public:
1867 using TypeWrapper::TypeWrapper;
1868
1869 /// Construct with default values from open62541.
1870 /// The `clientHandle` parameter cannot be set by the user, any value will be replaced by the
1871 /// client before sending the request to the server.
1872 // NOLINTNEXTLINE(hicpp-explicit-conversions)
1874 double samplingInterval = 250.0,
1875 ExtensionObject filter = {},
1876 uint32_t queueSize = 1U,
1877 bool discardOldest = true
1878 ) {
1879 handle()->samplingInterval = samplingInterval;
1880 handle()->filter = detail::toNative(std::move(filter));
1881 handle()->queueSize = queueSize;
1882 handle()->discardOldest = discardOldest;
1883 }
1884
1885 UAPP_GETTER(double, getSamplingInterval, samplingInterval)
1887 UAPP_GETTER(uint32_t, getQueueSize, queueSize)
1888 UAPP_GETTER(bool, getDiscardOldest, discardOldest)
1889};
1890
1891/**
1892 * UA_MonitoredItemCreateRequest wrapper class.
1893 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.2
1894 */
1896 : public TypeWrapper<UA_MonitoredItemCreateRequest, UA_TYPES_MONITOREDITEMCREATEREQUEST> {
1897public:
1898 using TypeWrapper::TypeWrapper;
1899
1901 ReadValueId itemToMonitor,
1902 MonitoringMode monitoringMode = MonitoringMode::Reporting,
1903 MonitoringParameters requestedParameters = {}
1904 ) {
1905 handle()->itemToMonitor = detail::toNative(std::move(itemToMonitor));
1906 handle()->monitoringMode = static_cast<UA_MonitoringMode>(monitoringMode);
1907 handle()->requestedParameters = detail::toNative(std::move(requestedParameters));
1908 }
1909
1910 UAPP_GETTER_WRAPPER(ReadValueId, getItemToMonitor, itemToMonitor)
1911 UAPP_GETTER_CAST(MonitoringMode, getMonitoringMode, monitoringMode)
1912 UAPP_GETTER_WRAPPER(MonitoringParameters, getRequestedParameters, requestedParameters)
1913};
1914
1915/**
1916 * UA_MonitoredItemCreateResult wrapper class.
1917 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.2
1918 */
1920 : public TypeWrapper<UA_MonitoredItemCreateResult, UA_TYPES_MONITOREDITEMCREATERESULT> {
1921public:
1922 using TypeWrapper::TypeWrapper;
1923
1924 UAPP_GETTER_WRAPPER(StatusCode, getStatusCode, statusCode);
1925 UAPP_GETTER(uint32_t, getMonitoredItemId, monitoredItemId);
1926 UAPP_GETTER(double, getRevisedSamplingInterval, revisedSamplingInterval);
1927 UAPP_GETTER(uint32_t, getRevisedQueueSize, revisedQueueSize);
1928 UAPP_GETTER_WRAPPER(ExtensionObject, getFilterResult, filterResult);
1929};
1930
1931/**
1932 * UA_CreateMonitoredItemsRequest wrapper class.
1933 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.2
1934 */
1936 : public TypeWrapper<UA_CreateMonitoredItemsRequest, UA_TYPES_CREATEMONITOREDITEMSREQUEST> {
1937public:
1938 using TypeWrapper::TypeWrapper;
1939
1941 RequestHeader requestHeader,
1942 uint32_t subscriptionId,
1943 TimestampsToReturn timestampsToReturn,
1945 ) {
1946 handle()->requestHeader = detail::toNative(std::move(requestHeader));
1947 handle()->subscriptionId = subscriptionId;
1948 handle()->timestampsToReturn = static_cast<UA_TimestampsToReturn>(timestampsToReturn);
1949 handle()->itemsToCreateSize = itemsToCreate.size();
1950 handle()->itemsToCreate = detail::toNativeArray(itemsToCreate);
1951 }
1952
1953 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
1954 UAPP_GETTER(uint32_t, getSubscriptionId, subscriptionId)
1955 UAPP_GETTER_CAST(TimestampsToReturn, getTimestampsToReturn, timestampsToReturn)
1957 MonitoredItemCreateRequest, getItemsToCreate, itemsToCreate, itemsToCreateSize
1959};
1960
1961/**
1962 * UA_CreateMonitoredItemsResponse wrapper class.
1963 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.2
1964 */
1966 : public TypeWrapper<UA_CreateMonitoredItemsResponse, UA_TYPES_CREATEMONITOREDITEMSRESPONSE> {
1967public:
1968 using TypeWrapper::TypeWrapper;
1969
1970 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
1971 UAPP_GETTER_SPAN_WRAPPER(MonitoredItemCreateResult, getResults, results, resultsSize);
1973 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
1975};
1976
1977/**
1978 * UA_MonitoredItemModifyRequest wrapper class.
1979 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.3
1980 */
1982 : public TypeWrapper<UA_MonitoredItemModifyRequest, UA_TYPES_MONITOREDITEMMODIFYREQUEST> {
1983public:
1984 using TypeWrapper::TypeWrapper;
1985
1986 MonitoredItemModifyRequest(uint32_t monitoredItemId, MonitoringParameters requestedParameters) {
1987 handle()->monitoredItemId = monitoredItemId;
1988 handle()->requestedParameters = detail::toNative(std::move(requestedParameters));
1989 }
1990
1991 UAPP_GETTER(uint32_t, getMonitoredItemId, monitoredItemId);
1992 UAPP_GETTER_WRAPPER(MonitoringParameters, getRequestedParameters, requestedParameters)
1993};
1994
1995/**
1996 * UA_MonitoredItemModifyResult wrapper class.
1997 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.3
1998 */
2000 : public TypeWrapper<UA_MonitoredItemModifyResult, UA_TYPES_MONITOREDITEMMODIFYRESULT> {
2001public:
2002 using TypeWrapper::TypeWrapper;
2003
2004 UAPP_GETTER_WRAPPER(StatusCode, getStatusCode, statusCode);
2005 UAPP_GETTER(double, getRevisedSamplingInterval, revisedSamplingInterval);
2006 UAPP_GETTER(uint32_t, getRevisedQueueSize, revisedQueueSize);
2007 UAPP_GETTER_WRAPPER(ExtensionObject, getFilterResult, filterResult);
2008};
2009
2010/**
2011 * UA_ModifyMonitoredItemsRequest wrapper class.
2012 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.3
2013 */
2015 : public TypeWrapper<UA_ModifyMonitoredItemsRequest, UA_TYPES_MODIFYMONITOREDITEMSREQUEST> {
2016public:
2017 using TypeWrapper::TypeWrapper;
2018
2020 RequestHeader requestHeader,
2021 uint32_t subscriptionId,
2022 TimestampsToReturn timestampsToReturn,
2024 ) {
2025 handle()->requestHeader = detail::toNative(std::move(requestHeader));
2026 handle()->subscriptionId = subscriptionId;
2027 handle()->timestampsToReturn = static_cast<UA_TimestampsToReturn>(timestampsToReturn);
2028 handle()->itemsToModifySize = itemsToModify.size();
2029 handle()->itemsToModify = detail::toNativeArray(itemsToModify);
2030 }
2031
2032 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
2033 UAPP_GETTER(uint32_t, getSubscriptionId, subscriptionId)
2034 UAPP_GETTER_CAST(TimestampsToReturn, getTimestampsToReturn, timestampsToReturn)
2036 MonitoredItemModifyRequest, getItemsToModify, itemsToModify, itemsToModifySize
2038};
2039
2040/**
2041 * UA_CreateMonitoredItemsResponse wrapper class.
2042 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.3
2043 */
2045 : public TypeWrapper<UA_ModifyMonitoredItemsResponse, UA_TYPES_MODIFYMONITOREDITEMSRESPONSE> {
2046public:
2047 using TypeWrapper::TypeWrapper;
2048
2049 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
2050 UAPP_GETTER_SPAN_WRAPPER(MonitoredItemModifyResult, getResults, results, resultsSize);
2052 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
2054};
2055
2056/**
2057 * UA_SetMonitoringModeRequest wrapper class.
2058 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.4
2059 */
2061 : public TypeWrapper<UA_SetMonitoringModeRequest, UA_TYPES_SETMONITORINGMODEREQUEST> {
2062public:
2063 using TypeWrapper::TypeWrapper;
2064
2066 RequestHeader requestHeader,
2067 uint32_t subscriptionId,
2068 MonitoringMode monitoringMode,
2069 Span<const uint32_t> monitoredItemIds
2070 ) {
2071 handle()->requestHeader = detail::toNative(std::move(requestHeader));
2072 handle()->subscriptionId = subscriptionId;
2073 handle()->monitoringMode = static_cast<UA_MonitoringMode>(monitoringMode);
2074 handle()->monitoredItemIdsSize = monitoredItemIds.size();
2075 handle()->monitoredItemIds = detail::toNativeArray(monitoredItemIds);
2076 }
2077
2078 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
2079 UAPP_GETTER(uint32_t, getSubscriptionId, subscriptionId)
2080 UAPP_GETTER_CAST(MonitoringMode, getMonitoringMode, monitoringMode)
2081 UAPP_GETTER_SPAN(uint32_t, getMonitoredItemIds, monitoredItemIds, monitoredItemIdsSize)
2082};
2083
2084/**
2085 * UA_SetMonitoringModeResponse wrapper class.
2086 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.4
2087 */
2089 : public TypeWrapper<UA_SetMonitoringModeResponse, UA_TYPES_SETMONITORINGMODERESPONSE> {
2090public:
2091 using TypeWrapper::TypeWrapper;
2092
2093 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
2094 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getResults, results, resultsSize);
2096 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
2098};
2099
2100/**
2101 * UA_SetTriggeringRequest wrapper class.
2102 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.5
2103 */
2105 : public TypeWrapper<UA_SetTriggeringRequest, UA_TYPES_SETTRIGGERINGREQUEST> {
2106public:
2107 using TypeWrapper::TypeWrapper;
2108
2110 RequestHeader requestHeader,
2111 uint32_t subscriptionId,
2112 uint32_t triggeringItemId,
2113 Span<const uint32_t> linksToAdd,
2114 Span<const uint32_t> linksToRemove
2115 ) {
2116 handle()->requestHeader = detail::toNative(std::move(requestHeader));
2117 handle()->subscriptionId = subscriptionId;
2118 handle()->triggeringItemId = triggeringItemId;
2119 handle()->linksToAddSize = linksToAdd.size();
2120 handle()->linksToAdd = detail::toNativeArray(linksToAdd);
2121 handle()->linksToRemoveSize = linksToRemove.size();
2122 handle()->linksToRemove = detail::toNativeArray(linksToRemove);
2123 }
2124
2125 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
2126 UAPP_GETTER(uint32_t, getSubscriptionId, subscriptionId)
2127 UAPP_GETTER(uint32_t, getTriggeringItemId, triggeringItemId)
2128 UAPP_GETTER_SPAN(uint32_t, getLinksToAdd, linksToAdd, linksToAddSize)
2129 UAPP_GETTER_SPAN(uint32_t, getLinksToRemove, linksToRemove, linksToRemoveSize)
2130};
2131
2132/**
2133 * UA_SetTriggeringResponse wrapper class.
2134 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.5
2135 */
2137 : public TypeWrapper<UA_SetTriggeringResponse, UA_TYPES_SETTRIGGERINGRESPONSE> {
2138public:
2139 using TypeWrapper::TypeWrapper;
2140
2141 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
2142 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getAddResults, addResults, addResultsSize);
2144 DiagnosticInfo, getAddDiagnosticInfos, addDiagnosticInfos, addDiagnosticInfosSize
2146 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getRemoveResults, removeResults, removeResultsSize);
2148 DiagnosticInfo, getRemoveDiagnosticInfos, removeDiagnosticInfos, removeDiagnosticInfosSize
2150};
2151
2152/**
2153 * UA_DeleteMonitoredItemsRequest wrapper class.
2154 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.6
2155 */
2157 : public TypeWrapper<UA_DeleteMonitoredItemsRequest, UA_TYPES_DELETEMONITOREDITEMSREQUEST> {
2158public:
2159 using TypeWrapper::TypeWrapper;
2160
2162 RequestHeader requestHeader, uint32_t subscriptionId, Span<const uint32_t> monitoredItemIds
2163 ) {
2164 handle()->requestHeader = detail::toNative(std::move(requestHeader));
2165 handle()->subscriptionId = subscriptionId;
2166 handle()->monitoredItemIdsSize = monitoredItemIds.size();
2167 handle()->monitoredItemIds = detail::toNativeArray(monitoredItemIds);
2168 }
2169
2170 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
2171 UAPP_GETTER(uint32_t, getSubscriptionId, subscriptionId)
2172 UAPP_GETTER_SPAN(uint32_t, getMonitoredItemIds, monitoredItemIds, monitoredItemIdsSize)
2173};
2174
2175/**
2176 * UA_DeleteMonitoredItemsResponse wrapper class.
2177 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.12.6
2178 */
2180 : public TypeWrapper<UA_DeleteMonitoredItemsResponse, UA_TYPES_DELETEMONITOREDITEMSRESPONSE> {
2181public:
2182 using TypeWrapper::TypeWrapper;
2183
2184 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
2185 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getResults, results, resultsSize);
2187 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
2189};
2190
2191/**
2192 * UA_CreateSubscriptionRequest wrapper class.
2193 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.2
2194 */
2196 : public TypeWrapper<UA_CreateSubscriptionRequest, UA_TYPES_CREATESUBSCRIPTIONREQUEST> {
2197public:
2198 using TypeWrapper::TypeWrapper;
2199
2201 RequestHeader requestHeader,
2202 double requestedPublishingInterval,
2203 uint32_t requestedLifetimeCount,
2204 uint32_t requestedMaxKeepAliveCount,
2205 uint32_t maxNotificationsPerPublish,
2206 bool publishingEnabled,
2207 uint8_t priority
2208 ) {
2209 handle()->requestHeader = detail::toNative(std::move(requestHeader));
2210 handle()->requestedPublishingInterval = requestedPublishingInterval;
2211 handle()->requestedLifetimeCount = requestedLifetimeCount;
2212 handle()->requestedMaxKeepAliveCount = requestedMaxKeepAliveCount;
2213 handle()->maxNotificationsPerPublish = maxNotificationsPerPublish;
2214 handle()->publishingEnabled = publishingEnabled;
2215 handle()->priority = priority;
2216 }
2217
2218 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
2219 UAPP_GETTER(double, getRequestedPublishingInterval, requestedPublishingInterval)
2220 UAPP_GETTER(uint32_t, getRequestedLifetimeCount, requestedLifetimeCount)
2221 UAPP_GETTER(uint32_t, getRequestedMaxKeepAliveCount, requestedMaxKeepAliveCount)
2222 UAPP_GETTER(uint32_t, getMaxNotificationsPerPublish, maxNotificationsPerPublish)
2223 UAPP_GETTER(bool, getPublishingEnabled, publishingEnabled)
2224 UAPP_GETTER(uint8_t, getPriority, priority)
2225};
2226
2227/**
2228 * UA_CreateSubscriptionResponse wrapper class.
2229 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.2
2230 */
2232 : public TypeWrapper<UA_CreateSubscriptionResponse, UA_TYPES_CREATESUBSCRIPTIONRESPONSE> {
2233public:
2234 using TypeWrapper::TypeWrapper;
2235
2236 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
2237 UAPP_GETTER(uint32_t, getSubscriptionId, subscriptionId)
2238 UAPP_GETTER(bool, getRevisedPublishingInterval, revisedPublishingInterval)
2239 UAPP_GETTER(uint32_t, getRevisedLifetimeCount, revisedLifetimeCount)
2240 UAPP_GETTER(uint32_t, getRevisedMaxKeepAliveCount, revisedMaxKeepAliveCount)
2241};
2242
2243/**
2244 * UA_ModifySubscriptionRequest wrapper class.
2245 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.3
2246 */
2248 : public TypeWrapper<UA_ModifySubscriptionRequest, UA_TYPES_MODIFYSUBSCRIPTIONREQUEST> {
2249public:
2250 using TypeWrapper::TypeWrapper;
2251
2253 RequestHeader requestHeader,
2254 uint32_t subscriptionId,
2255 double requestedPublishingInterval,
2256 uint32_t requestedLifetimeCount,
2257 uint32_t requestedMaxKeepAliveCount,
2258 uint32_t maxNotificationsPerPublish,
2259 uint8_t priority
2260 ) {
2261 handle()->requestHeader = detail::toNative(std::move(requestHeader));
2262 handle()->subscriptionId = subscriptionId;
2263 handle()->requestedPublishingInterval = requestedPublishingInterval;
2264 handle()->requestedLifetimeCount = requestedLifetimeCount;
2265 handle()->requestedMaxKeepAliveCount = requestedMaxKeepAliveCount;
2266 handle()->maxNotificationsPerPublish = maxNotificationsPerPublish;
2267 handle()->priority = priority;
2268 }
2269
2270 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
2271 UAPP_GETTER(uint32_t, getSubscriptionId, subscriptionId)
2272 UAPP_GETTER(double, getRequestedPublishingInterval, requestedPublishingInterval)
2273 UAPP_GETTER(uint32_t, getRequestedLifetimeCount, requestedLifetimeCount)
2274 UAPP_GETTER(uint32_t, getRequestedMaxKeepAliveCount, requestedMaxKeepAliveCount)
2275 UAPP_GETTER(uint32_t, getMaxNotificationsPerPublish, maxNotificationsPerPublish)
2276 UAPP_GETTER(uint8_t, getPriority, priority)
2277};
2278
2279/**
2280 * UA_ModifySubscriptionResponse wrapper class.
2281 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.3
2282 */
2284 : public TypeWrapper<UA_ModifySubscriptionResponse, UA_TYPES_MODIFYSUBSCRIPTIONRESPONSE> {
2285public:
2286 using TypeWrapper::TypeWrapper;
2287
2288 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
2289 UAPP_GETTER(bool, getRevisedPublishingInterval, revisedPublishingInterval)
2290 UAPP_GETTER(uint32_t, getRevisedLifetimeCount, revisedLifetimeCount)
2291 UAPP_GETTER(uint32_t, getRevisedMaxKeepAliveCount, revisedMaxKeepAliveCount)
2292};
2293
2294/**
2295 * UA_SetPublishingModeRequest wrapper class.
2296 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.4
2297 */
2299 : public TypeWrapper<UA_SetPublishingModeRequest, UA_TYPES_SETPUBLISHINGMODEREQUEST> {
2300public:
2301 using TypeWrapper::TypeWrapper;
2302
2304 RequestHeader requestHeader, bool publishingEnabled, Span<const uint32_t> subscriptionIds
2305 ) {
2306 handle()->requestHeader = detail::toNative(std::move(requestHeader));
2307 handle()->publishingEnabled = publishingEnabled;
2308 handle()->subscriptionIdsSize = subscriptionIds.size();
2309 handle()->subscriptionIds = detail::toNativeArray(subscriptionIds);
2310 }
2311
2312 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
2313 UAPP_GETTER(bool, getPublishingEnabled, publishingEnabled)
2314 UAPP_GETTER_SPAN(uint32_t, getSubscriptionIds, subscriptionIds, subscriptionIdsSize)
2315};
2316
2317/**
2318 * UA_SetPublishingModeResponse wrapper class.
2319 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.4
2320 */
2322 : public TypeWrapper<UA_SetPublishingModeResponse, UA_TYPES_SETPUBLISHINGMODERESPONSE> {
2323public:
2324 using TypeWrapper::TypeWrapper;
2325
2326 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
2327 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getResults, results, resultsSize)
2329 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
2331};
2332
2333/**
2334 * UA_StatusChangeNotification wrapper class.
2335 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/7.25.4
2336 */
2338 : public TypeWrapper<UA_StatusChangeNotification, UA_TYPES_STATUSCHANGENOTIFICATION> {
2339public:
2340 using TypeWrapper::TypeWrapper;
2341
2343 UAPP_GETTER_WRAPPER(DiagnosticInfo, getDiagnosticInfo, diagnosticInfo)
2344};
2345
2346/**
2347 * UA_DeleteSubscriptionsRequest wrapper class.
2348 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.8
2349 */
2351 : public TypeWrapper<UA_DeleteSubscriptionsRequest, UA_TYPES_DELETESUBSCRIPTIONSREQUEST> {
2352public:
2353 using TypeWrapper::TypeWrapper;
2354
2356 handle()->requestHeader = detail::toNative(std::move(requestHeader));
2357 handle()->subscriptionIdsSize = subscriptionIds.size();
2358 handle()->subscriptionIds = detail::toNativeArray(subscriptionIds);
2359 }
2360
2361 UAPP_GETTER_WRAPPER(RequestHeader, getRequestHeader, requestHeader)
2362 UAPP_GETTER_SPAN(uint32_t, getSubscriptionIds, subscriptionIds, subscriptionIdsSize)
2363};
2364
2365/**
2366 * UA_DeleteSubscriptionsResponse wrapper class.
2367 * @see https://reference.opcfoundation.org/Core/Part4/v105/docs/5.13.8
2368 */
2370 : public TypeWrapper<UA_DeleteSubscriptionsResponse, UA_TYPES_DELETESUBSCRIPTIONSRESPONSE> {
2371public:
2372 using TypeWrapper::TypeWrapper;
2373
2374 UAPP_GETTER_WRAPPER(ResponseHeader, getResponseHeader, responseHeader)
2375 UAPP_GETTER_SPAN_WRAPPER(StatusCode, getResults, results, resultsSize)
2377 DiagnosticInfo, getDiagnosticInfos, diagnosticInfos, diagnosticInfosSize
2379};
2380
2381#endif // UA_ENABLE_SUBSCRIPTIONS
2382
2383/* ----------------------------------------- Historizing ---------------------------------------- */
2384
2385/**
2386 * Perform update type for structured data history updates.
2387 * @see UA_PerformUpdateType
2388 * @see https://reference.opcfoundation.org/Core/Part11/v104/docs/6.8.3
2389 */
2390enum class PerformUpdateType : int32_t {
2391 // clang-format off
2392 Insert = 1,
2393 Replace = 2,
2394 Update = 3,
2395 Remove = 4,
2396 // clang-format on
2397};
2398
2399/* -------------------------------------- Type description -------------------------------------- */
2400
2401#ifdef UA_ENABLE_TYPEDESCRIPTION
2402
2403/**
2404 * Structure type.
2405 * @see https://reference.opcfoundation.org/Core/Part3/v105/docs/8.49
2406 */
2407enum class StructureType : int32_t {
2408 // clang-format off
2409 Structure = 0,
2411 Union = 2,
2412 // clang-format on
2413};
2414
2415/**
2416 * UA_StructureField wrapper class.
2417 * @see https://reference.opcfoundation.org/Core/Part3/v105/docs/8.51
2418 */
2419class StructureField : public TypeWrapper<UA_StructureField, UA_TYPES_STRUCTUREFIELD> {
2420public:
2421 using TypeWrapper::TypeWrapper;
2422
2424 UAPP_GETTER_WRAPPER(LocalizedText, getDescription, description)
2425 UAPP_GETTER_WRAPPER(NodeId, getDataType, dataType)
2426 UAPP_GETTER_CAST(ValueRank, getValueRank, valueRank)
2427 UAPP_GETTER_SPAN(uint32_t, getArrayDimensions, arrayDimensions, arrayDimensionsSize)
2428 UAPP_GETTER(uint32_t, getMaxStringLength, maxStringLength)
2429 UAPP_GETTER(bool, getIsOptional, isOptional)
2430};
2431
2432/**
2433 * UA_StructureDefinition wrapper class.
2434 * @see https://reference.opcfoundation.org/Core/Part3/v105/docs/8.48
2435 */
2437 : public TypeWrapper<UA_StructureDefinition, UA_TYPES_STRUCTUREDEFINITION> {
2438public:
2439 using TypeWrapper::TypeWrapper;
2440
2441 UAPP_GETTER_WRAPPER(NodeId, getDefaultEncodingId, defaultEncodingId)
2442 UAPP_GETTER_WRAPPER(NodeId, getBaseDataType, baseDataType)
2443 UAPP_GETTER_CAST(StructureType, getStructureType, structureType)
2444 UAPP_GETTER_SPAN_WRAPPER(StructureField, getFields, fields, fieldsSize)
2445};
2446
2447/**
2448 * UA_EnumField wrapper class.
2449 * @see https://reference.opcfoundation.org/Core/Part3/v105/docs/8.52
2450 */
2451class EnumField : public TypeWrapper<UA_EnumField, UA_TYPES_ENUMFIELD> {
2452public:
2453 using TypeWrapper::TypeWrapper;
2454
2455 EnumField(int64_t value, std::string_view name)
2456 : EnumField(value, {"", name}, {}, name) {}
2457
2459 int64_t value, LocalizedText displayName, LocalizedText description, std::string_view name
2460 ) {
2461 handle()->value = value;
2462 handle()->displayName = detail::toNative(std::move(displayName));
2463 handle()->description = detail::toNative(std::move(description));
2464 handle()->name = detail::toNative(name);
2465 }
2466
2467 UAPP_GETTER(int64_t, getValue, value)
2468 UAPP_GETTER_WRAPPER(LocalizedText, getDisplayName, displayName)
2469 UAPP_GETTER_WRAPPER(LocalizedText, getDescription, description)
2471};
2472
2473/**
2474 * UA_EnumDefinition wrapper class.
2475 * @see https://reference.opcfoundation.org/Core/Part3/v105/docs/8.50
2476 */
2477class EnumDefinition : public TypeWrapper<UA_EnumDefinition, UA_TYPES_ENUMDEFINITION> {
2478public:
2479 using TypeWrapper::TypeWrapper;
2480
2481 EnumDefinition(std::initializer_list<EnumField> fields)
2482 : EnumDefinition({fields.begin(), fields.size()}) {}
2483
2485 handle()->fieldsSize = fields.size();
2486 handle()->fields = detail::toNativeArray(fields);
2487 }
2488
2489 UAPP_GETTER_SPAN_WRAPPER(EnumField, getFields, fields, fieldsSize)
2490};
2491
2492#endif // UA_ENABLE_TYPEDESCRIPTION
2493
2494/**
2495 * @}
2496 */
2497
2498} // namespace opcua
UA_AddNodesItem wrapper class.
AddNodesItem(ExpandedNodeId parentNodeId, NodeId referenceTypeId, ExpandedNodeId requestedNewNodeId, QualifiedName browseName, NodeClass nodeClass, ExtensionObject nodeAttributes, ExpandedNodeId typeDefinition)
UA_AddNodesRequest wrapper class.
AddNodesRequest(RequestHeader requestHeader, Span< const AddNodesItem > nodesToAdd)
UA_AddNodesResponse wrapper class.
UA_AddNodesResult wrapper class.
UA_AddReferencesItem wrapper class.
AddReferencesItem(NodeId sourceNodeId, NodeId referenceTypeId, bool isForward, std::string_view targetServerUri, ExpandedNodeId targetNodeId, NodeClass targetNodeClass)
UA_AddReferencesRequest wrapper class.
AddReferencesRequest(RequestHeader requestHeader, Span< const AddReferencesItem > referencesToAdd)
UA_AddReferencesResponse wrapper class.
UA_AggregateFilter wrapper class.
AggregateFilter(DateTime startTime, NodeId aggregateType, double processingInterval, AggregateConfiguration aggregateConfiguration)
UA_AnonymousIdentityToken wrapper class.
UA_ApplicationDescription wrapper class.
UA_Argument wrapper class.
Argument(std::string_view name, LocalizedText description, NodeId dataType, ValueRank valueRank={}, Span< const uint32_t > arrayDimensions={})
UA_AttributeOperand wrapper class.
AttributeOperand(NodeId nodeId, std::string_view alias, RelativePath browsePath, AttributeId attributeId, std::string_view indexRange={})
Bitmask using (scoped) enums.
Definition bitmask.hpp:125
UA_BrowseDescription wrapper class.
BrowseDescription(NodeId nodeId, BrowseDirection browseDirection, NodeId referenceTypeId=ReferenceTypeId::References, bool includeSubtypes=true, Bitmask< NodeClass > nodeClassMask=NodeClass::Unspecified, Bitmask< BrowseResultMask > resultMask=BrowseResultMask::All)
UA_BrowseNextRequest wrapper class.
BrowseNextRequest(RequestHeader requestHeader, bool releaseContinuationPoints, Span< const ByteString > continuationPoints)
UA_BrowseNextResponse wrapper class.
UA_BrowsePathResult wrapper class.
UA_BrowsePathTarget wrapper class.
UA_BrowsePath wrapper class.
BrowsePath(NodeId startingNode, RelativePath relativePath)
UA_BrowseRequest wrapper class.
BrowseRequest(RequestHeader requestHeader, ViewDescription view, uint32_t requestedMaxReferencesPerNode, Span< const BrowseDescription > nodesToBrowse)
UA_BrowseResponse wrapper class.
UA_BrowseResult wrapper class.
UA_BuildInfo wrapper class.
BuildInfo(std::string_view productUri, std::string_view manufacturerName, std::string_view productName, std::string_view softwareVersion, std::string_view buildNumber, DateTime buildDate)
UA_ByteString wrapper class.
Definition types.hpp:490
UA_CallMethodRequest wrapper class.
CallMethodRequest(NodeId objectId, NodeId methodId, Span< const Variant > inputArguments)
UA_CallMethodResult wrapper class.
UA_CallRequest wrapper class.
CallRequest(RequestHeader requestHeader, Span< const CallMethodRequest > methodsToCall)
UA_CallResponse wrapper class.
UA_ContentFilterElement wrapper class.
ContentFilterElement(FilterOperator filterOperator, Span< const FilterOperand > operands)
UA_ContentFilter wrapper class.
ContentFilter(Span< const ContentFilterElement > elements)
ContentFilter(std::initializer_list< ContentFilterElement > elements)
UA_CreateMonitoredItemsRequest wrapper class.
CreateMonitoredItemsRequest(RequestHeader requestHeader, uint32_t subscriptionId, TimestampsToReturn timestampsToReturn, Span< const MonitoredItemCreateRequest > itemsToCreate)
UA_CreateMonitoredItemsResponse wrapper class.
UA_CreateSubscriptionRequest wrapper class.
CreateSubscriptionRequest(RequestHeader requestHeader, double requestedPublishingInterval, uint32_t requestedLifetimeCount, uint32_t requestedMaxKeepAliveCount, uint32_t maxNotificationsPerPublish, bool publishingEnabled, uint8_t priority)
UA_CreateSubscriptionResponse wrapper class.
UA_DataChangeFilter wrapper class.
DataChangeFilter(DataChangeTrigger trigger, DeadbandType deadbandType, double deadbandValue)
UA_DataTypeAttributes wrapper class.
DataTypeAttributes()
Construct with default attribute definitions.
UA_DataType wrapper class.
Definition datatype.hpp:27
UA_DataValue wrapper class.
Definition types.hpp:1478
UA_DateTime wrapper class.
Definition types.hpp:354
UA_DeleteMonitoredItemsRequest wrapper class.
DeleteMonitoredItemsRequest(RequestHeader requestHeader, uint32_t subscriptionId, Span< const uint32_t > monitoredItemIds)
UA_DeleteMonitoredItemsResponse wrapper class.
UA_DeleteNodesItem wrapper class.
DeleteNodesItem(NodeId nodeId, bool deleteTargetReferences)
UA_DeleteNodesRequest wrapper class.
DeleteNodesRequest(RequestHeader requestHeader, Span< const DeleteNodesItem > nodesToDelete)
UA_DeleteNodesResponse wrapper class.
UA_DeleteReferencesItem wrapper class.
DeleteReferencesItem(NodeId sourceNodeId, NodeId referenceTypeId, bool isForward, ExpandedNodeId targetNodeId, bool deleteBidirectional)
UA_DeleteReferencesRequest wrapper class.
DeleteReferencesRequest(RequestHeader requestHeader, Span< const DeleteReferencesItem > referencesToDelete)
UA_DeleteReferencesResponse wrapper class.
UA_DeleteSubscriptionsRequest wrapper class.
DeleteSubscriptionsRequest(RequestHeader requestHeader, Span< const uint32_t > subscriptionIds)
UA_DeleteSubscriptionsResponse wrapper class.
UA_DiagnosticInfo wrapper class.
Definition types.hpp:1809
UA_ElementOperand wrapper class.
ElementOperand(uint32_t index)
UA_EndpointDescription wrapper class.
UA_EnumDefinition wrapper class.
EnumDefinition(std::initializer_list< EnumField > fields)
EnumDefinition(Span< const EnumField > fields)
UA_EnumField wrapper class.
EnumField(int64_t value, std::string_view name)
EnumField(int64_t value, LocalizedText displayName, LocalizedText description, std::string_view name)
UA_EnumValueType wrapper class.
int64_t getValue() const noexcept
EnumValueType(int64_t value, LocalizedText displayName, LocalizedText description)
const LocalizedText & getDescription() const noexcept
const LocalizedText & getDisplayName() const noexcept
UA_EventFilter wrapper class.
EventFilter(Span< const SimpleAttributeOperand > selectClauses, ContentFilter whereClause)
UA_ExpandedNodeId wrapper class.
Definition types.hpp:727
UA_ExtensionObject wrapper class.
Definition types.hpp:1664
UA_IssuedIdentityToken wrapper class.
IssuedIdentityToken(ByteString tokenData, std::string_view encryptionAlgorithm={})
UA_LiteralOperand wrapper class.
LiteralOperand(Variant value)
UA_LocalizedText wrapper class.
Definition types.hpp:837
UA_MethodAttributes wrapper class.
MethodAttributes()
Construct with default attribute definitions.
UA_ModifyMonitoredItemsRequest wrapper class.
ModifyMonitoredItemsRequest(RequestHeader requestHeader, uint32_t subscriptionId, TimestampsToReturn timestampsToReturn, Span< const MonitoredItemModifyRequest > itemsToModify)
UA_CreateMonitoredItemsResponse wrapper class.
UA_ModifySubscriptionRequest wrapper class.
ModifySubscriptionRequest(RequestHeader requestHeader, uint32_t subscriptionId, double requestedPublishingInterval, uint32_t requestedLifetimeCount, uint32_t requestedMaxKeepAliveCount, uint32_t maxNotificationsPerPublish, uint8_t priority)
UA_ModifySubscriptionResponse wrapper class.
UA_MonitoredItemCreateRequest wrapper class.
MonitoredItemCreateRequest(ReadValueId itemToMonitor, MonitoringMode monitoringMode=MonitoringMode::Reporting, MonitoringParameters requestedParameters={})
UA_MonitoredItemCreateResult wrapper class.
UA_MonitoredItemModifyRequest wrapper class.
MonitoredItemModifyRequest(uint32_t monitoredItemId, MonitoringParameters requestedParameters)
UA_MonitoredItemModifyResult wrapper class.
UA_MonitoringParameters wrapper class.
MonitoringParameters(double samplingInterval=250.0, ExtensionObject filter={}, uint32_t queueSize=1U, bool discardOldest=true)
Construct with default values from open62541.
UA_NodeAttributes wrapper class.
UA_NodeId wrapper class.
Definition types.hpp:590
UA_ObjectAttributes wrapper class.
ObjectAttributes()
Construct with default attribute definitions.
UA_ObjectTypeAttributes wrapper class.
ObjectTypeAttributes()
Construct with default attribute definitions.
UA_QualifiedName wrapper class.
Definition types.hpp:800
UA_ReadRequest wrapper class.
ReadRequest(RequestHeader requestHeader, double maxAge, TimestampsToReturn timestampsToReturn, Span< const ReadValueId > nodesToRead)
UA_ReadResponse wrapper class.
UA_ReadValueId wrapper class.
ReadValueId(NodeId nodeId, AttributeId attributeId, std::string_view indexRange={}, QualifiedName dataEncoding={})
UA_ReferenceDescription wrapper class.
UA_ReferenceTypeAttributes wrapper class.
ReferenceTypeAttributes()
Construct with default attribute definitions.
UA_RegisterNodesRequest wrapper class.
RegisterNodesRequest(RequestHeader requestHeader, Span< const NodeId > nodesToRegister)
UA_RegisterNodesResponse wrapper class.
UA_RelativePathElement wrapper class.
RelativePathElement(NodeId referenceTypeId, bool isInverse, bool includeSubtypes, QualifiedName targetName)
UA_RelativePath wrapper class.
RelativePath(Span< const RelativePathElement > elements)
RelativePath(std::initializer_list< RelativePathElement > elements)
UA_RequestHeader wrapper class.
RequestHeader(NodeId authenticationToken, DateTime timestamp, uint32_t requestHandle, uint32_t returnDiagnostics, std::string_view auditEntryId, uint32_t timeoutHint, ExtensionObject additionalHeader)
UA_ResponseHeader wrapper class.
UA_SetMonitoringModeRequest wrapper class.
SetMonitoringModeRequest(RequestHeader requestHeader, uint32_t subscriptionId, MonitoringMode monitoringMode, Span< const uint32_t > monitoredItemIds)
UA_SetMonitoringModeResponse wrapper class.
UA_SetPublishingModeRequest wrapper class.
SetPublishingModeRequest(RequestHeader requestHeader, bool publishingEnabled, Span< const uint32_t > subscriptionIds)
UA_SetPublishingModeResponse wrapper class.
UA_SetTriggeringRequest wrapper class.
SetTriggeringRequest(RequestHeader requestHeader, uint32_t subscriptionId, uint32_t triggeringItemId, Span< const uint32_t > linksToAdd, Span< const uint32_t > linksToRemove)
UA_SetTriggeringResponse wrapper class.
UA_SimpleAttributeOperand wrapper class.
SimpleAttributeOperand(NodeId typeDefinitionId, Span< const QualifiedName > browsePath, AttributeId attributeId, std::string_view indexRange={})
View to a contiguous sequence of objects, similar to std::span in C++20.
Definition span.hpp:26
constexpr size_t size() const noexcept
Definition span.hpp:101
UA_StatusChangeNotification wrapper class.
UA_StatusCode wrapper class.
Definition types.hpp:44
UA_String wrapper class.
Definition types.hpp:251
UA_StructureDefinition wrapper class.
UA_StructureField wrapper class.
UA_TranslateBrowsePathsToNodeIdsRequest wrapper class.
TranslateBrowsePathsToNodeIdsRequest(RequestHeader requestHeader, Span< const BrowsePath > browsePaths)
UA_TranslateBrowsePathsToNodeIdsResponse wrapper class.
Template base class to wrap UA_* type objects.
constexpr TypeWrapper()=default
UA_UnregisterNodesRequest wrapper class.
UnregisterNodesRequest(RequestHeader requestHeader, Span< const NodeId > nodesToUnregister)
UA_UnregisterNodesResponse wrapper class.
UA_UserIdentityToken wrapper class.
UA_UserNameIdentityToken wrapper class.
UserNameIdentityToken(std::string_view userName, std::string_view password, std::string_view encryptionAlgorithm={})
UA_UserTokenPolicy wrapper class.
UserTokenPolicy(std::string_view policyId, UserTokenType tokenType, std::string_view issuedTokenType, std::string_view issuerEndpointUrl, std::string_view securityPolicyUri)
UA_VariableAttributes wrapper class.
auto & setValueScalar(Args &&... args)
auto & setValueArray(Args &&... args)
auto & setDataType()
This is an overloaded member function, provided for convenience. It differs from the above function o...
VariableAttributes()
Construct with default attribute definitions.
UA_VariableAttributes wrapper class.
auto & setValueArray(Args &&... args)
auto & setDataType()
This is an overloaded member function, provided for convenience. It differs from the above function o...
VariableTypeAttributes()
Construct with default attribute definitions.
auto & setValueScalar(Args &&... args)
UA_Variant wrapper class.
Definition types.hpp:887
UA_ViewAttributes wrapper class.
ViewAttributes()
Construct with default attribute definitions.
UA_ViewDescription wrapper class.
ViewDescription(NodeId viewId, DateTime timestamp, uint32_t viewVersion)
constexpr UA_EnumValueType * handle() noexcept
Definition wrapper.hpp:65
UA_WriteRequest wrapper class.
WriteRequest(RequestHeader requestHeader, Span< const WriteValue > nodesToWrite)
UA_WriteResponse wrapper class.
UA_WriteValue wrapper class.
WriteValue(NodeId nodeId, AttributeId attributeId, std::string_view indexRange, DataValue value)
UA_X509IdentityToken wrapper class.
X509IdentityToken(ByteString certificateData)
UA_EXPORT const UA_ObjectTypeAttributes UA_ObjectTypeAttributes_default
UA_EXPORT const UA_VariableAttributes UA_VariableAttributes_default
UA_EXPORT const UA_DataTypeAttributes UA_DataTypeAttributes_default
UA_EXPORT const UA_ViewAttributes UA_ViewAttributes_default
UA_EXPORT const UA_VariableTypeAttributes UA_VariableTypeAttributes_default
UA_EXPORT const UA_MethodAttributes UA_MethodAttributes_default
UA_EXPORT const UA_ReferenceTypeAttributes UA_ReferenceTypeAttributes_default
UA_EXPORT const UA_ObjectAttributes UA_ObjectAttributes_default
ReferenceTypeId
ReferenceType node ids defined by the OPC UA specification (generated).
Definition nodeids.hpp:456
ContentFilter operator||(const ContentFilterElement &lhs, const ContentFilterElement &rhs)
FilterOperator
Filter operator.
#define UAPP_NODEATTR_WRAPPER(Type, suffix, member, flag)
DataChangeTrigger
Data change trigger.
UserTokenType
User identity token type.
NodeAttributesMask
Node attributes mask.
ContentFilter operator!(const ContentFilterElement &filterElement)
ContentFilter operator&&(const ContentFilterElement &lhs, const ContentFilterElement &rhs)
PerformUpdateType
Perform update type for structured data history updates.
#define UAPP_NODEATTR_BITMASK(Type, suffix, member, flag)
#define UAPP_NODEATTR_ARRAY(Type, suffix, member, memberSize, flag)
#define UAPP_NODEATTR_CAST(Type, suffix, member, flag)
#define UAPP_NODEATTR(Type, suffix, member, flag)
DeadbandType
Deadband type.
std::variant< ElementOperand, LiteralOperand, AttributeOperand, SimpleAttributeOperand, ExtensionObject > FilterOperand
Filter operand.
StructureType
Structure type.
#define UAPP_NODEATTR_COMMON
BrowseResultMask
Browse result mask.
@ Anonymous
No token is required.
@ IssuedToken
Any token issued by an authorization service.
@ Certificate
An X.509 v3 certificate token.
@ Username
A username/password token.
static UA_LogCategory const char va_list args
auto toNative(T value) noexcept
NodeClass
Node class.
Definition common.hpp:138
AccessLevel
Access level.
Definition common.hpp:161
EventNotifier
Event notifier.
Definition common.hpp:241
ValueRank
Value rank.
Definition common.hpp:224
BrowseDirection
Browse direction.
Definition common.hpp:273
TimestampsToReturn
Timestamps to return.
Definition common.hpp:287
MonitoringMode
Monitoring mode.
Definition common.hpp:302
WriteMask
Write mask.
Definition common.hpp:183
AttributeId
Attribute identifiers.
Definition common.hpp:28
@ UserExecutable
Indicates if the method is currently executable taking user access rights into account.
@ Historizing
Indicates whether the server is actively collecting data for the history of the variable.
@ AccessRestrictions
Specifies access restrictions that apply to a node.
@ Executable
Indicates if the method is currently executable.
@ DisplayName
The localized name of the node.
@ BrowseName
A non-localised human-readable name used to browse the address space.
@ Value
The most recent value of the variable that the server has.
@ MinimumSamplingInterval
Specifies (in milliseconds) how fast the server can reasonably sample the value for changes.
@ IsAbstract
If a reference is abstract, no reference of this type shall exist, only of its subtypes.
@ InverseName
The inverse name describes the reference type as seen from the target node.
@ Description
Explains the meaning of the node in a localized text.
@ UserWriteMask
Exposes the possibilities of a client to write the attributes of the node.
@ ArrayDimensions
Specifies the maximum supported length of each dimension of the Value attribute.
@ ContainsNoLoops
Indicates that by following the references in the context of the view there are no loops.
@ RolePermissions
Permissions that apply to a node.
@ UserAccessLevel
Indicates how the value of a variable can be accessed (read/write) and if it contains current and/or ...
@ DataTypeDefinition
Provides the meta data and encoding information for custom data types.
@ Symmetric
If a reference is symmetric, it can seen from both the source and target node.
const UA_DataType & getDataType() noexcept
UA_LocalizedText displayName
UA_LocalizedText description
Trait to define an enum (class) as a bitmask and allow bitwise operations.
Definition bitmask.hpp:44
If a reference is symmetric
Definition symmetric.dox:1
uint8_t UA_Byte
UA_EXPORT const UA_ObjectTypeAttributes UA_ObjectTypeAttributes_default
#define UAPP_GETTER_SPAN(Type, getterName, memberArray, memberSize)
UA_EXPORT const UA_VariableAttributes UA_VariableAttributes_default
UA_EXPORT const UA_DataTypeAttributes UA_DataTypeAttributes_default
UA_EXPORT const UA_ViewAttributes UA_ViewAttributes_default
#define UAPP_GETTER_WRAPPER(Type, getterName, member)
#define UAPP_GETTER_CAST(Type, getterName, member)
#define UAPP_GETTER_SPAN_WRAPPER(Type, getterName, memberArray, memberSize)
#define UAPP_GETTER(Type, getterName, member)
UA_EXPORT const UA_VariableTypeAttributes UA_VariableTypeAttributes_default
UA_EXPORT const UA_MethodAttributes UA_MethodAttributes_default
UA_EXPORT const UA_ReferenceTypeAttributes UA_ReferenceTypeAttributes_default
UA_EXPORT const UA_ObjectAttributes UA_ObjectAttributes_default
UA_MessageSecurityMode
UA_BrowseDirection
UA_DataChangeTrigger
UA_UserTokenType
UA_BROWSERESULTMASK_REFERENCETYPEID
UA_BROWSERESULTMASK_DISPLAYNAME
UA_BROWSERESULTMASK_ALL
UA_BROWSERESULTMASK_ISFORWARD
UA_BROWSERESULTMASK_REFERENCETYPEINFO
UA_BROWSERESULTMASK_TYPEDEFINITION
UA_BROWSERESULTMASK_BROWSENAME
UA_BROWSERESULTMASK_TARGETINFO
UA_BROWSERESULTMASK_NODECLASS
UA_BROWSERESULTMASK_NONE
UA_ApplicationType
UA_TimestampsToReturn
UA_MonitoringMode
UA_NodeClass
UA_StatusCode status