Hysteresis function. More...
#include <sensesp/transforms/hysteresis.h>
Public Member Functions | |
Hysteresis (IN lower_threshold, IN upper_threshold, OUT low_output, OUT high_output, String config_path="") | |
![]() | |
LambdaTransform (std::function< OUT(IN)> function, const String &config_path="") | |
LambdaTransform (std::function< OUT(IN)> function, const ParamInfo *param_info, const String &config_path="") | |
LambdaTransform (std::function< OUT(IN, IN)> function, IN param1, const ParamInfo *param_info, const String &config_path="") | |
LambdaTransform (std::function< OUT(IN, IN, IN)> function, IN param1, IN param2, const ParamInfo *param_info, const String &config_path="") | |
LambdaTransform constructor for two-parameter function. | |
LambdaTransform (std::function< OUT(IN, IN, IN, OUT)> function, IN param1, IN param2, OUT param3, const ParamInfo *param_info, const String &config_path="") | |
LambdaTransform (std::function< OUT(IN, IN, IN, OUT, OUT)> function, IN param1, IN param2, OUT param3, OUT param4, const ParamInfo *param_info, const String &config_path="") | |
LambdaTransform (std::function< OUT(IN, IN, IN, OUT, OUT, bool)> function, IN param1, IN param2, OUT param3, OUT param4, bool param5, const ParamInfo *param_info, const String &config_path="") | |
LambdaTransform (std::function< OUT(IN, IN, IN, OUT, OUT, bool, bool)> function, IN param1, IN param2, OUT param3, OUT param4, bool param5, bool param6, const ParamInfo *param_info, const String &config_path="") | |
void | set (const IN &input) override |
bool | to_json (JsonObject &doc) override |
bool | from_json (const JsonObject &config) override |
const ParamInfo * | get_param_info () const |
![]() | |
Transform (String config_path="") | |
Transform< IN, OUT > * | connect_from (ValueProducer< OUT > *producer0, ValueProducer< OUT > *producer1=NULL, ValueProducer< OUT > *producer2=NULL, ValueProducer< OUT > *producer3=NULL, ValueProducer< OUT > *producer4=NULL) |
![]() | |
TransformBase (const String &config_path) | |
![]() | |
FileSystemSaveable (const String &config_path) | |
virtual bool | load () override |
Load and populate the object from a persistent storage. | |
virtual bool | save () override |
Save the object to a persistent storage. | |
virtual bool | clear () override |
Delete the data from a persistent storage. | |
bool | find_config_file (const String &config_path, String &filename) |
![]() | |
Saveable (const String &config_path) | |
virtual bool | refresh () |
Refresh the object. This may or may not access the persistent storage but is not expected to overwrite the object's state. | |
const String & | get_config_path () const |
![]() | |
![]() | |
virtual void | set_input (const IN &new_value) |
void | connect_from (ValueProducer< IN > *producer) |
![]() | |
ValueProducer () | |
ValueProducer (const OUT &initial_value) | |
virtual const OUT & | get () const |
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< OUT, typenameVConsumer::input_type >::value, std::shared_ptr< VConsumer > >::type | connect_to (std::shared_ptr< VConsumer > consumer) |
Connect a producer to a transform with a different input type. | |
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< OUT, typenameVConsumer::input_type >::value, VConsumer * >::type | connect_to (VConsumer *consumer) |
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< OUT, typenameVConsumer::input_type >::value, VConsumer * >::type | connect_to (VConsumer &consumer) |
void | emit (const OUT &new_value) |
![]() | |
Observable () | |
Observable (Observable &&other) | |
Move constructor. | |
void | notify () |
void | attach (std::function< void()> observer) |
Additional Inherited Members | |
![]() | |
using | input_type |
![]() | |
static const std::set< TransformBase * > & | get_transforms () |
![]() | |
IN | param1_ |
IN | param2_ |
OUT | param3_ |
OUT | param4_ |
bool | param5_ |
bool | param6_ |
![]() | |
const String | config_path_ |
![]() | |
OUT | output_ |
Hysteresis function.
Hysteresis is a threshold switch with a dead zone: to prevent switching back and forth at the threshold value, input has to rise above the upper threshold before being switched high, and has to decrease below the lower threshold before being switched back low.
IN | Input variable type |
OUT | Output variable type |
[in] | lower_threshold | Lower threshold value |
[in] | upper_threshold | Upper threshold value |
[in] | low_output | Output value when hysteresis function output is low |
[in] | high_output | Output value when hysteresis function output is high |
[in] | config_path | Configuration path for the transform |
Definition at line 33 of file hysteresis.h.
|
inline |
Definition at line 35 of file hysteresis.h.