IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QOpcUaApplicationIdentity Class

https:// defines the identity of the application.

This class was introduced in QtOpcUa 5.13.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QOpcUaApplicationIdentity Class▲

  • Header: QOpcUaApplicationIdentity

  • Since: QtOpcUa 5.13

  • qmake: QT += opcua

Detailed Description▲

This info must be configured using QOpcUaClient::setApplicationIdentity. The application identity can be set up manually or derived from a certificate.

 
Sélectionnez
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.

 
Sélectionnez
QOpcUaApplicationIdentity identity;
identity = pkiConfig.applicationIdentity();

Member Function Documentation▲

 

QOpcUaApplicationIdentity::QOpcUaApplicationIdentity(const QOpcUaApplicationIdentity &other)▲

Constructs an application identity from other.

QString QOpcUaApplicationIdentity::applicationName() const▲

Returns the human readable name of the application. This does not need to be unique.

See Also▲

See also https://()

int QOpcUaApplicationIdentity::applicationType() const▲

Returns the application's type.

See Also▲

See also https://()

QString QOpcUaApplicationIdentity::applicationUri() const▲

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▲

See also https://()

bool QOpcUaApplicationIdentity::isValid() const▲

Returns true if the application identity contains valid data.

QString QOpcUaApplicationIdentity::productUri() const▲

Returns the application's productUri.

This uniquely identifies the product.

See Also▲

See also https://()

void QOpcUaApplicationIdentity::setApplicationName(const QString &value)▲

Sets the application name to value.

See Also▲

See also https://()

void QOpcUaApplicationIdentity::setApplicationType(int value)▲

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

The default value is Client.

See Also▲

See also https://()

void QOpcUaApplicationIdentity::setApplicationUri(const QString &value)▲

Sets the https:// to value.

See Also▲

See also https://(), https://()

void QOpcUaApplicationIdentity::setProductUri(const QString &value)▲

Sets the https:// to value.

See Also▲

See also https://()

QOpcUaApplicationIdentity &QOpcUaApplicationIdentity::operator=(const QOpcUaApplicationIdentity &rhs)▲

Sets the values of rhs in this https://.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+   

Ce document est disponible sous la licence https:// telle que publiée par la Free Software Foundation.