OpcUaEndpointDiscovery¶
Description¶
Please refer to the Qt OPC UA EndpointDiscovery QML type documentation.
Properties¶
connection¶
Please refer to the Qt OPC UA EndpointDiscovery QML type documentation.
› Attributes: | Writable |
---|
count¶
Please refer to the Qt OPC UA EndpointDiscovery QML type documentation.
› Attributes: | Readonly |
---|
serverUrl¶
Please refer to the Qt OPC UA EndpointDiscovery QML type documentation.
› Attributes: | Writable |
---|
status¶
Please refer to the Qt OPC UA EndpointDiscovery QML type documentation.
› Attributes: | Readonly |
---|
Methods¶
at(SignedInteger row)¶
Please refer to the Qt OPC UA EndpointDiscovery QML type documentation.
› Returns: | OpcUaClientEndpointDescription |
---|
Example¶
import InCore.Foundation 2.5
import InCore.OpcUa 2.5
Application {
OpcUaClient {
OpcUaEndpointDiscovery {
serverUrl: "opc.tcp://192.168.1.2:4840"
onEndpointsChanged: {
if (status.isGood) {
if (status.status === OpcUaStatus.GoodCompletesAsynchronusly)
return; // wait until finished
if (count > 0) {
console.log("Using endpoint", at(0).endpointUrl, at(0).securityPolicy);
connection.connectToEndpoint(at(0));
} else {
console.log("No endpoints retrieved")
}
} else {
console.log("Error fetching endpoints:", status.status);
}
}
}
OpcUaClientConnection {
id: connection
backend: availableBackends[0]
defaultConnection: true
}
}
}