TaskManagerIO
Loading...
Searching...
No Matches
TmLongSchedule Class Reference

#include <TmLongSchedule.h>

Inheritance diagram for TmLongSchedule:
BaseEvent Executable

Public Member Functions

 TmLongSchedule (uint32_t milliSchedule, TimerFn callee, bool oneTime=false)
 TmLongSchedule (uint32_t milliSchedule, Executable *callee, bool oneTime=false)
void exec () override
uint32_t timeOfNextCheck () override
Public Member Functions inherited from BaseEvent
 BaseEvent (TaskManager *taskMgrToUse=&taskManager)
void setTriggered (bool t)
bool isTriggered () const
bool isComplete () const
void setCompleted (bool complete)
void markTriggeredAndNotify ()
Public Member Functions inherited from Executable
virtual ~Executable ()=default

Detailed Description

A task manager task that can be scheduled safely in hours and days. If you need more than this, you'll probably need to write your own event based on a real time clock's time of day. You could use this event as the starting point.

Constructor & Destructor Documentation

◆ TmLongSchedule() [1/2]

TmLongSchedule::TmLongSchedule ( uint32_t milliSchedule,
TimerFn callee,
bool oneTime = false )

Create a schedule that will call back a TimerFn functional callback.

Parameters
milliSchedulethe schedule to call back on
calleethe functional callback

◆ TmLongSchedule() [2/2]

TmLongSchedule::TmLongSchedule ( uint32_t milliSchedule,
Executable * callee,
bool oneTime = false )

Create schedule that will call the exec() method on an Executable

Parameters
milliSchedulethe schedule to call back on
calleethe object extending from Executable

Member Function Documentation

◆ exec()

void TmLongSchedule::exec ( )
overridevirtual

Called when the schedule is reached

Implements Executable.

◆ timeOfNextCheck()

uint32_t TmLongSchedule::timeOfNextCheck ( )
overridevirtual

This method must be implemented by all event handlers. It will be called when the event is first registered with task manager, then it will be called in whatever number of micros you return from the call. For polling events you'd set this to whatever frequency you needed to poll on. For interrupt / threaded situations, it may be set to a very large value, as you would not need to poll.

Returns
the number of microseconds before calling this method again.

Implements BaseEvent.


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