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.

Constructor & Destructor Documentation

Commander::Commander ( )
inline

Default constructor.

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.

void Commander::BeforeFirstLoops ( )
static

This function will call all BeforeFirstLoop() in sequence.

void Commander::CommanderPriorityLoops ( )
static

This function will call all PriorityLoop() in sequence.

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.

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.
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.


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