The QKnxDateTime class is a datapoint type for the date and time. 更多...
头: | #include <QKnxDateTime> |
qmake: | QT += knx |
继承: | QKnxFixedSizeDatapointType |
enum | 属性 { Fault, WorkingDay, NoWorkingDay, NoYear, NoDate, …, StandardSummerTime } |
flags | 属性 |
enum class | ClockQuality { WithoutExtendedSyncSignal, WithExtendedSyncSignal } |
QKnxDateTime (const QDate & date , const QKnxTime24 & time , QKnxDateTime::Attributes 属性 , QKnxDateTime::ClockQuality quality ) | |
QKnxDateTime () | |
QKnxDateTime::Attributes | 属性 () const |
QKnxDateTime::ClockQuality | clockQuality () const |
QDate | date () const |
void | setAttributes (QKnxDateTime::Attributes 属性 ) |
void | setClockQuality (QKnxDateTime::ClockQuality quality ) |
bool | setDate (const QDate & date ) |
bool | setTime (const QKnxTime24 & time ) |
bool | setValue (const QDate & date , const QKnxTime24 & time , QKnxDateTime::Attributes 属性 , QKnxDateTime::ClockQuality quality ) |
QKnxTime24 | time () const |
virtual bool | isValid () const override |
This is a fixed size datapoint type with the length of 8 bytes.
Valid dates are from
Monday, 1900-01-01
to
Wednesday, 2155-12-31
, and valid times are from
Any day, 00:00:00
to
Sunday, 24:00:00
.
另请参阅 QKnxDatapointType and Qt KNX Datapoint Type Classes .
This enum type holds the date attributes.
常量 | 值 | 描述 |
---|---|---|
QKnxDateTime::Fault
|
0x00
|
Set if one or more supported fields of the date and time information are corrupted. |
QKnxDateTime::WorkingDay
|
0x01
|
Set to indicate a working day. |
QKnxDateTime::NoWorkingDay
|
0x02
|
Set if the Working day field is not valid. |
QKnxDateTime::NoYear
|
0x04
|
Set if the Year field is not valid. |
QKnxDateTime::NoDate
|
0x08
|
Set if the Month and Day of the Month field are not valid. |
QKnxDateTime::NoDayOfWeek
|
0x10
|
Set if the Day of week field is not valid. |
QKnxDateTime::NoTime
|
0x20
|
Set if the Hour of day, Minutes and Seconds fields are not valid. |
QKnxDateTime::StandardSummerTime
|
0x40
|
Standard Summer Time is only an attribute for information and visualization. In the hour field, summer-time correction is already considered. Therefore, no hour offset shall be added by the receiver if Standard Summer Time Information is set. |
The Attributes type is a typedef for QFlags <Attribute>. It stores an OR combination of Attribute values.
This enum type holds whether the device sending date and time information sends signals which are synchronized (time to time) with an external date and time information source.
常量 | 值 | 描述 |
---|---|---|
QKnxDateTime::ClockQuality::WithoutExtendedSyncSignal
|
0
|
Clock without an external synchronization signal. The device sending date & time information has a local clock, which can be inaccurate. |
QKnxDateTime::ClockQuality::WithExtendedSyncSignal
|
0x01
|
Clock with an external synchronization signal (like DCF77, videotext). Also an externally synchronized clock should send
CLQ = 0
after start-up (until reception of first synchronization signal) or after a synchronization timeout.
|
Creates a fixed size datapoint type with the date set to date , time to time , attributes to 属性 , and clock quality to quality .
Creates a fixed size datapoint type with the date set to
2000, 0, 0
, the time set to
0 ,0
, the clock quality set to
WithoutExtendedSyncSignal
, and an empty list of attributes.
Returns the additional information stored in the datapoint type as a list of attributes.
另请参阅 setAttributes ().
Returns the clock quality stored in the datapoint type.
另请参阅 setClockQuality ().
Returns the date stored in the datapoint type.
另请参阅 setDate ().
[override virtual]
bool
QKnxDateTime::
isValid
() const
重实现: QKnxDatapointType::isValid () const.
Sets the additional information of the datapoint type to the list of attributes specified by 属性 .
另请参阅 属性 ().
Sets the clock quality to quality .
另请参阅 clockQuality ().
Sets the date stored in the datapoint type to date .
If the value is outside the allowed range, returns
false
and does not set the value.
另请参阅 date ().
Sets the time stored in the datapoint type to time .
If the value is outside the allowed range, returns
false
and does not set the value.
另请参阅 time ().
Sets the date stored in the datapoint type to date , time to time , the list of attributes to 属性 , and clock quality to quality .
返回
true
if the value was set; otherwise returns
false
.
Returns the time stored in the datapoint type.
另请参阅 setTime ().