|
FastLED 3.9.15
|
Cross-platform facade for runtime network activity detection.
The full implementation lives at src/platforms/esp/32/drivers/rmt/rmt_5/network_detector.h and only compiles when FASTLED_RMT5 is set. This facade exposes a fl::NetworkDetector type with the isAnyNetworkActive() accessor on every platform so that platform-neutral code (such as fl/channels/manager.cpp.hpp and fl/channels/driver.cpp.hpp) can perform a single runtime branch without having to ifdef around the RMT5 gate.
On platforms / build configurations where the real detector is not available, isAnyNetworkActive() returns false. That matches the pre-existing behavior for ESP32-P4 (which has no radio at all) and for all non-ESP32 platforms (where the deep-yield rationale from #2254 does not apply in the first place).
Cost on platforms where the real implementation is present is the ~1-10 us the ESP-IDF API takes per call (see the detailed docs on the implementation header). On every other platform the call collapses to a trivial return false and is folded into a constant by the optimizer.
Definition in file network_detector.h.
Include dependency graph for network_detector.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | fl::net::NetworkDetector |
| Stub NetworkDetector for platforms without the real implementation. More... | |
Namespaces | |
| namespace | fl |
| Base definition for an LED controller. | |
| namespace | fl::net |
Macros | |
| #define | FL_NETWORK_DETECTOR_HAS_REAL_IMPL 0 |
Typedefs | |
| using | fl::NetworkDetector = ::fl::net::NetworkDetector |