ReactESP 3.2.0
Asynchronous programming for the ESP microcontrollers
Loading...
Searching...
No Matches
reactesp::RepeatEvent Class Reference

Event that is triggered repeatedly. More...

#include <events.h>

Inheritance diagram for reactesp::RepeatEvent:
[legend]
Collaboration diagram for reactesp::RepeatEvent:
[legend]

Public Member Functions

 RepeatEvent (uint32_t interval, react_callback callback)
 Construct a new Repeat Event object.
 
 RepeatEvent (uint64_t interval, react_callback callback)
 Construct a new Repeat Event object.
 
void tick (EventLoop *event_loop) override
 
- Public Member Functions inherited from reactesp::TimedEvent
 TimedEvent (uint32_t interval, react_callback callback)
 Construct a new Timed Event object.
 
 TimedEvent (uint64_t interval, react_callback callback)
 Construct a new Timed Event object.
 
bool operator< (const TimedEvent &other) const
 
virtual void add (EventLoop *event_loop) override
 
virtual void remove (EventLoop *event_loop) override
 
uint32_t getTriggerTime () const
 
uint64_t getTriggerTimeMicros () const
 
bool isEnabled () const
 
virtual void add (std::shared_ptr< EventLoop > event_loop)
 
virtual void remove (std::shared_ptr< EventLoop > event_loop)
 
virtual void tick (EventLoop *event_loop)=0
 
virtual void tick (std::shared_ptr< EventLoop > event_loop)
 
- Public Member Functions inherited from reactesp::Event
 Event (react_callback callback)
 Construct a new Event object.
 
 Event (const Event &)=delete
 
 Event (Event &&)=delete
 
Eventoperator= (const Event &)=delete
 
Eventoperator= (Event &&)=delete
 
- Public Member Functions inherited from reactesp::EventInterface
virtual ~EventInterface ()=default
 Default virtual destructor.
 

Additional Inherited Members

- Protected Attributes inherited from reactesp::TimedEvent
const uint64_t interval
 
uint64_t last_trigger_time
 
bool enabled
 
- Protected Attributes inherited from reactesp::Event
const react_callback callback
 

Detailed Description

Event that is triggered repeatedly.

Definition at line 153 of file events.h.

Constructor & Destructor Documentation

◆ RepeatEvent() [1/2]

reactesp::RepeatEvent::RepeatEvent ( uint32_t interval,
react_callback callback )
inline

Construct a new Repeat Event object.

Parameters
intervalRepetition interval, in milliseconds
callbackFunction to be called at every repetition

Definition at line 161 of file events.h.

◆ RepeatEvent() [2/2]

reactesp::RepeatEvent::RepeatEvent ( uint64_t interval,
react_callback callback )
inline

Construct a new Repeat Event object.

Parameters
intervalRepetition interval, in microseconds
callbackFunction to be called at every repetition

Definition at line 169 of file events.h.

Member Function Documentation

◆ tick()

void reactesp::RepeatEvent::tick ( EventLoop * event_loop)
overridevirtual

Implements reactesp::EventInterface.

Definition at line 45 of file events.cpp.

Here is the call graph for this function:

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