FastLED 3.9.15
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 368 of file manager.cpp.hpp.

368 {
369 if (name.empty()) {
370 FL_ERROR("ChannelManager::getDriverByName() - Empty driver name provided");
371 return fl::shared_ptr<IChannelDriver>();
372 }
373 auto driver = findDriverByName(name);
374 if (!driver) {
375 FL_ERROR("ChannelManager::getDriverByName() - Driver '" << name.c_str() << "' not found or not enabled");
376 }
377 return driver;
378}
fl::shared_ptr< IChannelDriver > findDriverByName(const fl::string &name) const FL_NOEXCEPT
Silent counterpart to getDriverByName().
bool empty() const FL_NOEXCEPT
const char * c_str() const FL_NOEXCEPT
#define FL_ERROR(X)
Definition log.h:219

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

+ Here is the call graph for this function: