#include <TaskBlock.h>
Public Member Functions | |
| TaskBlock (taskid_t first_) | |
| bool | isTaskContained (taskid_t task) const |
| TimerTask * | getContainedTask (taskid_t task) |
| void | clearAll () |
| taskid_t | allocateTask () |
| taskid_t | lastSlot () const |
| taskid_t | firstSlot () const |
This is an internal class, and users of the library generally don't see it.
Task manager can never deallocate memory that it has already allocated for tasks, this is in order to make thread safety much easier. Given this we allocate tasks in blocks of DEFAULT_TASK_SIZE and each tranche contains it's start and end point in the "array". DEFAULT task size is set to 20 on 32 bit hardware where the size is negligible, 10 on MEGA2560 and all other AVR boards default to 6. We allow up to 8 tranches on AVR and up to 16 on 32 bit boards. This should provide more than enough tasks for most boards.
|
inline |
Checks if taskId is contained within this block
| task | the task ID to check |