ReactESP 3.0.0
Asynchronous programming for the ESP microcontrollers
|
TimedEvents are called based on elapsing of time. More...
#include <ReactESP.h>
Public Member Functions | |
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 |
void | add (EventLoop *event_loop) override |
void | remove (EventLoop *event_loop) override |
uint32_t | getTriggerTime () const |
uint64_t | getTriggerTimeMicros () const |
bool | isEnabled () const |
![]() | |
Event (react_callback callback) | |
Construct a new Event object. | |
Event (const Event &)=delete | |
Event (Event &&)=delete | |
Event & | operator= (const Event &)=delete |
Event & | operator= (Event &&)=delete |
![]() | |
virtual | ~EventInterface ()=default |
Default virtual destructor. | |
virtual void | tick (EventLoop *event_loop)=0 |
Protected Attributes | |
const uint64_t | interval |
uint64_t | last_trigger_time |
bool | enabled |
![]() | |
const react_callback | callback |
TimedEvents are called based on elapsing of time.
Definition at line 58 of file ReactESP.h.
|
inline |
Construct a new Timed Event object.
interval | Interval or delay for the event, in milliseconds |
callback | Function to be called when the event is triggered |
Definition at line 71 of file ReactESP.h.
|
inline |
Construct a new Timed Event object.
interval | Interval, in microseconds |
callback | Function to be called when the event is triggered |
Definition at line 82 of file ReactESP.h.
|
overridevirtual |
Implements reactesp::EventInterface.
Definition at line 18 of file ReactESP.cpp.
|
inline |
Definition at line 91 of file ReactESP.h.
|
inline |
Definition at line 94 of file ReactESP.h.
|
inline |
Definition at line 97 of file ReactESP.h.
bool reactesp::TimedEvent::operator< | ( | const TimedEvent & | other | ) | const |
Definition at line 13 of file ReactESP.cpp.
|
overridevirtual |
Implements reactesp::EventInterface.
Definition at line 22 of file ReactESP.cpp.
|
protected |
Definition at line 62 of file ReactESP.h.
|
protected |
Definition at line 60 of file ReactESP.h.
|
protected |
Definition at line 61 of file ReactESP.h.