OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
Loading...
Searching...
No Matches
InternalEvent< eventType, _Args > Struct Template Reference

Subscribable events. More...

#include <InternalTypes.hpp>

Public Types

typedef void(*) Callback(_Args...)
 Callback prototype.
 

Static Public Member Functions

static void subscribe (Callback callback)
 Subscribe to this event.
 
static void notify (_Args... __args)
 Invoke all subscribed callbacks.
 

Detailed Description

template<InternalEventType eventType, typename... _Args>
struct InternalEvent< eventType, _Args >

Subscribable events.

Note
Callbacks may be called from any thread
Template Parameters
eventTypeType of internal event
_ArgsCallback argument types

Definition at line 583 of file InternalTypes.hpp.

Member Typedef Documentation

◆ Callback

template<InternalEventType eventType, typename... _Args>
void(*) InternalEvent< eventType, _Args >::Callback(_Args...)

Callback prototype.

Definition at line 586 of file InternalTypes.hpp.

Member Function Documentation

◆ notify()

template<InternalEventType eventType, typename... _Args>
static void InternalEvent< eventType, _Args >::notify ( _Args... __args)
inlinestatic

Invoke all subscribed callbacks.

Parameters
__argsCallback arguments

Definition at line 607 of file InternalTypes.hpp.

◆ subscribe()

template<InternalEventType eventType, typename... _Args>
static void InternalEvent< eventType, _Args >::subscribe ( Callback callback)
inlinestatic

Subscribe to this event.

Note
The subscribed callback may need to invoke esp_task_wdt_reset()
Parameters
callbackEvent callback

Definition at line 596 of file InternalTypes.hpp.


The documentation for this struct was generated from the following file: