Connection issue OPC UA
Unsolved
General and Desktop
-
Why is it this stalls on connecting?
#include <QCoreApplication>
#include "QOpcUaProvider"
#include <QtOpcUa/QOpcUaClient>
#include <QUrl>
#include <QString>
#include <string>#include <iostream>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);QOpcUaProvider provider; if(provider.availableBackends().isEmpty()){ return a.exec(); } QOpcUaClient *client = provider.createClient(provider.availableBackends()[0]); if(!client){ return a.exec(); } QUrl OpcUa_server("opc.tcp://10.10.0.1:4840"); if(client->requestEndpoints(OpcUa_server) == true){ client->connectToEndpoint(OpcUa_server); }else{ return a.exec(); }