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

406 {
407 if (name.empty()) {
408 FL_ERROR("ChannelManager::getDriverByName() - Empty driver name provided");
409 return fl::shared_ptr<IChannelDriver>();
410 }
411 auto driver = findDriverByName(name);
412 if (!driver) {
413 FL_ERROR("ChannelManager::getDriverByName() - Driver '" << name.c_str() << "' not found or not enabled");
414 }
415 return driver;
416}
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: