26 lines
312 B
C++
26 lines
312 B
C++
#ifndef SENSOR_H
|
|
#define SENSOR_H
|
|
|
|
#include "Value.h"
|
|
#include "../mqtt.h"
|
|
|
|
class Sensor {
|
|
|
|
public:
|
|
|
|
const String& name;
|
|
|
|
explicit Sensor(const String& name): name(name) {
|
|
//
|
|
}
|
|
|
|
virtual ~Sensor() = default;
|
|
|
|
virtual void loopBeforeValues() {}
|
|
|
|
virtual Value *getValue(int index) = 0;
|
|
|
|
};
|
|
|
|
#endif
|