Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otScheduler Class Reference
[SCHEDULER - A simple approach to run a list of processes at specified timesSCHEDULER - A simple approach to run a list of processes at specified times]

Class for create a process scheduler.

#include <otScheduler.h>


Public Member Functions

 otScheduler ()
bool init (U32 process, U8 timerId)
void close ()
void run (bool ena)
void enable (U32 idx, bool ena)
bool enable (U32 idx)
void changeTaskInterval (U32 idx, U32 intTime)
void kill (U32 idx)
U32 interval (U32 idx)
U32 speed (U32 idx)
U32 size ()
bool function (U32 idx)
const char * text (U32 idx)
U32 addTask (U32 interval, SchedulerFunction Func, const char *text, bool enable=true)
void process (bool forever=true)


Constructor & Destructor Documentation

otScheduler.otScheduler  ) 
 


Member Function Documentation

U32 otScheduler.addTask U32  interval,
SchedulerFunction  Func,
const char *  text,
bool  enable = true
 

Add a task to the scheduler list

Parameters:
interval Interval time as ms for specified task
Func Function point to the task
text C string to document specified task
enable If true enable specified task to be processed
Returns:
Task identifier or 0xFFFFFFFF when task list is full

void otScheduler.changeTaskInterval U32  idx,
U32  intTime
 

Change the task interval time

Parameters:
idx Task identifier
intTime Interval time as ms

void otScheduler.close  ) 
 

bool otScheduler.enable U32  idx  ) 
 

Check specified task if enabled or not

Parameters:
idx Task identifier
Returns:
True if enabled

void otScheduler.enable U32  idx,
bool  ena
 

Enable/disable specified task

Parameters:
idx Task identifier
ena True to enable the task

bool otScheduler.function U32  idx  ) 
 

Check if at the specified index a task has been set

Parameters:
idx Task identifier
Returns:
True if a task is present

bool otScheduler.init U32  process,
U8  timerId
 

Init the scheduler

Parameters:
process Maximum nuomber of allowed process
timerId Timer identifier
Returns:
True on success

U32 otScheduler.interval U32  idx  ) 
 

Return the real interval time (ms) of the last execution

Parameters:
idx Task identifier
Returns:
Interval time

void otScheduler.kill U32  idx  ) 
 

Remove a specified task from the scheduling

Parameters:
idx Task identifier

void otScheduler.process bool  forever = true  ) 
 

Start scheduler processing. To stop the process the only way is to call run function.

Parameters:
forever True for infinite process, false for one time.

void otScheduler.run bool  ena  ) 
 

Enable/disable the scheduler activity

Parameters:
ena True to enable the scheduler processing

U32 otScheduler.size  ) 
 

Return the number of allowed task

Returns:
Allowed task

U32 otScheduler.speed U32  idx  ) 
 

Return the execution time (ms) of the specified task

Parameters:
idx Task identifier
Returns:
Execution time

const char* otScheduler.text U32  idx  ) 
 

Read related text to specified task

Parameters:
idx Task identifier
Returns:
Text


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-23 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0