ReactESP 3.2.0
Asynchronous programming for the ESP microcontrollers
|
TimedEvents are called based on elapsing of time. More...
#include <events.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 |
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) |
![]() | |
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. | |
Protected Attributes | |
const uint64_t | interval |
uint64_t | last_trigger_time |
bool | enabled |
![]() | |
const react_callback | callback |
|
inline |
|
inline |
|
overridevirtual |
Implements reactesp::EventInterface.
Definition at line 17 of file events.cpp.
|
inlinevirtual |
Reimplemented from reactesp::EventInterface.
|
inline |
|
inline |
|
inline |
bool reactesp::TimedEvent::operator< | ( | const TimedEvent & | other | ) | const |
Definition at line 12 of file events.cpp.
|
overridevirtual |
Implements reactesp::EventInterface.
Definition at line 23 of file events.cpp.
|
inlinevirtual |
Reimplemented from reactesp::EventInterface.
|
virtual |
|
inlinevirtual |
Reimplemented from reactesp::EventInterface.