FastLED 3.10.9
Loading...
Searching...
No Matches

◆ getDriverByName()

fl::shared_ptr< IChannelDriver > fl::ChannelManager::getDriverByName ( const fl::string & name) const

Get driver by name for affinity binding.

Parameters
nameEngine name to look up (case-sensitive, e.g., "RMT", "SPI", "PARLIO")
Returns
Shared pointer to driver if found and enabled, nullptr otherwise
Note
Used by Channel affinity system to bind channels to specific drivers
Logs FL_ERROR on miss — call findDriverByName() for silent lookup.

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

413 {
414 if (name.empty()) {
415 FL_ERROR("ChannelManager::getDriverByName() - Empty driver name provided");
416 return fl::shared_ptr<IChannelDriver>();
417 }
418 auto driver = findDriverByName(name);
419 if (!driver) {
420 FL_ERROR("ChannelManager::getDriverByName() - Driver '" << name.c_str() << "' not found or not enabled");
421 }
422 return driver;
423}
fl::shared_ptr< IChannelDriver > findDriverByName(const fl::string &name) const FL_NO_EXCEPT
Silent counterpart to getDriverByName().
bool empty() const FL_NO_EXCEPT
const char * c_str() const FL_NO_EXCEPT
#define FL_ERROR(...)
Definition log.h:373

References findDriverByName(), FL_ERROR, and fl::FL_NO_EXCEPT.

+ Here is the call graph for this function: