FastLED 3.10.6
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 396 of file manager.cpp.hpp.

396 {
397 if (name.empty()) {
398 FL_ERROR("ChannelManager::getDriverByName() - Empty driver name provided");
399 return fl::shared_ptr<IChannelDriver>();
400 }
401 auto driver = findDriverByName(name);
402 if (!driver) {
403 FL_ERROR("ChannelManager::getDriverByName() - Driver '" << name.c_str() << "' not found or not enabled");
404 }
405 return driver;
406}
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:372

References fl::basic_string::c_str(), fl::basic_string::empty(), findDriverByName(), and FL_ERROR.

+ Here is the call graph for this function: