SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
threshold.h
Go to the documentation of this file.
1#include "transform.h"
2#ifndef _threshold_h
3#define _threshold_h
4
5namespace sensesp {
6
19template <typename C, typename P>
36
53class FloatThreshold : public ThresholdTransform<float, bool> {
54 public:
58
59 virtual void get_configuration(JsonObject& doc) override;
60 virtual bool set_configuration(const JsonObject& config) override;
61 virtual String get_config_schema() override;
62};
63
80class IntThreshold : public ThresholdTransform<int, bool> {
81 public:
85
86 virtual void get_configuration(JsonObject& doc) override;
87 virtual bool set_configuration(const JsonObject& config) override;
88 virtual String get_config_schema() override;
89};
90
91} // namespace sensesp
92#endif
virtual void load_configuration()
Translates a float value into a boolean value, which depends on whether the float value is "in range"...
Definition threshold.h:53
virtual String get_config_schema() override
Definition threshold.cpp:44
virtual void get_configuration(JsonObject &doc) override
Definition threshold.cpp:16
FloatThreshold(float min_value, float max_value, bool in_range=true, String config_path="")
Definition threshold.h:55
virtual bool set_configuration(const JsonObject &config) override
Definition threshold.cpp:31
Translates an integer value into a boolean value, which depends on whether the integer value is "in r...
Definition threshold.h:80
virtual bool set_configuration(const JsonObject &config) override
Definition threshold.cpp:61
IntThreshold(int min_value, int max_value, bool in_range=true, String config_path="")
Definition threshold.h:82
virtual void get_configuration(JsonObject &doc) override
Definition threshold.cpp:46
virtual String get_config_schema() override
Definition threshold.cpp:74
Construct a new transform based on a single function.
A Transform base class that translates the value of type C into value of type P. Base class for class...
Definition threshold.h:20
virtual void set_input(C new_value, uint8_t input_channel=0) override
Definition threshold.cpp:6
ThresholdTransform(C min_value, C max_value, P in_range, String config_path="")
Definition threshold.h:22
The main Transform class. A transform is identified primarily by the type of value that is produces (...
Definition transform.h:54