diff options
author | Rainer Keller <Rainer.Keller@qt.io> | 2019-04-18 10:38:02 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2019-04-23 10:59:32 +0000 |
commit | 144782fc8630c15ff6478e2f224b7feb2e848836 (patch) | |
tree | a1129dc77021b6615cc241ad5f475f6c9525b153 | |
parent | 61a2c26fe8831a0a743efd0e179bbe9bf9425235 (diff) |
Doc: Fix QDoc warnings and errors
Change-Id: I2a53d2726b17ec356b39f94022fe0bdccbc6b25f
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
19 files changed, 314 insertions, 73 deletions
diff --git a/examples/opcua/opcuaviewer/doc/opcuaviewer.qdoc b/examples/opcua/opcuaviewer/doc/opcuaviewer.qdoc index 7baf78b..493f325 100644 --- a/examples/opcua/opcuaviewer/doc/opcuaviewer.qdoc +++ b/examples/opcua/opcuaviewer/doc/opcuaviewer.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the QtOpcUa module. @@ -28,12 +28,11 @@ /*! \example opcuaviewer \ingroup qtopcua-examples - \title Qt OPC UA explorer - \brief This example uses the model/view approach to display all nodes of an - OPC UA server in a \l QTreeView. + \title Qt OPC UA Viewer Example + \brief Using the model/view approach to display all nodes of an + OPC UA server in a tree view. - \section1 Introduction - This example uses the model/view approach to display all nodes of an + \e {Qt OPC UA Viewer} uses the model/view approach to display all nodes of an OPC UA server in a \l QTreeView. \image opcuaviewer.png diff --git a/examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc b/examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc index 982b3af..620f9d5 100644 --- a/examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc +++ b/examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -28,13 +28,12 @@ /*! \example waterpump/waterpump-qml \ingroup qtopcua-examples - \title Example using the QML API for Qt OPC UA - \brief This example shows how to use Qt OPC UA QML API to interact with an OPC UA - server to build a QML based HMI for a simple machine. + \title Qt Quick Waterpump Example + \brief Interacting with an OPC UA server to build a QML-based HMI for a + simple machine. - \section1 Introduction - This example shows how to use Qt OPC UA QML API to interact with an OPC UA - server to build a QML based HMI for a simple machine. + \e{Qt Quick Waterpump} shows how to use Qt OPC UA QML API to interact with + an OPC UA server to build a QML based HMI for a simple machine. \section1 The Simulation The OPC UA server included in this example runs a simulation of a machine @@ -108,7 +107,7 @@ For example, the button to flush the second tank is enabled only if the backend is connected to the server, the machine is idle, and - the tank level is above the setpoint. On click, the flushTank2() method + the tank level is above the setpoint. On click, the \c flushTank2() method is called on the server. \quotefromfile waterpump/waterpump-qml/MachineDisplay.qml diff --git a/examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc b/examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc index 2dde20d..3211991 100644 --- a/examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc +++ b/examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc @@ -1,5 +1,6 @@ /**************************************************************************** ** +** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2018 basysKom GmbH, info@basyskom.com ** Contact: https://www.qt.io/licensing/ ** @@ -28,17 +29,16 @@ /*! \example waterpump/waterpump-qmlcpp \ingroup qtopcua-examples - \title Using Qt OPC UA in a basic UI application - \brief This example shows how to use Qt OPC UA to interact with an OPC UA - server to build a QML based HMI for a simple machine. + \title Waterpump Example + \brief Interacting with an OPC UA server to build a QML-based HMI for a + simple machine. - \section1 Introduction - This example shows how to use Qt OPC UA to interact with an OPC UA - server to build a QML based HMI for a simple machine. + \e {Waterpump} shows how to use Qt OPC UA to interact with an + OPC UA server to build a QML-based HMI for a simple machine. \section1 The Simulation The OPC UA server included in this example runs a simulation of a machine - containing two tanks, a water pump and a valve. Water can be pumped from the + containing two tanks, a water pump, and a valve. Water can be pumped from the first tank into the second tank and then be flushed from the second tank by opening the valve. Both operations have a user-configurable setpoint which controls how much water is pumped to or flushed from the second tank. @@ -83,17 +83,17 @@ All methods return \l {QOpcUa::UaStatusCode} {Good} in case of success and \l {QOpcUa::UaStatusCode} {BadUserAccessDenied} if the operation is illegal - (e. g. trying to start the pump if the first tank is empty). + (for example, trying to start the pump if the first tank is empty). - \section1 Used Features of \l QOpcUaClient - This example uses read, write, method calls and data change subscriptions + \section1 Client Features + This example uses read, write, method calls, and data change subscriptions and shows how to set up handlers for the asynchronous operations offered by QOpcUaClient and QOpcUaNode. \section1 Implementation A backend class is used to handle the communication with the OPC UA server - and expose the content of this server by means of properties and Q_INVOKABLE + and expose the content of this server by means of properties and \c Q_INVOKABLE methods wrapping the OPC UA method calls. \section2 Member Variables @@ -109,7 +109,7 @@ \codeline \dots - For each value used in the HMI, a getter, a changed signal and a + For each value used in the HMI, a getter, a changed signal, and a property are added to enable property bindings in QML \quotefromfile waterpump/waterpump-qmlcpp/opcuamachinebackend.h @@ -124,7 +124,7 @@ Data change subscriptions report their updates using \l QOpcUaNode::attributeUpdated. A handler connected to this signal gets the new value as QVariant and can - e. g. write that value to a variable or emit a signal with the new value. + write that value to a variable or emit a signal with the new value, for example. \quotefromfile waterpump/waterpump-qmlcpp/opcuamachinebackend.cpp \skipto void OpcUaMachineBackend::percentFilledTank1Updated @@ -140,7 +140,8 @@ \section2 Interaction with the Server - In the constructor, a QOpcUaProvider is created and the available backends are saved to provide a model for the backend selection dropdown menu. + In the constructor, a QOpcUaProvider is created and the available backends + are saved to provide a model for the backend selection dropdown menu. \quotefromfile waterpump/waterpump-qmlcpp/opcuamachinebackend.cpp \dots @@ -149,23 +150,27 @@ \dots Before attempting a connection, a QOpcUaClient with the selected backend is created. - Its \l QOpcUaClient::endpointsRequestFinished signal is connected to the backend's requestEndpointsFinished slot. - The \l QOpcUaClient::stateChanged signal must be connected to the backend's clientStateHandler slot. + Its \l QOpcUaClient::endpointsRequestFinished signal is connected to the + backend's \c requestEndpointsFinished slot. + The \l QOpcUaClient::stateChanged signal must be connected to the backend's + \c clientStateHandler slot. \quotefromfile waterpump/waterpump-qmlcpp/opcuamachinebackend.cpp \skipto OpcUaMachineBackend::connectToEndpoint \printuntil m_client->requestEndpoints \printuntil } - The \l requestEndpointsFinished slot receives the list of available endpoints on the server and starts a connection - to the first entry in the list. If there are no available endpoints, the connection establishment is aborted. + The \c OpcUaMachineBackend::requestEndpointsFinished slot receives the list + of available endpoints on the server and starts a connection to the first + entry in the list. If there are no available endpoints, the connection + establishment is aborted. \quotefromfile waterpump/waterpump-qmlcpp/opcuamachinebackend.cpp \skipto void OpcUaMachineBackend::requestEndpointsFinished \printuntil m_client->connectToEndpoint \printuntil } - clientStateHandler acts on QOpcUaClient being connected or disconnected. + \c clientStateHandler acts on QOpcUaClient being connected or disconnected. In case of a successful connection, the node member variables created before are filled with node objects. @@ -205,7 +210,7 @@ \section2 The HMI A backend instance is created and handed to the QML part as a context property - named uaBackend. + named \c uaBackend. \dots \quotefromfile waterpump/waterpump-qmlcpp/main.cpp @@ -213,10 +218,10 @@ \printuntil setContextProperty \dots - The properties, signals and Q_INVOKABLE methods of uaBackend can now be accessed by + The properties, signals and \c Q_INVOKABLE methods of uaBackend can now be accessed by the QML code. For example, the button to flush the second tank is enabled only if the backend is connected to the server, the machine is idle and - the tank level is above the setpoint. On click, the flushTank2() method + the tank level is above the setpoint. On click, the \c flushTank2() method is called on the server. \quotefromfile waterpump/waterpump-qmlcpp/Tank2Unit.qml diff --git a/src/imports/opcua/opcuaconnection.cpp b/src/imports/opcua/opcuaconnection.cpp index 93ec5ad..163fc14 100644 --- a/src/imports/opcua/opcuaconnection.cpp +++ b/src/imports/opcua/opcuaconnection.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt OPC UA module. @@ -168,6 +168,7 @@ QT_BEGIN_NAMESPACE /*! \qmlsignal Connection::readNodeAttributesFinished(readResults) + \since 5.13 Emitted when the read request, started using \l readNodeAttributes(), is finished. The parameter of this signal is an array of \l ReadResult, which contains the @@ -188,6 +189,30 @@ QT_BEGIN_NAMESPACE \sa readNodeAttributes(), ReadResult */ +/*! + \qmlsignal Connection::writeNodeAttributesFinished(writeResults) + \since 5.13 + + Emitted when the write request started using \l writeNodeAttributes() is + finished. The parameter of this signal is an array of \l WriteResult, which + contains the values requested from the server. + + \code + for (var i = 0; i < writeResults.length; i++) { + console.log(writeResults[i].nodeId); + console.log(writeResults[i].namespaceName); + console.log(writeResults[i].attribute); + + if (writeResults[i].status.isBad) { + // value was not written + } + } + \endcode + + \sa writeNodeAttributes(), WriteResult + +*/ + Q_DECLARE_LOGGING_CATEGORY(QT_OPCUA_PLUGINS_QML) OpcUaConnection* OpcUaConnection::m_defaultConnection = nullptr; @@ -280,7 +305,7 @@ bool OpcUaConnection::isDefaultConnection() const Connects to the given endpoint. - \sa EndpointDescription endpoints + \sa EndpointDescription */ void OpcUaConnection::connectToEndpoint(const QOpcUaEndpointDescription &endpointDescription) @@ -475,9 +500,9 @@ bool OpcUaConnection::readNodeAttributes(const QJSValue &value) \endcode The result of the write request are provided by the signal - \l writeNodeAttributesFinished(). + \l Connection::writeNodeAttributesFinished(). - \sa writeNodeAttributesFinished(), WriteItem + \sa Connection::writeNodeAttributesFinished() WriteItem */ bool OpcUaConnection::writeNodeAttributes(const QJSValue &value) { diff --git a/src/imports/opcua/opcuaendpointdiscovery.cpp b/src/imports/opcua/opcuaendpointdiscovery.cpp index 8d3ed5b..80b0d25 100644 --- a/src/imports/opcua/opcuaendpointdiscovery.cpp +++ b/src/imports/opcua/opcuaendpointdiscovery.cpp @@ -51,16 +51,18 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlproperty string EndointDiscovery::serverUrl + \qmlproperty string EndpointDiscovery::serverUrl Discovery URL of the server to fetch the endpoints from. Every time the URL is changed, a request to the given server is started. - When starting the request, the list of available endpoints is cleared and the status - is set to \l Status.GoodCompletesAsynchronously. Once the request is finished, \l status changes. + When starting the request, the list of available endpoints is cleared + and the status is set to \l {Status::Status}{Status.GoodCompletesAsynchronously}. Once the request is finished, + \l status changes. + Make sure to check \l status before acessing the list of endpoints. - \sa onEndpointsChanged + \sa endpointsChanged */ /*! @@ -78,7 +80,7 @@ QT_BEGIN_NAMESPACE The current status of this element. In case the last retrieval of endpoints was successful, the status - is \c Status.Good. + is \l {Status::Status}{Status.Good}. \code if (endpoints.status.isGood) { @@ -96,10 +98,11 @@ QT_BEGIN_NAMESPACE Emitted when a retrieval request started, finished or failed. In a called function, you should first check the \l status of the object. - In case the status is \l Status.GoodCompletesAsynchronously, the request is still running. - In case the status is \l Status.Good, the request has finished and the endpoint descriptions - can be read. In case the status is not good, an error happended and \l status contains the - returned error code. + If the status is \l {Status::Status}{Status.GoodCompletesAsynchronously}, + the request is still running. + If the status is \l {Status::Status}{Status.Good}, the request has finished + and the endpoint descriptions can be read. If the status is not good, an + error happended and \l status contains the returned error code. \code onEndpointsChanged: { diff --git a/src/imports/opcua/opcuamethodargument.cpp b/src/imports/opcua/opcuamethodargument.cpp index cea67db..233a771 100644 --- a/src/imports/opcua/opcuamethodargument.cpp +++ b/src/imports/opcua/opcuamethodargument.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt OPC UA module. @@ -39,7 +39,7 @@ /*! \qmltype MethodArgument \inqmlmodule QtOpcUa - \brief Arguments for OpcUa method calls + \brief Arguments for OpcUa method calls. \since QtOpcUa 5.13 When calling methods which require arguments, this type is used. diff --git a/src/imports/opcua/opcuamethodnode.cpp b/src/imports/opcua/opcuamethodnode.cpp index 850f7a7..6220242 100644 --- a/src/imports/opcua/opcuamethodnode.cpp +++ b/src/imports/opcua/opcuamethodnode.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt OPC UA module. @@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE Status of the last method call. This property has to be checked to determine if the method call was successful. - \sa QOpcUa::Status + \sa Status */ /*! diff --git a/src/imports/opcua/opcuareadresult.cpp b/src/imports/opcua/opcuareadresult.cpp index cc5c24d..540be56 100644 --- a/src/imports/opcua/opcuareadresult.cpp +++ b/src/imports/opcua/opcuareadresult.cpp @@ -106,8 +106,8 @@ QT_BEGIN_NAMESPACE \readonly Result status of this ReadResult. - Before using any value of this ReadResult the status - should be checked for \l Status.isGood. To make sure + Before using any value of this ReadResult, the status + should be checked for \l {Status::Status}{Status.isGood}. To make sure the server has provided valid data. */ diff --git a/src/imports/opcua/opcuaserverdiscovery.cpp b/src/imports/opcua/opcuaserverdiscovery.cpp index c5199cf..2cbe5f2 100644 --- a/src/imports/opcua/opcuaserverdiscovery.cpp +++ b/src/imports/opcua/opcuaserverdiscovery.cpp @@ -56,8 +56,9 @@ QT_BEGIN_NAMESPACE URL of the server to retrieve the list of servers from. Every time the URL is changed, a request to the given server is started. - When starting the request, the list of available server is cleared and the status - is set to \l Status.GoodCompletesAsynchronously. Once the request is finished, \l status changes. + When starting the request, the list of available servers is cleared + and the status is set to \l {Status::Status}{Status.GoodCompletesAsynchronously}. + Once the request is finished, \l status changes. Make sure to check the \l status before acessing the list of servers. \code @@ -163,7 +164,7 @@ int OpcUaServerDiscovery::count() const } /*! - \qmlmethod ApplicationDescription Servers::at(index) + \qmlmethod ApplicationDescription ServerDiscovery::at(index) Returns the application description at given \a index. In case there are no servers available or the index is invalid, an invalid diff --git a/src/imports/opcua/opcuastatus.cpp b/src/imports/opcua/opcuastatus.cpp index 4f45db9..9994b9b 100644 --- a/src/imports/opcua/opcuastatus.cpp +++ b/src/imports/opcua/opcuastatus.cpp @@ -42,7 +42,7 @@ QT_BEGIN_NAMESPACE /*! \qmltype Status \inqmlmodule QtOpcUa - \brief Status code of an OPC UA function + \brief Status code of an OPC UA function. \since QtOpcUa 5.13 This QML element contains information about the result status of an OPC UA action. diff --git a/src/imports/opcua/opcuawriteresult.cpp b/src/imports/opcua/opcuawriteresult.cpp index 6e75ed8..f7729e4 100644 --- a/src/imports/opcua/opcuawriteresult.cpp +++ b/src/imports/opcua/opcuawriteresult.cpp @@ -87,7 +87,8 @@ QT_BEGIN_NAMESPACE \readonly Result status of this WriteResult. - If the write request was successful the status is \l Status.Good. + If the write request was successful the status is \l {Status::Status} + {Status.Good}. */ class OpcUaWriteResultData : public QSharedData diff --git a/src/opcua/client/qopcuaapplicationdescription.cpp b/src/opcua/client/qopcuaapplicationdescription.cpp index c7560a8..a3d599c 100644 --- a/src/opcua/client/qopcuaapplicationdescription.cpp +++ b/src/opcua/client/qopcuaapplicationdescription.cpp @@ -1,5 +1,6 @@ /**************************************************************************** ** +** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com ** Contact: http://www.qt.io/licensing/ ** @@ -47,14 +48,120 @@ QT_BEGIN_NAMESPACE */ /*! + \qmltype ApplicationDescription + \inqmlmodule QtOpcUa + \brief The OPC UA ApplicationDescription. + \since QtOpcUa 5.13 + + The application description contains information about an OPC UA application. +*/ + +/*! \enum QOpcUaApplicationDescription::ApplicationType + This enum type holds the application type. + \value Server This application is a server. \value Client This application is a client. \value ClientAndServer This application is a client and a server. \value DiscoveryServer This application is a discovery server. */ +/*! + \qmlproperty enumeration ApplicationDescription::ApplicationType + + The application type. + + \value Server This application is a server. + \value Client This application is a client. + \value ClientAndServer This application is a client and a server. + \value DiscoveryServer This application is a discovery server. +*/ + +/*! + \property QOpcUaApplicationDescription::applicationName + + Name describing the application. + */ + +/*! + \qmlproperty LocalizedText ApplicationDescription::applicationName + + Name describing the application. + */ + +/*! + \property QOpcUaApplicationDescription::applicationType + + The application's type: server, client, both, or discovery server. + */ + +/*! + \qmlproperty ApplicationType ApplicationDescription::applicationType + + The application's type: server, client, both, or discovery server. + */ + +/*! + \property QOpcUaApplicationDescription::applicationUri + + The globally unique identifier for this application instance. + */ + +/*! + \qmlproperty string ApplicationDescription::applicationUri + + The globally unique identifier for this application instance. + */ + +/*! + \property QOpcUaApplicationDescription::discoveryProfileUri + + The URI of the supported discovery profile. + */ + +/*! + \qmlproperty string ApplicationDescription::discoveryProfileUri + + The URI of the supported discovery profile. + */ + +/*! + \property QOpcUaApplicationDescription::discoveryUrls + + A list of URLs of discovery endpoints. + */ + +/*! + \qmlproperty list ApplicationDescription::discoveryUrls + + A list of URLs of discovery endpoints. + */ + +/*! + \property QOpcUaApplicationDescription::gatewayServerUri + + The URI of the gateway server. + */ + +/*! + \qmlproperty string ApplicationDescription::gatewayServerUri + + The URI of the gateway server. + */ + +/*! + \property QOpcUaApplicationDescription::productUri + + The globally unique identifier for this product. + */ + +/*! + \qmlproperty string ApplicationDescription::productUri + + The globally unique identifier for this product. + */ + class QOpcUaApplicationDescriptionData : public QSharedData { public: diff --git a/src/opcua/client/qopcuaapplicationidentity.cpp b/src/opcua/client/qopcuaapplicationidentity.cpp index 6e96102..74b2bfe 100644 --- a/src/opcua/client/qopcuaapplicationidentity.cpp +++ b/src/opcua/client/qopcuaapplicationidentity.cpp @@ -1,5 +1,6 @@ /**************************************************************************** ** +** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2018 Unified Automation GmbH ** Contact: http://www.qt.io/licensing/ ** @@ -182,7 +183,7 @@ QOpcUaApplicationDescription::ApplicationType QOpcUaApplicationIdentity::applica /*! Sets the type of the application. - Client applications should set this to \l {QOpcUaApplicationDescription::Client}{Client}. + Client applications should set \a value to \l {QOpcUaApplicationDescription::Client}{Client}. The default value is \l{QOpcUaApplicationDescription::Client}{Client}. */ diff --git a/src/opcua/client/qopcuaauthenticationinformation.cpp b/src/opcua/client/qopcuaauthenticationinformation.cpp index 35a7606..db59d34 100644 --- a/src/opcua/client/qopcuaauthenticationinformation.cpp +++ b/src/opcua/client/qopcuaauthenticationinformation.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt OPC UA module. @@ -90,7 +90,7 @@ QT_BEGIN_NAMESPACE \li Certificate \endlist - \sa setAnonymousAuthentication() setUsernameAuthentication() setCertificateAuthentication() + \sa setAnonymousAuthentication() setUsernameAuthentication() */ class QOpcUaAuthenticationInformationData : public QSharedData diff --git a/src/opcua/client/qopcuaclient.cpp b/src/opcua/client/qopcuaclient.cpp index 2deaa41..b477cc3 100644 --- a/src/opcua/client/qopcuaclient.cpp +++ b/src/opcua/client/qopcuaclient.cpp @@ -1,5 +1,6 @@ /**************************************************************************** ** +** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com ** Contact: http://www.qt.io/licensing/ ** @@ -162,7 +163,7 @@ Q_DECLARE_LOGGING_CATEGORY(QT_OPCUA) */ /*! - \fn QOpcUaClient::connectError(QOpcUaErrorState errorState) + \fn QOpcUaClient::connectError(QOpcUaErrorState *errorState) \since QtOpcUa 5.13 This function is currently available as a Technology Preview, and therefore the API @@ -190,7 +191,7 @@ Q_DECLARE_LOGGING_CATEGORY(QT_OPCUA) This signal is emitted when a password for an encrypted private key is required. The parameter \a keyFilePath contains the file path to key which is used. - The parameter \a wasInvalidOnPreviousTry is true if a previous try to decrypt the key failed (aka invalid pasword). + The parameter \a previousTryWasInvalid is true if a previous try to decrypt the key failed (aka invalid pasword). The parameter \a password points to a QString that has to be filled with the actual password for the key. In case the previous try failed it contains the previously used password. @@ -319,7 +320,7 @@ QOpcUaClient::~QOpcUaClient() } /*! - Sets the application identity for this \l QOpcUaClient instance. + Sets the application identity for this \l QOpcUaClient instance to \a identity. \since QtOpcUa 5.13 This function is currently available as a Technology Preview, and therefore the API @@ -347,7 +348,7 @@ QOpcUaApplicationIdentity QOpcUaClient::applicationIdentity() const } /*! - Sets the application PKI configuration for this \l QOpcUaClient instance. + Sets the application PKI configuration for this \l QOpcUaClient instance to \a config. \since QtOpcUa 5.13 This function is currently available as a Technology Preview, and therefore the API @@ -396,7 +397,7 @@ QOpcUaPkiConfiguration QOpcUaClient::pkiConfiguration() const client->setAuthenticationInformation(authInfo); \endcode - \sa setAuthenticationInformation() QEndPointDescription + \sa setAuthenticationInformation(), QOpcUaEndpointDescription */ void QOpcUaClient::connectToEndpoint(const QOpcUaEndpointDescription &endpoint) { diff --git a/src/opcua/client/qopcuaendpointdescription.cpp b/src/opcua/client/qopcuaendpointdescription.cpp index 7ddc540..91f916e 100644 --- a/src/opcua/client/qopcuaendpointdescription.cpp +++ b/src/opcua/client/qopcuaendpointdescription.cpp @@ -1,5 +1,6 @@ /**************************************************************************** ** +** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com ** Contact: http://www.qt.io/licensing/ ** @@ -47,14 +48,98 @@ QT_BEGIN_NAMESPACE */ /*! + \qmltype EndpointDescription + \inqmlmodule QtOpcUa + \brief The OPC UA EndpointDescription. + \since QtOpcUa 5.13 + + An endpoint description contains information about an endpoint and how to connect to it. +*/ + +/*! \enum QOpcUaEndpointDescription::MessageSecurityMode + This enum type holds the security mode supported by the endpoint. + \value Invalid The default value, will be rejected by the server. \value None No security. \value Sign Messages are signed but not encrypted. \value SignAndEncrypt Messages are signed and encrypted. */ +/*! + \qmlproperty enumeration EndpointDescription::MessageSecurityMode + + The security mode supported by the endpoint. + + \value Invalid The default value, will be rejected by the server. + \value None No security. + \value Sign Messages are signed but not encrypted. + \value SignAndEncrypt Messages are signed and encrypted. +*/ + + +/*! + \property QOpcUaEndpointDescription::endpointUrl + + The URL for the endpoint. + */ + +/*! + \qmlproperty string EndpointDescription::endpointUrl + + The URL for the endpoint. + */ + +/*! + \property QOpcUaEndpointDescription::securityMode + + Security mode supported by this endpoint. + */ + +/*! + \qmlproperty MessageSecurityMode EndpointDescription::securityMode + + Security mode supported by this endpoint. + */ + +/*! + \property QOpcUaEndpointDescription::securityPolicy + + The URI of the security policy. + */ + +/*! + \qmlproperty string EndpointDescription::securityPolicy + + The URI of the security policy. + */ + + +/*! + \property QOpcUaEndpointDescription::server + + The application description of the server. + */ + +/*! + \qmlproperty ApplicationDescription EndpointDescription::server + + The application description of the server. + */ + +/*! + \property QOpcUaEndpointDescription::userIdentityTokens + + List of user identity tokens the endpoint will accept. + */ + +/*! + \qmlproperty list<UserTokenPolicy> EndpointDescription::userIdentityTokens + + List of user identity tokens the endpoint will accept. + */ + class QOpcUaEndpointDescriptionData : public QSharedData { public: diff --git a/src/opcua/client/qopcuaerrorstate.cpp b/src/opcua/client/qopcuaerrorstate.cpp index a06131f..006a374 100644 --- a/src/opcua/client/qopcuaerrorstate.cpp +++ b/src/opcua/client/qopcuaerrorstate.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt OPC UA module. @@ -67,6 +67,19 @@ public: If case of errors issued by the local backend, they can be ignored by calling the function \l setIgnoreError(). */ + +/*! + \enum QOpcUaErrorState::ConnectionStep + + Specifies at which step during the connection establishment the error occurred. + + \value Unknown The connection step is unknown. + \value CertificateValidation Error happened in the certificate validation step. + \value OpenSecureChannel Error happened when opening the secure channel. + \value CreateSession Error happened when creating the session. + \value ActivateSession Error happened during session acivation. +*/ + QOpcUaErrorState::QOpcUaErrorState() : data(new QOpcUaErrorStateData()) { @@ -135,7 +148,7 @@ bool QOpcUaErrorState::isClientSideError() const } /*! - Sets if the occurred error is a client side error. + Sets if the occurred error is a client side error to \a clientSideError. */ void QOpcUaErrorState::setClientSideError(bool clientSideError) { @@ -143,7 +156,7 @@ void QOpcUaErrorState::setClientSideError(bool clientSideError) } /*! - Sets if this client side error should be ignored. + Sets if this client side error should be ignored to \a ignore. Setting this flag does only work if the error is actually a client side error. */ diff --git a/src/opcua/client/qopcualiteraloperand.cpp b/src/opcua/client/qopcualiteraloperand.cpp index 29468f5..36f9795 100644 --- a/src/opcua/client/qopcualiteraloperand.cpp +++ b/src/opcua/client/qopcualiteraloperand.cpp @@ -1,5 +1,6 @@ /**************************************************************************** ** +** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com ** Contact: http://www.qt.io/licensing/ ** @@ -78,7 +79,7 @@ QOpcUaLiteralOperand::QOpcUaLiteralOperand(const QVariant &value, QOpcUa::Types } /*! - Sets the values from \a rhs in this \l QLiteralOperand. + Sets the values from \a rhs in this \l QOpcUaLiteralOperand. */ QOpcUaLiteralOperand &QOpcUaLiteralOperand::operator=(const QOpcUaLiteralOperand &rhs) { diff --git a/src/opcua/doc/src/security.qdoc b/src/opcua/doc/src/security.qdoc index 4fc8e5d..472ae3c 100644 --- a/src/opcua/doc/src/security.qdoc +++ b/src/opcua/doc/src/security.qdoc @@ -210,7 +210,7 @@ Certificate: When connecting for the first time, the client needs to trust the server certificate. The client should display a certificate warning (with cert details) and offer the possibility to save the certificate in its trust list. - For an example see the \l{Qt OPC UA explorer}{opcuaviewer example}. + For an example, see \l{Qt OPC UA Viewer Example}. When the client has accepted the server certificate, you can try to connect again. Now the server may reject the client's certificate. This is indicated by the generic error code \c BadSecurityChecksFailed. Server normally store rejected certificates in a special \c rejected folder. |