| ButtonToSwitch Library for ESP32 (Arduino) v4.2.0 A library that provides elaborated switch mechanism behavior simulation for digital signals inputs

Loading...
Searching...
No Matches
ButtonToSwitch_ESP32.h
Go to the documentation of this file.
1
33#ifndef _BUTTONTOSWITCH_ESP32_H_
34#define _BUTTONTOSWITCH_ESP32_H_
35
36#include <Arduino.h>
37#include <stdint.h>
38
39#define _HwMinDbncTime 20 //Documented minimum wait time for a MPB signal to stabilize
40#define _StdPollDelay 10
41#define _MinSrvcTime 100
42#define _InvalidPinNum 0xFF // Value to give as "yet to be defined", the "Valid pin number" range and characteristics are development platform and environment related
43
44/*---------------- xTaskNotify() mechanism related constants, argument structs, information packing and unpacking BEGIN -------*/
45 const uint8_t IsOnBitPos {0};
46 const uint8_t IsEnabledBitPos{1};
47 const uint8_t PilotOnBitPos{2};
48 const uint8_t WrnngOnBitPos{3};
49 const uint8_t IsVoidedBitPos{4};
50 const uint8_t IsOnScndryBitPos{5};
51 const uint8_t OtptCurValBitPos{16};
52
53#ifndef MPBOTPTS_T
54 #define MPBOTPTS_T
61 struct MpbOtpts_t{
62 bool isOn;
63 bool isEnabled;
64 bool pilotOn;
65 bool wrnngOn;
66 bool isVoided;
67 bool isOnScndry;
68 uint16_t otptCurVal;
69 };
70#endif
71/*---------------- xTaskNotify() mechanism related constants, argument structs, information packing and unpacking END -------*/
72
73// Definition workaround to let a function/method return value to be a function pointer
74 typedef void (*fncPtrType)();
75 typedef fncPtrType (*ptrToTrnFnc)();
76
77//===========================>> BEGIN General use function prototypes
78 MpbOtpts_t otptsSttsUnpkg(uint32_t pkgOtpts);
79//===========================>> END General use function prototypes
80
81//===========================>> BEGIN General use Global variables
82//===========================>> END General use Global variables
83
84//==========================================================>> Classes declarations BEGIN
85
95 class DbncdMPBttn{
96 protected:
97 enum fdaDmpbStts {
98 stOffNotVPP,
99 stOffVPP,
100 stOn,
101 stOnVRP,
102 stDisabled
103 };
104 const unsigned long int _stdMinDbncTime {_HwMinDbncTime};
105
106 uint8_t _mpbttnPin{};
107 bool _pulledUp{};
108 bool _typeNO{};
109 unsigned long int _dbncTimeOrigSett{};
110
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}; //FreeRTOS returns NULL if creation fails (not nullptr)
123 String _mpbPollTmrName {""};
124 /*volatile*/ 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};
136
137 void clrSttChng();
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);
142 void setSttChng();
143 void _turnOff();
144 void _turnOn();
145 virtual void updFdaState();
146 bool updIsPressed();
147 virtual bool updValidPressesStatus();
148 const bool getOutputsChngTskTrggr() const;
149 void resetOutputsChngTskTrggr();
150
151 public:
156 DbncdMPBttn();
166 DbncdMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp = true, const bool &typeNO = true, const unsigned long int &dbncTimeOrigSett = 0);
171 virtual ~DbncdMPBttn();
183 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
194 void clrStatus(bool clrIsOn = true);
205 void disable();
214 void enable();
224 bool end();
232 const unsigned long int getCurDbncTime() const;
243 fncPtrType getFnWhnTrnOff();
254 fncPtrType getFnWhnTrnOn();
263 const bool getIsEnabled() const;
272 const bool getIsOn () const;
284 const bool getIsOnDisabled() const;
292 const uint32_t getOtptsSttsPkgd();
303 const bool getOutputsChange() const;
312 // const bool getOutputsChngTskTrggr() const;
322 unsigned long int getStrtDelay();
333 const TaskHandle_t getTaskToNotify() const;
344 const TaskHandle_t getTaskWhileOn();
350 bool init(const uint8_t &mpbttnPin, const bool &pulledUp = true, const bool &typeNO = true, const unsigned long int &dbncTimeOrigSett = 0);
359 bool pause();
365 void resetDbncTime();
371 void resetFda();
377 // void resetOutputsChngTskTrggr();
388 bool resume();
400 bool setDbncTime(const unsigned long int &newDbncTime);
408 void setFnWhnTrnOffPtr(void(*newFnWhnTrnOff)());
416 void setFnWhnTrnOnPtr(void (*newFnWhnTrnOn)());
427 void setIsOnDisabled(const bool &newIsOnDisabled);
435 void setOutputsChange(bool newOutputsChange);
445 void setTaskToNotify(const TaskHandle_t &newTaskHandle);
461 virtual void setTaskWhileOn(const TaskHandle_t &newTaskHandle);
462};
463
464//==========================================================>>
465
475 class DbncdDlydMPBttn: public DbncdMPBttn{
476 public:
481 DbncdDlydMPBttn();
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);
511};
512
513//==========================================================>>
514
531 class LtchMPBttn: public DbncdDlydMPBttn{
532 protected:
533 enum fdaLmpbStts {
534 stOffNotVPP,
535 stOffVPP,
536 stOnNVRP,
537 stOnVRP,
538 stLtchNVUP,
539 stLtchdVUP,
540 stOffVUP,
541 stOffNVURP,
542 stOffVURP,
543 stDisabled
544 };
545 bool _isLatched{false};
546 fdaLmpbStts _mpbFdaState {stOffNotVPP};
547 bool _trnOffASAP{true};
548 volatile bool _validUnlatchPend{false};
549 volatile bool _validUnlatchRlsPend{false};
550
551 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
552
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;
564 public:
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);
578 void clrStatus(bool clrIsOn = true);
587 const bool getIsLatched() const;
597 bool getTrnOffASAP();
605 const bool getUnlatchPend() const;
613 const bool getUnlatchRlsPend() const;
625 void setTrnOffASAP(const bool &newVal);
633 void setUnlatchPend(const bool &newVal);
641 void setUnlatchRlsPend(const bool &newVal);
652 bool unlatch();
653};
654
655//==========================================================>>
656
664 class TgglLtchMPBttn: public LtchMPBttn{
665 protected:
666 virtual void stOffNVURP_Do();
667 virtual void updValidUnlatchStatus();
668 public:
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);
675};
676
677//==========================================================>>
678
688 class TmLtchMPBttn: public LtchMPBttn{
689 protected:
690 bool _tmRstbl {true};
691 unsigned long int _srvcTime {};
692 unsigned long int _srvcTimerStrt{0};
693
694 virtual void stOffNotVPP_Out();
695 virtual void stOffVPP_Out();
696 virtual void updValidUnlatchStatus();
697 public:
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);
709 void clrStatus(bool clrIsOn = true);
715 const unsigned long int getSrvcTime() const;
726 bool setSrvcTime(const unsigned long int &newSrvcTime);
734 void setTmerRstbl(const bool &newIsRstbl);
735};
736
737//==========================================================>>
738
749 class HntdTmLtchMPBttn: public TmLtchMPBttn{
750 protected:
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};
760
761 bool _validWrnngSetPend{false};
762 bool _validWrnngResetPend{false};
763 bool _validPilotSetPend{false};
764 bool _validPilotResetPend{false};
765
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();
775 void _turnOnPilot();
776 void _turnOnWrnng();
777 bool updPilotOn();
778 bool updWrnngOn();
779 public:
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);
795 void clrStatus(bool clrIsOn = true);
806 fncPtrType getFnWhnTrnOffPilot();
817 fncPtrType getFnWhnTrnOffWrnng();
828 fncPtrType getFnWhnTrnOnPilot();
839 fncPtrType getFnWhnTrnOnWrnng();
849 const bool getPilotOn() const;
861 const bool getWrnngOn() const;
869 void setFnWhnTrnOffPilotPtr(void(*newFnWhnTrnOff)());
877 void setFnWhnTrnOffWrnngPtr(void(*newFnWhnTrnOff)());
885 void setFnWhnTrnOnPilotPtr(void(*newFnWhnTrnOn)());
893 void setFnWhnTrnOnWrnngPtr(void(*newFnWhnTrnOn)());
899 void setKeepPilot(const bool &newKeepPilot);
905 bool setSrvcTime(const unsigned long int &newSvcTime);
917 bool setWrnngPrctg (const unsigned int &newWrnngPrctg);
918};
919
920//==========================================================>>
921
930 class XtrnUnltchMPBttn: public LtchMPBttn{
931 protected:
932 DbncdDlydMPBttn* _unLtchBttn {nullptr};
933 bool _xtrnUnltchPRlsCcl {false};
934
935 virtual void stOffNVURP_Do();
936 virtual void updValidUnlatchStatus();
937 public:
951 XtrnUnltchMPBttn(const uint8_t &mpbttnPin, DbncdDlydMPBttn* unLtchBttn,
952 const bool &pulledUp, const bool &typeNO, const unsigned long int &dbncTimeOrigSett, const unsigned long int &strtDelay);
960 XtrnUnltchMPBttn(const uint8_t &mpbttnPin,
961 const bool &pulledUp, const bool &typeNO, const unsigned long int &dbncTimeOrigSett, const unsigned long int &strtDelay);
962
966 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
970 void clrStatus(bool clrIsOn = true);
971};
972
973//==========================================================>>
974
999 class DblActnLtchMPBttn: public LtchMPBttn{
1000 protected:
1001 enum fdaDALmpbStts{
1002 stOffNotVPP,
1003 stOffVPP,
1004 stOnMPBRlsd,
1005 //--------
1006 stOnStrtScndMod,
1007 stOnScndMod,
1008 stOnEndScndMod,
1009 //--------
1010 stOnTurnOff,
1011 //--------
1012 stDisabled
1013 };
1014 volatile bool _isOnScndry{false};
1015 fdaDALmpbStts _mpbFdaState {stOffNotVPP};
1016 unsigned long _scndModActvDly {2000};
1017 unsigned long _scndModTmrStrt {0};
1018 bool _validScndModPend{false};
1019
1020 void (*_fnWhnTrnOffScndry)() {nullptr};
1021 void (*_fnWhnTrnOnScndry)() {nullptr};
1022 TaskHandle_t _taskWhileOnScndryHndl{NULL};
1023
1024 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
1025 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1026 virtual void stDisabled_In(){};
1027 virtual void stOnEndScndMod_Out(){};
1028 virtual void stOnScndMod_Do() = 0;
1029 virtual void stOnStrtScndMod_In(){};
1030 virtual void _turnOffScndry();
1031 virtual void _turnOnScndry();
1032 virtual void updFdaState();
1033 virtual bool updValidPressesStatus();
1034 virtual void updValidUnlatchStatus();
1035
1036 public:
1042 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);
1046 ~DblActnLtchMPBttn();
1051 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
1055 void clrStatus(bool clrIsOn = true);
1064 fncPtrType getFnWhnTrnOffScndry();
1073 fncPtrType getFnWhnTrnOnScndry();
1081 bool getIsOnScndry();
1089 unsigned long getScndModActvDly();
1100 const TaskHandle_t getTaskWhileOnScndry();
1108 void setFnWhnTrnOffScndryPtr(void(*newFnWhnTrnOff)());
1116 void setFnWhnTrnOnScndryPtr(void (*newFnWhnTrnOn)());
1127 bool setScndModActvDly(const unsigned long &newVal);
1145 void setTaskWhileOnScndry(const TaskHandle_t &newTaskHandle);
1146
1147};
1148
1149//==========================================================>>
1150
1163 class DDlydDALtchMPBttn: public DblActnLtchMPBttn{
1164 protected:
1165 virtual void stOnEndScndMod_Out();
1166 virtual void stOnScndMod_Do();
1167 virtual void stOnStrtScndMod_In();
1168 public:
1174 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);
1178 ~DDlydDALtchMPBttn();
1182 void clrStatus(bool clrIsOn = true);
1183};
1184
1185//==========================================================>>
1186
1204 class SldrDALtchMPBttn: public DblActnLtchMPBttn{
1205
1206 protected:
1207 bool _autoSwpDirOnEnd{true}; // Changes slider direction automatically when reaches _otptValMax or _otptValMin
1208 bool _autoSwpDirOnPrss{false};// Changes slider direction each time it enters slider mode
1209 bool _curSldrDirUp{true};
1210 uint16_t _initOtptCurVal{};
1211 uint16_t _otptCurVal{};
1212 unsigned long _otptSldrSpd{1};
1213 uint16_t _otptSldrStpSize{0x01};
1214 uint16_t _otptValMax{0xFFFF};
1215 uint16_t _otptValMin{0x0000};
1216
1217 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1218 bool _setSldrDir(const bool &newVal);
1219 // virtual void stDisabled_In();
1220 void stOnEndScndMod_Out();
1221 virtual void stOnScndMod_Do();
1222 virtual void stOnStrtScndMod_In();
1223 public:
1231 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);
1235 ~SldrDALtchMPBttn();
1240 void clrStatus(bool clrIsOn = true);
1246 uint16_t getOtptCurVal();
1256 bool getOtptCurValIsMax();
1266 bool getOtptCurValIsMin();
1276 unsigned long getOtptSldrSpd();
1286 uint16_t getOtptSldrStpSize();
1292 uint16_t getOtptValMax();
1298 uint16_t getOtptValMin();
1308 bool getSldrDirUp();
1320 bool setOtptCurVal(const uint16_t &newVal);
1335 bool setOtptSldrSpd(const uint16_t &newVal);
1352 bool setOtptSldrStpSize(const uint16_t &newVal);
1368 bool setOtptValMax(const uint16_t &newVal);
1384 bool setOtptValMin(const uint16_t &newVal);
1397 bool setSldrDirDn();
1410 bool setSldrDirUp();
1420 void setSwpDirOnEnd(const bool &newVal);
1429 void setSwpDirOnPrss(const bool &newVal);
1437 bool swapSldrDir();
1438};
1439
1440//==========================================================>>
1441
1460 class VdblMPBttn: public DbncdDlydMPBttn{
1461 private:
1462 void setFrcdOtptWhnVdd(const bool &newVal);
1463 void setStOnWhnOtpFrcd(const bool &newVal);
1464 protected:
1465 enum fdaVmpbStts{
1466 stOffNotVPP,
1467 stOffVPP,
1468 stOnNVRP,
1469 //--------
1470 stOnVVP,
1471 stOnVddNVUP,
1472 stOffVddNVUP,
1473 stOffVddVUP,
1474 stOffUnVdd,
1475 //--------
1476 stOnVRP,
1477 stOnTurnOff,
1478 stOff,
1479 //--------
1480 stDisabled
1481 };
1482 fdaVmpbStts _mpbFdaState {stOffNotVPP};
1483
1484 void (*_fnWhnTrnOffVdd)() {nullptr};
1485 void (*_fnWhnTrnOnVdd)() {nullptr};
1486 bool _frcOtptLvlWhnVdd {true};
1487 bool _isVoided{false};
1488 bool _stOnWhnOtptFrcd{false};
1489 bool _validVoidPend{false};
1490 bool _validUnvoidPend{false};
1491
1492 static void mpbPollCallback(TimerHandle_t mpbTmrCb);
1493 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1494 bool setVoided(const bool &newVoidValue);
1495 virtual void stDisabled_In();
1496 virtual void stDisabled_Out();
1497 virtual void stOffNotVPP_In(){};
1498 virtual void stOffVddNVUP_Do(){}; //This provides a setting point for calculating the _validUnvoidPend
1499 virtual void stOffVPP_Do(){}; // This provides a setting point for the voiding mechanism to be started
1500 void _turnOffVdd();
1501 void _turnOnVdd();
1502 virtual void updFdaState();
1503 virtual bool updVoidStatus() = 0;
1504 public:
1512 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);
1516 virtual ~VdblMPBttn();
1520 void clrStatus(bool clrIsOn = true);
1529 fncPtrType getFnWhnTrnOffVdd();
1538 fncPtrType getFnWhnTrnOnVdd();
1548 bool getFrcOtptLvlWhnVdd();
1556 const bool getIsVoided() const;
1568 bool getStOnWhnOtpFrcd();
1576 void setFnWhnTrnOffVddPtr(void(*newFnWhnTrnOff)());
1584 void setFnWhnTrnOnVddPtr(void(*newFnWhnTrnOn)());
1595 bool setIsNotVoided();
1603 bool setIsVoided();
1604};
1605
1606//==========================================================>>
1607
1616 class TmVdblMPBttn: public VdblMPBttn{
1617 protected:
1618 unsigned long int _voidTime;
1619 unsigned long int _voidTmrStrt{0};
1620
1621 virtual void stOffNotVPP_In();
1622 virtual void stOffVddNVUP_Do(); //This provides a setting point for calculating the _validUnvoidPend
1623 virtual void stOffVPP_Do(); // This provides a setting point for the voiding mechanism to be started
1624 bool updIsPressed();
1625 virtual bool updVoidStatus();
1626 public:
1634 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);
1638 virtual ~TmVdblMPBttn();
1642 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
1646 void clrStatus();
1654 const unsigned long int getVoidTime() const;
1665 bool setVoidTime(const unsigned long int &newVoidTime);
1666};
1667
1668//==========================================================>>
1669
1685 class SnglSrvcVdblMPBttn: public VdblMPBttn{
1686 protected:
1687 virtual void setTaskWhileOn(const TaskHandle_t &newTaskHandle);
1688 virtual void stOffVddNVUP_Do(); //This provides the calculation for the _validUnvoidPend
1689 virtual bool updVoidStatus();
1690 public:
1696 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);
1700 virtual ~SnglSrvcVdblMPBttn();
1704 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
1705};
1706
1707//==========================================================>>
1708
1709#endif /*_BUTTONTOSWITCH_ESP32_H_*/
otptsSttsUnpkg
MpbOtpts_t otptsSttsUnpkg(uint32_t pkgOtpts)
Unpackages a 32-bit value into a DbncdMPBttn object status.
Definition ButtonToSwitch_ESP32.cpp:3095
DDlydDALtchMPBttn
Models a Debounced Delayed Double Action Latched MPB combo switch (Debounced Delayed DALDD-MPB - DD-D...
Definition ButtonToSwitch_ESP32.h:1163
DDlydDALtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2196
DDlydDALtchMPBttn::~DDlydDALtchMPBttn
~DDlydDALtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2192
DDlydDALtchMPBttn::DDlydDALtchMPBttn
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:2187
DblActnLtchMPBttn
Abstract class, base to model Double Action LDD-MPBs (DALDD-MPBs).
Definition ButtonToSwitch_ESP32.h:999
DblActnLtchMPBttn::setScndModActvDly
bool setScndModActvDly(const unsigned long &newVal)
Sets a new value for the scndModActvDly class attribute.
Definition ButtonToSwitch_ESP32.cpp:1880
DblActnLtchMPBttn::setFnWhnTrnOnScndryPtr
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:1869
DblActnLtchMPBttn::getTaskWhileOnScndry
const TaskHandle_t getTaskWhileOnScndry()
Returns the task to be run while the object is in the Secondary On state.
Definition ButtonToSwitch_ESP32.cpp:1814
DblActnLtchMPBttn::getFnWhnTrnOnScndry
fncPtrType getFnWhnTrnOnScndry()
Returns the function that is set to execute every time the object enters the Secondary On State.
Definition ButtonToSwitch_ESP32.cpp:1799
DblActnLtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1780
DblActnLtchMPBttn::getIsOnScndry
bool getIsOnScndry()
Returns the current value of the isOnScndry attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1804
DblActnLtchMPBttn::setTaskWhileOnScndry
void setTaskWhileOnScndry(const TaskHandle_t &newTaskHandle)
Sets the task to be run while the object is in the On state.
Definition ButtonToSwitch_ESP32.cpp:1896
DblActnLtchMPBttn::getScndModActvDly
unsigned long getScndModActvDly()
Returns the current value of the scndModActvDly class attribute.
Definition ButtonToSwitch_ESP32.cpp:1809
DblActnLtchMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1756
DblActnLtchMPBttn::setFnWhnTrnOffScndryPtr
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:1859
DblActnLtchMPBttn::getFnWhnTrnOffScndry
fncPtrType getFnWhnTrnOffScndry()
returns the function that is set to execute every time the object enters the Secondary Off State.
Definition ButtonToSwitch_ESP32.cpp:1794
DblActnLtchMPBttn::~DblActnLtchMPBttn
~DblActnLtchMPBttn()
Virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:1752
DblActnLtchMPBttn::DblActnLtchMPBttn
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:1747
DbncdDlydMPBttn
Models a Debounced Delayed MPB (DD-MPB).
Definition ButtonToSwitch_ESP32.h:475
DbncdDlydMPBttn::DbncdDlydMPBttn
DbncdDlydMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:759
DbncdDlydMPBttn::setStrtDelay
void setStrtDelay(const unsigned long int &newStrtDelay)
Sets a new value to the "Start Delay" strtDelay attribute.
Definition ButtonToSwitch_ESP32.cpp:780
DbncdDlydMPBttn::init
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:770
DbncdMPBttn
Base class, models a Debounced Momentary Push Button (D-MPB).
Definition ButtonToSwitch_ESP32.h:95
DbncdMPBttn::getFnWhnTrnOn
fncPtrType getFnWhnTrnOn()
Returns the function that is set to execute every time the object enters the On State.
Definition ButtonToSwitch_ESP32.cpp:164
DbncdMPBttn::resetFda
void resetFda()
Resets the MPB behavior automaton to it's Initial or Start State
Definition ButtonToSwitch_ESP32.cpp:330
DbncdMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
Clears and resets flags, timers and counters modified through the object's signals processing.
Definition ButtonToSwitch_ESP32.cpp:93
DbncdMPBttn::getCurDbncTime
const unsigned long int getCurDbncTime() const
Returns the current debounce period time set for the object.
Definition ButtonToSwitch_ESP32.cpp:154
DbncdMPBttn::getTaskWhileOn
const TaskHandle_t getTaskWhileOn()
Returns the task to be run (resumed) while the object is in the On state.
Definition ButtonToSwitch_ESP32.cpp:215
DbncdMPBttn::enable
void enable()
Enables the input signal processing.
Definition ButtonToSwitch_ESP32.cpp:131
DbncdMPBttn::pause
bool pause()
Pauses the software timer updating the computation of the object's internal flags value.
Definition ButtonToSwitch_ESP32.cpp:306
DbncdMPBttn::getTaskToNotify
const TaskHandle_t getTaskToNotify() const
Returns the task to be notified by the object when its output flags changes.
Definition ButtonToSwitch_ESP32.cpp:209
DbncdMPBttn::~DbncdMPBttn
virtual ~DbncdMPBttn()
Default virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:64
DbncdMPBttn::setTaskWhileOn
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:498
DbncdMPBttn::setIsOnDisabled
void setIsOnDisabled(const bool &newIsOnDisabled)
Sets the value of the isOnDisabled attribute flag.
Definition ButtonToSwitch_ESP32.cpp:423
DbncdMPBttn::init
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
DbncdMPBttn::end
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
DbncdMPBttn::begin
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
DbncdMPBttn::resetDbncTime
void resetDbncTime()
Resets the debounce process time of the object to the value used at instantiation.
Definition ButtonToSwitch_ESP32.cpp:324
DbncdMPBttn::DbncdMPBttn
DbncdMPBttn()
Default class constructor.
Definition ButtonToSwitch_ESP32.cpp:38
DbncdMPBttn::disable
void disable()
Disables the input signal processing, ignoring the changes of its values.
Definition ButtonToSwitch_ESP32.cpp:126
DbncdMPBttn::resume
bool resume()
Resets the outputs change task unblocking trigger (outputsChngTskTrggr) attribute flag.
Definition ButtonToSwitch_ESP32.cpp:348
DbncdMPBttn::getIsEnabled
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
DbncdMPBttn::getIsOnDisabled
const bool getIsOnDisabled() const
Returns the value of the isOnDisabled attribute flag.
Definition ButtonToSwitch_ESP32.cpp:179
DbncdMPBttn::setTaskToNotify
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:475
DbncdMPBttn::setFnWhnTrnOffPtr
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:380
DbncdMPBttn::getOutputsChange
const bool getOutputsChange() const
Returns the value of the outputsChange attribute flag.
Definition ButtonToSwitch_ESP32.cpp:194
DbncdMPBttn::getIsOn
const bool getIsOn() const
Returns the value of the isOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:174
DbncdMPBttn::setFnWhnTrnOnPtr
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:391
DbncdMPBttn::getStrtDelay
unsigned long int getStrtDelay()
Returns the current value of the outputs change task unblocking trigger (outputsChngTskTrggr) attribu...
Definition ButtonToSwitch_ESP32.cpp:199
DbncdMPBttn::getOtptsSttsPkgd
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
DbncdMPBttn::getFnWhnTrnOff
fncPtrType getFnWhnTrnOff()
Returns the function that is set to execute every time the object enters the Off State.
Definition ButtonToSwitch_ESP32.cpp:159
DbncdMPBttn::setOutputsChange
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:443
DbncdMPBttn::setDbncTime
bool setDbncTime(const unsigned long int &newDbncTime)
Sets the debounce process time.
Definition ButtonToSwitch_ESP32.cpp:364
HntdTmLtchMPBttn
Models a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB).
Definition ButtonToSwitch_ESP32.h:749
HntdTmLtchMPBttn::setSrvcTime
bool setSrvcTime(const unsigned long int &newSvcTime)
See TmLtchMPBttn::setSrvcTime(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1432
HntdTmLtchMPBttn::getFnWhnTrnOnPilot
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:1310
HntdTmLtchMPBttn::setFnWhnTrnOffWrnngPtr
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:1388
HntdTmLtchMPBttn::getFnWhnTrnOffWrnng
fncPtrType getFnWhnTrnOffWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch_ESP32.cpp:1305
HntdTmLtchMPBttn::getWrnngOn
const bool getWrnngOn() const
Returns the current value of the warningOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1325
HntdTmLtchMPBttn::setFnWhnTrnOnPilotPtr
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:1399
HntdTmLtchMPBttn::HntdTmLtchMPBttn
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:1250
HntdTmLtchMPBttn::getPilotOn
const bool getPilotOn() const
Returns the current value of the pilotOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1320
HntdTmLtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1280
HntdTmLtchMPBttn::getFnWhnTrnOffPilot
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:1300
HntdTmLtchMPBttn::setFnWhnTrnOnWrnngPtr
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:1410
HntdTmLtchMPBttn::setWrnngPrctg
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:1447
HntdTmLtchMPBttn::getFnWhnTrnOnWrnng
fncPtrType getFnWhnTrnOnWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch_ESP32.cpp:1315
HntdTmLtchMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1256
HntdTmLtchMPBttn::setFnWhnTrnOffPilotPtr
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:1377
HntdTmLtchMPBttn::setKeepPilot
void setKeepPilot(const bool &newKeepPilot)
Sets the configuration of the keepPilot service attribute.
Definition ButtonToSwitch_ESP32.cpp:1421
LtchMPBttn
Abstract class, base to model Latched Debounced Delayed MPBs (LDD-MPB).
Definition ButtonToSwitch_ESP32.h:531
LtchMPBttn::getIsLatched
const bool getIsLatched() const
Returns the value of the isLatched attribute flag, indicating the Latched or Unlatched condition of t...
Definition ButtonToSwitch_ESP32.cpp:835
LtchMPBttn::unlatch
bool unlatch()
Sets the values of the flags needed to unlatch a latched MPB.
Definition ButtonToSwitch_ESP32.cpp:922
LtchMPBttn::getUnlatchRlsPend
const bool getUnlatchRlsPend() const
Returns the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:850
LtchMPBttn::LtchMPBttn
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:793
LtchMPBttn::getUnlatchPend
const bool getUnlatchPend() const
Returns the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:845
LtchMPBttn::setUnlatchPend
void setUnlatchPend(const bool &newVal)
Sets the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:900
LtchMPBttn::setTrnOffASAP
void setTrnOffASAP(const bool &newVal)
Sets the value of the trnOffASAP attribute.
Definition ButtonToSwitch_ESP32.cpp:889
LtchMPBttn::getTrnOffASAP
bool getTrnOffASAP()
Returns the value of the trnOffASAP attribute flag.
Definition ButtonToSwitch_ESP32.cpp:840
LtchMPBttn::setUnlatchRlsPend
void setUnlatchRlsPend(const bool &newVal)
Sets the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:911
LtchMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:798
LtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:822
SldrDALtchMPBttn
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:1204
SldrDALtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
Definition ButtonToSwitch_ESP32.cpp:2240
SldrDALtchMPBttn::setOtptSldrSpd
bool setOtptSldrSpd(const uint16_t &newVal)
Sets the output slider speed (otptSldrSpd) attribute.
Definition ButtonToSwitch_ESP32.cpp:2316
SldrDALtchMPBttn::getOtptValMax
uint16_t getOtptValMax()
Returns the top output current value register setting.
Definition ButtonToSwitch_ESP32.cpp:2278
SldrDALtchMPBttn::getOtptCurValIsMin
bool getOtptCurValIsMin()
Returns the result of comparing the Output Current Value to the Minimum value setting
Definition ButtonToSwitch_ESP32.cpp:2263
SldrDALtchMPBttn::setSldrDirDn
bool setSldrDirDn()
Sets the value of the curSldrDirUp attribute to false.
Definition ButtonToSwitch_ESP32.cpp:2414
SldrDALtchMPBttn::setOtptValMax
bool setOtptValMax(const uint16_t &newVal)
Sets the output current value register maximum value attribute (otptValMax attribute).
Definition ButtonToSwitch_ESP32.cpp:2348
SldrDALtchMPBttn::swapSldrDir
bool swapSldrDir()
Inverts the current curSldrDirUp attribute value.
Definition ButtonToSwitch_ESP32.cpp:2511
SldrDALtchMPBttn::~SldrDALtchMPBttn
~SldrDALtchMPBttn()
Virtual class destructor.
Definition ButtonToSwitch_ESP32.cpp:2236
SldrDALtchMPBttn::setOtptCurVal
bool setOtptCurVal(const uint16_t &newVal)
Sets the output current value register.
Definition ButtonToSwitch_ESP32.cpp:2300
SldrDALtchMPBttn::getOtptCurVal
uint16_t getOtptCurVal()
Returns the Output Current Value (otpCurVal) attribute.
Definition ButtonToSwitch_ESP32.cpp:2253
SldrDALtchMPBttn::setSldrDirUp
bool setSldrDirUp()
Sets the value of the curSldrDirUp attribute to true.
Definition ButtonToSwitch_ESP32.cpp:2419
SldrDALtchMPBttn::getSldrDirUp
bool getSldrDirUp()
Returns the value of the curSldrDirUp attribute.
Definition ButtonToSwitch_ESP32.cpp:2288
SldrDALtchMPBttn::setOtptSldrStpSize
bool setOtptSldrStpSize(const uint16_t &newVal)
Sets the output slider step size (otptSldrStpSize) attribute value.
Definition ButtonToSwitch_ESP32.cpp:2332
SldrDALtchMPBttn::getOtptCurValIsMax
bool getOtptCurValIsMax()
Returns a boolean value indicating if the "Output Current Value" equals the maximum limit.
Definition ButtonToSwitch_ESP32.cpp:2258
SldrDALtchMPBttn::SldrDALtchMPBttn
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:2230
SldrDALtchMPBttn::setSwpDirOnPrss
void setSwpDirOnPrss(const bool &newVal)
Sets the value of the "Auto-Swap Direction On Press" (autoSwpDirOnPrss) attribute.
Definition ButtonToSwitch_ESP32.cpp:2431
SldrDALtchMPBttn::setOtptValMin
bool setOtptValMin(const uint16_t &newVal)
Sets the output current value register minimum value attribute (otptValMin attribute).
Definition ButtonToSwitch_ESP32.cpp:2370
SldrDALtchMPBttn::getOtptValMin
uint16_t getOtptValMin()
Returns the bottom output current value register setting.
Definition ButtonToSwitch_ESP32.cpp:2283
SldrDALtchMPBttn::getOtptSldrSpd
unsigned long getOtptSldrSpd()
Returns the current setting for the Output Slider Speed value.
Definition ButtonToSwitch_ESP32.cpp:2268
SldrDALtchMPBttn::getOtptSldrStpSize
uint16_t getOtptSldrStpSize()
Returns the current setting for the Output Slider Step Size value.
Definition ButtonToSwitch_ESP32.cpp:2273
SldrDALtchMPBttn::setSwpDirOnEnd
void setSwpDirOnEnd(const bool &newVal)
Sets the value of the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) attribute.
Definition ButtonToSwitch_ESP32.cpp:2424
SnglSrvcVdblMPBttn
Models a Single Service Voidable DD-MPB a.k.a. Trigger switch (SSVDD-MPB)
Definition ButtonToSwitch_ESP32.h:1685
SnglSrvcVdblMPBttn::setTaskWhileOn
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:3060
SnglSrvcVdblMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:3038
SnglSrvcVdblMPBttn::SnglSrvcVdblMPBttn
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:3026
SnglSrvcVdblMPBttn::~SnglSrvcVdblMPBttn
virtual ~SnglSrvcVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:3034
TgglLtchMPBttn
Models a Toggle Latch DD-MPB, a.k.a. a Toggle Switch (ToLDD-MPB).
Definition ButtonToSwitch_ESP32.h:664
TgglLtchMPBttn::TgglLtchMPBttn
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:1130
TmLtchMPBttn
Models a Timer Latch DD-MPB, a.k.a. Timer Switch (TiLDD-MPB).
Definition ButtonToSwitch_ESP32.h:688
TmLtchMPBttn::getSrvcTime
const unsigned long int getSrvcTime() const
Returns the configured Service Time.
Definition ButtonToSwitch_ESP32.cpp:1187
TmLtchMPBttn::setTmerRstbl
void setTmerRstbl(const bool &newIsRstbl)
Configures the timer for the Service Time to be reseted before it reaches unlatching time.
Definition ButtonToSwitch_ESP32.cpp:1208
TmLtchMPBttn::setSrvcTime
bool setSrvcTime(const unsigned long int &newSrvcTime)
Sets a new value to the Service Time attribute.
Definition ButtonToSwitch_ESP32.cpp:1192
TmLtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1176
TmLtchMPBttn::TmLtchMPBttn
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:1168
TmVdblMPBttn
Models a Time Voidable DD-MPB, a.k.a. Anti-tampering switch (TVDD-MPB)
Definition ButtonToSwitch_ESP32.h:1616
TmVdblMPBttn::~TmVdblMPBttn
virtual ~TmVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2927
TmVdblMPBttn::clrStatus
void clrStatus()
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2953
TmVdblMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:2931
TmVdblMPBttn::TmVdblMPBttn
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:2922
TmVdblMPBttn::getVoidTime
const unsigned long int getVoidTime() const
Returns the voidTime attribute current value.
Definition ButtonToSwitch_ESP32.cpp:2964
TmVdblMPBttn::setVoidTime
bool setVoidTime(const unsigned long int &newVoidTime)
Sets a new value to the Void Time attribute.
Definition ButtonToSwitch_ESP32.cpp:2969
VdblMPBttn
Abstract class, base to model Voidable DD-MPBs (VDD-MPB).
Definition ButtonToSwitch_ESP32.h:1460
VdblMPBttn::setIsVoided
bool setIsVoided()
Sets the value of the isVoided attribute flag to true.
Definition ButtonToSwitch_ESP32.cpp:2646
VdblMPBttn::getIsVoided
const bool getIsVoided() const
Returns the current value of the isVoided attribute flag.
Definition ButtonToSwitch_ESP32.cpp:2555
VdblMPBttn::getFnWhnTrnOnVdd
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:2545
VdblMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2528
VdblMPBttn::setFnWhnTrnOnVddPtr
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:2619
VdblMPBttn::~VdblMPBttn
virtual ~VdblMPBttn()
Default virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2524
VdblMPBttn::getFnWhnTrnOffVdd
fncPtrType getFnWhnTrnOffVdd()
Returns the function that is set to execute every time the object exits the Voided State.
Definition ButtonToSwitch_ESP32.cpp:2540
VdblMPBttn::setFnWhnTrnOffVddPtr
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:2607
VdblMPBttn::getFrcOtptLvlWhnVdd
bool getFrcOtptLvlWhnVdd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch_ESP32.cpp:2550
VdblMPBttn::getStOnWhnOtpFrcd
bool getStOnWhnOtpFrcd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch_ESP32.cpp:2560
VdblMPBttn::setIsNotVoided
bool setIsNotVoided()
Sets the value of the isVoided attribute flag to false.
Definition ButtonToSwitch_ESP32.cpp:2641
VdblMPBttn::VdblMPBttn
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:2518
XtrnUnltchMPBttn
Models an External Unlatch LDD-MPB, a.k.a. Emergency Latched Switch (XULDD-MPB)
Definition ButtonToSwitch_ESP32.h:930
XtrnUnltchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1700
XtrnUnltchMPBttn::XtrnUnltchMPBttn
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:1660
XtrnUnltchMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1672
MpbOtpts_t
Type to hold the complete set of output attribute flags from any DbncdMPBttn class and subclasses obj...
Definition ButtonToSwitch_ESP32.h:61