4#include <initializer_list>
17static constexpr uint8_t FUNCTION_NODE = 0x0c;
18static constexpr uint8_t FUNCTION_NODE_DATA = 0x10;
19static constexpr uint8_t FUNCTION_PARAMETER = 0x24;
45#ifdef DUCO_DEVICE_COUNT
54 void send(
DucoDevice *device, uint8_t function, std::initializer_list<uint8_t> data);
63#ifdef DUCO_DEVICE_COUNT
69#ifdef DUCO_DEVICE_COUNT
89 void setup()
override;
Helper class to easily give an object a parent of type T.
This class simplifies creating components that periodically check a state.
Minimal static vector - saves memory by avoiding std::vector overhead.
Every entity polls the box; deriving from PollingComponent shares its vtable.
virtual void receive_response(const DucoMessage &message)=0
Walks the node addresses once after boot; the nodes found are listed in the config dump.
void receive_response(const DucoMessage &message) override
std::array< uint8_t, NODE_COUNT > node_types_
static constexpr uint8_t NODE_COUNT
void dump_config() override
std::array< uint8_t, MAX_FRAME_SIZE > rx_buffer_
static constexpr size_t MAX_REQUEST_DATA
static constexpr size_t MAX_FRAME_SIZE
void dump_config() override
void set_disable_crc(bool disable_crc)
void close_request(DucoDevice *device)
Forget device's open request, for a device that will not send again.
void send(DucoDevice *device, uint8_t function, std::initializer_list< uint8_t > data)
Send a request; its answer goes to device, or nowhere if nullptr.
StaticVector< DucoPendingRequest, DUCO_DEVICE_COUNT > pending_
bool parse_byte_(uint8_t byte)
void register_device(DucoDevice *device)
DucoTime(time::RealTimeClock *clock)
time::RealTimeClock * clock_
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock.
const LogString * message
A received message; data points into the receive buffer and is valid only during the callback.
The open request of one device: the answer to it is function + 2 with the same message id.