SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::SystemStatusLed Class Reference

Consumes the networking and websocket states and delta counts and updates the device LED accordingly. Inherit this class and override the methods to customize the behavior. More...

#include <sensesp/system/system_status_led.h>

Public Member Functions

 SystemStatusLed (int pin)
 
ValueConsumer< SystemStatus > & get_system_status_consumer ()
 
ValueConsumer< int > & get_delta_tx_count_consumer ()
 

Protected Member Functions

virtual void set_wifi_no_ap ()
 
virtual void set_wifi_disconnected ()
 
virtual void set_wifimanager_activated ()
 
virtual void set_ws_disconnected ()
 
virtual void set_ws_authorizing ()
 
virtual void set_ws_connecting ()
 
virtual void set_ws_connected ()
 

Protected Attributes

std::unique_ptr< PatternBlinkerblinker_
 
LambdaConsumer< SystemStatussystem_status_consumer_
 
LambdaConsumer< int > delta_tx_count_consumer_
 

Detailed Description

Consumes the networking and websocket states and delta counts and updates the device LED accordingly. Inherit this class and override the methods to customize the behavior.

Definition at line 17 of file system_status_led.h.

Constructor & Destructor Documentation

◆ SystemStatusLed()

sensesp::SystemStatusLed::SystemStatusLed ( int pin)

Definition at line 35 of file system_status_led.cpp.

Member Function Documentation

◆ get_delta_tx_count_consumer()

ValueConsumer< int > & sensesp::SystemStatusLed::get_delta_tx_count_consumer ( )
inline

Definition at line 66 of file system_status_led.h.

◆ get_system_status_consumer()

ValueConsumer< SystemStatus > & sensesp::SystemStatusLed::get_system_status_consumer ( )
inline

Definition at line 63 of file system_status_led.h.

◆ set_wifi_disconnected()

void sensesp::SystemStatusLed::set_wifi_disconnected ( )
protectedvirtual

Definition at line 40 of file system_status_led.cpp.

◆ set_wifi_no_ap()

void sensesp::SystemStatusLed::set_wifi_no_ap ( )
protectedvirtual

Definition at line 39 of file system_status_led.cpp.

◆ set_wifimanager_activated()

void sensesp::SystemStatusLed::set_wifimanager_activated ( )
protectedvirtual

Definition at line 43 of file system_status_led.cpp.

◆ set_ws_authorizing()

void sensesp::SystemStatusLed::set_ws_authorizing ( )
protectedvirtual

Definition at line 49 of file system_status_led.cpp.

◆ set_ws_connected()

void sensesp::SystemStatusLed::set_ws_connected ( )
protectedvirtual

Definition at line 55 of file system_status_led.cpp.

◆ set_ws_connecting()

void sensesp::SystemStatusLed::set_ws_connecting ( )
protectedvirtual

Definition at line 52 of file system_status_led.cpp.

◆ set_ws_disconnected()

void sensesp::SystemStatusLed::set_ws_disconnected ( )
protectedvirtual

Definition at line 46 of file system_status_led.cpp.

Member Data Documentation

◆ blinker_

std::unique_ptr<PatternBlinker> sensesp::SystemStatusLed::blinker_
protected

Definition at line 19 of file system_status_led.h.

◆ delta_tx_count_consumer_

LambdaConsumer<int> sensesp::SystemStatusLed::delta_tx_count_consumer_
protected
Initial value:
{
[this](int) { blinker_->blip(); }}
std::unique_ptr< PatternBlinker > blinker_

Definition at line 57 of file system_status_led.h.

◆ system_status_consumer_

LambdaConsumer<SystemStatus> sensesp::SystemStatusLed::system_status_consumer_
protected
Initial value:
{
[this](SystemStatus status) {
switch (status) {
this->set_wifi_no_ap();
break;
break;
break;
break;
break;
break;
break;
}
}}
virtual void set_wifimanager_activated()

Definition at line 30 of file system_status_led.h.


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