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 GPIO_NUM_NC
43#define _maxValidPinNum GPIO_NUM_MAX-1
46const uint8_t IsOnBitPos {0};
47const uint8_t IsEnabledBitPos{1};
48const uint8_t PilotOnBitPos{2};
49const uint8_t WrnngOnBitPos{3};
50const uint8_t IsVoidedBitPos{4};
51const uint8_t IsOnScndryBitPos{5};
52const uint8_t OtptCurValBitPos{16};
75typedef void (*fncPtrType)();
76typedef fncPtrType (*ptrToTrnFnc)();
105 const unsigned long int _stdMinDbncTime {_HwMinDbncTime};
110 unsigned long int _dbncTimeOrigSett{};
112 bool _beginDisabled{
false};
113 unsigned long int _dbncRlsTimerStrt{0};
114 unsigned long int _dbncRlsTimeTempSett{0};
115 unsigned long int _dbncTimerStrt{0};
116 unsigned long int _dbncTimeTempSett{0};
117 fncPtrType _fnWhnTrnOff{
nullptr};
118 fncPtrType _fnWhnTrnOn{
nullptr};
119 bool _isEnabled{
true};
120 volatile bool _isOn{
false};
121 bool _isOnDisabled{
false};
122 volatile bool _isPressed{
false};
123 fdaDmpbStts _mpbFdaState {stOffNotVPP};
124 TimerHandle_t _mpbPollTmrHndl {NULL};
125 String _mpbPollTmrName {
""};
126 bool _outputsChange {
false};
127 uint32_t _outputsChangeCnt{0};
128 bool _outputsChngTskTrggr{
false};
129 bool _prssRlsCcl{
false};
130 unsigned long int _strtDelay {0};
131 bool _sttChng {
true};
132 TaskHandle_t _taskToNotifyHndl {NULL};
133 TaskHandle_t _taskWhileOnHndl{NULL};
134 volatile bool _validDisablePend{
false};
135 volatile bool _validEnablePend{
false};
136 volatile bool _validPressPend{
false};
137 volatile bool _validReleasePend{
false};
140 const bool getIsPressed()
const;
141 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
142 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
143 void _setIsEnabled(
const bool &newEnabledValue);
147 virtual void updFdaState();
149 virtual bool updValidPressesStatus();
150 const bool getOutputsChngTskTrggr()
const;
151 void resetOutputsChngTskTrggr();
168 DbncdMPBttn(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0);
185 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
352 bool init(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0);
410 bool setDbncTime(
const unsigned long int &newDbncTime);
504 DbncdDlydMPBttn(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
513 bool init(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
523 void setStrtDelay(
const unsigned long int &newStrtDelay);
558 bool _isLatched{
false};
559 fdaLmpbStts _mpbFdaState {stOffNotVPP};
560 bool _trnOffASAP{
true};
561 volatile bool _validUnlatchPend{
false};
562 volatile bool _validUnlatchRlsPend{
false};
564 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
566 virtual void stDisabled_In(){};
567 virtual void stDisabled_Out(){};
568 virtual void stLtchNVUP_Do(){};
569 virtual void stOffNotVPP_In(){};
570 virtual void stOffNotVPP_Out(){};
571 virtual void stOffNVURP_Do(){};
572 virtual void stOffVPP_Out(){};
573 virtual void stOffVURP_Out(){};
574 virtual void stOnNVRP_Do(){};
575 virtual void updFdaState();
576 virtual void updValidUnlatchStatus() = 0;
587 LtchMPBttn(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
591 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
683 virtual void stOffNVURP_Do();
684 virtual void updValidUnlatchStatus();
696 TgglLtchMPBttn(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
712 bool _tmRstbl {
true};
713 unsigned long int _srvcTime {};
714 unsigned long int _srvcTimerStrt{0};
716 virtual void stOffNotVPP_Out();
717 virtual void stOffVPP_Out();
718 virtual void updValidUnlatchStatus();
732 TmLtchMPBttn(
const int8_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);
753 bool setSrvcTime(
const unsigned long int &newSrvcTime);
778 void (*_fnWhnTrnOffPilot)() {
nullptr};
779 void (*_fnWhnTrnOffWrnng)() {
nullptr};
780 void (*_fnWhnTrnOnPilot)() {
nullptr};
781 void (*_fnWhnTrnOnWrnng)() {
nullptr};
782 bool _keepPilot{
false};
783 volatile bool _pilotOn{
false};
784 unsigned long int _wrnngMs{0};
785 volatile bool _wrnngOn {
false};
786 unsigned int _wrnngPrctg {0};
788 bool _validWrnngSetPend{
false};
789 bool _validWrnngResetPend{
false};
790 bool _validPilotSetPend{
false};
791 bool _validPilotResetPend{
false};
793 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
794 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
795 virtual void stDisabled_In();
796 virtual void stLtchNVUP_Do();
797 virtual void stOffNotVPP_In();
798 virtual void stOffVPP_Out();
799 virtual void stOnNVRP_Do();
800 void _turnOffPilot();
801 void _turnOffWrnng();
819 HntdTmLtchMPBttn(
const int8_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);
823 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
937 bool setSrvcTime(
const unsigned long int &newSvcTime);
965 bool _xtrnUnltchPRlsCcl {
false};
967 virtual void stOffNVURP_Do();
968 virtual void updValidUnlatchStatus();
989 const bool &pulledUp,
const bool &typeNO,
const unsigned long int &dbncTimeOrigSett,
const unsigned long int &strtDelay);
998 const bool &pulledUp,
const bool &typeNO,
const unsigned long int &dbncTimeOrigSett,
const unsigned long int &strtDelay);
1003 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1051 volatile bool _isOnScndry{
false};
1052 fdaDALmpbStts _mpbFdaState {stOffNotVPP};
1053 unsigned long _scndModActvDly {2000};
1054 unsigned long _scndModTmrStrt {0};
1055 bool _validScndModPend{
false};
1057 void (*_fnWhnTrnOffScndry)() {
nullptr};
1058 void (*_fnWhnTrnOnScndry)() {
nullptr};
1059 TaskHandle_t _taskWhileOnScndryHndl{NULL};
1061 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
1062 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1063 virtual void stDisabled_In(){};
1064 virtual void stOnEndScndMod_Out(){};
1065 virtual void stOnScndMod_Do() = 0;
1066 virtual void stOnStrtScndMod_In(){};
1067 virtual void _turnOffScndry();
1068 virtual void _turnOnScndry();
1069 virtual void updFdaState();
1070 virtual bool updValidPressesStatus();
1071 virtual void updValidUnlatchStatus();
1084 DblActnLtchMPBttn(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
1093 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1207 virtual void stOnEndScndMod_Out();
1208 virtual void stOnScndMod_Do();
1209 virtual void stOnStrtScndMod_In();
1221 DDlydDALtchMPBttn(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
1254 bool _autoSwpDirOnEnd{
true};
1255 bool _autoSwpDirOnPrss{
false};
1256 bool _curSldrDirUp{
true};
1257 uint16_t _initOtptCurVal{};
1258 uint16_t _otptCurVal{};
1259 unsigned long _otptSldrSpd{1};
1260 uint16_t _otptSldrStpSize{0x01};
1261 uint16_t _otptValMax{0xFFFF};
1262 uint16_t _otptValMin{0x0000};
1264 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1265 bool _setSldrDir(
const bool &newVal);
1266 void stOnEndScndMod_Out();
1267 virtual void stOnScndMod_Do();
1268 virtual void stOnStrtScndMod_In();
1282 SldrDALtchMPBttn(
const int8_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);
1513 void setFrcdOtptWhnVdd(
const bool &newVal);
1514 void setStOnWhnOtpFrcd(
const bool &newVal);
1533 fdaVmpbStts _mpbFdaState {stOffNotVPP};
1535 void (*_fnWhnTrnOffVdd)() {
nullptr};
1536 void (*_fnWhnTrnOnVdd)() {
nullptr};
1537 bool _frcOtptLvlWhnVdd {
true};
1538 bool _isVoided{
false};
1539 bool _stOnWhnOtptFrcd{
false};
1540 bool _validVoidPend{
false};
1541 bool _validUnvoidPend{
false};
1543 static void mpbPollCallback(TimerHandle_t mpbTmrCb);
1544 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1545 bool setVoided(
const bool &newVoidValue);
1546 virtual void stDisabled_In();
1547 virtual void stDisabled_Out();
1548 virtual void stOffNotVPP_In(){};
1549 virtual void stOffVddNVUP_Do(){};
1550 virtual void stOffVPP_Do(){};
1553 virtual void updFdaState();
1554 virtual bool updVoidStatus() = 0;
1567 VdblMPBttn(
const int8_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);
1673 unsigned long int _voidTime;
1674 unsigned long int _voidTmrStrt{0};
1676 virtual void stOffNotVPP_In();
1677 virtual void stOffVddNVUP_Do();
1678 virtual void stOffVPP_Do();
1679 bool updIsPressed();
1680 virtual bool updVoidStatus();
1693 TmVdblMPBttn(
const int8_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);
1701 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1724 bool setVoidTime(
const unsigned long int &newVoidTime);
1747 virtual void stOffVddNVUP_Do();
1748 virtual bool updVoidStatus();
1760 SnglSrvcVdblMPBttn(
const int8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0,
const unsigned long int &strtDelay = 0);
1768 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:1205
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2241
~DDlydDALtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2237
DDlydDALtchMPBttn()
Default class constructor.
Definition ButtonToSwitch_ESP32.cpp:2228
Abstract class, base to model Double Action LDD-MPBs (DALDD-MPBs).
Definition ButtonToSwitch_ESP32.h:1036
bool setScndModActvDly(const unsigned long &newVal)
Sets a new value for the scndModActvDly class attribute.
Definition ButtonToSwitch_ESP32.cpp:1921
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:1910
const TaskHandle_t getTaskWhileOnScndry()
Returns the task to be run while the object is in the Secondary On state.
Definition ButtonToSwitch_ESP32.cpp:1855
fncPtrType getFnWhnTrnOnScndry()
Returns the function that is set to execute every time the object enters the Secondary On State.
Definition ButtonToSwitch_ESP32.cpp:1840
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1821
bool getIsOnScndry()
Returns the current value of the isOnScndry attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1845
DblActnLtchMPBttn()
Abstract Class default constructor.
Definition ButtonToSwitch_ESP32.cpp:1779
void setTaskWhileOnScndry(const TaskHandle_t &newTaskHandle)
Sets the task to be run while the object is in the On state.
Definition ButtonToSwitch_ESP32.cpp:1937
unsigned long getScndModActvDly()
Returns the current value of the scndModActvDly class attribute.
Definition ButtonToSwitch_ESP32.cpp:1850
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1792
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:1900
fncPtrType getFnWhnTrnOffScndry()
returns the function that is set to execute every time the object enters the Secondary Off State.
Definition ButtonToSwitch_ESP32.cpp:1835
~DblActnLtchMPBttn()
Virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:1788
Models a Debounced Delayed MPB (DD-MPB).
Definition ButtonToSwitch_ESP32.h:488
DbncdDlydMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:764
void setStrtDelay(const unsigned long int &newStrtDelay)
Sets a new value to the "Start Delay" strtDelay attribute.
Definition ButtonToSwitch_ESP32.cpp:785
bool init(const int8_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 int8_t, const bool, const bool, const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:775
Base class, models a Debounced Momentary Push Button (D-MPB).
Definition ButtonToSwitch_ESP32.h:96
void setBeginDisabled(const bool &newBeginDisabled=false)
Sets the starting isDisabled state.
Definition ButtonToSwitch_ESP32.cpp:364
void setFnWhnTrnOffPtr(fncPtrType newFnWhnTrnOff)
Sets the function that will be called to execute every time the object enters the Off State.
Definition ButtonToSwitch_ESP32.cpp:387
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:330
void clrStatus(bool clrIsOn=true)
Clears and resets flags, timers and counters modified through the object's signals processing.
Definition ButtonToSwitch_ESP32.cpp:98
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:306
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:64
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:507
void setIsOnDisabled(const bool &newIsOnDisabled)
Sets the value of the isOnDisabled attribute flag.
Definition ButtonToSwitch_ESP32.cpp:432
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:69
void resetDbncTime()
Resets the debounce process time of the object to the value used at instantiation.
Definition ButtonToSwitch_ESP32.cpp:324
DbncdMPBttn()
Default class constructor.
Definition ButtonToSwitch_ESP32.cpp:38
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:348
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
bool init(const int8_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
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:484
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
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
void setFnWhnTrnOnPtr(fncPtrType newFnWhnTrnOn)
Sets the function that will be called to execute every time the object enters the On State.
Definition ButtonToSwitch_ESP32.cpp:399
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:452
bool setDbncTime(const unsigned long int &newDbncTime)
Sets the debounce process time.
Definition ButtonToSwitch_ESP32.cpp:371
Models a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB).
Definition ButtonToSwitch_ESP32.h:776
bool setSrvcTime(const unsigned long int &newSvcTime)
See TmLtchMPBttn::setSrvcTime(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1463
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:1341
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:1419
fncPtrType getFnWhnTrnOffWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch_ESP32.cpp:1336
const bool getWrnngOn() const
Returns the current value of the warningOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1356
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:1430
const bool getPilotOn() const
Returns the current value of the pilotOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1351
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1311
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:1331
HntdTmLtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:1272
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:1441
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:1478
fncPtrType getFnWhnTrnOnWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch_ESP32.cpp:1346
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1282
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:1408
void setKeepPilot(const bool &newKeepPilot)
Sets the configuration of the keepPilot service attribute.
Definition ButtonToSwitch_ESP32.cpp:1452
Abstract class, base to model Latched Debounced Delayed MPBs (LDD-MPB).
Definition ButtonToSwitch_ESP32.h:544
const bool getIsLatched() const
Returns the value of the isLatched attribute flag, indicating the Latched or Unlatched condition of t...
Definition ButtonToSwitch_ESP32.cpp:849
bool unlatch()
Sets the values of the flags needed to unlatch a latched MPB.
Definition ButtonToSwitch_ESP32.cpp:936
const bool getUnlatchRlsPend() const
Returns the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:864
const bool getUnlatchPend() const
Returns the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:859
void setUnlatchPend(const bool &newVal)
Sets the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:914
void setTrnOffASAP(const bool &newVal)
Sets the value of the trnOffASAP attribute.
Definition ButtonToSwitch_ESP32.cpp:903
bool getTrnOffASAP()
Returns the value of the trnOffASAP attribute flag.
Definition ButtonToSwitch_ESP32.cpp:854
void setUnlatchRlsPend(const bool &newVal)
Sets the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:925
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:807
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:836
LtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:798
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:1251
void clrStatus(bool clrIsOn=true)
Definition ButtonToSwitch_ESP32.cpp:2289
bool setOtptSldrSpd(const uint16_t &newVal)
Sets the output slider speed (otptSldrSpd) attribute.
Definition ButtonToSwitch_ESP32.cpp:2365
uint16_t getOtptValMax()
Returns the top output current value register setting.
Definition ButtonToSwitch_ESP32.cpp:2327
bool getOtptCurValIsMin()
Returns the result of comparing the Output Current Value to the Minimum value setting
Definition ButtonToSwitch_ESP32.cpp:2312
bool setSldrDirDn()
Sets the value of the curSldrDirUp attribute to false.
Definition ButtonToSwitch_ESP32.cpp:2463
bool setOtptValMax(const uint16_t &newVal)
Sets the output current value register maximum value attribute (otptValMax attribute).
Definition ButtonToSwitch_ESP32.cpp:2397
bool swapSldrDir()
Inverts the current curSldrDirUp attribute value.
Definition ButtonToSwitch_ESP32.cpp:2560
~SldrDALtchMPBttn()
Virtual class destructor.
Definition ButtonToSwitch_ESP32.cpp:2285
bool setOtptCurVal(const uint16_t &newVal)
Sets the output current value register.
Definition ButtonToSwitch_ESP32.cpp:2349
uint16_t getOtptCurVal()
Returns the Output Current Value (otpCurVal) attribute.
Definition ButtonToSwitch_ESP32.cpp:2302
bool setSldrDirUp()
Sets the value of the curSldrDirUp attribute to true.
Definition ButtonToSwitch_ESP32.cpp:2468
SldrDALtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:2275
bool getSldrDirUp()
Returns the value of the curSldrDirUp attribute.
Definition ButtonToSwitch_ESP32.cpp:2337
bool setOtptSldrStpSize(const uint16_t &newVal)
Sets the output slider step size (otptSldrStpSize) attribute value.
Definition ButtonToSwitch_ESP32.cpp:2381
bool getOtptCurValIsMax()
Returns a boolean value indicating if the "Output Current Value" equals the maximum limit.
Definition ButtonToSwitch_ESP32.cpp:2307
void setSwpDirOnPrss(const bool &newVal)
Sets the value of the "Auto-Swap Direction On Press" (autoSwpDirOnPrss) attribute.
Definition ButtonToSwitch_ESP32.cpp:2480
bool setOtptValMin(const uint16_t &newVal)
Sets the output current value register minimum value attribute (otptValMin attribute).
Definition ButtonToSwitch_ESP32.cpp:2419
uint16_t getOtptValMin()
Returns the bottom output current value register setting.
Definition ButtonToSwitch_ESP32.cpp:2332
unsigned long getOtptSldrSpd()
Returns the current setting for the Output Slider Speed value.
Definition ButtonToSwitch_ESP32.cpp:2317
uint16_t getOtptSldrStpSize()
Returns the current setting for the Output Slider Step Size value.
Definition ButtonToSwitch_ESP32.cpp:2322
void setSwpDirOnEnd(const bool &newVal)
Sets the value of the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) attribute.
Definition ButtonToSwitch_ESP32.cpp:2473
Models a Single Service Voidable DD-MPB a.k.a. Trigger switch (SSVDD-MPB)
Definition ButtonToSwitch_ESP32.h:1744
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:3127
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:3100
virtual ~SnglSrvcVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:3096
SnglSrvcVdblMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:3084
Models a Toggle Latch DD-MPB, a.k.a. a Toggle Switch (ToLDD-MPB).
Definition ButtonToSwitch_ESP32.h:681
TgglLtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:1144
Models a Timer Latch DD-MPB, a.k.a. Timer Switch (TiLDD-MPB).
Definition ButtonToSwitch_ESP32.h:710
TmLtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:1186
const unsigned long int getSrvcTime() const
Returns the configured Service Time.
Definition ButtonToSwitch_ESP32.cpp:1209
void setTmerRstbl(const bool &newIsRstbl)
Configures the timer for the Service Time to be reseted before it reaches unlatching time.
Definition ButtonToSwitch_ESP32.cpp:1230
bool setSrvcTime(const unsigned long int &newSrvcTime)
Sets a new value to the Service Time attribute.
Definition ButtonToSwitch_ESP32.cpp:1214
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1198
Models a Time Voidable DD-MPB, a.k.a. Anti-tampering switch (TVDD-MPB)
Definition ButtonToSwitch_ESP32.h:1671
TmVdblMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:2971
virtual ~TmVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2980
void clrStatus()
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:3011
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:2984
const unsigned long int getVoidTime() const
Returns the voidTime attribute current value.
Definition ButtonToSwitch_ESP32.cpp:3022
bool setVoidTime(const unsigned long int &newVoidTime)
Sets a new value to the Void Time attribute.
Definition ButtonToSwitch_ESP32.cpp:3027
Abstract class, base to model Voidable DD-MPBs (VDD-MPB).
Definition ButtonToSwitch_ESP32.h:1511
bool setIsVoided()
Sets the value of the isVoided attribute flag to true.
Definition ButtonToSwitch_ESP32.cpp:2699
const bool getIsVoided() const
Returns the current value of the isVoided attribute flag.
Definition ButtonToSwitch_ESP32.cpp:2608
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:2598
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2581
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:2672
virtual ~VdblMPBttn()
Default virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2577
VdblMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:2567
fncPtrType getFnWhnTrnOffVdd()
Returns the function that is set to execute every time the object exits the Voided State.
Definition ButtonToSwitch_ESP32.cpp:2593
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:2660
bool getFrcOtptLvlWhnVdd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch_ESP32.cpp:2603
bool getStOnWhnOtpFrcd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch_ESP32.cpp:2613
bool setIsNotVoided()
Sets the value of the isVoided attribute flag to false.
Definition ButtonToSwitch_ESP32.cpp:2694
Models an External Unlatch LDD-MPB, a.k.a. Emergency Latched Switch (XULDD-MPB)
Definition ButtonToSwitch_ESP32.h:962
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1732
XtrnUnltchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:1683
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1699
Type to hold the complete set of output attribute flags from any DbncdMPBttn class and subclasses obj...
Definition ButtonToSwitch_ESP32.h:62