OpenDevice
Open IoT (Internet Of Things) Platform and Framework http://opendevice.io
Scheduler Class Reference

Public Member Functions

 Scheduler ()
 
void init ()
 
void addTask (Task &aTask)
 
void deleteTask (Task &aTask)
 
void disableAll (bool aRecursive=true)
 
void enableAll (bool aRecursive=true)
 
bool execute ()
 
void startNow (bool aRecursive=true)
 
TaskcurrentTask ()
 

Friends

class Task
 

Constructor & Destructor Documentation

◆ Scheduler()

Scheduler::Scheduler ( )

Default constructor. Creates a scheduler with an empty execution chain.

Member Function Documentation

◆ addTask()

void Scheduler::addTask ( Task aTask)

Appends task aTask to the tail of the execution chain.

Parameters
&aTask- reference to the Task to be appended.
Note
Task can only be part of the chain once.

◆ deleteTask()

void Scheduler::deleteTask ( Task aTask)

Deletes specific Task from the execution chain

Parameters
&aTask- reference to the task to be deleted from the chain

◆ disableAll()

void Scheduler::disableAll ( bool  aRecursive = true)

Disables all tasks in the execution chain Convenient for error situations, when the only task remaining active is an error processing task

Parameters
aRecursive- if true, tasks of the higher priority chains are disabled as well recursively

◆ enableAll()

void Scheduler::enableAll ( bool  aRecursive = true)

Enables all the tasks in the execution chain

Parameters
aRecursive- if true, tasks of the higher priority chains are enabled as well recursively

◆ execute()

bool Scheduler::execute ( )

Makes one pass through the execution chain. Tasks are executed in the order they were added to the chain There is no concept of priority Different pseudo "priority" could be achieved by running task more frequently

◆ init()

void Scheduler::init ( )

Initializes all internal varaibles

◆ startNow()

void Scheduler::startNow ( bool  aRecursive = true)

Sets scheduler for the higher priority tasks (support for layered task priority)

Parameters
aScheduler- pointer to a scheduler for the higher priority tasks

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