QOpcUaApplicationIdentity defines the identity of the application. More...
Header: | #include <QOpcUaApplicationIdentity> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
qmake: | QT += opcua |
Since: | QtOpcUa 5.13 |
QOpcUaApplicationIdentity(const QOpcUaApplicationIdentity &other) | |
QOpcUaApplicationIdentity & | operator=(const QOpcUaApplicationIdentity &rhs) |
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) |
This info must be configured using QOpcUaClient::setApplicationIdentity. The application identity can be set up manually or derived from a certificate.
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);
In case your application authenticates using certificates the application identity has to match the used certificate. In this case all information is extracted from the certificate given in the PKI configuration.
QOpcUaApplicationIdentity identity; identity = pkiConfig.applicationIdentity();
Constructs an application identity from other.
Sets the values of rhs in this QOpcUaApplicationIdentity.
Returns the human readable name of the application. This does not need to be unique.
See also setApplicationName().
Returns the application's type.
See also setApplicationType().
Returns the application's application URI.
This must be unique for each installation instance of the application and must match the ApplicationURI in the application's certificate.
See also setApplicationUri().
Returns true if the application identity contains valid data.
Returns the application's productUri.
This uniquely identifies the product.
See also setProductUri().
Sets the application name to value.
See also applicationName().
Sets the type of the application. Client applications should set value to Client.
The default value is Client.
See also applicationType().
Sets the applicationUri to value.
See also applicationUri() and setApplicationName().
Sets the productUri to value.
See also productUri().