Doly C++ SDK v1.00
Loading...
Searching...
No Matches
LedEvent.h File Reference

Event registration helpers for the LED subsystem. More...

#include <stdint.h>
#include "LedEventListener.h"

Go to the source code of this file.

Namespaces

namespace  LedEvent

Functions

void LedEvent::AddListener (LedEventListener *observer, bool priority=false)
 Register a LedEventListener instance.
void LedEvent::RemoveListener (LedEventListener *observer)
 Unregister a previously registered LedEventListener instance.
void LedEvent::AddListenerOnComplete (void(*onEvent)(uint16_t id, LedSide side))
 Register a static/free function to receive completion events.
void LedEvent::RemoveListenerOnComplete (void(*onEvent)(uint16_t id, LedSide side))
 Unregister a previously registered completion callback.
void LedEvent::AddListenerOnError (void(*onError)(uint16_t id, LedSide side, LedErrorType type))
 Register a static/free function to receive error events.
void LedEvent::RemoveListenerOnError (void(*onError)(uint16_t id, LedSide side, LedErrorType type))
 Unregister a previously registered error callback.

Detailed Description

Event registration helpers for the LED subsystem.

Use this API to subscribe to LED completion and error notifications. Two callback styles are supported:

  • Object listeners (LedEventListener*)
  • Static/free function callbacks (function pointers)

Threading notes:

  • Callbacks invoked from an internal worker/event thread.