Modes API

HasModesIF

class HasModesIF

Subclassed by ControllerBase, DeviceHandlerBase, PowerSwitcherComponent, SubsystemBase

Public Static Attributes

static const Event CHANGING_MODE = MAKE_EVENT(0, severity::INFO)

An object announces changing the mode. p1: target mode. p2: target submode

static const Event MODE_INFO = MAKE_EVENT(1, severity::INFO)

An Object announces its mode; parameter1 is mode, parameter2 is submode.

static const Event OBJECT_IN_INVALID_MODE = MAKE_EVENT(5, severity::LOW)

Indicates a bug or configuration failure: Object is in a mode it should never be in.

static const Event FORCING_MODE = MAKE_EVENT(6, severity::MEDIUM)

The mode is changed, but for some reason, the change is forced, i.e. EXTERNAL_CONTROL ignored. p1: target mode. p2: target submode

static const Event MODE_CMD_REJECTED = MAKE_EVENT(7, severity::LOW)

A mode command was rejected by the called object. Par1: called object id, Par2: return code.

static const Mode_t MODE_ON = 1

The device is powered and ready to perform operations. In this mode, no commands are sent by the device handler itself, but direct commands van be commanded and will be interpreted

static const Mode_t MODE_OFF = 0

The device is powered off. The only command accepted in this mode is a mode change to on.

static const Submode_t SUBMODE_NONE = 0

To avoid checks against magic number “0”.