The QKnxScloMode class is a datapoint type for storing the system clock (SCLO) mode. 更多...
头: | #include <QKnxScloMode> |
qmake: | QT += knx |
继承: | QKnx1Byte |
enum class | Mode { Autonomous, Slave, Master, Invalid } |
QKnxScloMode (QKnxScloMode::Mode mode ) | |
QKnxScloMode () | |
QKnxScloMode::Mode | mode () const |
bool | setMode (QKnxScloMode::Mode mode ) |
One device in the system may be assigned to provide accurate system time and date information and synchronize the local clocks of other devices in the system. The system clock information is generated and distributed by the system clock that is configured as a master clock .
Other clocks in the system are configured as slave clocks , which are also real clocks. They contain an internal clock to keep the time (using an oscillator, crystal, mains signal, and so on).
The clock in the SCLO can also be run autonomously, which means that no system clock information is sent and reception of system clock information is disabled. In this case, the SCLO is configured as an autonomous clock .
SCLO mode may be activated automatically or by configuration. Usually, the device containing a SCLO with the most accurate clock will be configured as master, whereas SCLOs in other devices are configured as slaves or autonomous clocks.
The Mode enumeration holds the main functionality of SCLO as an autonomous clock, a slave clock, or a master clock. Depending on the mode, datapoints in the SCLO become mandatory or optional and alternative flowcharts are activated in the device.
The SCLO mode must be set in a device, but it can be 只读 . It can be set at the factory and is not changeable because a SCLO may have a fixed functionality. For example, a DCF77 Radio Clock will always be a master clock.
This is a fixed size datapoint type with the length of 1 byte.
另请参阅 QKnxDatapointType , QKnx1Byte ,和 Qt KNX Datapoint Type Classes .
This enum holds the main functionality of the SCLO stored in the datapoint type.
常量 | 值 | 描述 |
---|---|---|
QKnxScloMode::Mode::Autonomous
|
0x00
|
The system clock is configured as an autonomous clock. |
QKnxScloMode::Mode::Slave
|
0x01
|
The system clock is configured as a slave clock. |
QKnxScloMode::Mode::Master
|
0x02
|
The system clock is configured as a master clock. |
QKnxScloMode::Mode::Invalid
|
0xff
|
The value is invalid. |
Creates a fixed size datapoint type with the SCLO mode set to mode .
Creates a fixed size datapoint type with the SCLO mode set to
Autonomous
.
Returns the SCLO mode stored in the datapoint type.
另请参阅 setMode ().
Sets the SCLO mode stored in the datapoint type to mode .
返回
true
if the byte was set; otherwise returns
false
.
另请参阅 mode ().