This class stores OPC UA value data and associated metadata. 更多...
头: | #include <QOpcUaDataValue> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
qmake: | QT += opcua |
Since: | Qt 6.3 |
QOpcUaDataValue () | |
QOpcUaDataValue (const QOpcUaDataValue & other ) | |
~QOpcUaDataValue () | |
(从 6.7 起)
quint16
|
serverPicoseconds () const |
QDateTime | serverTimestamp () const |
(从 6.7 起)
void
|
setServerPicoseconds (quint16 serverPicoseconds ) |
void | setServerTimestamp (const QDateTime & serverTimestamp ) |
(从 6.7 起)
void
|
setSourcePicoseconds (quint16 sourcePicoseconds ) |
void | setSourceTimestamp (const QDateTime & sourceTimestamp ) |
void | setStatusCode (QOpcUa::UaStatusCode statusCode ) |
void | setValue (const QVariant & value ) |
(从 6.7 起)
quint16
|
sourcePicoseconds () const |
QDateTime | sourceTimestamp () const |
QOpcUa::UaStatusCode | statusCode () const |
void | swap (QOpcUaDataValue & other ) |
QVariant | value () const |
(从 6.7 起)
QVariant
|
operator QVariant () const |
QOpcUaDataValue & | operator= (const QOpcUaDataValue & other ) |
(从 6.7 起)
bool
|
operator!= (const QOpcUaDataValue & lhs , const QOpcUaDataValue & rhs ) |
(从 6.7 起)
bool
|
operator== (const QOpcUaDataValue & lhs , const QOpcUaDataValue & rhs ) |
This class corresponds to the OPC UA DataValue type.
Constructs an invalid data value.
Constructs a data value from other .
[noexcept]
QOpcUaDataValue::
~QOpcUaDataValue
()
Destroys the data value.
[since 6.7]
quint16
QOpcUaDataValue::
serverPicoseconds
() const
Returns the number of 10 picosecond intervals for the server timestamp.
该函数在 Qt 6.7 引入。
另请参阅 setServerPicoseconds ().
Returns the server timestamp for value ().
另请参阅 setServerTimestamp ().
[since 6.7]
void
QOpcUaDataValue::
setServerPicoseconds
(
quint16
serverPicoseconds
)
Sets the number of 10 picosecond intervals for the server timestamp to serverPicoseconds .
该函数在 Qt 6.7 引入。
另请参阅 serverPicoseconds ().
Sets the server timestamp to serverTimestamp .
另请参阅 serverTimestamp ().
[since 6.7]
void
QOpcUaDataValue::
setSourcePicoseconds
(
quint16
sourcePicoseconds
)
Sets the number of 10 picosecond intervals for the source timestamp to sourcePicoseconds .
该函数在 Qt 6.7 引入。
另请参阅 sourcePicoseconds ().
Sets the source timestamp to sourceTimestamp .
另请参阅 sourceTimestamp ().
Sets the status code to statusCode .
另请参阅 statusCode ().
Sets the value to value .
If this data value is to be used with QOpcUaBinaryDataEncoding or QOpcUaGenericStructHandler , the value's type must be QOpcUaVariant .
另请参阅 value ().
[since 6.7]
quint16
QOpcUaDataValue::
sourcePicoseconds
() const
Returns the number of 10 picosecond intervals for the source timestamp.
该函数在 Qt 6.7 引入。
另请参阅 setSourcePicoseconds ().
Returns the source timestamp for value ().
另请参阅 setSourceTimestamp ().
Returns the status code for this data value. If the status code is not Good , the value and the timestamps are invalid.
另请参阅 setStatusCode ().
[noexcept]
void
QOpcUaDataValue::
swap
(
QOpcUaDataValue
&
other
)
Swaps this data value instance with other 。此函数非常快且从不失败。
Returns the value.
另请参阅 setValue ().
[since 6.7]
QVariant
QOpcUaDataValue::
operator QVariant
() const
返回 QVariant containing this data value.
该函数在 Qt 6.7 引入。
设置值从 other in this data value.
[noexcept, since 6.7]
bool
operator!=
(const
QOpcUaDataValue
&
lhs
, const
QOpcUaDataValue
&
rhs
)
返回
true
if
lhs
不等于
rhs
.
该函数在 Qt 6.7 引入。
[noexcept, since 6.7]
bool
operator==
(const
QOpcUaDataValue
&
lhs
, const
QOpcUaDataValue
&
rhs
)
返回
true
if
lhs
等于
rhs
.
该函数在 Qt 6.7 引入。