An Event Emitter.
Constructor
Clears all event listeners, if all is set to true, it even clears the
EVENT_CLEAR listener.
| Parameter | Type | Description | 
|---|---|---|
| all | bool | whether to clear all (default: false) | 
Sets up a listener for an event.
| Parameter | Type | Description | 
|---|---|---|
| event | int16_t | event id (numeric value, from 1to2048, orEEType) | 
| function | function | functionacceptingint16_tandfloatarguments | 
Removes a listener from an event.
| Parameter | Type | Description | 
|---|---|---|
| event | int16_t | event id (numeric value, from 1to2048, orEEType) | 
| function | function | functionacceptingint16_tandfloatarguments | 
Returns the count of listeners for an event.
| Parameter | Type | Description | 
|---|---|---|
| event | int16_t | event id (numeric value, from 1to2048, orEEType) | 
Returns:
int16_t - number of listeners for the event.
Emits an event to all listeners.
| Parameter | Type | Description | 
|---|---|---|
| event | int16_t | event id (numeric value, from 1to2048, orEEType) | 
| value | float | value to emit to the listeners | 
These are predefined events that will emit by default:
EVENT_CLEAR - when clear() calledEVENT_FIRST - emitted on first eventEVENT_EVEN - emitted on all even eventsEVENT_ODD - emitted on all odd events