ESPHome  2024.11.0
Public Types | Public Member Functions | Static Public Member Functions | Data Fields
esphome::Scheduler::SchedulerItem Struct Reference

#include <scheduler.h>

Public Types

enum  Type { TIMEOUT, INTERVAL }
 

Public Member Functions

uint32_t next_execution ()
 
uint8_t next_execution_major ()
 
const char * get_type_str ()
 

Static Public Member Functions

static bool cmp (const std::unique_ptr< SchedulerItem > &a, const std::unique_ptr< SchedulerItem > &b)
 

Data Fields

Componentcomponent
 
std::string name
 
enum esphome::Scheduler::SchedulerItem::Type type
 
union {
   uint32_t   interval
 
   uint32_t   timeout
 
}; 
 
uint32_t last_execution
 
std::function< void()> callback
 
bool remove
 
uint8_t last_execution_major
 

Detailed Description

Definition at line 31 of file scheduler.h.

Member Enumeration Documentation

◆ Type

Enumerator
TIMEOUT 
INTERVAL 

Definition at line 34 of file scheduler.h.

Member Function Documentation

◆ cmp()

bool HOT esphome::Scheduler::SchedulerItem::cmp ( const std::unique_ptr< SchedulerItem > &  a,
const std::unique_ptr< SchedulerItem > &  b 
)
static

Definition at line 335 of file scheduler.cpp.

◆ get_type_str()

const char* esphome::Scheduler::SchedulerItem::get_type_str ( )
inline

Definition at line 54 of file scheduler.h.

◆ next_execution()

uint32_t esphome::Scheduler::SchedulerItem::next_execution ( )
inline

Definition at line 44 of file scheduler.h.

◆ next_execution_major()

uint8_t esphome::Scheduler::SchedulerItem::next_execution_major ( )
inline

Definition at line 45 of file scheduler.h.

Field Documentation

◆ @158

union { ... }

◆ callback

std::function<void()> esphome::Scheduler::SchedulerItem::callback

Definition at line 40 of file scheduler.h.

◆ component

Component* esphome::Scheduler::SchedulerItem::component

Definition at line 32 of file scheduler.h.

◆ interval

uint32_t esphome::Scheduler::SchedulerItem::interval

Definition at line 36 of file scheduler.h.

◆ last_execution

uint32_t esphome::Scheduler::SchedulerItem::last_execution

Definition at line 39 of file scheduler.h.

◆ last_execution_major

uint8_t esphome::Scheduler::SchedulerItem::last_execution_major

Definition at line 42 of file scheduler.h.

◆ name

std::string esphome::Scheduler::SchedulerItem::name

Definition at line 33 of file scheduler.h.

◆ remove

bool esphome::Scheduler::SchedulerItem::remove

Definition at line 41 of file scheduler.h.

◆ timeout

uint32_t esphome::Scheduler::SchedulerItem::timeout

Definition at line 37 of file scheduler.h.

◆ type

enum esphome::Scheduler::SchedulerItem::Type esphome::Scheduler::SchedulerItem::type

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