QKnxPsuMode Class

The QKnxPsuMode class is a datapoint type for storing the bus power supply unit mode. More...

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

Public Types

enum class Mode { Disabled, Enabled, Automatic, Invalid }

Public Functions

QKnxPsuMode(Mode mode)
QKnxPsuMode()
Mode mode() const
bool setMode(Mode mode)

Detailed Description

A bus power supply unit is required for bus communications. It can be either a decentral (distributed) bus power supply unit, DPSU, or a central bus power supply unit, PSU.

The DPSU or PSU can be activated or deactivated also by mechanical means, such as using a jumper or a switch. The supported range is product specific. For example, disabled/enabled only or disabled/auto only.

The range for the Mode value is from Disabled, 0 to Automatic, 2.

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 QKnxPsuMode::Mode

This enum holds the bus power supply unit mode stored in the datapoint type.

ConstantValueDescription
QKnxPsuMode::Mode::Disabled0x00The PSU or DPSU in the device is switched off.
QKnxPsuMode::Mode::Enabled0x01The PSU or DPSU in the device is switched on.
QKnxPsuMode::Mode::Automatic0x02The PSU or DPSU in the device was turned on or off automatically. For example, by sending a message on the bus.
QKnxPsuMode::Mode::Invalid0xffThe mode is invalid.

Member Function Documentation

QKnxPsuMode::QKnxPsuMode(Mode mode)

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

QKnxPsuMode::QKnxPsuMode()

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

Mode QKnxPsuMode::mode() const

Returns the mode stored in the datapoint type.

See also setMode().

bool QKnxPsuMode::setMode(Mode mode)

Sets the mode stored in the datapoint type to mode.

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

See also mode().