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

Item that renders its own value on the web UI status page. More...

#include <sensesp/ui/status_page_item.h>

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

Public Member Functions

 StatusPageItem (String name, const T &value, String group, int order)
 
- Public Member Functions inherited from sensesp::StatusPageItemBase
 StatusPageItemBase (String name, String group, int order)
 
String & get_name ()
 
- Public Member Functions inherited from sensesp::ObservableValue< T >
 ObservableValue ()=default
 
 ObservableValue (const T &value)
 
 ObservableValue (const ObservableValue &)=delete
 
ObservableValueoperator= (const ObservableValue &)=delete
 
void set (const T &value) override
 
const T & operator= (const T &value)
 
T & operator++ ()
 
T & operator-- ()
 
operator++ (int)
 
operator-- (int)
 
const T & operator+= (const T &value)
 
const T & operator-= (const T &value)
 
- Public Member Functions inherited from sensesp::ValueConsumer< T >
virtual void set_input (const T &new_value)
 
void connect_from (ValueProducer< T > *producer)
 
- Public Member Functions inherited from sensesp::ValueProducer< T >
 ValueProducer ()
 
 ValueProducer (const T &initial_value)
 
virtual const T & get () const
 
template<typename VConsumer >
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< T, typenameVConsumer::input_type >::value, std::shared_ptr< VConsumer > >::type connect_to (std::shared_ptr< VConsumer > consumer)
 Connect a producer to a transform with a different input type.
 
template<typename VConsumer >
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< T, typenameVConsumer::input_type >::value, VConsumer * >::type connect_to (VConsumer *consumer)
 
template<typename VConsumer >
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< T, typenameVConsumer::input_type >::value, VConsumer * >::type connect_to (VConsumer &consumer)
 
void emit (const T &new_value)
 
- Public Member Functions inherited from sensesp::Observable
 Observable ()
 
 Observable (Observable &&other)
 Move constructor.
 
void notify ()
 
void attach (std::function< void()> observer)
 

Protected Member Functions

virtual JsonDocument as_json () override
 

Additional Inherited Members

- Public Types inherited from sensesp::ValueConsumer< T >
using input_type = T
 
- Static Public Member Functions inherited from sensesp::StatusPageItemBase
static const std::map< String, StatusPageItemBase * > * get_status_page_items ()
 
- Protected Attributes inherited from sensesp::StatusPageItemBase
String name_
 
String group_ = kUIOutputDefaultGroup
 
int order_ = kUIOutputDefaultOrder
 
- Protected Attributes inherited from sensesp::ValueProducer< T >
output_
 
- Static Protected Attributes inherited from sensesp::StatusPageItemBase
static std::map< String, StatusPageItemBase * > status_page_items_
 

Detailed Description

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

Item that renders its own value on the web UI status page.

A StatusPageItem can be connected to a ValueProducer and will render the value of the producer on the web UI status page. When unconnected, it will always render the value provided in the constructor.

Template Parameters
T

Definition at line 48 of file status_page_item.h.

Constructor & Destructor Documentation

◆ StatusPageItem()

template<typename T >
sensesp::StatusPageItem< T >::StatusPageItem ( String name,
const T & value,
String group,
int order )
inline

Definition at line 50 of file status_page_item.h.

Member Function Documentation

◆ as_json()

template<typename T >
virtual JsonDocument sensesp::StatusPageItem< T >::as_json ( )
inlineoverrideprotectedvirtual

Implements sensesp::StatusPageItemBase.

Definition at line 56 of file status_page_item.h.

Here is the call graph for this function:

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