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.
Constructs a connection settings object.
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.
Returns the connect timeout.
This value determines how long the connect will wait for a reply.
另请参阅 setConnectTimeout ().
Returns the request timeout.
This value determines how long a synchronous service call will wait for a reply.
另请参阅 setRequestTimeout ().
Returns the secure channel lifetime.
另请参阅 setSecureChannelLifeTime ().
Returns the session locale ids.
另请参阅 setSessionLocaleIds ().
Returns the requested session timeout.
另请参阅 setSessionTimeout ().
设置 timeout as the new connect timeout.
另请参阅 connectTimeout ().
设置 timeout as the new request timeout.
另请参阅 requestTimeout ().
设置 lifeTime as the new secure channel lifetime.
有关细节,见 https://reference.opcfoundation.org/v105/Core/docs/Part4/5.5.2/#Table11
另请参阅 secureChannelLifeTime ().
设置 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 ().
设置 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.
设置值从 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
.