Arduino-Scheduler
Portable Collaborative Multi-Tasking Scheduler for Arduino
SchedulerTaskCompletionQueue.ino File Reference
#include <Scheduler.h>
#include <Scheduler/Queue.h>
Include dependency graph for SchedulerTaskCompletionQueue.ino:

Go to the source code of this file.

Typedefs

typedef SchedulerClass::func_t task_t
 

Functions

void sumTo100 ()
 
void factTo10 ()
 
void printAlive ()
 
void setup ()
 
void loop ()
 
void worker ()
 

Variables

const unsigned int TASKQ_MAX = 8
 
Queue< task_t, TASKQ_MAXtaskq
 
volatile unsigned int sum100
 
volatile unsigned long int fact10
 

Detailed Description

Version
1.0
Author
Andrei Stoica

License

Copyright (C) 2015-2017, Mikael Patel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Description

This Arduino sketch shows how to use the Scheduler library; Worker Design Pattern; Functions (tasks) are queued and executed by work threads.

Definition in file SchedulerTaskCompletionQueue.ino.

Typedef Documentation

Function Documentation

void factTo10 ( )

Definition at line 54 of file SchedulerTaskCompletionQueue.ino.

void loop ( )

Definition at line 111 of file SchedulerTaskCompletionQueue.ino.

void printAlive ( )

Definition at line 65 of file SchedulerTaskCompletionQueue.ino.

void setup ( )

Definition at line 76 of file SchedulerTaskCompletionQueue.ino.

void sumTo100 ( )

Definition at line 41 of file SchedulerTaskCompletionQueue.ino.

void worker ( )

Definition at line 121 of file SchedulerTaskCompletionQueue.ino.

Variable Documentation

volatile unsigned long int fact10

Definition at line 52 of file SchedulerTaskCompletionQueue.ino.

volatile unsigned int sum100

Definition at line 39 of file SchedulerTaskCompletionQueue.ino.

Definition at line 36 of file SchedulerTaskCompletionQueue.ino.

const unsigned int TASKQ_MAX = 8

Definition at line 35 of file SchedulerTaskCompletionQueue.ino.