SensESP 3.0.1
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 Types

using input_type = T
 

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 Typedef Documentation

◆ input_type

template<typename T >
using sensesp::ValueConsumer< T >::input_type = T

Definition at line 24 of file valueconsumer.h.

Member Function Documentation

◆ connect_from()

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

Definition at line 42 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 called automatically by a ValueProducer but can also be called manually.

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::LambdaConsumer< bool >, sensesp::LambdaConsumer< ClickTypes >, sensesp::LambdaConsumer< int >, sensesp::LambdaConsumer< long >, sensesp::LambdaConsumer< SKWSConnectionState >, sensesp::LambdaConsumer< String >, sensesp::LambdaConsumer< SystemStatus >, sensesp::LambdaConsumer< WiFiState >, 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< float >, sensesp::ObservableValue< int >, sensesp::ObservableValue< int8_t >, sensesp::ObservableValue< SKWSConnectionState >, sensesp::ObservableValue< String >, sensesp::ObservableValue< uint16_t >, sensesp::ObservableValue< uint64_t >, sensesp::PersistingObservableValue< T >, sensesp::PersistingObservableValue< String >, sensesp::PWMOutput, sensesp::Repeat< FROM, TO >, sensesp::Repeat< T, Nullable< T > >, sensesp::Repeat< T, T >, sensesp::RepeatExpiring< T >, sensesp::RepeatStopping< T >, sensesp::SemaphoreValue< T >, sensesp::SKOutput< T >, sensesp::SKOutput< String >, sensesp::SKPutRequest< T >, sensesp::TaskQueueProducer< T >, sensesp::TaskQueueProducer< int >, sensesp::TaskQueueProducer< SKWSConnectionState >, sensesp::TextToTruth, sensesp::ThresholdTransform< C >, sensesp::Throttle< T >, sensesp::TimeCounter< T >, sensesp::TimeString, sensesp::TruthToText, sensesp::VoltageDividerR1, sensesp::VoltageDividerR2, and sensesp::VoltageMultiplier.

Definition at line 32 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 35 of file valueconsumer.h.

Here is the call graph for this function:

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