SensESP 3.4.1-alpha
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>

Inherited by sensesp::LambdaConsumer< SystemStatus >, sensesp::LambdaConsumer< long >, sensesp::LambdaConsumer< bool >, sensesp::LambdaConsumer< ClickTypes >, sensesp::LambdaConsumer< String >, sensesp::LambdaConsumer< WiFiState >, sensesp::LambdaConsumer< SKWSConnectionState >, sensesp::ObservableValue< SKWSConnectionState >, sensesp::ObservableValue< int >, sensesp::ObservableValue< String >, sensesp::ObservableValue< int8_t >, sensesp::ObservableValue< uint16_t >, sensesp::ObservableValue< uint64_t >, sensesp::ObservableValue< float >, sensesp::Transform< std::tuple< float, float, float >, float >, sensesp::Transform< bool, ClickTypes >, sensesp::Transform< std::tuple< float, float >, float >, sensesp::Transform< T, T >, sensesp::Transform< int, float >, sensesp::Transform< float, String >, sensesp::Transform< IN, OUT >, sensesp::Transform< float, float >, sensesp::Transform< FROM, TO >, sensesp::Transform< T, Nullable< T > >, sensesp::Transform< float, int >, sensesp::Transform< String, String >, sensesp::Transform< String, bool >, sensesp::Transform< T, double >, sensesp::Transform< time_t, String >, sensesp::Transform< bool, String >, sensesp::Transform< int, int >, sensesp::ObservableValue< T >, sensesp::SKPutRequest< T >, and sensesp::SemaphoreValue< T >.

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::AsyncResponseHandler, sensesp::Integrator< C, P >, sensesp::ThresholdTransform< C >, sensesp::PWMOutput, sensesp::LambdaConsumer< IN >, sensesp::Debounce< T >, sensesp::Enable< T >, sensesp::Throttle< T >, sensesp::TimeCounter< T >, sensesp::SKOutput< T >, sensesp::SKPutRequest< T >, sensesp::SemaphoreValue< T >, sensesp::Filter< T >, sensesp::ObservableValue< T >, sensesp::PersistingObservableValue< T >, and sensesp::TaskQueueProducer< T >.

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: