TaskManagerIO
Loading...
Searching...
No Matches
TaskTypes.h File Reference

This class represents the core tasks that are added to task manager, and the TimerTask object itself. More...

Go to the source code of this file.

Classes

class  Executable
class  BaseEvent
class  TimerTask

Typedefs

typedef unsigned int taskid_t
typedef std::function< void()> TimerFn

Enumerations

enum  TimerUnit : uint8_t {
  TIME_MICROS = 0 , TIME_SECONDS = 1 , TIME_MILLIS = 2 , TM_TIME_REPEATING = 0x10 ,
  TM_TIME_RUNNING = 0x20
}
enum  ExecutionType : uint8_t {
  EXECTYPE_FUNCTION = 0 , EXECTYPE_EXECUTABLE = 1 , EXECTYPE_EVENT = 2 , EXECTYPE_MASK = 0x03 ,
  EXECTYPE_DELETE_ON_DONE = 0x08 , EXECTYPE_DEL_EXECUTABLE = EXECTYPE_EXECUTABLE | EXECTYPE_DELETE_ON_DONE , EXECTYPE_DEL_EVENT = EXECTYPE_EVENT | EXECTYPE_DELETE_ON_DONE
}

Variables

TaskManager taskManager

Detailed Description

This class represents the core tasks that are added to task manager, and the TimerTask object itself.

Typedef Documentation

◆ taskid_t

typedef unsigned int taskid_t

Represents the identifier of a task, it can be used to query, alter and cancel tasks. You should not rely on any characteristics of this type, it could change later, it is essentially no more than a handle to a task.

◆ TimerFn

typedef void(* TimerFn)()

Definition of a function to be called back when a scheduled event is required. Takes no parameters, returns nothing.

Enumeration Type Documentation

◆ TimerUnit

enum TimerUnit : uint8_t

The time units that can be used with the schedule calls.

Enumerator
TIME_MICROS 

Schedule the task in microseconds

TIME_SECONDS 

Schedule the task in seconds

TIME_MILLIS 

Schedule the task in milliseconds - the default

◆ ExecutionType

enum ExecutionType : uint8_t

Internal class. The execution types stored internally in a task, records what kind of task is in use, and if it needs deleting when clearing the timer task.

Variable Documentation

◆ taskManager

TaskManager taskManager
extern

the global task manager instance that would normally be associated with the main loop

the global task manager, this would normally be associated with the main runLoop.