Base class of input driver modules (sensors, encoders, ...).
More...
#include <abstractin.h>
|
| int | publish (long value, const char *subtopic=NULL) |
| int | publish (float value, const char *subtopic=NULL) |
| int | publish (char *value, const char *subtopic=NULL) |
| 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) |
|
| Input * | in |
| | Pointer to the Input (config entry) this driver is attached to.
|
| friend | Input |
Base class of input driver modules (sensors, encoders, ...).
abstractIn extends abstractCh for drivers attached to an Input. The in pointer references the Input's config entry; the protected publish() helpers convert the measured value to a string and publish it to the MQTT topic given by the "emit" field of the input.
◆ abstractIn()
| abstractIn::abstractIn |
( |
Input * | _in | ) |
|
|
inline |
◆ publish() [1/3]
| int abstractIn::publish |
( |
char * | value, |
|
|
const char * | subtopic = NULL ) |
|
protected |
Publish a string reading to the input's "emit" topic (retained).
◆ publish() [2/3]
| int abstractIn::publish |
( |
float | value, |
|
|
const char * | subtopic = NULL ) |
|
protected |
Publish a float reading to the input's "emit" topic (retained).
◆ publish() [3/3]
| int abstractIn::publish |
( |
long | value, |
|
|
const char * | subtopic = NULL ) |
|
protected |
Publish an integer reading to the input's "emit" topic (retained).
◆ in
Pointer to the Input (config entry) this driver is attached to.
◆ Input
The documentation for this class was generated from the following files: