FastLED 3.9.15
Loading...
Searching...
No Matches

◆ getDriverInfos()

fl::span< const DriverInfo > fl::ChannelManager::getDriverInfos ( ) const

Get full state of all registered drivers.

Returns
Span of driver info (sorted by priority descending)
Note
Returned span is valid until next call to any non-const method
This method updates an internal cache - not thread-safe
fl::string copies are cheap (shared pointer internally, no heap allocation)

Definition at line 339 of file manager.cpp.hpp.

339 {
340 // Update cache with current driver state
341 mCachedDriverInfo.clear();
342 mCachedDriverInfo.reserve(mDrivers.size());
343
344 for (const auto& entry : mDrivers) {
345 // fl::string copy is cheap (shared pointer internally, no heap allocation)
346 mCachedDriverInfo.push_back({
347 entry.name,
348 entry.priority,
349 entry.enabled
350 });
351 }
352
353 return mCachedDriverInfo;
354}
fl::vector< DriverInfo > mCachedDriverInfo
Cached driver info for getDriverInfos() to avoid allocations.
Definition manager.h:291
fl::vector< EngineEntry > mDrivers
Shared drivers sorted by priority descending (higher values first)
Definition manager.h:287

References mCachedDriverInfo, and mDrivers.

Referenced by CFastLED::getDriverInfos(), fl::validation::printEngineValidation(), and fl::validation::validateExpectedEngines().

+ Here is the caller graph for this function: