idfxx 1.0.0
Modern C++23 components for ESP-IDF
Loading...
Searching...
No Matches
idfxx::event_type< IdEnum > Struct Template Reference

Combines an event base with a specific event ID. More...

Public Member Functions

constexpr esp_event_base_t idf_base () const
 Returns the underlying ESP-IDF event base.
 
constexpr int32_t idf_id () const
 Returns the event ID as an int32_t.
 

Public Attributes

event_base< IdEnum > base
 The event base.
 
IdEnum id
 The event ID.
 

Detailed Description

template<typename IdEnum>
struct idfxx::event_type< IdEnum >

Combines an event base with a specific event ID.

Template Parameters
IdEnumThe enum type for the event ID.
event_type evt{events::wifi, WIFI_EVENT_STA_START};
loop.try_listener_add(evt, callback);
Combines an event base with a specific event ID.
Definition event.hpp:148

Definition at line 148 of file event.hpp.

Member Function Documentation

◆ idf_base()

template<typename IdEnum >
constexpr esp_event_base_t idfxx::event_type< IdEnum >::idf_base ( ) const
inlineconstexpr

Returns the underlying ESP-IDF event base.

Returns
The esp_event_base_t value.

Definition at line 158 of file event.hpp.

References idfxx::event_type< IdEnum >::base.

◆ idf_id()

template<typename IdEnum >
constexpr int32_t idfxx::event_type< IdEnum >::idf_id ( ) const
inlineconstexpr

Returns the event ID as an int32_t.

Returns
The event ID cast to int32_t.

Definition at line 164 of file event.hpp.

References idfxx::event_type< IdEnum >::id.

Member Data Documentation

◆ base

template<typename IdEnum >
event_base<IdEnum> idfxx::event_type< IdEnum >::base

◆ id

template<typename IdEnum >
IdEnum idfxx::event_type< IdEnum >::id

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