QOpcUaConnectionSettings Class

The common parameters for a connection to a server. More...

Header: #include <QOpcUaConnectionSettings>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua
Since: Qt 6.6

Public Functions

QOpcUaConnectionSettings()
QOpcUaConnectionSettings(const QOpcUaConnectionSettings &other)
QOpcUaConnectionSettings(QOpcUaConnectionSettings &&other)
~QOpcUaConnectionSettings()
std::chrono::milliseconds connectTimeout() const
std::chrono::milliseconds requestTimeout() const
std::chrono::milliseconds secureChannelLifeTime() const
QStringList sessionLocaleIds() const
std::chrono::milliseconds sessionTimeout() const
void setConnectTimeout(std::chrono::milliseconds timeout)
void setRequestTimeout(std::chrono::milliseconds timeout)
void setSecureChannelLifeTime(std::chrono::milliseconds lifeTime)
void setSessionLocaleIds(const QStringList &localeIds)
void setSessionTimeout(std::chrono::milliseconds timeout)
void swap(QOpcUaConnectionSettings &other)
QOpcUaConnectionSettings &operator=(const QOpcUaConnectionSettings &rhs)
QOpcUaConnectionSettings &operator=(QOpcUaConnectionSettings &&other)
bool operator!=(const QOpcUaConnectionSettings &lhs, const QOpcUaConnectionSettings &rhs)
bool operator==(const QOpcUaConnectionSettings &lhs, const QOpcUaConnectionSettings &rhs)

Detailed Description

This class stores common connection parameters like the session timeout, the secure channel lifetime and the localeIds.

The information from this class is currently only used by the open62541 backend.

Member Function Documentation

QOpcUaConnectionSettings::QOpcUaConnectionSettings()

Constructs a connection settings object.

QOpcUaConnectionSettings::QOpcUaConnectionSettings(const QOpcUaConnectionSettings &other)

Constructs a connection settings object with the values of other.

[noexcept] QOpcUaConnectionSettings::QOpcUaConnectionSettings(QOpcUaConnectionSettings &&other)

Move-constructs a new connection settings object from other.

Note: The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.

[noexcept] QOpcUaConnectionSettings::~QOpcUaConnectionSettings()

Destroys this connection settings object.

std::chrono::milliseconds QOpcUaConnectionSettings::connectTimeout() const

Returns the connect timeout.

This value determines how long the connect will wait for a reply.

See also setConnectTimeout().

std::chrono::milliseconds QOpcUaConnectionSettings::requestTimeout() const

Returns the request timeout.

This value determines how long a synchronous service call will wait for a reply.

See also setRequestTimeout().

std::chrono::milliseconds QOpcUaConnectionSettings::secureChannelLifeTime() const

Returns the secure channel lifetime.

See also setSecureChannelLifeTime().

QStringList QOpcUaConnectionSettings::sessionLocaleIds() const

Returns the session locale ids.

See also setSessionLocaleIds().

std::chrono::milliseconds QOpcUaConnectionSettings::sessionTimeout() const

Returns the requested session timeout.

See also setSessionTimeout().

void QOpcUaConnectionSettings::setConnectTimeout(std::chrono::milliseconds timeout)

Sets timeout as the new connect timeout.

See also connectTimeout().

void QOpcUaConnectionSettings::setRequestTimeout(std::chrono::milliseconds timeout)

Sets timeout as the new request timeout.

See also requestTimeout().

void QOpcUaConnectionSettings::setSecureChannelLifeTime(std::chrono::milliseconds lifeTime)

Sets lifeTime as the new secure channel lifetime.

For details, see https://reference.opcfoundation.org/v105/Core/docs/Part4/5.5.2/#Table11

See also secureChannelLifeTime().

void QOpcUaConnectionSettings::setSessionLocaleIds(const QStringList &localeIds)

Sets localeIds as the new list of locale IDs. This setting is currently not supported by the open62541 backend.

For details, see https://reference.opcfoundation.org/v105/Core/docs/Part4/5.6.3/#Table17

See also sessionLocaleIds().

void QOpcUaConnectionSettings::setSessionTimeout(std::chrono::milliseconds timeout)

Sets timeout as the new requested session timeout.

For details, see https://reference.opcfoundation.org/v105/Core/docs/Part4/5.6.2/#Table15

See also sessionTimeout().

[noexcept] void QOpcUaConnectionSettings::swap(QOpcUaConnectionSettings &other)

Swaps connection settings object other with this connection settings object. This operation is very fast and never fails.

QOpcUaConnectionSettings &QOpcUaConnectionSettings::operator=(const QOpcUaConnectionSettings &rhs)

Sets the values from rhs in this connection settings object.

[noexcept] QOpcUaConnectionSettings &QOpcUaConnectionSettings::operator=(QOpcUaConnectionSettings &&other)

Move-assigns other to this QOpcUaConnectionSettings instance.

Note: The moved-from object other is placed in a partially-formed state, in which the only valid operations are destruction and assignment of a new value.

Related Non-Members

[noexcept] bool operator!=(const QOpcUaConnectionSettings &lhs, const QOpcUaConnectionSettings &rhs)

Returns true if lhs does not contain the same connection settings as rhs; otherwise returns false.

[noexcept] bool operator==(const QOpcUaConnectionSettings &lhs, const QOpcUaConnectionSettings &rhs)

Returns true if lhs contains the same connection settings as rhs; otherwise returns false.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.