11static constexpr uint8_t WRITE_QUEUE_SIZE = 10;
65 void setup()
override;
69#ifdef MICRONOVA_LISTENER_COUNT
79#ifdef USE_MICRONOVA_WRITER
91#ifdef MICRONOVA_LISTENER_COUNT
97#ifdef USE_MICRONOVA_WRITER
100#ifdef MICRONOVA_LISTENER_COUNT
107#ifdef MICRONOVA_LISTENER_COUNT
This class simplifies creating components that periodically check a state.
Fixed-size circular buffer with FIFO semantics and iteration support.
Minimal static vector - saves memory by avoiding std::vector overhead.
void set_memory_location(uint8_t l)
uint8_t get_memory_address()
void set_memory_address(uint8_t a)
MicroNovaBaseListener(MicroNova *m)
uint8_t get_memory_location()
void dump_config() override
MicroNovaCommand current_command_
StaticVector< MicroNovaListener *, MICRONOVA_LISTENER_COUNT > listeners_
bool reply_pending_
True if we are waiting for a reply from the stove.
MicroNova(GPIOPin *enable_rx_pin)
void send_current_command_()
StaticRingBuffer< MicroNovaCommand, MICRONOVA_LISTENER_COUNT > read_queue_
void request_update_listeners_()
void queue_read_request(uint8_t location, uint8_t address)
Queue a read request to the stove (low priority - added at back) All listeners registered for this ad...
bool queue_write_command(uint8_t location, uint8_t address, uint8_t data)
Queue a write command to the stove (processed before reads)
uint32_t transmission_time_
Time when current command was sent.
StaticRingBuffer< MicroNovaCommand, WRITE_QUEUE_SIZE > write_queue_
void register_micronova_listener(MicroNovaListener *listener)
MicroNovaListener(MicroNova *m)
void request_value_from_stove_()
virtual void process_value_from_stove(int value_from_stove)=0
Represents a command to be sent to the stove Write commands have the high bit (0x80) set in memory_lo...
uint8_t data
Only used for write commands.