20 return const_cast<std::remove_const_t<T>*
>(&value);
26 return const_cast<std::remove_const_t<T>*
>(array.data());
47 const NodeId& referenceType,
49 std::string_view browseName,
52 const NodeId& typeDefinition
56 item.referenceTypeId = referenceType;
57 item.requestedNewNodeId.nodeId = id;
61 item.nodeAttributes = nodeAttributes;
62 item.typeDefinition.nodeId = typeDefinition;
69 request.nodesToAdd = &item;
74 const NodeId& sourceId,
const NodeId& referenceType,
bool forward,
const NodeId& targetId
78 item.referenceTypeId = referenceType;
79 item.isForward = forward;
80 item.targetNodeId.nodeId = targetId;
87 request.referencesToAdd = &item;
101 request.nodesToDelete = &item;
107 const NodeId& referenceType,
110 bool deleteBidirectional
114 item.referenceTypeId = referenceType;
115 item.isForward = isForward;
116 item.targetNodeId.nodeId = targetId;
117 item.deleteBidirectional = deleteBidirectional;
125 request.referencesToDelete = &item;
131 item.
nodeId = *
id.handle();
132 item.attributeId =
static_cast<uint32_t
>(attributeId);
141 request.nodesToReadSize = 1;
142 request.nodesToRead = &item;
151 request.nodesToReadSize = nodesToRead.size();
160 item.
nodeId = *
id.handle();
161 item.attributeId =
static_cast<uint32_t
>(attributeId);
162 item.value = *value.handle();
163 item.value.hasValue =
true;
170 request.nodesToWrite = &item;
181#ifdef UA_ENABLE_METHODCALLS
188 request.methodId = methodId;
189 request.inputArgumentsSize = inputArguments.size();
197 request.methodsToCallSize = 1;
208 request.nodesToBrowseSize = 1;
214 bool releaseContinuationPoint,
const ByteString& continuationPoint
218 request.continuationPointsSize = 1;
233 std::vector<RelativePathElement> relativePathElements(browsePath.
size());
237 relativePathElements.begin(),
239 return RelativePathElement(ReferenceTypeId::HierarchicalReferences, false, true, qn);
245#ifdef UA_ENABLE_SUBSCRIPTIONS
247template <
typename SubscriptionParameters>
253 request.requestedLifetimeCount = parameters.lifetimeCount;
254 request.requestedMaxKeepAliveCount = parameters.maxKeepAliveCount;
255 request.maxNotificationsPerPublish = parameters.maxNotificationsPerPublish;
256 request.publishingEnabled = publishingEnabled;
257 request.priority = parameters.priority;
261template <
typename SubscriptionParameters>
267 request.requestedPublishingInterval = parameters.publishingInterval;
268 request.requestedLifetimeCount = parameters.lifetimeCount;
269 request.requestedMaxKeepAliveCount = parameters.maxKeepAliveCount;
270 request.maxNotificationsPerPublish = parameters.maxNotificationsPerPublish;
271 request.priority = parameters.priority;
280 request.subscriptionIdsSize = subscriptionIds.size();
281 request.subscriptionIds =
getPointer(subscriptionIds);
289 request.subscriptionIds = &subscriptionId;
293template <
typename MonitoringParameters>
297 native.samplingInterval = parameters.samplingInterval;
298 native.filter = parameters.filter;
299 native.queueSize = parameters.queueSize;
300 native.discardOldest = parameters.discardOldest;
303template <
typename MonitoringParameters>
317 uint32_t subscriptionId,
324 request.itemsToCreateSize = itemsToCreate.size();
325 request.itemsToCreate =
getPointer(itemsToCreate);
329template <
typename MonitoringParameters>
339template <
typename MonitoringParameters>
346 request.itemsToModifySize = 1;
347 request.itemsToModify = &item;
357 request.monitoredItemIdsSize = monitoredItemIds.size();
358 request.monitoredItemIds =
getPointer(monitoredItemIds);
363 uint32_t subscriptionId,
364 uint32_t triggeringItemId,
370 request.triggeringItemId = triggeringItemId;
371 request.linksToAddSize = linksToAdd.size();
373 request.linksToRemoveSize = linksToRemove.size();
374 request.linksToRemove =
getPointer(linksToRemove);
383 request.monitoredItemIdsSize = monitoredItemIds.size();
384 request.monitoredItemIds =
getPointer(monitoredItemIds);
UA_BrowseDescription wrapper class.
UA_BrowsePath wrapper class.
UA_ByteString wrapper class.
UA_DataValue wrapper class.
UA_ExtensionObject wrapper class.
static ExtensionObject fromDecoded(T &data) noexcept
Create an ExtensionObject from a decoded object (reference).
UA_MonitoringParameters wrapper class.
UA_ReadValueId wrapper class.
View to a contiguous sequence of objects, similar to std::span in C++20.
constexpr iterator begin() const noexcept
constexpr size_t size() const noexcept
constexpr iterator end() const noexcept
DeleteReferencesResponse deleteReferences(Client &connection, const DeleteReferencesRequest &request) noexcept
Delete one or more references (client only).
constexpr NativeType * asNative(WrapperType *wrapper) noexcept
Cast Wrapper object pointers to native object pointers.
UA_String toNativeString(std::string_view src) noexcept
Convert std::string_view to UA_String (no copy)
UA_ReadRequest createReadRequest(TimestampsToReturn timestamps, UA_ReadValueId &item) noexcept
UA_AddReferencesItem createAddReferencesItem(const NodeId &sourceId, const NodeId &referenceType, bool forward, const NodeId &targetId) noexcept
auto * getPointer(T &value) noexcept
UA_DeleteReferencesItem createDeleteReferencesItem(const NodeId &sourceId, const NodeId &referenceType, bool isForward, const NodeId &targetId, bool deleteBidirectional) noexcept
void copyMonitoringParametersToNative(const MonitoringParameters ¶meters, UA_MonitoringParameters &native) noexcept
UA_MonitoredItemModifyRequest createMonitoredItemModifyRequest(uint32_t monitoredItemId, MonitoringParameters ¶meters) noexcept
UA_ReadValueId createReadValueId(const NodeId &id, AttributeId attributeId) noexcept
UA_WriteRequest createWriteRequest(UA_WriteValue &item) noexcept
UA_CallRequest createCallRequest(UA_CallMethodRequest &item) noexcept
UA_BrowseRequest createBrowseRequest(const BrowseDescription &bd, uint32_t maxReferences) noexcept
UA_CreateMonitoredItemsRequest createCreateMonitoredItemsRequest(uint32_t subscriptionId, TimestampsToReturn timestampsToReturn, Span< const UA_MonitoredItemCreateRequest > itemsToCreate) noexcept
UA_SetTriggeringRequest createSetTriggeringRequest(uint32_t subscriptionId, uint32_t triggeringItemId, Span< const uint32_t > linksToAdd, Span< const uint32_t > linksToRemove) noexcept
UA_MonitoredItemCreateRequest createMonitoredItemCreateRequest(const ReadValueId &itemToMonitor, MonitoringMode monitoringMode, MonitoringParameters ¶meters) noexcept
UA_AddReferencesRequest createAddReferencesRequest(UA_AddReferencesItem &item) noexcept
UA_CallMethodRequest createCallMethodRequest(const NodeId &objectId, const NodeId &methodId, Span< const Variant > inputArguments) noexcept
UA_AddNodesItem createAddNodesItem(const NodeId &parentId, const NodeId &referenceType, const NodeId &id, std::string_view browseName, NodeClass nodeClass, const ExtensionObject &nodeAttributes, const NodeId &typeDefinition) noexcept
UA_SetPublishingModeRequest createSetPublishingModeRequest(bool publishing, Span< const uint32_t > subscriptionIds) noexcept
UA_ModifySubscriptionRequest createModifySubscriptionRequest(uint32_t subscriptionId, const SubscriptionParameters ¶meters) noexcept
UA_SetMonitoringModeRequest createSetMonitoringModeRequest(uint32_t subscriptionId, Span< const uint32_t > monitoredItemIds, MonitoringMode monitoringMode) noexcept
UA_DeleteNodesItem createDeleteNodesItem(const NodeId &id, bool deleteReferences) noexcept
UA_AddNodesRequest createAddNodesRequest(UA_AddNodesItem &item) noexcept
UA_DeleteMonitoredItemsRequest createDeleteMonitoredItemsRequest(uint32_t subscriptionId, Span< const uint32_t > monitoredItemIds) noexcept
BrowsePath createBrowsePath(const NodeId &origin, Span< const QualifiedName > browsePath)
UA_CreateSubscriptionRequest createCreateSubscriptionRequest(const SubscriptionParameters ¶meters, bool publishingEnabled) noexcept
auto * getNativePointer(T &wrapper) noexcept
UA_WriteValue createWriteValue(const NodeId &id, AttributeId attributeId, const DataValue &value) noexcept
UA_TranslateBrowsePathsToNodeIdsRequest createTranslateBrowsePathsToNodeIdsRequest(const BrowsePath &browsePath) noexcept
UA_DeleteNodesRequest createDeleteNodesRequest(UA_DeleteNodesItem &item) noexcept
UA_DeleteReferencesRequest createDeleteReferencesRequest(UA_DeleteReferencesItem &item) noexcept
ExtensionObject wrapNodeAttributes(const T &attributes) noexcept
UA_DeleteSubscriptionsRequest createDeleteSubscriptionsRequest(uint32_t &subscriptionId) noexcept
UA_BrowseNextRequest createBrowseNextRequest(bool releaseContinuationPoint, const ByteString &continuationPoint) noexcept
UA_ModifyMonitoredItemsRequest createModifyMonitoredItemsRequest(uint32_t subscriptionId, MonitoringParameters ¶meters, UA_MonitoredItemModifyRequest &item) noexcept
TimestampsToReturn
Timestamps to return.
MonitoringMode
Monitoring mode.
AttributeId
Attribute identifiers.
UA_ExpandedNodeId parentNodeId
size_t referencesToAddSize
UA_Boolean releaseContinuationPoints
UA_UInt32 requestedMaxReferencesPerNode
UA_CallMethodRequest * methodsToCall
UA_Double requestedPublishingInterval
size_t referencesToDeleteSize
size_t subscriptionIdsSize
UA_ReadValueId itemToMonitor
UA_UInt32 monitoredItemId
UA_TimestampsToReturn timestampsToReturn
UA_Boolean publishingEnabled
Subscription parameters with default values from open62541.