QKnxScloMode Class

The QKnxScloMode class is a datapoint type for storing the system clock (SCLO) mode. More...

Header: #include <QKnxScloMode>
qmake: QT += knx
Inherits: QKnx1Byte

Public Types

enum class Mode { Autonomous, Slave, Master, Invalid }

Public Functions

QKnxScloMode(QKnxScloMode::Mode mode)
QKnxScloMode()
QKnxScloMode::Mode mode() const
bool setMode(QKnxScloMode::Mode mode)

Detailed Description

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 read-only. 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.

See also QKnxDatapointType, QKnx1Byte, and Qt KNX Datapoint Type Classes.

Member Type Documentation

enum class QKnxScloMode::Mode

This enum holds the main functionality of the SCLO stored in the datapoint type.

ConstantValueDescription
QKnxScloMode::Mode::Autonomous0x00The system clock is configured as an autonomous clock.
QKnxScloMode::Mode::Slave0x01The system clock is configured as a slave clock.
QKnxScloMode::Mode::Master0x02The system clock is configured as a master clock.
QKnxScloMode::Mode::Invalid0xffThe value is invalid.

Member Function Documentation

QKnxScloMode::QKnxScloMode(QKnxScloMode::Mode mode)

Creates a fixed size datapoint type with the SCLO mode set to mode.

QKnxScloMode::QKnxScloMode()

Creates a fixed size datapoint type with the SCLO mode set to Autonomous.

QKnxScloMode::Mode QKnxScloMode::mode() const

Returns the SCLO mode stored in the datapoint type.

See also setMode().

bool QKnxScloMode::setMode(QKnxScloMode::Mode mode)

Sets the SCLO mode stored in the datapoint type to mode.

Returns true if the byte was set; otherwise returns false.

See also mode().

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.