FastLED 3.10.8
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 377 of file manager.cpp.hpp.

377 {
378 // Update cache with current driver state
379 mCachedDriverInfo.clear();
380 mCachedDriverInfo.reserve(mDrivers.size());
381
382 for (const auto& entry : mDrivers) {
383 // fl::string copy is cheap (shared pointer internally, no heap allocation)
384 mCachedDriverInfo.push_back({
385 entry.name,
386 entry.priority,
387 entry.enabled
388 });
389 }
390
391 return mCachedDriverInfo;
392}
fl::vector< DriverInfo > mCachedDriverInfo
Cached driver info for getDriverInfos() to avoid allocations.
Definition manager.h:331
fl::vector< EngineEntry > mDrivers
Shared drivers sorted by priority descending (higher values first)
Definition manager.h:327

References fl::FL_NO_EXCEPT, mCachedDriverInfo, and mDrivers.

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

+ Here is the caller graph for this function: