PQRST
1.0
Priority Queue for Running Simple Tasks
|
There are a few ‘maintenance tasks’ on the queue, placed there by the queueing system. More...
#include <pqrst.h>
Public Member Functions | |
bool | user_task_p (void) const |
Indicates whether this is a user task or a maintenance task. More... | |
![]() | |
Task () | |
Construct a task. More... | |
virtual | ~Task () |
virtual void | start (ms_t delay) |
Start the task. More... | |
virtual void | start (void) |
Start the task immediately. More... | |
virtual void | run (ms_t t)=0 |
Runs one step of the task. More... | |
ms_t | cancel (void) |
Cancel this task. More... | |
ms_t | uncancel (void) |
Uncancel a task. More... | |
void | run_at (ms_t t, Task *T=nullptr) |
Push a new task onto the queue, due at a given time. More... | |
void | run_after (ms_t t, Task *T=nullptr) |
Push a new Task onto the queue, due some (positive) interval after the queue's current reference time. More... | |
void | run_immediately (Task *T=nullptr) |
Push a task onto the queue, due immediately. More... | |
bool | before (const Task *) const |
Impose an ordering on tasks. More... | |
bool | set_task_slippy (bool) |
Set a task to be ‘slippy’. More... | |
bool | get_task_slippy (void) const |
Determine whether a task is ‘slippy’. More... | |
bool | is_enqueued_p (void) const |
Return true if the task is currently scheduled on a queue. More... | |
ms_t | ready_time (void) const |
Return the time when the tast is next ready. More... | |
void | set_priority (unsigned char) |
Set the priority of the task. More... | |
unsigned char | get_priority (void) const |
Return the priority of the task. More... | |
void | set_duration (ms_t) |
Set the duration of the task. More... | |
ms_t | get_duration (void) const |
Return the task's expected duration. More... | |
void | set_task_ident (const char *ident_string) |
Set the identification string for a task. More... | |
const char * | get_task_ident (void) const |
Retrieve the identification string. More... | |
Friends | |
class | ModularTimeMinder |
Additional Inherited Members | |
![]() | |
static const PROGMEM char *const | pqrst_version |
Reports the PQRST version and compilation options. More... | |
![]() | |
virtual void | signal (int signal, ms_t t) |
Receive a signal. More... | |
virtual void | run_task (ms_t) |
Run this task; this is the method which is actually called when a task is due to be run. More... | |
There are a few ‘maintenance tasks’ on the queue, placed there by the queueing system.
User code cannot generate these tasks, but it may occasionally be useful to detect whether a task is thus classed – perhaps within a TaskQueue::traverse_queue callback – and the method Task::user_task_p can be used for that.
|
inlinevirtual |
Indicates whether this is a user task or a maintenance task.
All instances of this class return false.
Reimplemented from Task.
|
friend |