SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
|
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_input() method. They are connected to ValueProducers
via the connect_to()
method.
More...
#include <sensesp/system/valueconsumer.h>
Public Member Functions | |
virtual void | set_input (T new_value, uint8_t input_channel=0) |
void | connect_from (ValueProducer< T > *producer, uint8_t input_channel=0) |
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_input() method. They are connected to ValueProducers
via the connect_to()
method.
Definition at line 22 of file valueconsumer.h.
|
inline |
Registers this consumer with the specified producer, letting it know that this consumer would like to receive notifications whenever its value changes.
input_channel | Consumers can have one or more inputs feeding them. This parameter allows you to specify which input number the producer is connecting to. For single input consumers, leave the index at zero. |
Definition at line 42 of file valueconsumer.h.
|
inlinevirtual |
Used to set an input of this consumer. It is usually called automatically by a ValueProducer.
new_value | the value of the input |
input_channel | Consumers can have one or more inputs feeding them. This parameter allows you to specify which input number the producer is connecting to. For single input consumers, leave the index at zero. |
Reimplemented in sensesp::RgbLed, sensesp::IntegratorT< C, P >, sensesp::ThresholdTransform< C, P >, sensesp::SmartSwitchController, sensesp::ThresholdTransform< float, bool >, sensesp::PWMOutput, sensesp::LambdaConsumer< IN >, sensesp::SystemStatusLed, sensesp::PressRepeater, sensesp::ThresholdTransform< int, bool >, sensesp::RgbLed, sensesp::SmartSwitchController, sensesp::SystemStatusLed, sensesp::DebounceTemplate< T >, sensesp::Enable< T >, sensesp::TimeCounter< T >, sensesp::RepeatReport< T >, sensesp::SKOutput< T >, sensesp::SKPutRequest< T >, sensesp::UIOutput< T >, sensesp::SystemStatusController, and sensesp::SystemStatusController.
Definition at line 32 of file valueconsumer.h.