Commanders
Arduino buttons/bus library
ButtonsCommanderClass Class Reference

#include "ButtonsCommander.hpp"

Inheritance diagram for ButtonsCommanderClass:
Commander

Public Member Functions

 ButtonsCommanderClass ()
 
void begin ()
 
void beforeFirstLoop ()
 
ButtonsCommanderButtonAdd (ButtonsCommanderButton *inpButton)
 
ButtonsCommanderButtonGetFromId (unsigned long inId) const
 
unsigned long loop ()
 

Static Public Member Functions

static ButtonsCommanderButtonAddButton (ButtonsCommanderButton *inpButton)
 
static ButtonsCommanderClass & GetCurrent ()
 

Detailed Description

This Commanders receive orders from all kind of physical buttons.

This commander is mainly a list of buttons. This is not maintained by CMDRSCHAINEDLIST, but it is the same way of work.

Constructor & Destructor Documentation

ButtonsCommanderClass::ButtonsCommanderClass ( )

Default constructor.

Member Function Documentation

ButtonsCommanderButton * ButtonsCommanderClass::Add ( ButtonsCommanderButton inpButton)

Add a new button to the internal linked list.

Parameters
inpButtonButton to add.
Returns
address of the inserted button.
ButtonsCommanderButton * ButtonsCommanderClass::AddButton ( ButtonsCommanderButton inpButton)
static

Add a new button to the internal linked list of the static ButtonsCommander.

Parameters
inpButtonButton to add.
Returns
address of the inserted button.
Remarks
This is an internal function.
void ButtonsCommanderClass::beforeFirstLoop ( )
virtual

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

Reimplemented from Commander.

void ButtonsCommanderClass::begin ( )

Initialize the instance.

static ButtonsCommanderClass& ButtonsCommanderClass::GetCurrent ( )
inlinestatic

Get the current instance of DccCommanderClass

Remarks
This is an internal function.
ButtonsCommanderButton * ButtonsCommanderClass::GetFromId ( unsigned long  inId) const

Gets a button address from its id.

Parameters
inIdid to find.
Returns
Address of the found button or NULL if nothing found.
Remarks
This is an internal function.
unsigned long ButtonsCommanderClass::loop ( )
virtual

Main loop function.

Reimplemented from Commander.


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