33#ifndef _BUTTONTOSWITCH_ESP32_H_
34#define _BUTTONTOSWITCH_ESP32_H_
39#define _HwMinDbncTime 20
40#define _StdPollDelay 10
41#define _MinSrvcTime 100
42#define _InvalidPinNum 0xFF
45const uint8_t IsOnBitPos {0};
46const uint8_t IsEnabledBitPos{1};
47const uint8_t PilotOnBitPos{2};
48const uint8_t WrnngOnBitPos{3};
49const uint8_t IsVoidedBitPos{4};
50const uint8_t IsOnScndryBitPos{5};
51const uint8_t OtptCurValBitPos{16};
74typedef void (*fncPtrType)();
75typedef fncPtrType (*ptrToTrnFnc)();
104 const unsigned long int _stdMinDbncTime {_HwMinDbncTime};
106 uint8_t _mpbttnPin{};
109 unsigned long int _dbncTimeOrigSett{};
111 unsigned long int _dbncRlsTimerStrt{0};
112 unsigned long int _dbncRlsTimeTempSett{0};
113 unsigned long int _dbncTimerStrt{0};
114 unsigned long int _dbncTimeTempSett{0};
115 void (*_fnWhnTrnOff)() {
nullptr};
116 void (*_fnWhnTrnOn)() {
nullptr};
117 bool _isEnabled{
true};
118 volatile bool _isOn{
false};
119 bool _isOnDisabled{
false};
120 volatile bool _isPressed{
false};
121 fdaDmpbStts _mpbFdaState {stOffNotVPP};
122 TimerHandle_t _mpbPollTmrHndl {NULL};
123 String _mpbPollTmrName {
""};
124 bool _outputsChange {
false};
125 uint32_t _outputsChangeCnt{0};
126 bool _outputsChngTskTrggr{
false};
127 bool _prssRlsCcl{
false};
128 unsigned long int _strtDelay {0};
129 bool _sttChng {
true};
130 TaskHandle_t _taskToNotifyHndl {NULL};
131 TaskHandle_t _taskWhileOnHndl{NULL};
132 volatile bool _validDisablePend{
false};
133 volatile bool _validEnablePend{
false};
134 volatile bool _validPressPend{
false};
135 volatile bool _validReleasePend{
false};
138 const bool getIsPressed()
const;
139 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
140 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
141 void _setIsEnabled(
const bool &newEnabledValue);
145 virtual void updFdaState();
147 virtual bool updValidPressesStatus();
148 const bool getOutputsChngTskTrggr()
const;
149 void resetOutputsChngTskTrggr();
166 DbncdMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0);
183 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
350 bool init(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0);
400 bool setDbncTime(
const unsigned long int &newDbncTime);
491 DbncdDlydMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
500 bool init(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
510 void setStrtDelay(
const unsigned long int &newStrtDelay);
545 bool _isLatched{
false};
546 fdaLmpbStts _mpbFdaState {stOffNotVPP};
547 bool _trnOffASAP{
true};
548 volatile bool _validUnlatchPend{
false};
549 volatile bool _validUnlatchRlsPend{
false};
551 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
553 virtual void stDisabled_In(){};
554 virtual void stDisabled_Out(){};
555 virtual void stLtchNVUP_Do(){};
556 virtual void stOffNotVPP_In(){};
557 virtual void stOffNotVPP_Out(){};
558 virtual void stOffNVURP_Do(){};
559 virtual void stOffVPP_Out(){};
560 virtual void stOffVURP_Out(){};
561 virtual void stOnNVRP_Do(){};
562 virtual void updFdaState();
563 virtual void updValidUnlatchStatus() = 0;
570 LtchMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
574 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
666 virtual void stOffNVURP_Do();
667 virtual void updValidUnlatchStatus();
674 TgglLtchMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
690 bool _tmRstbl {
true};
691 unsigned long int _srvcTime {};
692 unsigned long int _srvcTimerStrt{0};
694 virtual void stOffNotVPP_Out();
695 virtual void stOffVPP_Out();
696 virtual void updValidUnlatchStatus();
705 TmLtchMPBttn(
const uint8_t &mpbttnPin,
const unsigned long int &svcTime,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
726 bool setSrvcTime(
const unsigned long int &newSrvcTime);
751 void (*_fnWhnTrnOffPilot)() {
nullptr};
752 void (*_fnWhnTrnOffWrnng)() {
nullptr};
753 void (*_fnWhnTrnOnPilot)() {
nullptr};
754 void (*_fnWhnTrnOnWrnng)() {
nullptr};
755 bool _keepPilot{
false};
756 volatile bool _pilotOn{
false};
757 unsigned long int _wrnngMs{0};
758 volatile bool _wrnngOn {
false};
759 unsigned int _wrnngPrctg {0};
761 bool _validWrnngSetPend{
false};
762 bool _validWrnngResetPend{
false};
763 bool _validPilotSetPend{
false};
764 bool _validPilotResetPend{
false};
766 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
767 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
768 virtual void stDisabled_In();
769 virtual void stLtchNVUP_Do();
770 virtual void stOffNotVPP_In();
771 virtual void stOffVPP_Out();
772 virtual void stOnNVRP_Do();
773 void _turnOffPilot();
774 void _turnOffWrnng();
787 HntdTmLtchMPBttn(
const uint8_t &mpbttnPin,
const unsigned long int &svcTime,
const unsigned int &wrnngPrctg = 0,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
791 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
905 bool setSrvcTime(
const unsigned long int &newSvcTime);
933 bool _xtrnUnltchPRlsCcl {
false};
935 virtual void stOffNVURP_Do();
936 virtual void updValidUnlatchStatus();
952 const bool &pulledUp,
const bool &typeNO,
const unsigned long int &dbncTimeOrigSett,
const unsigned long int &strtDelay);
961 const bool &pulledUp,
const bool &typeNO,
const unsigned long int &dbncTimeOrigSett,
const unsigned long int &strtDelay);
966 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1014 volatile bool _isOnScndry{
false};
1015 fdaDALmpbStts _mpbFdaState {stOffNotVPP};
1016 unsigned long _scndModActvDly {2000};
1017 unsigned long _scndModTmrStrt {0};
1018 bool _validScndModPend{
false};
1020 void (*_fnWhnTrnOffScndry)() {
nullptr};
1021 void (*_fnWhnTrnOnScndry)() {
nullptr};
1022 TaskHandle_t _taskWhileOnScndryHndl{NULL};
1024 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
1025 virtual void stDisabled_In(){};
1026 virtual void stOnEndScndMod_Out(){};
1027 virtual void stOnScndMod_Do() = 0;
1028 virtual void stOnStrtScndMod_In(){};
1029 virtual void _turnOffScndry();
1030 virtual void _turnOnScndry();
1031 virtual void updFdaState();
1032 virtual bool updValidPressesStatus();
1033 virtual void updValidUnlatchStatus();
1041 DblActnLtchMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
1050 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1164 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1166 virtual void stOnEndScndMod_Out();
1167 virtual void stOnScndMod_Do();
1168 virtual void stOnStrtScndMod_In();
1175 DDlydDALtchMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
1208 bool _autoSwpDirOnEnd{
true};
1209 bool _autoSwpDirOnPrss{
false};
1210 bool _curSldrDirUp{
true};
1211 uint16_t _initOtptCurVal{};
1212 uint16_t _otptCurVal{};
1213 unsigned long _otptSldrSpd{1};
1214 uint16_t _otptSldrStpSize{0x01};
1215 uint16_t _otptValMax{0xFFFF};
1216 uint16_t _otptValMin{0x0000};
1218 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1219 bool _setSldrDir(
const bool &newVal);
1221 void stOnEndScndMod_Out();
1222 virtual void stOnScndMod_Do();
1223 virtual void stOnStrtScndMod_In();
1232 SldrDALtchMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0,
const uint16_t initVal = 0xFFFF);
1463 void setFrcdOtptWhnVdd(
const bool &newVal);
1464 void setStOnWhnOtpFrcd(
const bool &newVal);
1483 fdaVmpbStts _mpbFdaState {stOffNotVPP};
1485 void (*_fnWhnTrnOffVdd)() {
nullptr};
1486 void (*_fnWhnTrnOnVdd)() {
nullptr};
1487 bool _frcOtptLvlWhnVdd {
true};
1488 bool _isVoided{
false};
1489 bool _stOnWhnOtptFrcd{
false};
1490 bool _validVoidPend{
false};
1491 bool _validUnvoidPend{
false};
1493 static void mpbPollCallback(TimerHandle_t mpbTmrCb);
1494 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1495 bool setVoided(
const bool &newVoidValue);
1496 virtual void stDisabled_In();
1497 virtual void stDisabled_Out();
1498 virtual void stOffNotVPP_In(){};
1499 virtual void stOffVddNVUP_Do(){};
1500 virtual void stOffVPP_Do(){};
1503 virtual void updFdaState();
1504 virtual bool updVoidStatus() = 0;
1513 VdblMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0,
const bool &isOnDisabled =
false);
1619 unsigned long int _voidTime;
1620 unsigned long int _voidTmrStrt{0};
1622 virtual void stOffNotVPP_In();
1623 virtual void stOffVddNVUP_Do();
1624 virtual void stOffVPP_Do();
1625 bool updIsPressed();
1626 virtual bool updVoidStatus();
1635 TmVdblMPBttn(
const uint8_t &mpbttnPin,
unsigned long int voidTime,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0,
const bool &isOnDisabled =
false);
1643 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1666 bool setVoidTime(
const unsigned long int &newVoidTime);
1689 virtual void stOffVddNVUP_Do();
1690 virtual bool updVoidStatus();
1697 SnglSrvcVdblMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
1705 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
Models a Debounced Delayed Double Action Latched MPB combo switch (Debounced Delayed DALDD-MPB - DD-D...
Definition ButtonToSwitch_ESP32.h:1162
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2214
~DDlydDALtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2210
DDlydDALtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:2205
Abstract class, base to model Double Action LDD-MPBs (DALDD-MPBs).
Definition ButtonToSwitch_ESP32.h:999
bool setScndModActvDly(const unsigned long &newVal)
Sets a new value for the scndModActvDly class attribute.
Definition ButtonToSwitch_ESP32.cpp:1898
void setFnWhnTrnOnScndryPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object enters the Secondary On State.
Definition ButtonToSwitch_ESP32.cpp:1886
const TaskHandle_t getTaskWhileOnScndry()
Returns the task to be run while the object is in the Secondary On state.
Definition ButtonToSwitch_ESP32.cpp:1840
fncPtrType getFnWhnTrnOnScndry()
Returns the function that is set to execute every time the object enters the Secondary On State.
Definition ButtonToSwitch_ESP32.cpp:1825
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1806
bool getIsOnScndry()
Returns the current value of the isOnScndry attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1830
void setTaskWhileOnScndry(const TaskHandle_t &newTaskHandle)
Sets the task to be run while the object is in the On state.
Definition ButtonToSwitch_ESP32.cpp:1916
unsigned long getScndModActvDly()
Returns the current value of the scndModActvDly class attribute.
Definition ButtonToSwitch_ESP32.cpp:1835
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1782
void setFnWhnTrnOffScndryPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object enters the Secondary Off State...
Definition ButtonToSwitch_ESP32.cpp:1875
fncPtrType getFnWhnTrnOffScndry()
returns the function that is set to execute every time the object enters the Secondary Off State.
Definition ButtonToSwitch_ESP32.cpp:1820
~DblActnLtchMPBttn()
Virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:1778
DblActnLtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Abstract Class constructor.
Definition ButtonToSwitch_ESP32.cpp:1773
Models a Debounced Delayed MPB (DD-MPB).
Definition ButtonToSwitch_ESP32.h:475
DbncdDlydMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:763
void setStrtDelay(const unsigned long int &newStrtDelay)
Sets a new value to the "Start Delay" strtDelay attribute.
Definition ButtonToSwitch_ESP32.cpp:784
bool init(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
see DbncdMPBttn::init(const uint8_t, const bool, const bool, const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:774
Base class, models a Debounced Momentary Push Button (D-MPB).
Definition ButtonToSwitch_ESP32.h:95
fncPtrType getFnWhnTrnOn()
Returns the function that is set to execute every time the object enters the On State.
Definition ButtonToSwitch_ESP32.cpp:164
void resetFda()
Resets the MPB behavior automaton to it's Initial or Start State
Definition ButtonToSwitch_ESP32.cpp:334
void clrStatus(bool clrIsOn=true)
Clears and resets flags, timers and counters modified through the object's signals processing.
Definition ButtonToSwitch_ESP32.cpp:94
const unsigned long int getCurDbncTime() const
Returns the current debounce period time set for the object.
Definition ButtonToSwitch_ESP32.cpp:154
const TaskHandle_t getTaskWhileOn()
Returns the task to be run (resumed) while the object is in the On state.
Definition ButtonToSwitch_ESP32.cpp:215
void enable()
Enables the input signal processing.
Definition ButtonToSwitch_ESP32.cpp:131
bool pause()
Pauses the software timer updating the computation of the object's internal flags value.
Definition ButtonToSwitch_ESP32.cpp:310
const TaskHandle_t getTaskToNotify() const
Returns the task to be notified by the object when its output flags changes.
Definition ButtonToSwitch_ESP32.cpp:209
virtual ~DbncdMPBttn()
Default virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:65
virtual void setTaskWhileOn(const TaskHandle_t &newTaskHandle)
Sets the task to be run while the object is in the On state.
Definition ButtonToSwitch_ESP32.cpp:502
void setIsOnDisabled(const bool &newIsOnDisabled)
Sets the value of the isOnDisabled attribute flag.
Definition ButtonToSwitch_ESP32.cpp:427
bool init(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0)
Initializes an object instantiated by the default constructor.
Definition ButtonToSwitch_ESP32.cpp:220
bool end()
Detaches the object from the timer that monitors the input pins, compute and updates the object's sta...
Definition ButtonToSwitch_ESP32.cpp:136
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
Attaches the instantiated object to a timer that monitors the input pins and updates the object statu...
Definition ButtonToSwitch_ESP32.cpp:70
void resetDbncTime()
Resets the debounce process time of the object to the value used at instantiation.
Definition ButtonToSwitch_ESP32.cpp:328
DbncdMPBttn()
Default class constructor.
Definition ButtonToSwitch_ESP32.cpp:39
void disable()
Disables the input signal processing, ignoring the changes of its values.
Definition ButtonToSwitch_ESP32.cpp:126
bool resume()
Resets the outputs change task unblocking trigger (outputsChngTskTrggr) attribute flag.
Definition ButtonToSwitch_ESP32.cpp:352
const bool getIsEnabled() const
Returns the value of the isEnabled attribute flag, indicating the Enabled or Disabled status of the o...
Definition ButtonToSwitch_ESP32.cpp:169
const bool getIsOnDisabled() const
Returns the value of the isOnDisabled attribute flag.
Definition ButtonToSwitch_ESP32.cpp:179
void setTaskToNotify(const TaskHandle_t &newTaskHandle)
Sets the handle to the task to be notified by the object when its output attribute flags changes.
Definition ButtonToSwitch_ESP32.cpp:479
void setFnWhnTrnOffPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object enters the Off State.
Definition ButtonToSwitch_ESP32.cpp:384
const bool getOutputsChange() const
Returns the value of the outputsChange attribute flag.
Definition ButtonToSwitch_ESP32.cpp:194
const bool getIsOn() const
Returns the value of the isOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:174
void setFnWhnTrnOnPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object enters the On State.
Definition ButtonToSwitch_ESP32.cpp:395
unsigned long int getStrtDelay()
Returns the current value of the outputs change task unblocking trigger (outputsChngTskTrggr) attribu...
Definition ButtonToSwitch_ESP32.cpp:199
const uint32_t getOtptsSttsPkgd()
Returns the relevant attribute flags values for the object state encoded as a 32 bits value,...
Definition ButtonToSwitch_ESP32.cpp:189
fncPtrType getFnWhnTrnOff()
Returns the function that is set to execute every time the object enters the Off State.
Definition ButtonToSwitch_ESP32.cpp:159
void setOutputsChange(bool newOutputsChange)
Sets the value of the attribute flag indicating if a change took place in any of the output attribute...
Definition ButtonToSwitch_ESP32.cpp:447
bool setDbncTime(const unsigned long int &newDbncTime)
Sets the debounce process time.
Definition ButtonToSwitch_ESP32.cpp:368
Models a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB).
Definition ButtonToSwitch_ESP32.h:749
bool setSrvcTime(const unsigned long int &newSvcTime)
See TmLtchMPBttn::setSrvcTime(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1445
fncPtrType getFnWhnTrnOnPilot()
Returns the function that is set to execute every time the object's Pilot attribute flag enters the O...
Definition ButtonToSwitch_ESP32.cpp:1315
void setFnWhnTrnOffWrnngPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object's Warning is reset.
Definition ButtonToSwitch_ESP32.cpp:1398
fncPtrType getFnWhnTrnOffWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch_ESP32.cpp:1310
const bool getWrnngOn() const
Returns the current value of the warningOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1330
void setFnWhnTrnOnPilotPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object's Pilot is set.
Definition ButtonToSwitch_ESP32.cpp:1410
HntdTmLtchMPBttn(const uint8_t &mpbttnPin, const unsigned long int &svcTime, const unsigned int &wrnngPrctg=0, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:1255
const bool getPilotOn() const
Returns the current value of the pilotOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1325
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1285
fncPtrType getFnWhnTrnOffPilot()
Returns the function that is set to execute every time the object's Pilot attribute flag enters the O...
Definition ButtonToSwitch_ESP32.cpp:1305
void setFnWhnTrnOnWrnngPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object's Wrnng is set.
Definition ButtonToSwitch_ESP32.cpp:1422
bool setWrnngPrctg(const unsigned int &newWrnngPrctg)
Sets the value for the percentage of service time for calculating the warningOn flag value.
Definition ButtonToSwitch_ESP32.cpp:1460
fncPtrType getFnWhnTrnOnWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch_ESP32.cpp:1320
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1261
void setFnWhnTrnOffPilotPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object's Pilot is reset.
Definition ButtonToSwitch_ESP32.cpp:1386
void setKeepPilot(const bool &newKeepPilot)
Sets the configuration of the keepPilot service attribute.
Definition ButtonToSwitch_ESP32.cpp:1434
Abstract class, base to model Latched Debounced Delayed MPBs (LDD-MPB).
Definition ButtonToSwitch_ESP32.h:531
const bool getIsLatched() const
Returns the value of the isLatched attribute flag, indicating the Latched or Unlatched condition of t...
Definition ButtonToSwitch_ESP32.cpp:839
bool unlatch()
Sets the values of the flags needed to unlatch a latched MPB.
Definition ButtonToSwitch_ESP32.cpp:926
const bool getUnlatchRlsPend() const
Returns the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:854
LtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:797
const bool getUnlatchPend() const
Returns the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:849
void setUnlatchPend(const bool &newVal)
Sets the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:904
void setTrnOffASAP(const bool &newVal)
Sets the value of the trnOffASAP attribute.
Definition ButtonToSwitch_ESP32.cpp:893
bool getTrnOffASAP()
Returns the value of the trnOffASAP attribute flag.
Definition ButtonToSwitch_ESP32.cpp:844
void setUnlatchRlsPend(const bool &newVal)
Sets the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:915
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:802
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:826
Models a Slider Double Action LDD-MPB combo switch, a.k.a. off/on/dimmer, a.k.a. off/on/volume radio ...
Definition ButtonToSwitch_ESP32.h:1205
void clrStatus(bool clrIsOn=true)
Definition ButtonToSwitch_ESP32.cpp:2281
bool setOtptSldrSpd(const uint16_t &newVal)
Sets the output slider speed (otptSldrSpd) attribute.
Definition ButtonToSwitch_ESP32.cpp:2360
uint16_t getOtptValMax()
Returns the top output current value register setting.
Definition ButtonToSwitch_ESP32.cpp:2320
bool getOtptCurValIsMin()
Returns the result of comparing the Output Current Value to the Minimum value setting
Definition ButtonToSwitch_ESP32.cpp:2305
bool setSldrDirDn()
Sets the value of the curSldrDirUp attribute to false.
Definition ButtonToSwitch_ESP32.cpp:2464
bool setOtptValMax(const uint16_t &newVal)
Sets the output current value register maximum value attribute (otptValMax attribute).
Definition ButtonToSwitch_ESP32.cpp:2396
bool swapSldrDir()
Inverts the current curSldrDirUp attribute value.
Definition ButtonToSwitch_ESP32.cpp:2577
~SldrDALtchMPBttn()
Virtual class destructor.
Definition ButtonToSwitch_ESP32.cpp:2277
bool setOtptCurVal(const uint16_t &newVal)
Sets the output current value register.
Definition ButtonToSwitch_ESP32.cpp:2342
uint16_t getOtptCurVal()
Returns the Output Current Value (otpCurVal) attribute.
Definition ButtonToSwitch_ESP32.cpp:2295
bool setSldrDirUp()
Sets the value of the curSldrDirUp attribute to true.
Definition ButtonToSwitch_ESP32.cpp:2469
bool getSldrDirUp()
Returns the value of the curSldrDirUp attribute.
Definition ButtonToSwitch_ESP32.cpp:2330
bool setOtptSldrStpSize(const uint16_t &newVal)
Sets the output slider step size (otptSldrStpSize) attribute value.
Definition ButtonToSwitch_ESP32.cpp:2378
bool getOtptCurValIsMax()
Returns a boolean value indicating if the "Output Current Value" equals the maximum limit.
Definition ButtonToSwitch_ESP32.cpp:2300
SldrDALtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0, const uint16_t initVal=0xFFFF)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:2271
void setSwpDirOnPrss(const bool &newVal)
Sets the value of the "Auto-Swap Direction On Press" (autoSwpDirOnPrss) attribute.
Definition ButtonToSwitch_ESP32.cpp:2481
bool setOtptValMin(const uint16_t &newVal)
Sets the output current value register minimum value attribute (otptValMin attribute).
Definition ButtonToSwitch_ESP32.cpp:2418
uint16_t getOtptValMin()
Returns the bottom output current value register setting.
Definition ButtonToSwitch_ESP32.cpp:2325
unsigned long getOtptSldrSpd()
Returns the current setting for the Output Slider Speed value.
Definition ButtonToSwitch_ESP32.cpp:2310
uint16_t getOtptSldrStpSize()
Returns the current setting for the Output Slider Step Size value.
Definition ButtonToSwitch_ESP32.cpp:2315
void setSwpDirOnEnd(const bool &newVal)
Sets the value of the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) attribute.
Definition ButtonToSwitch_ESP32.cpp:2474
Models a Single Service Voidable DD-MPB a.k.a. Trigger switch (SSVDD-MPB)
Definition ButtonToSwitch_ESP32.h:1686
virtual void setTaskWhileOn(const TaskHandle_t &newTaskHandle)
Sets the task to be run while the object is in the On state.
Definition ButtonToSwitch_ESP32.cpp:3138
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:3116
SnglSrvcVdblMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:3104
virtual ~SnglSrvcVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:3112
Models a Toggle Latch DD-MPB, a.k.a. a Toggle Switch (ToLDD-MPB).
Definition ButtonToSwitch_ESP32.h:664
TgglLtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:1135
Models a Timer Latch DD-MPB, a.k.a. Timer Switch (TiLDD-MPB).
Definition ButtonToSwitch_ESP32.h:688
const unsigned long int getSrvcTime() const
Returns the configured Service Time.
Definition ButtonToSwitch_ESP32.cpp:1192
void setTmerRstbl(const bool &newIsRstbl)
Configures the timer for the Service Time to be reseted before it reaches unlatching time.
Definition ButtonToSwitch_ESP32.cpp:1213
bool setSrvcTime(const unsigned long int &newSrvcTime)
Sets a new value to the Service Time attribute.
Definition ButtonToSwitch_ESP32.cpp:1197
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1181
TmLtchMPBttn(const uint8_t &mpbttnPin, const unsigned long int &svcTime, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:1173
Models a Time Voidable DD-MPB, a.k.a. Anti-tampering switch (TVDD-MPB)
Definition ButtonToSwitch_ESP32.h:1617
virtual ~TmVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:3005
void clrStatus()
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:3031
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:3009
TmVdblMPBttn(const uint8_t &mpbttnPin, unsigned long int voidTime, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0, const bool &isOnDisabled=false)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:3000
const unsigned long int getVoidTime() const
Returns the voidTime attribute current value.
Definition ButtonToSwitch_ESP32.cpp:3042
bool setVoidTime(const unsigned long int &newVoidTime)
Sets a new value to the Void Time attribute.
Definition ButtonToSwitch_ESP32.cpp:3047
Abstract class, base to model Voidable DD-MPBs (VDD-MPB).
Definition ButtonToSwitch_ESP32.h:1461
bool setIsVoided()
Sets the value of the isVoided attribute flag to true.
Definition ButtonToSwitch_ESP32.cpp:2715
const bool getIsVoided() const
Returns the current value of the isVoided attribute flag.
Definition ButtonToSwitch_ESP32.cpp:2622
fncPtrType getFnWhnTrnOnVdd()
Returns the function that is set to execute every time the object enters the Voided or "Voided On" St...
Definition ButtonToSwitch_ESP32.cpp:2612
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2594
void setFnWhnTrnOnVddPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object's isVoided attribute flag is s...
Definition ButtonToSwitch_ESP32.cpp:2687
virtual ~VdblMPBttn()
Default virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2590
fncPtrType getFnWhnTrnOffVdd()
Returns the function that is set to execute every time the object exits the Voided State.
Definition ButtonToSwitch_ESP32.cpp:2607
void setFnWhnTrnOffVddPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object's isVoided attribute flag is r...
Definition ButtonToSwitch_ESP32.cpp:2674
bool getFrcOtptLvlWhnVdd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch_ESP32.cpp:2617
bool getStOnWhnOtpFrcd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch_ESP32.cpp:2627
bool setIsNotVoided()
Sets the value of the isVoided attribute flag to false.
Definition ButtonToSwitch_ESP32.cpp:2710
VdblMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0, const bool &isOnDisabled=false)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:2584
Models an External Unlatch LDD-MPB, a.k.a. Emergency Latched Switch (XULDD-MPB)
Definition ButtonToSwitch_ESP32.h:930
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1726
XtrnUnltchMPBttn(const uint8_t &mpbttnPin, DbncdDlydMPBttn *unLtchBttn, const bool &pulledUp, const bool &typeNO, const unsigned long int &dbncTimeOrigSett, const unsigned long int &strtDelay)
Class constructor.
Definition ButtonToSwitch_ESP32.cpp:1686
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1698
Type to hold the complete set of output attribute flags from any DbncdMPBttn class and subclasses obj...
Definition ButtonToSwitch_ESP32.h:61