- class QOpcUaApplicationIdentity#
QOpcUaApplicationIdentity
defines the identity of the application. More…Synopsis#
Methods#
def
__init__()
def
applicationUri()
def
isValid()
def
productUri()
def
setProductUri()
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();
- __init__()#
Default constructs an application identity with no parameters set.
- __init__(other)
- Parameters:
other –
QOpcUaApplicationIdentity
Constructs an application identity from
other
.- applicationName()#
- Return type:
str
Returns the human readable name of the application. This does not need to be unique.
See also
- applicationType()#
- Return type:
Returns the application’s type.
See also
- 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
- isValid()#
- Return type:
bool
Returns true if the application identity contains valid data.
- productUri()#
- Return type:
str
Returns the application’s productUri.
This uniquely identifies the product.
See also
- setApplicationName(value)#
- Parameters:
value – str
Sets the application name to
value
.See also
- setApplicationType(value)#
- Parameters:
value –
ApplicationType
Sets the type of the application. Client applications should set
value
toClient
.The default value is
Client
.See also
- setApplicationUri(value)#
- Parameters:
value – str
Sets the
applicationUri
tovalue
.See also
- setProductUri(value)#
- Parameters:
value – str
Sets the
productUri
tovalue
.See also