SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
repeat_report.h
Go to the documentation of this file.
1#ifndef _repeat_report_H_
2#define _repeat_report_H_
3
4#include <elapsedMillis.h>
5
6#include "transform.h"
7
8namespace sensesp {
9
22template <typename T>
24 public:
27 max_silence_interval_{max_silence_interval} {
28 this->load_configuration();
29 }
30
31 virtual void set_input(T input, uint8_t inputChannel = 0) override;
32 virtual void start() override;
33 virtual void get_configuration(JsonObject& doc) override;
34 virtual bool set_configuration(const JsonObject& config) override;
35 virtual String get_config_schema() override;
36
37 private:
38 long max_silence_interval_;
39 elapsedMillis last_update_interval_;
40};
41
42} // namespace sensesp
43
44#endif
virtual void load_configuration()
Construct a new transform based on a single function.
Ensures that values that do not change frequently are still reported at a specified maximum silence i...
virtual bool set_configuration(const JsonObject &config) override
virtual void get_configuration(JsonObject &doc) override
virtual void set_input(T input, uint8_t inputChannel=0) override
virtual String get_config_schema() override
RepeatReport(long max_silence_interval=15000, String config_path="")
virtual void start() override
A common type of transform that consumes, transforms, then outputs values of the same data type.
Definition transform.h:95