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.

Definition at line 40 of file ButtonsCommander.hpp.

Constructor & Destructor Documentation

ButtonsCommanderClass::ButtonsCommanderClass ( )

Default constructor.

Definition at line 23 of file ButtonsCommander.cpp.

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.

Definition at line 43 of file ButtonsCommander.cpp.

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.

Definition at line 35 of file ButtonsCommander.cpp.

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.

Definition at line 78 of file ButtonsCommander.cpp.

void ButtonsCommanderClass::begin ( )

Initialize the instance.

Definition at line 28 of file ButtonsCommander.cpp.

static ButtonsCommanderClass& ButtonsCommanderClass::GetCurrent ( )
inlinestatic

Get the current instance of DccCommanderClass

Remarks
This is an internal function.

Definition at line 87 of file ButtonsCommander.hpp.

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.

Definition at line 61 of file ButtonsCommander.cpp.

unsigned long ButtonsCommanderClass::loop ( )
virtual

Main loop function.

Reimplemented from Commander.

Definition at line 89 of file ButtonsCommander.cpp.


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