Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QOpcUa api change
Qt 6.11 is out! See what's new in the release blog

QOpcUa api change

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 358 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ODБOïO Offline
    ODБOïO Offline
    ODБOï
    wrote on last edited by
    #1

    hi,
    after updating my project i have an issue in my opcua connection method

    this 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 ?

    ODБOïO 1 Reply Last reply
    0
    • ODБOïO ODБOï

      hi,
      after updating my project i have an issue in my opcua connection method

      this 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 ?

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by ODБOï
      #2

      @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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved