#pragma once // ============================================================================= // knx_dali_gw — KNX-to-DALI Gateway Component (ESP-IDF) // ============================================================================= #include "esp_idf_platform.h" #include "dali_domain.hpp" #include #include #include #include #include // Forward declarations. class Bau07B0; namespace gateway { namespace knx_dali_gw { struct KnxDaliGatewayConfig { std::string nvs_namespace{"knx_dali_gw"}; uint16_t fallback_individual_address{0xfffe}; int dali_channel{0}; }; class KnxDaliGateway { public: explicit KnxDaliGateway(const KnxDaliGatewayConfig& config); ~KnxDaliGateway(); KnxDaliGateway(const KnxDaliGateway&) = delete; KnxDaliGateway& operator=(const KnxDaliGateway&) = delete; bool init(); void loop(); Bau07B0& knxDevice(); const Bau07B0& knxDevice() const; void setNetworkInterface(esp_netif_t* netif); bool handleTunnelFrame(const uint8_t* data, size_t len); bool handleBusFrame(const uint8_t* data, size_t len); bool emitGroupValue(uint16_t group_object_number, const uint8_t* data, size_t len); private: struct Impl; std::unique_ptr impl_; }; } // namespace knx_dali_gw } // namespace gateway