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= (QOpcUaConnectionSettings && other ) |
| QOpcUaConnectionSettings & | operator= (const QOpcUaConnectionSettings & rhs ) |
| 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.
[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.
設置值從 rhs in this connection settings object.
[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
.