QOpcUa api change
-
hi,
after updating my project i have an issue in my opcua connection methodthis was working
QString url = "opc.tcp://localhost:4840" m_client->connectToEndpoint(url);
but now connectToEndpoint(QString) has become connectToEndpoint(QOpcUaEndpointDescription)
so i do
QOpcUaEndpointDescription d; d.setSecurityMode(QOpcUaEndpointDescription::None); d.setEndpointUrl(url); m_client->connectToEndpoint(d);
but i have an error saying
qt.opcua.plugins.open62541: "Endpoint description is invalid because endpoint URL or security policy URL is empty"there is a setSecurityPolicy(QString); method but i have no idea what value to pass to it, can someone tell me the possible values please ?
-
hi,
after updating my project i have an issue in my opcua connection methodthis was working
QString url = "opc.tcp://localhost:4840" m_client->connectToEndpoint(url);
but now connectToEndpoint(QString) has become connectToEndpoint(QOpcUaEndpointDescription)
so i do
QOpcUaEndpointDescription d; d.setSecurityMode(QOpcUaEndpointDescription::None); d.setEndpointUrl(url); m_client->connectToEndpoint(d);
but i have an error saying
qt.opcua.plugins.open62541: "Endpoint description is invalid because endpoint URL or security policy URL is empty"there is a setSecurityPolicy(QString); method but i have no idea what value to pass to it, can someone tell me the possible values please ?
@lelev
setSecurityPolicy ( "http://opcfoundation.org/UA/SecurityPolicy#None" ) worked
i found here https://github.com/qt/qtopcua/blob/5.13/tests/auto/qopcuaclient/tst_client.cpp line 749