mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[open62541] update to 1.3.5 (#29887)
* update open62541 * run x-add-version * adds patch to qtopcua to support open62541 v1.3 * x-add-version * Update ports/open62541/vcpkg.json Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com> * x-add-version * remove explicit set of version variable * x-add-version * Add a warning when the user tries to turn on both encryption options, as requested by @LilyWangLL. --------- Co-authored-by: Julian Zimmermann <Julian.Zimmermann@gti.de> Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
02e902e380
commit
50494bb7d4
@ -1,22 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9184b943..bd9203f7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -526,7 +526,7 @@ if(NOT UA_FORCE_CPP AND (CMAKE_COMPILER_IS_GNUCC OR "x${CMAKE_C_COMPILER_ID}" ST
|
||||
check_add_cc_flag("-Wall") # Warnings
|
||||
check_add_cc_flag("-Wextra") # More warnings
|
||||
check_add_cc_flag("-Wpedantic") # Standard compliance
|
||||
- check_add_cc_flag("-Werror") # All warnings are errors
|
||||
+ #check_add_cc_flag("-Werror") # All warnings are errors
|
||||
|
||||
check_add_cc_flag("-Wno-static-in-inline") # Clang doesn't like the use of static inline methods inside static inline methods
|
||||
check_add_cc_flag("-Wno-overlength-strings") # May happen in the nodeset compiler when complex values are directly encoded
|
||||
@@ -659,7 +659,7 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /WX /w44996") # Compiler warnings, error on warning
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /WX /w44996 /wd4090") # Compiler warnings, error on warning
|
||||
|
||||
if(UA_MSVC_FORCE_STATIC_CRT AND NOT BUILD_SHARED_LIBS)
|
||||
set(CompilerFlags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS
|
@ -1,24 +1,29 @@
|
||||
set(VERSION v1.2.3)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO open62541/open62541
|
||||
REF "${VERSION}"
|
||||
SHA512 ffcc697901ec978fb9d1f8996f8a4c5114c98a0ec19206cac95d1a84f8d0fcbe38bf73e88f1df59d53bc6be481102aa2f2a6a0efa29797e7ce11123bd23131c2
|
||||
REF "v${VERSION}"
|
||||
SHA512 bb45d288a097b461d2a7106153c7f4b4c38c73cf767fe15c6c9c2213a6e3fcaf9b436fb70c1e7c6dcbc8ef45f232a5bd2f140285fab486358cb5a3a17da96d6e
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
openssl.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
openssl UA_ENABLE_ENCRYPTION_OPENSSL
|
||||
mbedtls UA_ENABLE_ENCRYPTION_MBEDTLS
|
||||
amalgamation UA_ENABLE_AMALGAMATION
|
||||
historizing UA_ENABLE_HISTORIZING
|
||||
)
|
||||
|
||||
if("openssl" IN_LIST FEATURES)
|
||||
set(OPEN62541_ENCRYPTION_OPTIONS -DUA_ENABLE_ENCRYPTION=OPENSSL)
|
||||
if("mbedtls" IN_LIST FEATURES)
|
||||
message(WARNING "Only one encryption method can be used. When both [openssl] and [mbedtls] "
|
||||
"are on, openssl is used. To use [mbedtls], don't enable [openssl]. To suppress this "
|
||||
"message, don't enable [mbedtls]")
|
||||
endif()
|
||||
elseif("mbedtls" IN_LIST FEATURES)
|
||||
set(OPEN62541_ENCRYPTION_OPTIONS -DUA_ENABLE_ENCRYPTION=MBEDTLS)
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path("${PYTHON3_DIR}")
|
||||
@ -27,6 +32,7 @@ vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
${OPEN62541_ENCRYPTION_OPTIONS}
|
||||
-DOPEN62541_VERSION=${VERSION}
|
||||
OPTIONS_DEBUG
|
||||
-DCMAKE_DEBUG_POSTFIX=d
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "open62541",
|
||||
"version": "1.2.3",
|
||||
"port-version": 1,
|
||||
"version": "1.3.5",
|
||||
"description": "open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0.",
|
||||
"homepage": "https://open62541.org",
|
||||
"license": "MPL-2.0",
|
||||
|
361
ports/qtopcua/open62541_v1.3_support.patch
Normal file
361
ports/qtopcua/open62541_v1.3_support.patch
Normal file
@ -0,0 +1,361 @@
|
||||
diff --git a/src/plugins/opcua/open62541/qopen62541.h b/src/plugins/opcua/open62541/qopen62541.h
|
||||
index aed1262..a4f63df 100644
|
||||
--- a/src/plugins/opcua/open62541/qopen62541.h
|
||||
+++ b/src/plugins/opcua/open62541/qopen62541.h
|
||||
@@ -11,6 +11,8 @@
|
||||
#elif defined(__GNUC__) //includes mingw
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
||||
+#pragma GCC diagnostic ignored "-Wmissing-braces"
|
||||
#elif defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
diff --git a/src/plugins/opcua/open62541/qopen62541backend.cpp b/src/plugins/opcua/open62541/qopen62541backend.cpp
|
||||
index f62ad6c..8714e7a 100644
|
||||
--- a/src/plugins/opcua/open62541/qopen62541backend.cpp
|
||||
+++ b/src/plugins/opcua/open62541/qopen62541backend.cpp
|
||||
@@ -176,7 +176,7 @@ void Open62541AsyncBackend::writeAttributes(quint64 handle, UA_NodeId id, QOpcUa
|
||||
|
||||
void Open62541AsyncBackend::enableMonitoring(quint64 handle, UA_NodeId id, QOpcUa::NodeAttributes attr, const QOpcUaMonitoringParameters &settings)
|
||||
{
|
||||
- UaDeleter<UA_NodeId> nodeIdDeleter(&id, UA_NodeId_deleteMembers);
|
||||
+ UaDeleter<UA_NodeId> nodeIdDeleter(&id, UA_NodeId_clear);
|
||||
|
||||
QOpen62541Subscription *usedSubscription = nullptr;
|
||||
|
||||
@@ -328,7 +328,7 @@ void Open62541AsyncBackend::resolveBrowsePath(quint64 handle, UA_NodeId startNod
|
||||
UA_TranslateBrowsePathsToNodeIdsRequest req;
|
||||
UA_TranslateBrowsePathsToNodeIdsRequest_init(&req);
|
||||
UaDeleter<UA_TranslateBrowsePathsToNodeIdsRequest> requestDeleter(
|
||||
- &req,UA_TranslateBrowsePathsToNodeIdsRequest_deleteMembers);
|
||||
+ &req,UA_TranslateBrowsePathsToNodeIdsRequest_clear);
|
||||
|
||||
req.browsePathsSize = 1;
|
||||
req.browsePaths = UA_BrowsePath_new();
|
||||
@@ -466,7 +466,7 @@ void Open62541AsyncBackend::readNodeAttributes(const QList<QOpcUaReadItem> &node
|
||||
|
||||
UA_ReadRequest req;
|
||||
UA_ReadRequest_init(&req);
|
||||
- UaDeleter<UA_ReadRequest> requestDeleter(&req, UA_ReadRequest_deleteMembers);
|
||||
+ UaDeleter<UA_ReadRequest> requestDeleter(&req, UA_ReadRequest_clear);
|
||||
|
||||
req.nodesToReadSize = nodesToRead.size();
|
||||
req.nodesToRead = static_cast<UA_ReadValueId *>(UA_Array_new(nodesToRead.size(), &UA_TYPES[UA_TYPES_READVALUEID]));
|
||||
@@ -503,7 +503,7 @@ void Open62541AsyncBackend::writeNodeAttributes(const QList<QOpcUaWriteItem> &no
|
||||
|
||||
UA_WriteRequest req;
|
||||
UA_WriteRequest_init(&req);
|
||||
- UaDeleter<UA_WriteRequest> requestDeleter(&req, UA_WriteRequest_deleteMembers);
|
||||
+ UaDeleter<UA_WriteRequest> requestDeleter(&req, UA_WriteRequest_clear);
|
||||
|
||||
req.nodesToWriteSize = nodesToWrite.size();
|
||||
req.nodesToWrite = static_cast<UA_WriteValue *>(UA_Array_new(nodesToWrite.size(), &UA_TYPES[UA_TYPES_WRITEVALUE]));
|
||||
@@ -600,7 +600,7 @@ void Open62541AsyncBackend::addNode(const QOpcUaAddNodeItem &nodeToAdd)
|
||||
{
|
||||
UA_AddNodesRequest req;
|
||||
UA_AddNodesRequest_init(&req);
|
||||
- UaDeleter<UA_AddNodesRequest> requestDeleter(&req, UA_AddNodesRequest_deleteMembers);
|
||||
+ UaDeleter<UA_AddNodesRequest> requestDeleter(&req, UA_AddNodesRequest_clear);
|
||||
req.nodesToAddSize = 1;
|
||||
req.nodesToAdd = UA_AddNodesItem_new();
|
||||
UA_AddNodesItem_init(req.nodesToAdd);
|
||||
@@ -644,7 +644,7 @@ void Open62541AsyncBackend::deleteNode(const QString &nodeId, bool deleteTargetR
|
||||
{
|
||||
UA_DeleteNodesRequest request;
|
||||
UA_DeleteNodesRequest_init(&request);
|
||||
- UaDeleter<UA_DeleteNodesRequest> requestDeleter(&request, UA_DeleteNodesRequest_deleteMembers);
|
||||
+ UaDeleter<UA_DeleteNodesRequest> requestDeleter(&request, UA_DeleteNodesRequest_clear);
|
||||
|
||||
request.nodesToDeleteSize = 1;
|
||||
request.nodesToDelete = UA_DeleteNodesItem_new();
|
||||
@@ -673,7 +673,7 @@ void Open62541AsyncBackend::addReference(const QOpcUaAddReferenceItem &reference
|
||||
{
|
||||
UA_AddReferencesRequest request;
|
||||
UA_AddReferencesRequest_init(&request);
|
||||
- UaDeleter<UA_AddReferencesRequest> requestDeleter(&request, UA_AddReferencesRequest_deleteMembers);
|
||||
+ UaDeleter<UA_AddReferencesRequest> requestDeleter(&request, UA_AddReferencesRequest_clear);
|
||||
|
||||
request.referencesToAddSize = 1;
|
||||
request.referencesToAdd = UA_AddReferencesItem_new();
|
||||
@@ -712,7 +712,7 @@ void Open62541AsyncBackend::deleteReference(const QOpcUaDeleteReferenceItem &ref
|
||||
{
|
||||
UA_DeleteReferencesRequest request;
|
||||
UA_DeleteReferencesRequest_init(&request);
|
||||
- UaDeleter<UA_DeleteReferencesRequest> requestDeleter(&request, UA_DeleteReferencesRequest_deleteMembers);
|
||||
+ UaDeleter<UA_DeleteReferencesRequest> requestDeleter(&request, UA_DeleteReferencesRequest_clear);
|
||||
|
||||
request.referencesToDeleteSize = 1;
|
||||
request.referencesToDelete = UA_DeleteReferencesItem_new();
|
||||
@@ -810,10 +810,6 @@ void Open62541AsyncBackend::clientStateCallback(UA_Client *client,
|
||||
|
||||
// UA_Client_disconnect() must be called from outside this callback or open62541 will crash
|
||||
backend->m_disconnectAfterStateChangeTimer.start();
|
||||
-
|
||||
- // Use a queued connection to make sure the subscription is not deleted if the callback was triggered
|
||||
- // inside of one of its methods.
|
||||
- QMetaObject::invokeMethod(backend, "cleanupSubscriptions", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void Open62541AsyncBackend::inactivityCallback(UA_Client *client)
|
||||
@@ -875,7 +871,7 @@ void Open62541AsyncBackend::connectToEndpoint(const QOpcUaEndpointDescription &e
|
||||
return;
|
||||
}
|
||||
|
||||
- UaDeleter<UA_ByteString> clientCertDeleter(&localCertificate, &UA_ByteString_deleteMembers);
|
||||
+ UaDeleter<UA_ByteString> clientCertDeleter(&localCertificate, &UA_ByteString_clear);
|
||||
|
||||
success = loadFileToByteString(pkiConfig.privateKeyFile(), &privateKey);
|
||||
|
||||
@@ -887,7 +883,7 @@ void Open62541AsyncBackend::connectToEndpoint(const QOpcUaEndpointDescription &e
|
||||
return;
|
||||
}
|
||||
|
||||
- UaDeleter<UA_ByteString> privateKeyDeleter(&privateKey, &UA_ByteString_deleteMembers);
|
||||
+ UaDeleter<UA_ByteString> privateKeyDeleter(&privateKey, &UA_ByteString_clear);
|
||||
|
||||
success = loadAllFilesInDirectory(pkiConfig.trustListDirectory(), &trustList, &trustListSize);
|
||||
|
||||
diff --git a/src/plugins/opcua/open62541/qopen62541client.cpp b/src/plugins/opcua/open62541/qopen62541client.cpp
|
||||
index cecd9a4..d3e8863 100644
|
||||
--- a/src/plugins/opcua/open62541/qopen62541client.cpp
|
||||
+++ b/src/plugins/opcua/open62541/qopen62541client.cpp
|
||||
@@ -163,6 +163,7 @@ QStringList QOpen62541Client::supportedSecurityPolicies() const
|
||||
, "http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15"
|
||||
, "http://opcfoundation.org/UA/SecurityPolicy#Basic256"
|
||||
, "http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256"
|
||||
+ , "http://opcfoundation.org/UA/SecurityPolicy#Aes128_Sha256_RsaOaep"
|
||||
#endif
|
||||
};
|
||||
}
|
||||
diff --git a/src/plugins/opcua/open62541/qopen62541node.cpp b/src/plugins/opcua/open62541/qopen62541node.cpp
|
||||
index 9885959..cbfba03 100644
|
||||
--- a/src/plugins/opcua/open62541/qopen62541node.cpp
|
||||
+++ b/src/plugins/opcua/open62541/qopen62541node.cpp
|
||||
@@ -29,7 +29,7 @@ QOpen62541Node::~QOpen62541Node()
|
||||
if (m_client)
|
||||
m_client->unregisterNode(this);
|
||||
|
||||
- UA_NodeId_deleteMembers(&m_nodeId);
|
||||
+ UA_NodeId_clear(&m_nodeId);
|
||||
}
|
||||
|
||||
bool QOpen62541Node::readAttributes(QOpcUa::NodeAttributes attr, const QString &indexRange)
|
||||
diff --git a/src/plugins/opcua/open62541/qopen62541subscription.cpp b/src/plugins/opcua/open62541/qopen62541subscription.cpp
|
||||
index 610596c..15fccb0 100644
|
||||
--- a/src/plugins/opcua/open62541/qopen62541subscription.cpp
|
||||
+++ b/src/plugins/opcua/open62541/qopen62541subscription.cpp
|
||||
@@ -146,13 +146,13 @@ void QOpen62541Subscription::modifyMonitoring(quint64 handle, QOpcUa::NodeAttrib
|
||||
|
||||
UA_SetPublishingModeRequest req;
|
||||
UA_SetPublishingModeRequest_init(&req);
|
||||
- UaDeleter<UA_SetPublishingModeRequest> requestDeleter(&req, UA_SetPublishingModeRequest_deleteMembers);
|
||||
+ UaDeleter<UA_SetPublishingModeRequest> requestDeleter(&req, UA_SetPublishingModeRequest_clear);
|
||||
req.publishingEnabled = value.toBool();
|
||||
req.subscriptionIdsSize = 1;
|
||||
req.subscriptionIds = UA_UInt32_new();
|
||||
*req.subscriptionIds = m_subscriptionId;
|
||||
UA_SetPublishingModeResponse res = UA_Client_Subscriptions_setPublishingMode(m_backend->m_uaclient, req);
|
||||
- UaDeleter<UA_SetPublishingModeResponse> responseDeleter(&res, UA_SetPublishingModeResponse_deleteMembers);
|
||||
+ UaDeleter<UA_SetPublishingModeResponse> responseDeleter(&res, UA_SetPublishingModeResponse_clear);
|
||||
|
||||
if (res.responseHeader.serviceResult != UA_STATUSCODE_GOOD) {
|
||||
qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to set publishing mode:" << res.responseHeader.serviceResult;
|
||||
@@ -181,14 +181,14 @@ void QOpen62541Subscription::modifyMonitoring(quint64 handle, QOpcUa::NodeAttrib
|
||||
|
||||
UA_SetMonitoringModeRequest req;
|
||||
UA_SetMonitoringModeRequest_init(&req);
|
||||
- UaDeleter<UA_SetMonitoringModeRequest> requestDeleter(&req, UA_SetMonitoringModeRequest_deleteMembers);
|
||||
+ UaDeleter<UA_SetMonitoringModeRequest> requestDeleter(&req, UA_SetMonitoringModeRequest_clear);
|
||||
req.monitoringMode = static_cast<UA_MonitoringMode>(value.value<QOpcUaMonitoringParameters::MonitoringMode>());
|
||||
req.monitoredItemIdsSize = 1;
|
||||
req.monitoredItemIds = UA_UInt32_new();
|
||||
*req.monitoredItemIds = monItem->monitoredItemId;
|
||||
req.subscriptionId = m_subscriptionId;
|
||||
UA_SetMonitoringModeResponse res = UA_Client_MonitoredItems_setMonitoringMode(m_backend->m_uaclient, req);
|
||||
- UaDeleter<UA_SetMonitoringModeResponse> responseDeleter(&res, UA_SetMonitoringModeResponse_deleteMembers);
|
||||
+ UaDeleter<UA_SetMonitoringModeResponse> responseDeleter(&res, UA_SetMonitoringModeResponse_clear);
|
||||
|
||||
if (res.responseHeader.serviceResult != UA_STATUSCODE_GOOD) {
|
||||
qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to set monitoring mode:" << res.responseHeader.serviceResult;
|
||||
@@ -219,7 +219,7 @@ bool QOpen62541Subscription::addAttributeMonitoredItem(quint64 handle, QOpcUa::N
|
||||
{
|
||||
UA_MonitoredItemCreateRequest req;
|
||||
UA_MonitoredItemCreateRequest_init(&req);
|
||||
- UaDeleter<UA_MonitoredItemCreateRequest> requestDeleter(&req, UA_MonitoredItemCreateRequest_deleteMembers);
|
||||
+ UaDeleter<UA_MonitoredItemCreateRequest> requestDeleter(&req, UA_MonitoredItemCreateRequest_clear);
|
||||
req.itemToMonitor.attributeId = QOpen62541ValueConverter::toUaAttributeId(attr);
|
||||
UA_NodeId_copy(&id, &(req.itemToMonitor.nodeId));
|
||||
if (settings.indexRange().size())
|
||||
@@ -244,7 +244,7 @@ bool QOpen62541Subscription::addAttributeMonitoredItem(quint64 handle, QOpcUa::N
|
||||
}
|
||||
|
||||
UA_MonitoredItemCreateResult res;
|
||||
- UaDeleter<UA_MonitoredItemCreateResult> resultDeleter(&res, UA_MonitoredItemCreateResult_deleteMembers);
|
||||
+ UaDeleter<UA_MonitoredItemCreateResult> resultDeleter(&res, UA_MonitoredItemCreateResult_clear);
|
||||
|
||||
if (attr == QOpcUa::NodeAttribute::EventNotifier && settings.filter().canConvert<QOpcUaMonitoringParameters::EventFilter>())
|
||||
res = UA_Client_MonitoredItems_createEvent(m_backend->m_uaclient, m_subscriptionId,
|
||||
@@ -436,7 +436,7 @@ void QOpen62541Subscription::createEventFilter(const QOpcUaMonitoringParameters:
|
||||
|
||||
convertSelectClause(filter, &uaFilter->selectClauses, &uaFilter->selectClausesSize);
|
||||
if (!convertWhereClause(filter, &uaFilter->whereClause))
|
||||
- UA_ExtensionObject_deleteMembers(out);
|
||||
+ UA_ExtensionObject_clear(out);
|
||||
}
|
||||
|
||||
bool QOpen62541Subscription::convertSelectClause(const QOpcUaMonitoringParameters::EventFilter &filter,
|
||||
@@ -458,8 +458,9 @@ bool QOpen62541Subscription::convertSelectClause(const QOpcUaMonitoringParameter
|
||||
QOpen62541ValueConverter::scalarFromQt<UA_QualifiedName, QOpcUaQualifiedName>(
|
||||
filter.selectClauses().at(i).browsePath().at(j), &select[i].browsePath[j]);
|
||||
}
|
||||
- QOpen62541ValueConverter::scalarFromQt<UA_String, QString>(filter.selectClauses().at(i).indexRange(),
|
||||
- &select[i].indexRange);
|
||||
+ if (!filter.selectClauses().at(i).indexRange().isEmpty())
|
||||
+ QOpen62541ValueConverter::scalarFromQt<UA_String, QString>(filter.selectClauses().at(i).indexRange(),
|
||||
+ &select[i].indexRange);
|
||||
select[i].attributeId = QOpen62541ValueConverter::toUaAttributeId(filter.selectClauses().at(i).attributeId());
|
||||
}
|
||||
|
||||
@@ -548,7 +549,7 @@ bool QOpen62541Subscription::convertWhereClause(const QOpcUaMonitoringParameters
|
||||
} else {
|
||||
qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Unknown filter operand type for event filter" <<
|
||||
filter.whereClause().at(i).filterOperands().at(j).typeName();
|
||||
- UA_ContentFilter_deleteMembers(result);
|
||||
+ UA_ContentFilter_clear(result);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -703,7 +704,7 @@ bool QOpen62541Subscription::modifyMonitoredItemParameters(quint64 nodeHandle, Q
|
||||
|
||||
UA_ModifyMonitoredItemsRequest req;
|
||||
UA_ModifyMonitoredItemsRequest_init(&req);
|
||||
- UaDeleter<UA_ModifyMonitoredItemsRequest> requestDeleter(&req, UA_ModifyMonitoredItemsRequest_deleteMembers);
|
||||
+ UaDeleter<UA_ModifyMonitoredItemsRequest> requestDeleter(&req, UA_ModifyMonitoredItemsRequest_clear);
|
||||
req.subscriptionId = m_subscriptionId;
|
||||
req.itemsToModifySize = 1;
|
||||
req.itemsToModify = UA_MonitoredItemModifyRequest_new();
|
||||
@@ -780,7 +781,7 @@ bool QOpen62541Subscription::modifyMonitoredItemParameters(quint64 nodeHandle, Q
|
||||
|
||||
UA_ModifyMonitoredItemsResponse res = UA_Client_MonitoredItems_modify(m_backend->m_uaclient, req);
|
||||
UaDeleter<UA_ModifyMonitoredItemsResponse> responseDeleter(
|
||||
- &res, UA_ModifyMonitoredItemsResponse_deleteMembers);
|
||||
+ &res, UA_ModifyMonitoredItemsResponse_clear);
|
||||
|
||||
if (res.responseHeader.serviceResult != UA_STATUSCODE_GOOD || res.results[0].statusCode != UA_STATUSCODE_GOOD) {
|
||||
p.setStatusCode(static_cast<QOpcUa::UaStatusCode>(res.responseHeader.serviceResult == UA_STATUSCODE_GOOD ? res.results[0].statusCode : res.responseHeader.serviceResult));
|
||||
diff --git a/src/plugins/opcua/open62541/qopen62541valueconverter.cpp b/src/plugins/opcua/open62541/qopen62541valueconverter.cpp
|
||||
index 5a8562c..61a504a 100644
|
||||
--- a/src/plugins/opcua/open62541/qopen62541valueconverter.cpp
|
||||
+++ b/src/plugins/opcua/open62541/qopen62541valueconverter.cpp
|
||||
@@ -124,69 +124,67 @@ QVariant toQVariant(const UA_Variant &value)
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
- switch (value.type->typeIndex) {
|
||||
- case UA_TYPES_BOOLEAN:
|
||||
+ if (value.type == &UA_TYPES[UA_TYPES_BOOLEAN])
|
||||
return arrayToQVariant<bool, UA_Boolean>(value, QMetaType::Bool);
|
||||
- case UA_TYPES_SBYTE:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_SBYTE])
|
||||
return arrayToQVariant<signed char, UA_SByte>(value, QMetaType::SChar);
|
||||
- case UA_TYPES_BYTE:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_BYTE])
|
||||
return arrayToQVariant<uchar, UA_Byte>(value, QMetaType::UChar);
|
||||
- case UA_TYPES_INT16:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_INT16])
|
||||
return arrayToQVariant<qint16, UA_Int16>(value, QMetaType::Short);
|
||||
- case UA_TYPES_UINT16:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_UINT16])
|
||||
return arrayToQVariant<quint16, UA_UInt16>(value, QMetaType::UShort);
|
||||
- case UA_TYPES_INT32:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_INT32])
|
||||
return arrayToQVariant<qint32, UA_Int32>(value, QMetaType::Int);
|
||||
- case UA_TYPES_UINT32:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_UINT32])
|
||||
return arrayToQVariant<quint32, UA_UInt32>(value, QMetaType::UInt);
|
||||
- case UA_TYPES_INT64:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_INT64])
|
||||
return arrayToQVariant<int64_t, UA_Int64>(value, QMetaType::LongLong);
|
||||
- case UA_TYPES_UINT64:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_UINT64])
|
||||
return arrayToQVariant<uint64_t, UA_UInt64>(value, QMetaType::ULongLong);
|
||||
- case UA_TYPES_FLOAT:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_FLOAT])
|
||||
return arrayToQVariant<float, UA_Float>(value, QMetaType::Float);
|
||||
- case UA_TYPES_DOUBLE:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_DOUBLE])
|
||||
return arrayToQVariant<double, UA_Double>(value, QMetaType::Double);
|
||||
- case UA_TYPES_STRING:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_STRING])
|
||||
return arrayToQVariant<QString, UA_String>(value, QMetaType::QString);
|
||||
- case UA_TYPES_BYTESTRING:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_BYTESTRING])
|
||||
return arrayToQVariant<QByteArray, UA_ByteString>(value, QMetaType::QByteArray);
|
||||
- case UA_TYPES_LOCALIZEDTEXT:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_LOCALIZEDTEXT])
|
||||
return arrayToQVariant<QOpcUaLocalizedText, UA_LocalizedText>(value);
|
||||
- case UA_TYPES_NODEID:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_NODEID])
|
||||
return arrayToQVariant<QString, UA_NodeId>(value, QMetaType::QString);
|
||||
- case UA_TYPES_DATETIME:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_DATETIME])
|
||||
return arrayToQVariant<QDateTime, UA_DateTime>(value, QMetaType::QDateTime);
|
||||
- case UA_TYPES_GUID:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_GUID])
|
||||
return arrayToQVariant<QUuid, UA_Guid>(value, QMetaType::QUuid);
|
||||
- case UA_TYPES_XMLELEMENT:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_XMLELEMENT])
|
||||
return arrayToQVariant<QString, UA_XmlElement>(value, QMetaType::QString);
|
||||
- case UA_TYPES_QUALIFIEDNAME:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_QUALIFIEDNAME])
|
||||
return arrayToQVariant<QOpcUaQualifiedName, UA_QualifiedName>(value);
|
||||
- case UA_TYPES_STATUSCODE:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_STATUSCODE])
|
||||
return arrayToQVariant<QOpcUa::UaStatusCode, UA_StatusCode>(value, QMetaType::UInt);
|
||||
- case UA_TYPES_EXTENSIONOBJECT:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_EXTENSIONOBJECT])
|
||||
return arrayToQVariant<QVariant, UA_ExtensionObject>(value);
|
||||
- case UA_TYPES_EXPANDEDNODEID:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_EXPANDEDNODEID])
|
||||
return arrayToQVariant<QOpcUaExpandedNodeId, UA_ExpandedNodeId>(value);
|
||||
- case UA_TYPES_ARGUMENT:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_ARGUMENT])
|
||||
return arrayToQVariant<QOpcUaArgument, UA_Argument>(value);
|
||||
- case UA_TYPES_RANGE:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_RANGE])
|
||||
return arrayToQVariant<QOpcUaRange, UA_Range>(value);
|
||||
- case UA_TYPES_EUINFORMATION:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_EUINFORMATION])
|
||||
return arrayToQVariant<QOpcUaEUInformation, UA_EUInformation>(value);
|
||||
- case UA_TYPES_AXISINFORMATION:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_AXISINFORMATION])
|
||||
return arrayToQVariant<QOpcUaAxisInformation, UA_AxisInformation>(value);
|
||||
- case UA_TYPES_COMPLEXNUMBERTYPE:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_COMPLEXNUMBERTYPE])
|
||||
return arrayToQVariant<QOpcUaComplexNumber, UA_ComplexNumberType>(value);
|
||||
- case UA_TYPES_DOUBLECOMPLEXNUMBERTYPE:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_DOUBLECOMPLEXNUMBERTYPE])
|
||||
return arrayToQVariant<QOpcUaDoubleComplexNumber, UA_DoubleComplexNumberType>(value);
|
||||
- case UA_TYPES_XVTYPE:
|
||||
+ else if (value.type == &UA_TYPES[UA_TYPES_XVTYPE])
|
||||
return arrayToQVariant<QOpcUaXValue, UA_XVType>(value);
|
||||
- default:
|
||||
- qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Variant conversion from Open62541 for typeName" << value.type->typeName << " not implemented";
|
||||
- return QVariant();
|
||||
- }
|
||||
+
|
||||
+ qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Variant conversion from Open62541 for typeName" << value.type->typeName << " not implemented";
|
||||
+ return QVariant();
|
||||
}
|
||||
|
||||
const UA_DataType *toDataType(QOpcUa::Types valueType)
|
||||
@@ -672,7 +670,7 @@ void scalarFromQt<UA_ExtensionObject, QOpcUaExtensionObject>(const QOpcUaExtensi
|
||||
{
|
||||
QByteArray temp = obj.encodedBody();
|
||||
UA_NodeId encodingId = Open62541Utils::nodeIdFromQString(obj.encodingTypeId());
|
||||
- UaDeleter<UA_NodeId> nodeIdDeleter(&encodingId, UA_NodeId_deleteMembers);
|
||||
+ UaDeleter<UA_NodeId> nodeIdDeleter(&encodingId, UA_NodeId_clear);
|
||||
createExtensionObject(temp, encodingId, ptr, obj.encoding());
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
|
||||
include("${SCRIPT_PATH}/qt_install_submodule.cmake")
|
||||
|
||||
set(${PORT}_PATCHES open62541_v1.3_support.patch)
|
||||
|
||||
# General features:
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "qtopcua",
|
||||
"version": "6.4.3",
|
||||
"port-version": 1,
|
||||
"description": "Qt wrapper for existing OPC UA stacks",
|
||||
"homepage": "https://www.qt.io/",
|
||||
"license": null,
|
||||
|
@ -5733,8 +5733,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"open62541": {
|
||||
"baseline": "1.2.3",
|
||||
"port-version": 1
|
||||
"baseline": "1.3.5",
|
||||
"port-version": 0
|
||||
},
|
||||
"openal-soft": {
|
||||
"baseline": "1.23.0",
|
||||
@ -6674,7 +6674,7 @@
|
||||
},
|
||||
"qtopcua": {
|
||||
"baseline": "6.4.3",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"qtpositioning": {
|
||||
"baseline": "6.4.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e7412d5c63f5b77eb06f485b7fb89bb718b2f712",
|
||||
"version": "1.3.5",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "78181e46126a93ba6bbea749a985ba675fb53c03",
|
||||
"version": "1.2.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "9adaecfcef9783e8df0e92acbd817a4051b11ffb",
|
||||
"version": "6.4.3",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "2271b5bd852c0d9afdcee54b6f335667e7883501",
|
||||
"version": "6.4.3",
|
||||
|
Loading…
x
Reference in New Issue
Block a user