SensESP 3.0.0-beta.3
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::ValueConsumer< T > Class Template Reference

A base class for piece of code (like a transform) that accepts data for input. ValueConsumers can accept one or more input values via the set() method. They are connected to ValueProducers via the connect_to() method. More...

#include <sensesp/system/valueconsumer.h>

Inheritance diagram for sensesp::ValueConsumer< T >:
[legend]

Public Member Functions

virtual void set (const T &new_value)
 
virtual void set_input (const T &new_value)
 
void connect_from (ValueProducer< T > *producer)
 

Detailed Description

template<typename T>
class sensesp::ValueConsumer< T >

A base class for piece of code (like a transform) that accepts data for input. ValueConsumers can accept one or more input values via the set() method. They are connected to ValueProducers via the connect_to() method.

See also
ValueProducer::connect_to()

Definition at line 22 of file valueconsumer.h.

Member Function Documentation

◆ connect_from()

template<typename T >
void sensesp::ValueConsumer< T >::connect_from ( ValueProducer< T > * producer)
inline

Registers this consumer with the specified producer, letting it know that this consumer would like to receive notifications whenever its value changes.

Definition at line 45 of file valueconsumer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set()

template<typename T >
virtual void sensesp::ValueConsumer< T >::set ( const T & new_value)
inlinevirtual

Used to set an input of this consumer. It is usually called automatically by a ValueProducer.

Parameters
new_valuethe value of the input

Reimplemented in sensesp::AirDensity, sensesp::AnalogVoltage, sensesp::AngleCorrection, sensesp::AsyncResponseHandler, sensesp::ChangeFilter, sensesp::ClickType, sensesp::CurveInterpolator, sensesp::Debounce< T >, sensesp::DewPoint, sensesp::Enable< T >, sensesp::Filter< T >, sensesp::Frequency, sensesp::HeatIndexEffect, sensesp::HeatIndexTemperature, sensesp::Integrator< C, P >, sensesp::Integrator< int, int >, sensesp::LambdaConsumer< IN >, sensesp::LambdaTransform< IN, OUT, P1, P2, P3, P4, P5, P6 >, sensesp::LambdaTransform< float, float, float, float >, sensesp::LambdaTransform< float, int >, sensesp::LambdaTransform< IN, OUT, IN, IN, OUT, OUT >, sensesp::Median, sensesp::MovingAverage, sensesp::ObservableValue< T >, sensesp::ObservableValue< int >, sensesp::ObservableValue< SKWSConnectionState >, sensesp::ObservableValue< String >, sensesp::PersistingObservableValue< T >, sensesp::PersistingObservableValue< String >, sensesp::PressRepeater, sensesp::PWMOutput, sensesp::RepeatExpiring< T >, sensesp::RepeatStopping< T >, sensesp::RgbLed, sensesp::RgbLed, sensesp::SKOutput< T >, sensesp::SKOutput< String >, sensesp::SKPutRequest< T >, sensesp::SmartSwitchController, sensesp::SmartSwitchController, sensesp::SystemStatusController, sensesp::SystemStatusController, sensesp::SystemStatusLed, sensesp::SystemStatusLed, sensesp::TaskQueueProducer< T >, sensesp::TaskQueueProducer< int >, sensesp::TaskQueueProducer< SKWSConnectionState >, sensesp::TextToTruth, sensesp::ThresholdTransform< C, P >, sensesp::Throttle< T >, sensesp::TimeCounter< T >, sensesp::TimeString, sensesp::TruthToText, sensesp::UIOutput< T >, sensesp::UIOutput< String >, sensesp::VoltageDividerR1, sensesp::VoltageDividerR2, and sensesp::VoltageMultiplier.

Definition at line 29 of file valueconsumer.h.

Here is the caller graph for this function:

◆ set_input()

template<typename T >
virtual void sensesp::ValueConsumer< T >::set_input ( const T & new_value)
inlinevirtual

Definition at line 31 of file valueconsumer.h.

Here is the call graph for this function:

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