QOpcUaApplicationIdentity Class
QOpcUaApplicationIdentity definiert die Identität der Anwendung. Mehr...
| Header: | #include <QOpcUaApplicationIdentity> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
| Seit: | QtOpcUa 5.13 |
Öffentliche Funktionen
| QOpcUaApplicationIdentity() | |
| QOpcUaApplicationIdentity(const QOpcUaApplicationIdentity &other) | |
| QString | applicationName() const |
| QOpcUaApplicationDescription::ApplicationType | applicationType() const |
| QString | applicationUri() const |
| bool | isValid() const |
| QString | productUri() const |
| void | setApplicationName(const QString &value) |
| void | setApplicationType(QOpcUaApplicationDescription::ApplicationType value) |
| void | setApplicationUri(const QString &value) |
| void | setProductUri(const QString &value) |
| QOpcUaApplicationIdentity & | operator=(const QOpcUaApplicationIdentity &rhs) |
Ausführliche Beschreibung
Diese Informationen müssen über „ QOpcUaClient::setApplicationIdentity “ konfiguriert werden. Die Anwendungsidentität kann manuell eingerichtet oder aus einem Zertifikat abgeleitet werden.
QOpcUaApplicationIdentity identity;
const QString applicationUri = QStringLiteral("urn:%1:%2:%3")
.arg(QHostInfo::localHostName())
.arg(QCoreApplication::organizationName())
.arg(QCoreApplication::applicationName());
const QString productUri = QStringLiteral("urn:%1:%2")
.arg(QCoreApplication::organizationName())
.arg(QCoreApplication::applicationName());
identity.setProductUri(productUri);
identity.setApplicationUri(applicationUri);
identity.setApplicationName(QCoreApplication::applicationName());
identity.setApplicationType(QOpcUaApplicationDescription::Client);
client->setApplicationIdentity(identity);Falls sich Ihre Anwendung mithilfe von Zertifikaten authentifiziert, muss die Anwendungsidentität mit dem verwendeten Zertifikat übereinstimmen. In diesem Fall werden alle Informationen aus dem in der PKI-Konfiguration angegebenen Zertifikat extrahiert.
QOpcUaApplicationIdentity identity;
identity = pkiConfig.applicationIdentity();Dokumentation der Mitgliedsfunktionen
QOpcUaApplicationIdentity::QOpcUaApplicationIdentity()
„Default“ erstellt eine Anwendungsidentität, ohne dass Parameter festgelegt werden.
QOpcUaApplicationIdentity::QOpcUaApplicationIdentity(const QOpcUaApplicationIdentity &other)
Erstellt eine Anwendungsidentität aus other.
QString QOpcUaApplicationIdentity::applicationName() const
Gibt den für Menschen lesbaren Namen der Anwendung zurück. Dieser muss nicht eindeutig sein.
Siehe auch ` setApplicationName()`.
QOpcUaApplicationDescription::ApplicationType QOpcUaApplicationIdentity::applicationType() const
Gibt den Typ der Anwendung zurück.
Siehe auch „ setApplicationType()“.
QString QOpcUaApplicationIdentity::applicationUri() const
Gibt die Anwendungs-URI der Anwendung zurück.
Diese muss für jede Installationsinstanz der Anwendung eindeutig sein und mit der ApplicationURI im Zertifikat der Anwendung übereinstimmen.
Siehe auch „ setApplicationUri()“.
bool QOpcUaApplicationIdentity::isValid() const
Gibt „true“ zurück, wenn die Anwendungsidentität gültige Daten enthält.
QString QOpcUaApplicationIdentity::productUri() const
Gibt den `productUri` der Anwendung zurück.
Dieser identifiziert das Produkt eindeutig.
Siehe auch „ setProductUri()“.
void QOpcUaApplicationIdentity::setApplicationName(const QString &value)
Legt den Anwendungsnamen auf „ value “ fest.
Siehe auch applicationName().
void QOpcUaApplicationIdentity::setApplicationType(QOpcUaApplicationDescription::ApplicationType value)
Legt den Typ der Anwendung fest. Client-Anwendungen sollten „ value “ auf „ Client “ setzen.
Der Standardwert ist „ Client “.
Siehe auch applicationType().
void QOpcUaApplicationIdentity::setApplicationUri(const QString &value)
Setzt die „ applicationUri “ auf „ value “.
Siehe auch applicationUri() und setApplicationName().
void QOpcUaApplicationIdentity::setProductUri(const QString &value)
Setzt die Eigenschaft „ productUri “ auf „ value “.
Siehe auch productUri().
QOpcUaApplicationIdentity &QOpcUaApplicationIdentity::operator=(const QOpcUaApplicationIdentity &rhs)
Legt die Werte von „ rhs “ in dieser Datei „ QOpcUaApplicationIdentity “ fest.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.