QOpcUaApplicationIdentity Class
QOpcUaApplicationIdentity は、アプリケーションの識別子を定義します。詳細...
| ヘッダー: | #include <QOpcUaApplicationIdentity> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
| バージョン: | QtOpcUa 5.13以降 |
パブリック関数
| 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) |
詳細な説明
この情報は、QOpcUaClient::setApplicationIdentity を使用して設定する必要があります。アプリケーション ID は手動で設定するか、証明書から導出することができます。
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);アプリケーションが証明書を使用して認証を行う場合、アプリケーション ID は使用される証明書と一致している必要があります。この場合、すべての情報は PKI 構成で指定された証明書から抽出されます。
QOpcUaApplicationIdentity identity;
identity = pkiConfig.applicationIdentity();メンバ関数のドキュメント
QOpcUaApplicationIdentity::QOpcUaApplicationIdentity()
default は、パラメータが設定されていないアプリケーション ID を作成します。
QOpcUaApplicationIdentity::QOpcUaApplicationIdentity(const QOpcUaApplicationIdentity &other)
other からアプリケーションIDを生成します。
QString QOpcUaApplicationIdentity::applicationName() const
アプリケーションの読みやすい名前を返します。この名前は一意である必要はありません。
setApplicationName()も参照してください 。
QOpcUaApplicationDescription::ApplicationType QOpcUaApplicationIdentity::applicationType() const
アプリケーションの型を返します。
setApplicationType()も参照してください 。
QString QOpcUaApplicationIdentity::applicationUri() const
アプリケーションのアプリケーション URI を返します。
これは、アプリケーションの各インストールインスタンスごとに一意である必要があり、アプリケーションの証明書内の ApplicationURI と一致している必要があります。
setApplicationUri()も参照してください 。
bool QOpcUaApplicationIdentity::isValid() const
アプリケーションIDに有効なデータが含まれている場合、trueを返します。
QString QOpcUaApplicationIdentity::productUri() const
アプリケーションの productUri を返します。
これは、製品を一意に識別するものです。
setProductUri()も参照してください 。
void QOpcUaApplicationIdentity::setApplicationName(const QString &value)
アプリケーション名を「value 」に設定します。
applicationName()も参照してください 。
void QOpcUaApplicationIdentity::setApplicationType(QOpcUaApplicationDescription::ApplicationType value)
アプリケーションのタイプを設定します。クライアントアプリケーションでは、value をClient に設定する必要があります。
デフォルト値は `Client` です。
applicationType()も参照してください 。
void QOpcUaApplicationIdentity::setApplicationUri(const QString &value)
applicationUri をvalue に設定します。
applicationUri() およびsetApplicationName()も参照してください 。
void QOpcUaApplicationIdentity::setProductUri(const QString &value)
productUri をvalue に設定します。
productUri()も参照してください 。
QOpcUaApplicationIdentity &QOpcUaApplicationIdentity::operator=(const QOpcUaApplicationIdentity &rhs)
このQOpcUaApplicationIdentity 内のrhs の値を設定します。
© 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.