SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::Hysteresis< IN, OUT > Class Template Reference

Hysteresis function. More...

#include <sensesp/transforms/hysteresis.h>

Inheritance diagram for sensesp::Hysteresis< IN, OUT >:
[legend]

Public Member Functions

 Hysteresis (IN lower_threshold, IN upper_threshold, OUT low_output, OUT high_output, String config_path="")
 
- Public Member Functions inherited from sensesp::LambdaTransform< IN, OUT, IN, IN, OUT, OUT >
 LambdaTransform (std::function< OUT(IN)> function, String config_path="")
 
 LambdaTransform (std::function< OUT(IN)> function, const ParamInfo *param_info, String config_path="")
 
 LambdaTransform (std::function< OUT(IN, IN)> function, IN param1, const ParamInfo *param_info, String config_path="")
 
 LambdaTransform (std::function< OUT(IN, IN, IN)> function, IN param1, IN param2, const ParamInfo *param_info, 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, 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, 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, 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, String config_path="")
 
void set_input (IN input, uint8_t input_channel=0) override
 
void get_configuration (JsonObject &doc) override
 
bool set_configuration (const JsonObject &config) override
 
String get_config_schema () override
 
- Public Member Functions inherited from sensesp::Transform< IN, OUT >
 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)
 
- Public Member Functions inherited from sensesp::TransformBase
 TransformBase (String config_path="")
 
- Public Member Functions inherited from sensesp::Configurable
 Configurable (String config_path="", String description="", int sort_order=1000)
 
String get_description ()
 
void set_description (String description)
 Set the description of the Configurable.
 
int get_sort_order ()
 
void set_sort_order (int sort_order)
 
virtual void save_configuration ()
 
- Public Member Functions inherited from sensesp::Startable
 Startable (int priority=0)
 
virtual void start ()
 
const int get_start_priority ()
 
void set_start_priority (int priority)
 
- Public Member Functions inherited from sensesp::ValueConsumer< T >
virtual void set_input (T new_value, uint8_t input_channel=0)
 
void connect_from (ValueProducer< T > *producer, uint8_t input_channel=0)
 
- Public Member Functions inherited from sensesp::ValueProducer< T >
 ValueProducer ()
 
virtual const T & get () const
 
void connect_to (ValueConsumer< T > *consumer, uint8_t input_channel=0)
 
template<typename CT >
void connect_to (ValueConsumer< CT > *consumer, uint8_t input_channel=0)
 Connect a producer to a consumer of a different type.
 
template<typename T2 >
Transform< T, T2 > * connect_to (Transform< T, T2 > *consumer_producer, uint8_t input_channel=0)
 
template<typename TT , typename T2 >
Transform< TT, T2 > * connect_to (Transform< TT, T2 > *consumer_producer, uint8_t input_channel=0)
 Connect a producer to a transform with a different input type.
 
void emit (T new_value)
 
- Public Member Functions inherited from sensesp::Observable
 Observable ()
 
 Observable (Observable &&other)
 Move constructor.
 
void notify ()
 
void attach (std::function< void()> observer)
 

Additional Inherited Members

- Static Public Member Functions inherited from sensesp::TransformBase
static const std::set< TransformBase * > & get_transforms ()
 
- Static Public Member Functions inherited from sensesp::Startable
static void start_all ()
 
- Public Attributes inherited from sensesp::Configurable
const String config_path_
 
- Protected Member Functions inherited from sensesp::Configurable
virtual void load_configuration ()
 
- Protected Attributes inherited from sensesp::Configurable
String description_ = ""
 
int sort_order_ = 1000
 
- Protected Attributes inherited from sensesp::ValueProducer< T >
output
 

Detailed Description

template<class IN, class OUT>
class sensesp::Hysteresis< IN, OUT >

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.

Template Parameters
INInput variable type
OUTOutput variable type
Parameters
[in]lower_thresholdLower threshold value
[in]upper_thresholdUpper threshold value
[in]low_outputOutput value when hysteresis function output is low
[in]high_outputOutput value when hysteresis function output is high
[in]config_pathConfiguration path for the transform

Definition at line 33 of file hysteresis.h.

Constructor & Destructor Documentation

◆ Hysteresis()

template<class IN , class OUT >
sensesp::Hysteresis< IN, OUT >::Hysteresis ( IN  lower_threshold,
IN  upper_threshold,
OUT  low_output,
OUT  high_output,
String  config_path = "" 
)
inline

Definition at line 35 of file hysteresis.h.


The documentation for this class was generated from the following file: