PySide6.QtOpcUa.QOpcUaApplicationIdentity

class QOpcUaApplicationIdentity

QOpcUaApplicationIdentity defines the identity of the application. More

Synopsis

Methods

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:

otherQOpcUaApplicationIdentity

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.

applicationType()
Return type:

ApplicationType

Returns the application’s type.

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.

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

setProductUri()

setApplicationName(value)
Parameters:

value – str

Sets the application name to value.

setApplicationType(value)
Parameters:

valueApplicationType

Sets the type of the application. Client applications should set value to Client .

The default value is Client .

setApplicationUri(value)
Parameters:

value – str

Sets the applicationUri to value.

setProductUri(value)
Parameters:

value – str

Sets the productUri to value.

See also

productUri()