Commanders
Arduino buttons/bus library
|
#include "ButtonsCommander.hpp"
Public Member Functions | |
ButtonsCommanderClass () | |
void | begin () |
void | beforeFirstLoop () |
ButtonsCommanderButton * | Add (ButtonsCommanderButton *inpButton) |
ButtonsCommanderButton * | GetFromId (unsigned long inId) const |
unsigned long | loop () |
Static Public Member Functions | |
static ButtonsCommanderButton * | AddButton (ButtonsCommanderButton *inpButton) |
static ButtonsCommanderClass & | GetCurrent () |
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.
ButtonsCommanderClass::ButtonsCommanderClass | ( | ) |
Default constructor.
ButtonsCommanderButton * ButtonsCommanderClass::Add | ( | ButtonsCommanderButton * | inpButton | ) |
Add a new button to the internal linked list.
inpButton | Button to add. |
|
static |
Add a new button to the internal linked list of the static ButtonsCommander.
inpButton | Button to add. |
|
virtual |
void ButtonsCommanderClass::begin | ( | ) |
Initialize the instance.
|
inlinestatic |
Get the current instance of DccCommanderClass
ButtonsCommanderButton * ButtonsCommanderClass::GetFromId | ( | unsigned long | inId | ) | const |
Gets a button address from its id.
inId | id to find. |
|
virtual |
Main loop function.
Reimplemented from Commander.