QOpcUaApplicationIdentity#
QOpcUaApplicationIdentity
defines the identity of the application. More…
Synopsis#
Functions#
def
applicationName
()def
applicationType
()def
applicationUri
()def
isValid
()def
productUri
()def
setApplicationName
(value)def
setApplicationType
(value)def
setApplicationUri
(value)def
setProductUri
(value)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
This info must be configured using 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();
- class PySide6.QtOpcUa.QOpcUaApplicationIdentity#
PySide6.QtOpcUa.QOpcUaApplicationIdentity(other)
- Parameters:
Constructs an application identity from other
.
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.applicationName()#
- Return type:
str
Returns the human readable name of the application. This does not need to be unique.
See also
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.applicationType()#
- Return type:
Returns the application’s type.
See also
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.applicationUri()#
- Return type:
str
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
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.isValid()#
- Return type:
bool
Returns true if the application identity contains valid data.
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.productUri()#
- Return type:
str
Returns the application’s productUri.
This uniquely identifies the product.
See also
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.setApplicationName(value)#
- Parameters:
value – str
Sets the application name to value
.
See also
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.setApplicationType(value)#
- Parameters:
value –
ApplicationType
Sets the type of the application. Client applications should set value
to Client
.
The default value is Client
.
See also
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.setApplicationUri(value)#
- Parameters:
value – str
Sets the applicationUri
to value
.
See also
- PySide6.QtOpcUa.QOpcUaApplicationIdentity.setProductUri(value)#
- Parameters:
value – str
Sets the productUri
to value
.
See also