Commanders
Arduino buttons/bus library
Commander Class Reference

#include "Commander.hpp"

Inheritance diagram for Commander:
ButtonsCommanderClass CANCommanderClass DccCommanderClass I2CCommanderClass

Public Member Functions

 Commander ()
 
virtual void PriorityLoop ()
 
virtual void beforeFirstLoop ()
 
virtual unsigned long loop ()
 

Static Public Member Functions

static void CommanderPriorityLoops ()
 
static void BeforeFirstLoops ()
 
static unsigned long loops ()
 

Detailed Description

This is the base class for all the commanders.

DO NOT INSTANCIATE THIS CLASS !

A commander is a class with a loop function which is able to raise events for a source. Each commander is an item into a linked list of commanders. There is one and only one Commander of a given type during a library session.

Definition at line 23 of file Commander.hpp.

Constructor & Destructor Documentation

Commander::Commander ( )
inline

Default constructor.

Definition at line 31 of file Commander.hpp.

Member Function Documentation

virtual void Commander::beforeFirstLoop ( )
inlinevirtual

This function will be called after sketch Setup(), but before the first call to loop(). It will be called only one time.

Reimplemented in ButtonsCommanderClass.

Definition at line 40 of file Commander.hpp.

void Commander::BeforeFirstLoops ( )
static

This function will call all BeforeFirstLoop() in sequence.

Definition at line 33 of file Commander.cpp.

void Commander::CommanderPriorityLoops ( )
static

This function will call all PriorityLoop() in sequence.

Definition at line 44 of file Commander.cpp.

virtual unsigned long Commander::loop ( )
inlinevirtual

Main loop of this commander.

Returns
Event Id if an event has been raised, or UNDEFINED_ID if not.

Reimplemented in DccCommanderClass, CANCommanderClass, ButtonsCommanderClass, and I2CCommanderClass.

Definition at line 44 of file Commander.hpp.

unsigned long Commander::loops ( )
static

This function will call all loop() in sequence.

Returns
Event Id if an event has been raised, or UNDEFINED_ID if not.

Definition at line 55 of file Commander.cpp.

virtual void Commander::PriorityLoop ( )
inlinevirtual

Priority loop function. A commander can need more call to its loop than normal. The priority loop functions of all the commanders will be called before any commander loop.

Reimplemented in DccCommanderClass.

Definition at line 37 of file Commander.hpp.


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