QOpcUaConnectionSettings Class

The common parameters for a connection to a server. 更多...

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

公共函数

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 )

详细描述

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.

成员函数文档编制

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 .

注意: 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.

另请参阅 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.

另请参阅 setRequestTimeout ().

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

Returns the secure channel lifetime.

另请参阅 setSecureChannelLifeTime ().

QStringList QOpcUaConnectionSettings:: sessionLocaleIds () const

Returns the session locale ids.

另请参阅 setSessionLocaleIds ().

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

Returns the requested session timeout.

另请参阅 setSessionTimeout ().

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

设置 timeout as the new connect timeout.

另请参阅 connectTimeout ().

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

设置 timeout as the new request timeout.

另请参阅 requestTimeout ().

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

设置 lifeTime as the new secure channel lifetime.

有关细节,见 https://reference.opcfoundation.org/v105/Core/docs/Part4/5.5.2/#Table11

另请参阅 secureChannelLifeTime ().

void QOpcUaConnectionSettings:: setSessionLocaleIds (const QStringList & localeIds )

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

有关细节,见 https://reference.opcfoundation.org/v105/Core/docs/Part4/5.6.3/#Table17

另请参阅 sessionLocaleIds ().

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

设置 timeout as the new requested session timeout.

有关细节,见 https://reference.opcfoundation.org/v105/Core/docs/Part4/5.6.2/#Table15

另请参阅 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 )

设置值从 rhs in this connection settings object.

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

移动赋值 other 到此 QOpcUaConnectionSettings 实例。

注意: 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] bool operator!= (const QOpcUaConnectionSettings & lhs , const QOpcUaConnectionSettings & rhs )

返回 true if lhs does not contain the same connection settings as rhs ;否则返回 false .

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

返回 true if lhs contains the same connection settings as rhs ;否则返回 false .