Very simple cooperative round-robin task scheduler. See examples.

Dependents:   Garage_Control

Embed: (wiki syntax)

« Back to documentation index

SimpleTask Class Reference

SimpleTask Class Reference

SimpleTask. More...

#include <SimpleScheduler.h>


Detailed Description

SimpleTask.

A defined function task requires a "holder" for SimpleScheduler to manage it. This is the holder class.

See also:
SimpleScheduler
example1.h
example2.h
example3.h
example4.h
http://mbed.org/cookbook/SimpleScheduler
     SimpleTask *task = new SimpleTask(100);
     task->attach(func);
     SimpleTask *task = new SimpleTask(100, func); // Every 100ms
     SimpleTask *task = new SimpleTask(1.0, func); // Every 1second

When creating new SimpleTasks you pass the time as a frequency of how often to call the task function. If the time is an integer then milliseconds is assumed. If the number you pass is a read (double) number then the time assumed is seconds.

Definition at line 64 of file SimpleScheduler.h.