14static const char *
const TAG =
"micronova";
15static const int STOVE_REPLY_DELAY = 60;
17static const std::string STOVE_STATES[11] = {
"Off",
125 void setup()
override;
126 void loop()
override;
Mutex implementation, with API based on the unavailable std::mutex.
This class simplifies creating components that periodically check a state.
void set_memory_location(uint8_t l)
void set_micronova_object(MicroNova *m)
uint8_t get_memory_address()
void set_memory_address(uint8_t a)
void set_function(MicroNovaFunctions f)
MicroNovaFunctions function_
MicroNovaBaseListener(MicroNova *m)
virtual void dump_config()
MicroNovaFunctions get_function()
uint8_t get_memory_location()
void dump_config() override
void set_stove(MicroNovaSwitchListener *s)
std::vector< MicroNovaSensorListener * > micronova_listeners_
void set_enable_rx_pin(GPIOPin *enable_rx_pin)
void write_address(uint8_t location, uint8_t address, uint8_t data)
MicroNovaSerialTransmission current_transmission_
uint8_t get_current_stove_state()
void request_address(uint8_t location, uint8_t address, MicroNovaSensorListener *listener)
MicroNovaSwitchListener * stove_switch_
MicroNovaSwitchListener * get_stove_switch()
Mutex reply_pending_mutex_
uint8_t current_stove_state_
void set_current_stove_state(uint8_t s)
void register_micronova_listener(MicroNovaSensorListener *l)
virtual void process_value_from_stove(int value_from_stove)=0
void set_needs_update(bool u)
virtual void request_value_from_stove()=0
MicroNovaNumberListener(MicroNova *m)
MicroNovaSensorListener(MicroNova *m)
virtual void request_value_from_stove()=0
virtual void process_value_from_stove(int value_from_stove)=0
void set_needs_update(bool u)
MicroNovaSensorListener()
virtual void set_stove_state(bool v)=0
MicroNovaSwitchListener(MicroNova *m)
virtual bool get_stove_state()=0
@ STOVE_FUNCTION_WATER_PRESSURE
@ STOVE_FUNCTION_STOVE_STATE
@ STOVE_FUNCTION_WATER_TEMPERATURE
@ STOVE_FUNCTION_FUMES_TEMPERATURE
@ STOVE_FUNCTION_MEMORY_ADDRESS_SENSOR
@ STOVE_FUNCTION_ROOM_TEMPERATURE
@ STOVE_FUNCTION_POWER_LEVEL
@ STOVE_FUNCTION_STOVE_POWER
@ STOVE_FUNCTION_THERMOSTAT_TEMPERATURE
@ STOVE_FUNCTION_FAN_SPEED
Providing packet encoding functions for exchanging data with a remote host.
MicroNovaSensorListener * initiating_listener
uint32_t request_transmission_time