FastLED 3.10.9
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 384 of file manager.cpp.hpp.

384 {
385 // Update cache with current driver state
386 mCachedDriverInfo.clear();
387 mCachedDriverInfo.reserve(mDrivers.size());
388
389 for (const auto& entry : mDrivers) {
390 // fl::string copy is cheap (shared pointer internally, no heap allocation)
391 mCachedDriverInfo.push_back({
392 entry.name,
393 entry.priority,
394 entry.enabled
395 });
396 }
397
398 return mCachedDriverInfo;
399}
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: