FastLED 3.10.6
Loading...
Searching...
No Matches

◆ visitControllers()

template<typename Visitor>
static void fl::CLEDController::visitControllers ( Visitor && visitor)
inlinestatic

Visit all controllers in the linked list with a visitor The visitor must be a callable that accepts (const CLEDController*, fl::span<const CRGB>)

Parameters
visitorthe visitor callable to call for each controller
Template Parameters
Visitorcallable type (function, lambda, functor, etc.)

Definition at line 315 of file cled_controller.h.

315 {
316 const CLEDController *pCur = head();
317 while(pCur) {
318 visitor(pCur, fl::span<const CRGB>(pCur->leds(), pCur->size()));
319 pCur = pCur->next();
320 }
321 }
virtual int size() const FL_NO_EXCEPT
How many LEDs does this controller manage?
static CLEDController * head() FL_NO_EXCEPT
Get the first LED controller in the linked list of controllers.
CRGB * leds() FL_NO_EXCEPT
Pointer to the CRGB array for this controller.
CLEDController * next() FL_NO_EXCEPT
Get the next controller in the linked list after this one.
CLEDController(RegistrationMode mode) FL_NO_EXCEPT
Protected constructor with registration mode.

References CLEDController(), fl::FL_NO_EXCEPT, head(), leds(), next(), and size().

Referenced by CFastLED::getEstimatedPowerInMilliWatts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: