Logic_library
Library for Logic board by RoboticsBrno.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
Buttons Class Reference

#include <Buttons.hpp>

Public Types

using CallbackList = eventpp::CallbackList< void(std::bitset< MaxID > currentState, std::bitset< MaxID > changedBtns)>
 

Public Member Functions

 Buttons (Buttons &)=delete
 
Buttonsoperator= (Buttons &)=delete
 
CallbackListcallbackList ()
 
CallbackList::Handle onChange (CallbackList::Callback function)
 
CallbackList::Handle onChange (std::function< void(std::bitset< MaxID > currentState)> function)
 
CallbackList::Handle onChange (std::function< void()> function)
 
CallbackList::Handle onChange (CallbackList::Callback function, ButtonID watchedButton)
 
CallbackList::Handle onChange (std::function< void(bool isPressed)> function, ButtonID watchedButton)
 
CallbackList::Handle onChange (std::function< void()> function, ButtonID watchedButton)
 
Buttons::CallbackList::Handle onNextChanges (Buttons::CallbackList::Callback function, int count)
 
Buttons::CallbackList::Handle onNextChange (Buttons::CallbackList::Callback function)
 
CallbackList::Handle onNextChanges (std::function< void(bool isPressed)> function, ButtonID watchedButton, int count)
 
CallbackList::Handle onNextChange (std::function< void(bool isPressed)> function, ButtonID watchedButton)
 
template<typename Condition >
Buttons::CallbackList::Handle onChangeUntil (Buttons::CallbackList::Callback function, Condition condition)
 
CallbackList::Handle onPress (CallbackList::Callback function)
 
CallbackList::Handle onPress (std::function< void(std::bitset< MaxID > currentState)> function)
 
CallbackList::Handle onPress (std::function< void()> function)
 
CallbackList::Handle onPress (std::function< void()> function, ButtonID watchedButton)
 
CallbackList::Handle onNextPresses (std::function< void()> function, ButtonID watchedButton, int count)
 
CallbackList::Handle onNextPress (std::function< void()> function, ButtonID watchedButton)
 
template<typename Condition >
Buttons::CallbackList::Handle onPressUntil (std::function< void()> function, Condition condition, ButtonID watchedButton)
 
CallbackList::Handle onRelease (CallbackList::Callback function)
 
CallbackList::Handle onRelease (std::function< void(std::bitset< MaxID > currentState)> function)
 
CallbackList::Handle onRelease (std::function< void()> function)
 
CallbackList::Handle onRelease (std::function< void()> function, ButtonID watchedButton)
 
CallbackList::Handle onNextReleases (std::function< void()> function, ButtonID watchedButton, int count)
 
CallbackList::Handle onNexRelease (std::function< void()> function, ButtonID watchedButton)
 
template<typename Condition >
Buttons::CallbackList::Handle onReleaseUntil (std::function< void()> function, Condition condition, ButtonID watchedButton)
 
CallbackList::Handle priZmene (CallbackList::Callback funkce)
 
CallbackList::Handle priZmene (std::function< void(std::bitset< MaxID > aktualniStav)> funkce)
 
CallbackList::Handle priZmene (std::function< void()> funkce)
 
CallbackList::Handle priZmene (CallbackList::Callback funkce, ButtonID sledovaneTlacitko)
 
CallbackList::Handle priZmene (std::function< void(bool jeStisknuto)> funkce, ButtonID sledovaneTlacitko)
 
CallbackList::Handle priZmene (std::function< void()> funkce, ButtonID sledovaneTlacitko)
 
CallbackList::Handle priStisku (CallbackList::Callback funkce)
 
CallbackList::Handle priStisku (std::function< void(std::bitset< MaxID > currentState)> funkce)
 
CallbackList::Handle priStisku (std::function< void()> funkce)
 
CallbackList::Handle priStisku (std::function< void()> funkce, ButtonID sledovaneTlacitko)
 
CallbackList::Handle priUvolneni (CallbackList::Callback funkce)
 
CallbackList::Handle priUvolneni (std::function< void(std::bitset< MaxID > currentState)> funkce)
 
CallbackList::Handle priUvolneni (std::function< void()> funkce)
 
CallbackList::Handle priUvolneni (std::function< void()> funkce, ButtonID sledovaneTlacitko)
 
void removeCallback (CallbackList::Handle)
 
void smazatCallback (CallbackList::Handle handle)
 

Static Public Member Functions

static bool IRAM_ATTR read (gpio_num_t)
 
static bool IRAM_ATTR read (ButtonID)
 
static std::bitset< MaxID > IRAM_ATTR readAll ()
 
static bool IRAM_ATTR precti (gpio_num_t cisloPinu)
 
static bool IRAM_ATTR precti (ButtonID idTlacitka)
 
static std::bitset< MaxID > IRAM_ATTR prectiVsechny ()
 

Friends

class Logic
 

Member Typedef Documentation

◆ CallbackList

using Buttons::CallbackList = eventpp::CallbackList<void(std::bitset<MaxID> currentState, std::bitset<MaxID> changedBtns)>

Constructor & Destructor Documentation

◆ Buttons()

Buttons::Buttons ( Buttons )
delete

Member Function Documentation

◆ callbackList()

CallbackList & Buttons::callbackList ( )
inline

◆ onChange() [1/6]

CallbackList::Handle Buttons::onChange ( CallbackList::Callback  function)

◆ onChange() [2/6]

CallbackList::Handle Buttons::onChange ( CallbackList::Callback  function,
ButtonID  watchedButton 
)
inline

◆ onChange() [3/6]

CallbackList::Handle Buttons::onChange ( std::function< void()>  function)
inline

◆ onChange() [4/6]

CallbackList::Handle Buttons::onChange ( std::function< void()>  function,
ButtonID  watchedButton 
)
inline

◆ onChange() [5/6]

CallbackList::Handle Buttons::onChange ( std::function< void(bool isPressed)>  function,
ButtonID  watchedButton 
)
inline

◆ onChange() [6/6]

CallbackList::Handle Buttons::onChange ( std::function< void(std::bitset< MaxID > currentState)>  function)
inline

◆ onChangeUntil()

template<typename Condition >
Buttons::CallbackList::Handle Buttons::onChangeUntil ( Buttons::CallbackList::Callback  function,
Condition  condition 
)
inline

◆ onNexRelease()

CallbackList::Handle Buttons::onNexRelease ( std::function< void()>  function,
ButtonID  watchedButton 
)
inline

◆ onNextChange() [1/2]

Buttons::CallbackList::Handle Buttons::onNextChange ( Buttons::CallbackList::Callback  function)
inline

◆ onNextChange() [2/2]

CallbackList::Handle Buttons::onNextChange ( std::function< void(bool isPressed)>  function,
ButtonID  watchedButton 
)
inline

◆ onNextChanges() [1/2]

Buttons::CallbackList::Handle Buttons::onNextChanges ( Buttons::CallbackList::Callback  function,
int  count 
)
inline

◆ onNextChanges() [2/2]

CallbackList::Handle Buttons::onNextChanges ( std::function< void(bool isPressed)>  function,
ButtonID  watchedButton,
int  count 
)
inline

◆ onNextPress()

CallbackList::Handle Buttons::onNextPress ( std::function< void()>  function,
ButtonID  watchedButton 
)
inline

◆ onNextPresses()

CallbackList::Handle Buttons::onNextPresses ( std::function< void()>  function,
ButtonID  watchedButton,
int  count 
)
inline

◆ onNextReleases()

CallbackList::Handle Buttons::onNextReleases ( std::function< void()>  function,
ButtonID  watchedButton,
int  count 
)
inline

◆ onPress() [1/4]

CallbackList::Handle Buttons::onPress ( CallbackList::Callback  function)
inline

◆ onPress() [2/4]

CallbackList::Handle Buttons::onPress ( std::function< void()>  function)
inline

◆ onPress() [3/4]

CallbackList::Handle Buttons::onPress ( std::function< void()>  function,
ButtonID  watchedButton 
)
inline

◆ onPress() [4/4]

CallbackList::Handle Buttons::onPress ( std::function< void(std::bitset< MaxID > currentState)>  function)
inline

◆ onPressUntil()

template<typename Condition >
Buttons::CallbackList::Handle Buttons::onPressUntil ( std::function< void()>  function,
Condition  condition,
ButtonID  watchedButton 
)
inline

◆ onRelease() [1/4]

CallbackList::Handle Buttons::onRelease ( CallbackList::Callback  function)
inline

◆ onRelease() [2/4]

CallbackList::Handle Buttons::onRelease ( std::function< void()>  function)
inline

◆ onRelease() [3/4]

CallbackList::Handle Buttons::onRelease ( std::function< void()>  function,
ButtonID  watchedButton 
)
inline

◆ onRelease() [4/4]

CallbackList::Handle Buttons::onRelease ( std::function< void(std::bitset< MaxID > currentState)>  function)
inline

◆ onReleaseUntil()

template<typename Condition >
Buttons::CallbackList::Handle Buttons::onReleaseUntil ( std::function< void()>  function,
Condition  condition,
ButtonID  watchedButton 
)
inline

◆ operator=()

Buttons & Buttons::operator= ( Buttons )
delete

◆ precti() [1/2]

static bool IRAM_ATTR Buttons::precti ( ButtonID  idTlacitka)
inlinestatic

◆ precti() [2/2]

static bool IRAM_ATTR Buttons::precti ( gpio_num_t  cisloPinu)
inlinestatic

◆ prectiVsechny()

static std::bitset< MaxID > IRAM_ATTR Buttons::prectiVsechny ( )
inlinestatic

◆ priStisku() [1/4]

CallbackList::Handle Buttons::priStisku ( CallbackList::Callback  funkce)
inline

◆ priStisku() [2/4]

CallbackList::Handle Buttons::priStisku ( std::function< void()>  funkce)
inline

◆ priStisku() [3/4]

CallbackList::Handle Buttons::priStisku ( std::function< void()>  funkce,
ButtonID  sledovaneTlacitko 
)
inline

◆ priStisku() [4/4]

CallbackList::Handle Buttons::priStisku ( std::function< void(std::bitset< MaxID > currentState)>  funkce)
inline

◆ priUvolneni() [1/4]

CallbackList::Handle Buttons::priUvolneni ( CallbackList::Callback  funkce)
inline

◆ priUvolneni() [2/4]

CallbackList::Handle Buttons::priUvolneni ( std::function< void()>  funkce)
inline

◆ priUvolneni() [3/4]

CallbackList::Handle Buttons::priUvolneni ( std::function< void()>  funkce,
ButtonID  sledovaneTlacitko 
)
inline

◆ priUvolneni() [4/4]

CallbackList::Handle Buttons::priUvolneni ( std::function< void(std::bitset< MaxID > currentState)>  funkce)
inline

◆ priZmene() [1/6]

CallbackList::Handle Buttons::priZmene ( CallbackList::Callback  funkce)
inline

◆ priZmene() [2/6]

CallbackList::Handle Buttons::priZmene ( CallbackList::Callback  funkce,
ButtonID  sledovaneTlacitko 
)
inline

◆ priZmene() [3/6]

CallbackList::Handle Buttons::priZmene ( std::function< void()>  funkce)
inline

◆ priZmene() [4/6]

CallbackList::Handle Buttons::priZmene ( std::function< void()>  funkce,
ButtonID  sledovaneTlacitko 
)
inline

◆ priZmene() [5/6]

CallbackList::Handle Buttons::priZmene ( std::function< void(bool jeStisknuto)>  funkce,
ButtonID  sledovaneTlacitko 
)
inline

◆ priZmene() [6/6]

CallbackList::Handle Buttons::priZmene ( std::function< void(std::bitset< MaxID > aktualniStav)>  funkce)
inline

◆ read() [1/2]

bool IRAM_ATTR Buttons::read ( ButtonID  id)
static

◆ read() [2/2]

bool IRAM_ATTR Buttons::read ( gpio_num_t  gpio)
static

◆ readAll()

std::bitset< MaxID > IRAM_ATTR Buttons::readAll ( )
static

◆ removeCallback()

void Buttons::removeCallback ( CallbackList::Handle  handle)

◆ smazatCallback()

void Buttons::smazatCallback ( CallbackList::Handle  handle)
inline

Friends And Related Function Documentation

◆ Logic

friend class Logic
friend

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