SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::UIOutput< T > Class Template Reference

#include <sensesp/ui/ui_output.h>

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

Public Member Functions

 UIOutput (String name)
 
 UIOutput (String name, T value, String group=kUIOutputDefaultGroup, int order=kUIOutputDefaultOrder)
 
void set_json (const JsonObject &obj) override
 
void set_input (T new_value, uint8_t input_channel=0) override
 
- Public Member Functions inherited from sensesp::UIOutputBase
 UIOutputBase (String name, String group, int order)
 
Stringget_name ()
 
- Public Member Functions inherited from sensesp::Observable
 Observable ()
 
 Observable (Observable &&other)
 Move constructor.
 
void notify ()
 
void attach (std::function< void()> observer)
 
- Public Member Functions inherited from sensesp::ObservableValue< T >
 ObservableValue ()
 
 ObservableValue (const T &value)
 
void set (const T &value)
 
const T & operator= (const T &value)
 
- 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::ValueConsumer< T >
void connect_from (ValueProducer< T > *producer, uint8_t input_channel=0)
 

Additional Inherited Members

- Static Public Member Functions inherited from sensesp::UIOutputBase
static const std::map< String, UIOutputBase * > * get_ui_outputs ()
 
- Protected Attributes inherited from sensesp::UIOutputBase
String name_
 
String group_ = kUIOutputDefaultGroup
 
int order_ = kUIOutputDefaultOrder
 
- Protected Attributes inherited from sensesp::ValueProducer< T >
output
 
- Static Protected Attributes inherited from sensesp::UIOutputBase
static std::map< String, UIOutputBase * > ui_outputs_
 

Detailed Description

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

Definition at line 64 of file ui_output.h.

Constructor & Destructor Documentation

◆ UIOutput() [1/2]

template<typename T >
sensesp::UIOutput< T >::UIOutput ( String  name)
inline

Definition at line 68 of file ui_output.h.

◆ UIOutput() [2/2]

template<typename T >
sensesp::UIOutput< T >::UIOutput ( String  name,
value,
String  group = kUIOutputDefaultGroup,
int  order = kUIOutputDefaultOrder 
)
inline

Definition at line 71 of file ui_output.h.

Here is the call graph for this function:

Member Function Documentation

◆ set_input()

template<typename T >
void sensesp::UIOutput< T >::set_input ( new_value,
uint8_t  input_channel = 0 
)
inlineoverridevirtual

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

Parameters
new_valuethe value of the input
input_channelConsumers 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 from sensesp::ValueConsumer< T >.

Definition at line 84 of file ui_output.h.

Here is the call graph for this function:

◆ set_json()

template<typename T >
void sensesp::UIOutput< T >::set_json ( const JsonObject obj)
inlineoverridevirtual

Reimplemented from sensesp::UIOutputBase.

Definition at line 77 of file ui_output.h.

Here is the call graph for this function:

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