PQRST  1.1
Priority Queue for Running Simple Tasks
Public Member Functions | Friends | List of all members
MaintenanceTask Class Reference

There are a few ‘maintenance tasks’ on the queue, placed there by the queueing system. More...

#include <pqrst.h>

Inheritance diagram for MaintenanceTask:
Inheritance graph
[legend]
Collaboration diagram for MaintenanceTask:
Collaboration graph
[legend]

Public Member Functions

bool user_task_p (void) const
 Indicates whether this is a user task or a maintenance task. More...
 
- Public Member Functions inherited from Task
 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 (non-negative) 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_after (void) const
 Return the interval until the Task is next ready, relative to the queue reference time. 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 Public Attributes inherited from Task
static const PROGMEM char *const pqrst_version
 Reports the PQRST version and compilation options. More...
 
- Protected Member Functions inherited from Task
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...
 

Detailed Description

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.

Member Function Documentation

◆ user_task_p()

bool MaintenanceTask::user_task_p ( void  ) const
inlinevirtual

Indicates whether this is a user task or a maintenance task.

All instances of this class return false.

Returns
false

Reimplemented from Task.

Friends And Related Function Documentation

◆ ModularTimeMinder

friend class ModularTimeMinder
friend

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