|
LightHub 4.6.0
Open-source smart home controller firmware
|
Base class of output driver modules (one per channel type). More...
#include <abstractout.h>
Public Member Functions | |
| abstractOut () | |
| virtual void | link (Item *_item) |
| virtual int | Ctrl (itemCmd cmd, char *subItem=NULL, bool toExecute=true, bool authorized=false)=0 |
| Execute a command on the hardware. Pure virtual - driver-specific. | |
| virtual int | isActive () |
| virtual bool | isAllowed (itemCmd cmd) |
| virtual itemCmd | getDefaultOnVal () |
| virtual int | getChanType () |
| virtual int | Status () override |
| virtual void | setStatus (uint8_t status) override |
| int | Setup () override |
| Item * | getItem () |
| Public Member Functions inherited from abstractCh | |
| abstractCh () | |
| virtual | ~abstractCh () |
| virtual int | Poll (short cause) |
| virtual int | Stop () |
Protected Member Functions | |
| int | pubAction (bool state) |
| Protected Member Functions inherited from abstractCh | |
| int | publishTopic (const char *topic, long value, const char *subtopic=NULL) |
| int | publishTopic (const char *topic, float value, const char *subtopic=NULL) |
| int | publishTopic (const char *topic, const char *value, const char *subtopic=NULL, const char *suffix=NULL) |
Protected Attributes | |
| Item * | item |
| Item currently linked to this driver. | |
Base class of output driver modules (one per channel type).
abstractOut is the interface between the item core and a concrete device driver (out_dmx, out_relay, out_Modbus, ...). The driver is created by driverFactory, linked to the current item via link(), controls the hardware in Ctrl() and reports activity via isActive(). Drivers are shared between items of the same channel type, so all state must be derived from the linked item rather than stored per-instance.
|
inline |
|
pure virtual |
Execute a command on the hardware. Pure virtual - driver-specific.
| cmd | - command and/or value to execute |
| subItem | - subchannel for multi-channel drivers |
| toExecute | - false means bookkeeping only (e.g. channel already inactive) |
| authorized | - true if the caller is authorized |
Implemented in colorChannel, out_AC, out_counter, out_Modbus, out_Motor, out_Multivent, out_pid, and out_relay.
|
inlinevirtual |
Reimplemented in out_AC, out_counter, out_dmx, out_Modbus, out_Motor, out_Multivent, out_pid, out_pwm, out_relay, and out_SPILed.
|
inlinevirtual |
|
inline |
|
virtual |
Reimplemented in out_AC, out_Multivent, and out_pid.
|
inlinevirtual |
Veto a command (driver-specific restrictions).
|
inlinevirtual |
Attach (or detach with NULL) the item this driver currently operates on.
Reimplemented in colorChannel, out_AC, out_Modbus, out_Motor, out_Multivent, out_pid, out_relay, and out_SPILed.
|
protected |
Publish an on/off state change to the MQTT topics of the linked item.
|
overridevirtual |
Set the CST_* status of the driver.
Reimplemented from abstractCh.
|
overridevirtual |
Driver-level setup wrapper (validates the linked item before Setup of hardware).
Implements abstractCh.
Reimplemented in out_AC, out_counter, out_dmx, out_Modbus, out_Motor, out_Multivent, out_pid, out_pwm, out_relay, and out_SPILed.
|
overridevirtual |
Reimplemented from abstractCh.