| ButtonToSwitch Library for ESP32 (Arduino) v4.6.1 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
48//FFDR For Future Development Reminder!!
49//FTPO For Testing Purposes Only code!!
50
51#ifndef _BUTTONTOSWITCH_ESP32_H_
52#define _BUTTONTOSWITCH_ESP32_H_
53
54#include <Arduino.h>
55#include <stdint.h>
56
57#define _HwMinDbncTime 20 //Documented minimum wait time for a MPB signal to stabilize
58#define _StdPollDelay 10
59#define _MinSrvcTime 100
60#define _InvalidPinNum GPIO_NUM_NC //Not Connected pin number (in this hardware platform -1), so a signed numeric type must be used! Value to give as "yet to be defined pin"
61#define _maxValidPinNum GPIO_NUM_MAX-1
62
63/*---------------- xTaskNotify() mechanism related constants, argument structs, information packing and unpacking BEGIN -------*/
64 const uint8_t IsOnBitPos {0};
65 const uint8_t IsEnabledBitPos{1};
66 const uint8_t PilotOnBitPos{2};
67 const uint8_t WrnngOnBitPos{3};
68 const uint8_t IsVoidedBitPos{4};
69 const uint8_t IsOnScndryBitPos{5};
70 const uint8_t OtptCurValBitPos{16};
71
72#ifndef MPBOTPTS_T
73 #define MPBOTPTS_T
80 struct MpbOtpts_t{
81 bool isOn;
82 bool isEnabled;
83 bool pilotOn;
84 bool wrnngOn;
85 bool isVoided;
86 bool isOnScndry;
87 uint16_t otptCurVal;
88 };
89#endif
90/*---------------- xTaskNotify() mechanism related constants, argument structs, information packing and unpacking END -------*/
91
92/* Definition workaround to let a function/method return value to be a function pointer
93 to a function that receives no arguments and returns no values: void (funcName*)() .
94 The resulting **fncPtrType** type then defines a pointer to a function of the described properties */
95 typedef void (*fncPtrType)();
96 typedef fncPtrType (*ptrToTrnFnc)();
97
98/* Definition workaround to let a function/method return value to be a function pointer
99 to a function that receives a void* argument and returns no values: void (funcName*)(void*)
100 The resulting **fncVdPtrPrmPtrType** type then defines a pointer to a function of the described properties and signature*/
101 typedef void (*fncVdPtrPrmPtrType)(void*);
102 typedef fncVdPtrPrmPtrType (*ptrToTrnFncVdPtr)(void*);
103
104//===========================>> BEGIN General use function prototypes
105 MpbOtpts_t otptsSttsUnpkg(uint32_t pkgOtpts);
106//===========================>> END General use function prototypes
107
108//===========================>> BEGIN General use Global variables
109//===========================>> END General use Global variables
110
111//==========================================================>> Classes declarations BEGIN
112
122 class DbncdMPBttn{
123 protected:
124 enum fdaDmpbStts {
125 stOffNotVPP,
126 stOffVPP,
127 stOn,
128 stOnVRP,
129 stDisabled
130 };
131 const unsigned long int _stdMinDbncTime {_HwMinDbncTime};
132
133 int8_t _mpbttnPin{};
134 bool _pulledUp{};
135 bool _typeNO{};
136 unsigned long int _dbncTimeOrigSett{};
137
138 bool _beginDisabled{false};
139 unsigned long int _dbncRlsTimerStrt{0};
140 unsigned long int _dbncRlsTimeTempSett{0};
141 unsigned long int _dbncTimerStrt{0};
142 unsigned long int _dbncTimeTempSett{0};
143 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOff{nullptr}; // _fVPPWhnTrnOff
144 void* _fnVdPtrPrmWhnTrnOffArgPtr{nullptr}; // _fVPPWhnTrnOffArgPtr
145 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOn{nullptr}; // _fVPPWhnTrnOn
146 void* _fnVdPtrPrmWhnTrnOnArgPtr{nullptr}; // _fVPPWhnTrnOnArgPtr
147 fncPtrType _fnWhnTrnOff{nullptr};
148 fncPtrType _fnWhnTrnOn{nullptr};
149
150 bool _isEnabled{true};
151 volatile bool _isOn{false};
152 bool _isOnDisabled{false};
153 volatile bool _isPressed{false};
154 fdaDmpbStts _mpbFdaState {stOffNotVPP};
155 DbncdMPBttn* _mpbInstnc{nullptr};
156 TimerHandle_t _mpbPollTmrHndl {NULL}; //FreeRTOS returns NULL if creation fails (not nullptr)
157 String _mpbPollTmrName {""};
158 bool _outputsChange {false};
159 uint32_t _outputsChangeCnt{0};
160 bool _outputsChngTskTrggr{false};
161 bool _prssRlsCcl{false};
162 unsigned long int _strtDelay {0};
163 bool _sttChng {true};
164 TaskHandle_t _taskToNotifyHndl {NULL};
165 TaskHandle_t _taskWhileOnHndl{NULL};
166 volatile bool _validDisablePend{false};
167 volatile bool _validEnablePend{false};
168 volatile bool _validPressPend{false};
169 volatile bool _validReleasePend{false};
170
171 SemaphoreHandle_t _isOnMutex; // Mutex to protect the _isOn attribute flag value from concurrent access
172 SemaphoreHandle_t _strtDelayMutex; // Mutex to protect the _strtDelay attribute value from concurrent access
173 SemaphoreHandle_t _updFdaMutex; // Mutex to protect the updFdsState state updating automaton from concurrent access
174
175 void clrSttChng();
176 const bool getIsPressed() const;
177 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
178 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
179 void _setIsEnabled(const bool &newEnabledValue);
180 void setSttChng();
181 void _turnOff();
182 void _turnOn();
183 virtual void updFdaState();
184 bool updIsPressed(); //FFDR Refactor to a Strategy Pattern design to accomodate different signal sources
185 virtual bool updValidPressesStatus();
186 const bool getOutputsChngTskTrggr() const;
187 // void resetOutputsChngTskTrggr();
188
189 public:
194 DbncdMPBttn();
207 DbncdMPBttn(const int8_t &mpbttnPin, const bool &pulledUp = true, const bool &typeNO = true, const unsigned long int &dbncTimeOrigSett = 0);
213 DbncdMPBttn(const DbncdMPBttn& other);
218 virtual ~DbncdMPBttn();
230 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
241 void clrStatus(bool clrIsOn = true);
252 void disable();
261 void enable();
271 bool end();
279 const unsigned long int getCurDbncTime() const;
292 fncPtrType getFnWhnTrnOff();
305 fncPtrType getFnWhnTrnOn();
314 fncVdPtrPrmPtrType getFVPPWhnTrnOff();
320 void* getFVPPWhnTrnOffArgPtr();
329 fncVdPtrPrmPtrType getFVPPWhnTrnOn();
335 void* getFVPPWhnTrnOnArgPtr();
344 const bool getIsEnabled() const;
353 const bool getIsOn () const;
365 const bool getIsOnDisabled() const;
371 const DbncdMPBttn* getMpbInstnc() const;
379 const uint32_t getOtptsSttsPkgd();
390 const bool getOutputsChange() const;
400 unsigned long int getStrtDelay();
411 const TaskHandle_t getTaskToNotify() const;
422 const TaskHandle_t getTaskWhileOn();
428 bool init(const int8_t &mpbttnPin, const bool &pulledUp = true, const bool &typeNO = true, const unsigned long int &dbncTimeOrigSett = 0);
437 bool pause();
443 void resetDbncTime();
449 void resetFda();
460 bool resume();
468 void setBeginDisabled(const bool &newBeginDisabled = false);
480 bool setDbncTime(const unsigned long int &newDbncTime);
488 void setFnWhnTrnOffPtr(fncPtrType newFnWhnTrnOff);
496 void setFnWhnTrnOnPtr(fncPtrType newFnWhnTrnOn);
505 void setFVPPWhnTrnOff(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
513 void setFVPPWhnTrnOffArgPtr(void* newFVPPWhnTrnOffArgPtr);
522 void setFVPPWhnTrnOn(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
530 void setFVPPWhnTrnOnArgPtr(void* newFVPPWhnTrnOnArgPtr);
541 void setIsOnDisabled(const bool &newIsOnDisabled);
549 void setOutputsChange(bool newOutputsChange);
559 void setTaskToNotify(const TaskHandle_t &newTaskHandle);
575 virtual void setTaskWhileOn(const TaskHandle_t &newTaskHandle);
576};
577
578//==========================================================>>
579
589 class DbncdDlydMPBttn: public DbncdMPBttn{
590 public:
595 DbncdDlydMPBttn();
605 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);
611 DbncdDlydMPBttn(const DbncdDlydMPBttn& other);
615 virtual ~DbncdDlydMPBttn();
624 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);
634 void setStrtDelay(const unsigned long int &newStrtDelay);
635};
636
637//==========================================================>>
638
655 class LtchMPBttn: public DbncdDlydMPBttn{
656 protected:
657 enum fdaLmpbStts {
658 stOffNotVPP,
659 stOffVPP,
660 stOnNVRP,
661 stOnVRP,
662 stLtchNVUP,
663 stLtchdVUP,
664 stOffVUP,
665 stOffNVURP,
666 stOffVURP,
667 stDisabled
668 };
669 bool _isLatched{false};
670 fdaLmpbStts _mpbFdaState {stOffNotVPP};
671 bool _trnOffASAP{true};
672 volatile bool _validUnlatchPend{false};
673 volatile bool _validUnlatchRlsPend{false};
674
675 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
676
677 virtual void stDisabled_In(){};
678 virtual void stDisabled_Out(){};
679 virtual void stLtchNVUP_Do(){};
680 virtual void stOffNotVPP_In(){};
681 virtual void stOffNotVPP_Out(){};
682 virtual void stOffNVURP_Do(){};
683 virtual void stOffVPP_Out(){};
684 virtual void stOffVURP_Out(){};
685 virtual void stOnNVRP_Do(){};
686 virtual void updFdaState();
687 virtual void updValidUnlatchStatus() = 0;
688 public:
692 LtchMPBttn();
698 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);
704 LtchMPBttn(const LtchMPBttn& other); //FFDR Check new code implemented and uncomment
708 virtual ~LtchMPBttn();
712 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
716 void clrStatus(bool clrIsOn = true);
725 const bool getIsLatched() const;
735 bool getTrnOffASAP();
743 const bool getUnlatchPend() const;
751 const bool getUnlatchRlsPend() const;
763 void setTrnOffASAP(const bool &newVal);
771 void setUnlatchPend(const bool &newVal);
779 void setUnlatchRlsPend(const bool &newVal);
790 bool unlatch();
791};
792
793//==========================================================>>
794
802 class TgglLtchMPBttn: public LtchMPBttn{
803 protected:
804 virtual void stOffNVURP_Do();
805 virtual void updValidUnlatchStatus();
806 public:
811 TgglLtchMPBttn();
817 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);
823 TgglLtchMPBttn(const TgglLtchMPBttn& other);
827 virtual ~TgglLtchMPBttn();
828};
829
830//==========================================================>>
831
841 class TmLtchMPBttn: public LtchMPBttn{
842 protected:
843 bool _tmRstbl {true};
844 unsigned long int _srvcTime {};
845 unsigned long int _srvcTimerStrt{0};
846
847 virtual void stOffNotVPP_Out();
848 virtual void stOffVPP_Out();
849 virtual void updValidUnlatchStatus();
850
851 public:
856 TmLtchMPBttn();
864 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);
870 TmLtchMPBttn(const TmLtchMPBttn &other);
874 virtual ~TmLtchMPBttn();
878 void clrStatus(bool clrIsOn = true);
884 const unsigned long int getSrvcTime() const;
895 bool setSrvcTime(const unsigned long int &newSrvcTime);
903 void setTmerRstbl(const bool &newIsRstbl);
904};
905
906//==========================================================>>
907
918 class HntdTmLtchMPBttn: public TmLtchMPBttn{
919 protected:
920 unsigned long int _wrnngMs{0};
921 unsigned int _wrnngPrctg {0};
922
923 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffPilot{nullptr}; // _fVPPWhnTrnOffPilot
924 void* _fnVdPtrPrmWhnTrnOffPilotArgPtr{nullptr}; // _fVPPWhnTrnOffPilotArgPtr
925 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnPilot{nullptr}; // _fVPPWhnTrnOnPilot
926 void* _fnVdPtrPrmWhnTrnOnPilotArgPtr{nullptr}; // _fVPPWhnTrnOnPilotArgPtr
927 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffWrnng{nullptr}; // _fVPPWhnTrnOffWrnng
928 void* _fnVdPtrPrmWhnTrnOffWrnngArgPtr{nullptr}; // _fVPPWhnTrnOffWrnngArgPtr
929 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnWrnng{nullptr}; // _fVPPWhnTrnOnWrnng
930 void* _fnVdPtrPrmWhnTrnOnWrnngArgPtr{nullptr}; // _fVPPWhnTrnOnWrnngArgPtr
931 void (*_fnWhnTrnOffPilot)() {nullptr};
932 void (*_fnWhnTrnOffWrnng)() {nullptr};
933 void (*_fnWhnTrnOnPilot)() {nullptr};
934 void (*_fnWhnTrnOnWrnng)() {nullptr};
935 bool _keepPilot{false};
936 volatile bool _pilotOn{false};
937 volatile bool _wrnngOn {false};
938
939 bool _validWrnngSetPend{false};
940 bool _validWrnngResetPend{false};
941 bool _validPilotSetPend{false};
942 bool _validPilotResetPend{false};
943
944 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
945 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
946 virtual void stDisabled_In();
947 virtual void stLtchNVUP_Do();
948 virtual void stOffNotVPP_In();
949 virtual void stOffVPP_Out();
950 virtual void stOnNVRP_Do();
951 void _turnOffPilot();
952 void _turnOffWrnng();
953 void _turnOnPilot();
954 void _turnOnWrnng();
955 bool updPilotOn();
956 bool updWrnngOn();
957 public:
962 HntdTmLtchMPBttn();
970 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);
976 HntdTmLtchMPBttn(const HntdTmLtchMPBttn &other);
980 ~HntdTmLtchMPBttn();
984 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
988 void clrStatus(bool clrIsOn = true);
999 fncPtrType getFnWhnTrnOffPilot();
1010 fncPtrType getFnWhnTrnOffWrnng();
1021 fncPtrType getFnWhnTrnOnPilot();
1032 fncPtrType getFnWhnTrnOnWrnng();
1041 fncVdPtrPrmPtrType getFVPPWhnTrnOffPilot();
1047 void* getFVPPWhnTrnOffPilotArgPtr();
1056 fncVdPtrPrmPtrType getFVPPWhnTrnOnPilot();
1062 void* getFVPPWhnTrnOnPilotArgPtr();
1071 fncVdPtrPrmPtrType getFVPPWhnTrnOffWrnng();
1077 void* getFVPPWhnTrnOffWrnngArgPtr();
1086 fncVdPtrPrmPtrType getFVPPWhnTrnOnWrnng();
1092 void* getFVPPWhnTrnOnWrnngArgPtr();
1102 const bool getPilotOn() const;
1114 const bool getWrnngOn() const;
1122 void setFnWhnTrnOffPilotPtr(void(*newFnWhnTrnOff)());
1130 void setFnWhnTrnOffWrnngPtr(void(*newFnWhnTrnOff)());
1138 void setFnWhnTrnOnPilotPtr(void(*newFnWhnTrnOn)());
1146 void setFnWhnTrnOnWrnngPtr(void(*newFnWhnTrnOn)());
1155 void setFVPPWhnTrnOffPilot(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
1163 void setFVPPWhnTrnOffPilotArgPtr(void* newFVPPWhnTrnOffArgPtr);
1172 void setFVPPWhnTrnOnPilot(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
1180 void setFVPPWhnTrnOnPilotArgPtr(void* newFVPPWhnTrnOnArgPtr);
1189 void setFVPPWhnTrnOffWrnng(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
1197 void setFVPPWhnTrnOffWrnngArgPtr(void* newFVPPWhnTrnOffArgPtr);
1206 void setFVPPWhnTrnOnWrnng(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
1214 void setFVPPWhnTrnOnWrnngArgPtr(void* newFVPPWhnTrnOnArgPtr);
1220 void setKeepPilot(const bool &newKeepPilot);
1226 bool setSrvcTime(const unsigned long int &newSvcTime);
1238 bool setWrnngPrctg (const unsigned int &newWrnngPrctg);
1239};
1240
1241//==========================================================>>
1242
1251 class XtrnUnltchMPBttn: public LtchMPBttn{
1252 protected:
1253 DbncdDlydMPBttn* _unLtchBttn {nullptr};
1254 bool _xtrnUnltchPRlsCcl {false};
1255
1256 virtual void stOffNVURP_Do();
1257 virtual void updValidUnlatchStatus();
1258 public:
1263 XtrnUnltchMPBttn();
1277 XtrnUnltchMPBttn(const int8_t &mpbttnPin, DbncdDlydMPBttn* unLtchBttn,
1278 const bool &pulledUp, const bool &typeNO, const unsigned long int &dbncTimeOrigSett, const unsigned long int &strtDelay);
1286 XtrnUnltchMPBttn(const int8_t &mpbttnPin,
1287 const bool &pulledUp, const bool &typeNO, const unsigned long int &dbncTimeOrigSett, const unsigned long int &strtDelay);
1288
1292 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
1296 void clrStatus(bool clrIsOn = true);
1297};
1298
1299//==========================================================>>
1300
1325 class DblActnLtchMPBttn: public LtchMPBttn{
1326 protected:
1327 enum fdaDALmpbStts{
1328 stOffNotVPP,
1329 stOffVPP,
1330 stOnMPBRlsd,
1331 //--------
1332 stOnStrtScndMod,
1333 stOnScndMod,
1334 stOnEndScndMod,
1335 //--------
1336 stOnTurnOff,
1337 //--------
1338 stDisabled
1339 };
1340 volatile bool _isOnScndry{false};
1341 fdaDALmpbStts _mpbFdaState {stOffNotVPP};
1342 unsigned long _scndModActvDly {2000};
1343 unsigned long _scndModTmrStrt {0};
1344 bool _validScndModPend{false};
1345
1346 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffScndry{nullptr}; // _fVPPWhnTrnOffScndry
1347 void* _fnVdPtrPrmWhnTrnOffScndryArgPtr{nullptr}; // _fVPPWhnTrnOffScndryArgPtr
1348 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnScndry{nullptr}; // _fVPPWhnTrnOnScndry
1349 void* _fnVdPtrPrmWhnTrnOnScndryArgPtr{nullptr}; // _fVPPWhnTrnOnScndryArgPtr
1350 void (*_fnWhnTrnOffScndry)() {nullptr};
1351 void (*_fnWhnTrnOnScndry)() {nullptr};
1352 TaskHandle_t _taskWhileOnScndryHndl{NULL};
1353
1354 static void mpbPollCallback(TimerHandle_t mpbTmrCbArg);
1355 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1356 virtual void stDisabled_In(){};
1357 virtual void stOnEndScndMod_Out(){};
1358 virtual void stOnScndMod_Do() = 0;
1359 virtual void stOnStrtScndMod_In(){};
1360 virtual void _turnOffScndry();
1361 virtual void _turnOnScndry();
1362 virtual void updFdaState();
1363 virtual bool updValidPressesStatus();
1364 virtual void updValidUnlatchStatus();
1365
1366 public:
1371 DblActnLtchMPBttn();
1377 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);
1381 ~DblActnLtchMPBttn();
1386 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
1390 void clrStatus(bool clrIsOn = true);
1399 fncPtrType getFnWhnTrnOffScndry();
1408 fncPtrType getFnWhnTrnOnScndry();
1417 fncVdPtrPrmPtrType getFVPPWhnTrnOffScndry();
1423 void* getFVPPWhnTrnOffScndryArgPtr();
1432 fncVdPtrPrmPtrType getFVPPWhnTrnOnScndry();
1438 void* getFVPPWhnTrnOnScndryArgPtr();
1446 bool getIsOnScndry();
1454 unsigned long getScndModActvDly();
1465 const TaskHandle_t getTaskWhileOnScndry();
1473 void setFnWhnTrnOffScndryPtr(void(*newFnWhnTrnOff)());
1481 void setFnWhnTrnOnScndryPtr(void (*newFnWhnTrnOn)());
1490 void setFVPPWhnTrnOffScndry(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
1498 void setFVPPWhnTrnOffScndryArgPtr(void* newFVPPWhnTrnOffArgPtr);
1507 void setFVPPWhnTrnOnScndry(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
1515 void setFVPPWhnTrnOnScndryArgPtr(void* newFVPPWhnTrnOnArgPtr);
1526 bool setScndModActvDly(const unsigned long &newVal);
1544 void setTaskWhileOnScndry(const TaskHandle_t &newTaskHandle);
1545};
1546
1547//==========================================================>>
1548
1561 class DDlydDALtchMPBttn: public DblActnLtchMPBttn{
1562 protected:
1563 virtual void stOnEndScndMod_Out();
1564 virtual void stOnScndMod_Do();
1565 virtual void stOnStrtScndMod_In();
1566 public:
1571 DDlydDALtchMPBttn();
1577 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);
1581 ~DDlydDALtchMPBttn();
1585 void clrStatus(bool clrIsOn = true);
1586};
1587
1588//==========================================================>>
1589
1607 class SldrDALtchMPBttn: public DblActnLtchMPBttn{
1608
1609 protected:
1610 bool _autoSwpDirOnEnd{true}; // Changes slider direction automatically when reaches _otptValMax or _otptValMin
1611 bool _autoSwpDirOnPrss{false};// Changes slider direction each time it enters slider mode
1612 bool _curSldrDirUp{true};
1613 uint16_t _initOtptCurVal{};
1614 uint16_t _otptCurVal{};
1615 bool _otptCurValIsMax{false};
1616 bool _otptCurValIsMin{false};
1617 unsigned long _otptSldrSpd{1};
1618 uint16_t _otptSldrStpSize{0x01};
1619 uint16_t _otptValMax{0xFFFF};
1620 uint16_t _otptValMin{0x0000};
1621
1622 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffSldrMax{nullptr}; // _fVPPWhnTrnOffSldrMax
1623 void* _fnVdPtrPrmWhnTrnOffSldrMaxArgPtr{nullptr}; // _fVPPWhnTrnOffSldrMaxArgPtr
1624 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnSldrMax{nullptr}; // _fVPPWhnTrnOnSldrMax
1625 void* _fnVdPtrPrmWhnTrnOnSldrMaxArgPtr{nullptr}; // _fVPPWhnTrnOnSldrMaxArgPtr
1626 void (*_fnWhnTrnOffSldrMax)() {nullptr};
1627 void (*_fnWhnTrnOnSldrMax)() {nullptr};
1628
1629 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffSldrMin{nullptr}; // _fVPPWhnTrnOffSldrMin
1630 void* _fnVdPtrPrmWhnTrnOffSldrMinArgPtr{nullptr}; // _fVPPWhnTrnOffSldrMinArgPtr
1631 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnSldrMin{nullptr}; // _fVPPWhnTrnOnSldrMin
1632 void* _fnVdPtrPrmWhnTrnOnSldrMinArgPtr{nullptr}; // _fVPPWhnTrnOnSldrMinArgPtr
1633 void (*_fnWhnTrnOffSldrMin)() {nullptr};
1634 void (*_fnWhnTrnOnSldrMin)() {nullptr};
1635
1636 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffSldrDirUp{nullptr}; // _fVPPWhnTrnOffSldrDirUp
1637 void* _fnVdPtrPrmWhnTrnOffSldrDirUpArgPtr{nullptr}; // _fVPPWhnTrnOffSldrDirUpArgPtr
1638 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnSldrDirUp{nullptr}; // _fVPPWhnTrnOnSldrDirUp
1639 void* _fnVdPtrPrmWhnTrnOnSldrDirUpArgPtr{nullptr}; // _fVPPWhnTrnOnSldrDirUpArgPtr
1640 void (*_fnWhnTrnOffSldrDirUp)() {nullptr};
1641 void (*_fnWhnTrnOnSldrDirUp)() {nullptr};
1642
1643 void _ntfyChngSldrDir();
1644 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1645 bool _setSldrDir(const bool &newVal);
1646 void stOnEndScndMod_Out();
1647 virtual void stOnScndMod_Do();
1648 virtual void stOnStrtScndMod_In();
1649 void _turnOffSldrMax();
1650 void _turnOnSldrMax();
1651 void _turnOffSldrMin();
1652 void _turnOnSldrMin();
1653
1654 public:
1659 SldrDALtchMPBttn();
1667 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);
1671 ~SldrDALtchMPBttn();
1676 void clrStatus(bool clrIsOn = true);
1685 fncPtrType getFnWhnTrnOffSldrDirUp();
1694 fncPtrType getFnWhnTrnOnSldrDirUp();
1705 fncPtrType getFnWhnTrnOffSldrMax();
1716 fncPtrType getFnWhnTrnOffSldrMin();
1727 fncPtrType getFnWhnTrnOnSldrMax();
1738 fncPtrType getFnWhnTrnOnSldrMin();
1747 fncVdPtrPrmPtrType getFVPPWhnTrnOffSldrDirUp();
1754 void* getFVPPWhnTrnOffSldrDirUpArgPtr();
1763 fncVdPtrPrmPtrType getFVPPWhnTrnOnSldrDirUp();
1770 void* getFVPPWhnTrnOnSldrDirUpArgPtr();
1781 fncVdPtrPrmPtrType getFVPPWhnTrnOffSldrMax();
1788 void* getFVPPWhnTrnOffSldrMaxArgPtr();
1799 fncVdPtrPrmPtrType getFVPPWhnTrnOnSldrMax();
1806 void* getFVPPWhnTrnOnSldrMaxArgPtr();
1817 fncVdPtrPrmPtrType getFVPPWhnTrnOffSldrMin();
1824 void* getFVPPWhnTrnOffSldrMinArgPtr();
1835 fncVdPtrPrmPtrType getFVPPWhnTrnOnSldrMin();
1841 void* getFVPPWhnTrnOnSldrMinArgPtr();
1847 uint16_t getOtptCurVal();
1857 bool getOtptCurValIsMax();
1867 bool getOtptCurValIsMin();
1877 unsigned long getOtptSldrSpd();
1887 uint16_t getOtptSldrStpSize();
1893 uint16_t getOtptValMax();
1899 uint16_t getOtptValMin();
1909 bool getSldrDirUp();
1917 void setFnWhnTrnOffSldrDirUp(void(*newFnWhnTrnOff)()); // getFnWhnTrnOffSldrDirUp
1923 void setFnWhnTrnOnSldrDirUp(void(*newFnWhnTrnOn)()); // getFnWhnTrnOnSldrDirUp
1929 void setFnWhnTrnOffSldrMaxPtr(void(*newFnWhnTrnOff)()); // getFnWhnTrnOffSldrMax
1935 void setFnWhnTrnOffSldrMinPtr(void(*newFnWhnTrnOff)()); // getFnWhnTrnOffSldrMin
1941 void setFnWhnTrnOnSldrMaxPtr(void(*newFnWhnTrnOn)());
1947 void setFnWhnTrnOnSldrMinPtr(void(*newFnWhnTrnOn)());
1956 void setFVPPWhnTrnOffSldrDirUp(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
1962 void setFVPPWhnTrnOffSldrDirUpArgPtr(void* newFVPPWhnTrnOffArgPtr);
1971 void setFVPPWhnTrnOnSldrDirUp(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
1977 void setFVPPWhnTrnOnSldrDirUpArgPtr(void* newFVPPWhnTrnOnArgPtr);
1986 void setFVPPWhnTrnOffSldrMax(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
1992 void setFVPPWhnTrnOffSldrMaxArgPtr(void* newFVPPWhnTrnOffArgPtr);
2001 void setFVPPWhnTrnOnSldrMax(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
2007 void setFVPPWhnTrnOnSldrMaxArgPtr(void* newFVPPWhnTrnOnArgPtr);
2016 void setFVPPWhnTrnOffSldrMin(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
2022 void setFVPPWhnTrnOffSldrMinArgPtr(void* newFVPPWhnTrnOffArgPtr);
2031 void setFVPPWhnTrnOnSldrMin(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
2037 void setFVPPWhnTrnOnSldrMinArgPtr(void* newFVPPWhnTrnOnArgPtr);
2049 bool setOtptCurVal(const uint16_t &newVal);
2064 bool setOtptSldrSpd(const uint16_t &newVal);
2081 bool setOtptSldrStpSize(const uint16_t &newVal);
2097 bool setOtptValMax(const uint16_t &newVal);
2113 bool setOtptValMin(const uint16_t &newVal);
2126 bool setSldrDirDn();
2139 bool setSldrDirUp();
2149 void setSwpDirOnEnd(const bool &newVal);
2158 void setSwpDirOnPrss(const bool &newVal);
2166 bool swapSldrDir();
2167};
2168
2169//==========================================================>>
2170
2189 class VdblMPBttn: public DbncdDlydMPBttn{
2190 private:
2191 void setFrcdOtptWhnVdd(const bool &newVal);
2192 void setStOnWhnOtpFrcd(const bool &newVal);
2193
2194 protected:
2195 enum fdaVmpbStts{
2196 stOffNotVPP,
2197 stOffVPP,
2198 stOnNVRP,
2199 //--------
2200 stOnVVP,
2201 stOnVddNVUP,
2202 stOffVddNVUP,
2203 stOffVddVUP,
2204 stOffUnVdd,
2205 //--------
2206 stOnVRP,
2207 stOnTurnOff,
2208 stOff,
2209 //--------
2210 stDisabled
2211 };
2212 fdaVmpbStts _mpbFdaState {stOffNotVPP};
2213
2214 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffVdd{nullptr}; // _fVPPWhnTrnOffVdd
2215 void* _fnVdPtrPrmWhnTrnOffVddArgPtr{nullptr}; // _fVPPWhnTrnOffVddArgPtr
2216 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnVdd{nullptr}; // _fVPPWhnTrnOnVdd
2217 void* _fnVdPtrPrmWhnTrnOnVddArgPtr{nullptr}; // _fVPPWhnTrnOnVddArgPtr
2218 void (*_fnWhnTrnOffVdd)() {nullptr};
2219 void (*_fnWhnTrnOnVdd)() {nullptr};
2220 bool _frcOtptLvlWhnVdd {true};
2221 bool _isVoided{false};
2222 bool _stOnWhnOtptFrcd{false};
2223 bool _validVoidPend{false};
2224 bool _validUnvoidPend{false};
2225
2226 static void mpbPollCallback(TimerHandle_t mpbTmrCb);
2227 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
2228 bool setVoided(const bool &newVoidValue);
2229 virtual void stDisabled_In();
2230 virtual void stDisabled_Out();
2231 virtual void stOffNotVPP_In(){};
2232 virtual void stOffVddNVUP_Do(){}; // This provides a setting point for calculating the _validUnvoidPend
2233 virtual void stOffVPP_Do(){}; // This provides a setting point for the voiding mechanism to be started
2234 void _turnOffVdd();
2235 void _turnOnVdd();
2236 virtual void updFdaState();
2237 virtual bool updVoidStatus() = 0;
2238
2239 public:
2243 VdblMPBttn();
2251 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);
2255 virtual ~VdblMPBttn();
2259 void clrStatus(bool clrIsOn = true);
2268 fncPtrType getFnWhnTrnOffVdd();
2277 fncPtrType getFnWhnTrnOnVdd();
2287 bool getFrcOtptLvlWhnVdd();
2296 fncVdPtrPrmPtrType getFVPPWhnTrnOffVdd();
2302 void* getFVPPWhnTrnOffVddArgPtr();
2311 fncVdPtrPrmPtrType getFVPPWhnTrnOnVdd();
2317 void* getFVPPWhnTrnOnVddArgPtr();
2325 const bool getIsVoided() const;
2337 bool getStOnWhnOtpFrcd();
2345 void setFnWhnTrnOffVddPtr(void(*newFnWhnTrnOff)());
2353 void setFnWhnTrnOnVddPtr(void(*newFnWhnTrnOn)());
2362 void setFVPPWhnTrnOffVdd(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
2370 void setFVPPWhnTrnOffVddArgPtr(void* newFVPPWhnTrnOffArgPtr);
2379 void setFVPPWhnTrnOnVdd(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
2387 void setFVPPWhnTrnOnVddArgPtr(void* newFVPPWhnTrnOnArgPtr);
2398 bool setIsNotVoided();
2406 bool setIsVoided();
2407};
2408
2409//==========================================================>>
2410
2419 class TmVdblMPBttn: public VdblMPBttn{
2420 protected:
2421 unsigned long int _voidTime;
2422 unsigned long int _voidTmrStrt{0};
2423
2424 virtual void stOffNotVPP_In();
2425 virtual void stOffVddNVUP_Do(); // This provides a setting point for calculating the _validUnvoidPend
2426 virtual void stOffVPP_Do(); // This provides a setting point for the voiding mechanism to be started
2427 bool updIsPressed();
2428 virtual bool updVoidStatus();
2429 public:
2433 TmVdblMPBttn();
2441 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);
2445 virtual ~TmVdblMPBttn();
2449 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
2453 void clrStatus();
2461 const unsigned long int getVoidTime() const;
2472 bool setVoidTime(const unsigned long int &newVoidTime);
2473};
2474
2475//==========================================================>>
2476
2492 class SnglSrvcVdblMPBttn: public VdblMPBttn{
2493 protected:
2494 virtual void setTaskWhileOn(const TaskHandle_t &newTaskHandle);
2495 virtual void stOffVddNVUP_Do(); // This provides the calculation for the _validUnvoidPend
2496 virtual bool updVoidStatus();
2497 public:
2502 SnglSrvcVdblMPBttn();
2508 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);
2512 virtual ~SnglSrvcVdblMPBttn();
2516 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
2517};
2518
2519//==========================================================>>
2520
2521#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:4006
DDlydDALtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2678
DDlydDALtchMPBttn::~DDlydDALtchMPBttn
~DDlydDALtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2674
DDlydDALtchMPBttn::DDlydDALtchMPBttn
DDlydDALtchMPBttn()
Default class constructor.
Definition ButtonToSwitch_ESP32.cpp:2665
DblActnLtchMPBttn::setScndModActvDly
bool setScndModActvDly(const unsigned long &newVal)
Sets a new value for the scndModActvDly class attribute.
Definition ButtonToSwitch_ESP32.cpp:2353
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:2292
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:2237
DblActnLtchMPBttn::getFVPPWhnTrnOnScndry
fncVdPtrPrmPtrType getFVPPWhnTrnOnScndry()
Returns a pointer to a function that is set to execute every time the object enters the Secondary Mod...
Definition ButtonToSwitch_ESP32.cpp:2217
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:2202
DblActnLtchMPBttn::setFVPPWhnTrnOnScndryArgPtr
void setFVPPWhnTrnOnScndryArgPtr(void *newFVPPWhnTrnOnArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:2341
DblActnLtchMPBttn::getFVPPWhnTrnOffScndryArgPtr
void * getFVPPWhnTrnOffScndryArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:2212
DblActnLtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2183
DblActnLtchMPBttn::getIsOnScndry
bool getIsOnScndry()
Returns the current value of the isOnScndry attribute flag.
Definition ButtonToSwitch_ESP32.cpp:2227
DblActnLtchMPBttn::DblActnLtchMPBttn
DblActnLtchMPBttn()
Abstract Class default constructor.
Definition ButtonToSwitch_ESP32.cpp:2140
DblActnLtchMPBttn::setFVPPWhnTrnOnScndry
void setFVPPWhnTrnOnScndry(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Secondary Mode On State.
Definition ButtonToSwitch_ESP32.cpp:2328
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:2369
DblActnLtchMPBttn::setFVPPWhnTrnOffScndry
void setFVPPWhnTrnOffScndry(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Secondary Mode Off State.
Definition ButtonToSwitch_ESP32.cpp:2303
DblActnLtchMPBttn::getScndModActvDly
unsigned long getScndModActvDly()
Returns the current value of the scndModActvDly class attribute.
Definition ButtonToSwitch_ESP32.cpp:2232
DblActnLtchMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:2153
DblActnLtchMPBttn::getFVPPWhnTrnOnScndryArgPtr
void * getFVPPWhnTrnOnScndryArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:2222
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:2282
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:2197
DblActnLtchMPBttn::setFVPPWhnTrnOffScndryArgPtr
void setFVPPWhnTrnOffScndryArgPtr(void *newFVPPWhnTrnOffArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:2316
DblActnLtchMPBttn::~DblActnLtchMPBttn
~DblActnLtchMPBttn()
Virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:2149
DblActnLtchMPBttn::getFVPPWhnTrnOffScndry
fncVdPtrPrmPtrType getFVPPWhnTrnOffScndry()
Returns a pointer to a function that is set to execute every time the object enters the Secondary Mod...
Definition ButtonToSwitch_ESP32.cpp:2207
DbncdDlydMPBttn
Models a Debounced Delayed MPB (DD-MPB).
Definition ButtonToSwitch_ESP32.h:589
DbncdDlydMPBttn::~DbncdDlydMPBttn
virtual ~DbncdDlydMPBttn()
Class destructor.
Definition ButtonToSwitch_ESP32.cpp:921
DbncdDlydMPBttn::DbncdDlydMPBttn
DbncdDlydMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:904
DbncdDlydMPBttn::setStrtDelay
void setStrtDelay(const unsigned long int &newStrtDelay)
Sets a new value to the "Start Delay" strtDelay attribute.
Definition ButtonToSwitch_ESP32.cpp:939
DbncdDlydMPBttn::init
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:929
DbncdMPBttn::setBeginDisabled
void setBeginDisabled(const bool &newBeginDisabled=false)
Sets the starting isDisabled state.
Definition ButtonToSwitch_ESP32.cpp:447
DbncdMPBttn::setFnWhnTrnOffPtr
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:470
DbncdMPBttn::getFnWhnTrnOn
fncPtrType getFnWhnTrnOn()
Returns a pointer to a function that is set to execute every time the object enters the On State.
Definition ButtonToSwitch_ESP32.cpp:223
DbncdMPBttn::setFVPPWhnTrnOff
void setFVPPWhnTrnOff(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Off State.
Definition ButtonToSwitch_ESP32.cpp:492
DbncdMPBttn::resetFda
void resetFda()
Resets the MPB behavior automaton to it's Initial or Start State
Definition ButtonToSwitch_ESP32.cpp:413
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:157
DbncdMPBttn::getCurDbncTime
const unsigned long int getCurDbncTime() const
Returns the current debounce period time set for the object.
Definition ButtonToSwitch_ESP32.cpp:213
DbncdMPBttn::getMpbInstnc
const DbncdMPBttn * getMpbInstnc() const
Returns a pointer to the present instanced object.
Definition ButtonToSwitch_ESP32.cpp:268
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:298
DbncdMPBttn::enable
void enable()
Enables the input signal processing.
Definition ButtonToSwitch_ESP32.cpp:190
DbncdMPBttn::pause
bool pause()
Pauses the software timer updating the computation of the object's internal flags value.
Definition ButtonToSwitch_ESP32.cpp:389
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:293
DbncdMPBttn::~DbncdMPBttn
virtual ~DbncdMPBttn()
Default virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:122
DbncdMPBttn::getFVPPWhnTrnOff
fncVdPtrPrmPtrType getFVPPWhnTrnOff()
Returns a pointer to a function that is set to execute every time the object enters the Off State.
Definition ButtonToSwitch_ESP32.cpp:228
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:634
DbncdMPBttn::setIsOnDisabled
void setIsOnDisabled(const bool &newIsOnDisabled)
Sets the value of the isOnDisabled attribute flag.
Definition ButtonToSwitch_ESP32.cpp:563
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:195
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:127
DbncdMPBttn::resetDbncTime
void resetDbncTime()
Resets the debounce process time of the object to the value used at instantiation.
Definition ButtonToSwitch_ESP32.cpp:407
DbncdMPBttn::setFVPPWhnTrnOn
void setFVPPWhnTrnOn(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the On State.
Definition ButtonToSwitch_ESP32.cpp:517
DbncdMPBttn::getFVPPWhnTrnOn
fncVdPtrPrmPtrType getFVPPWhnTrnOn()
Returns a pointer to a function that is set to execute every time the object enters the On State.
Definition ButtonToSwitch_ESP32.cpp:238
DbncdMPBttn::DbncdMPBttn
DbncdMPBttn()
Default class constructor.
Definition ButtonToSwitch_ESP32.cpp:54
DbncdMPBttn::disable
void disable()
Disables the input signal processing, ignoring the changes of its values.
Definition ButtonToSwitch_ESP32.cpp:185
DbncdMPBttn::resume
bool resume()
Restarts the software timer updating the calculation of the object internal flags.
Definition ButtonToSwitch_ESP32.cpp:431
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:248
DbncdMPBttn::getIsOnDisabled
const bool getIsOnDisabled() const
Returns the value of the isOnDisabled attribute flag.
Definition ButtonToSwitch_ESP32.cpp:258
DbncdMPBttn::getFVPPWhnTrnOnArgPtr
void * getFVPPWhnTrnOnArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:243
DbncdMPBttn::init
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:303
DbncdMPBttn::setFVPPWhnTrnOnArgPtr
void setFVPPWhnTrnOnArgPtr(void *newFVPPWhnTrnOnArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:530
DbncdMPBttn::getFVPPWhnTrnOffArgPtr
void * getFVPPWhnTrnOffArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:233
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:611
DbncdMPBttn::getOutputsChange
const bool getOutputsChange() const
Returns the value of the outputsChange attribute flag.
Definition ButtonToSwitch_ESP32.cpp:278
DbncdMPBttn::getIsOn
const bool getIsOn() const
Returns the value of the isOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:253
DbncdMPBttn::setFVPPWhnTrnOffArgPtr
void setFVPPWhnTrnOffArgPtr(void *newFVPPWhnTrnOffArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:505
DbncdMPBttn::getStrtDelay
unsigned long int getStrtDelay()
Returns the current value of strtDelay attribute.
Definition ButtonToSwitch_ESP32.cpp:283
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:273
DbncdMPBttn::setFnWhnTrnOnPtr
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:481
DbncdMPBttn::getFnWhnTrnOff
fncPtrType getFnWhnTrnOff()
Returns a pointer to a function that is set to execute every time the object enters the Off State.
Definition ButtonToSwitch_ESP32.cpp:218
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:583
DbncdMPBttn::setDbncTime
bool setDbncTime(const unsigned long int &newDbncTime)
Sets the debounce process time.
Definition ButtonToSwitch_ESP32.cpp:454
HntdTmLtchMPBttn::setSrvcTime
bool setSrvcTime(const unsigned long int &newSvcTime)
See TmLtchMPBttn::setSrvcTime(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1811
HntdTmLtchMPBttn::getFVPPWhnTrnOffWrnng
fncVdPtrPrmPtrType getFVPPWhnTrnOffWrnng()
Returns a pointer to a function that is set to execute every time the object enters the Warning Off S...
Definition ButtonToSwitch_ESP32.cpp:1579
HntdTmLtchMPBttn::getFVPPWhnTrnOffWrnngArgPtr
void * getFVPPWhnTrnOffWrnngArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:1584
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:1549
HntdTmLtchMPBttn::getFVPPWhnTrnOnWrnngArgPtr
void * getFVPPWhnTrnOnWrnngArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:1594
HntdTmLtchMPBttn::getFVPPWhnTrnOnWrnng
fncVdPtrPrmPtrType getFVPPWhnTrnOnWrnng()
Returns a pointer to a function that is set to execute every time the object enters the Warning On St...
Definition ButtonToSwitch_ESP32.cpp:1589
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:1667
HntdTmLtchMPBttn::setFVPPWhnTrnOnWrnngArgPtr
void setFVPPWhnTrnOnWrnngArgPtr(void *newFVPPWhnTrnOnArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:1788
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:1544
HntdTmLtchMPBttn::setFVPPWhnTrnOffPilotArgPtr
void setFVPPWhnTrnOffPilotArgPtr(void *newFVPPWhnTrnOffArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:1713
HntdTmLtchMPBttn::getFVPPWhnTrnOnPilot
fncVdPtrPrmPtrType getFVPPWhnTrnOnPilot()
Returns a pointer to a function that is set to execute every time the object enters the Pilot On Stat...
Definition ButtonToSwitch_ESP32.cpp:1569
HntdTmLtchMPBttn::getWrnngOn
const bool getWrnngOn() const
Returns the current value of the warningOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1604
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:1678
HntdTmLtchMPBttn::getPilotOn
const bool getPilotOn() const
Returns the current value of the pilotOn attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1599
HntdTmLtchMPBttn::setFVPPWhnTrnOffPilot
void setFVPPWhnTrnOffPilot(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Pilot Off State.
Definition ButtonToSwitch_ESP32.cpp:1700
HntdTmLtchMPBttn::getFVPPWhnTrnOffPilotArgPtr
void * getFVPPWhnTrnOffPilotArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:1564
HntdTmLtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1519
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:1539
HntdTmLtchMPBttn::setFVPPWhnTrnOnPilotArgPtr
void setFVPPWhnTrnOnPilotArgPtr(void *newFVPPWhnTrnOnArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:1738
HntdTmLtchMPBttn::HntdTmLtchMPBttn
HntdTmLtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:1458
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:1689
HntdTmLtchMPBttn::getFVPPWhnTrnOnPilotArgPtr
void * getFVPPWhnTrnOnPilotArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:1574
HntdTmLtchMPBttn::setFVPPWhnTrnOffWrnng
void setFVPPWhnTrnOffWrnng(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Warning Off State.
Definition ButtonToSwitch_ESP32.cpp:1750
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:1826
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:1554
HntdTmLtchMPBttn::setFVPPWhnTrnOffWrnngArgPtr
void setFVPPWhnTrnOffWrnngArgPtr(void *newFVPPWhnTrnOffArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:1763
HntdTmLtchMPBttn::getFVPPWhnTrnOffPilot
fncVdPtrPrmPtrType getFVPPWhnTrnOffPilot()
Returns a pointer to a function that is set to execute every time the object enters the Pilot Off Sta...
Definition ButtonToSwitch_ESP32.cpp:1559
HntdTmLtchMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:1489
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:1656
HntdTmLtchMPBttn::setFVPPWhnTrnOnWrnng
void setFVPPWhnTrnOnWrnng(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Warning On State.
Definition ButtonToSwitch_ESP32.cpp:1775
HntdTmLtchMPBttn::setFVPPWhnTrnOnPilot
void setFVPPWhnTrnOnPilot(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Pilot On State.
Definition ButtonToSwitch_ESP32.cpp:1725
HntdTmLtchMPBttn::setKeepPilot
void setKeepPilot(const bool &newKeepPilot)
Sets the configuration of the keepPilot service attribute.
Definition ButtonToSwitch_ESP32.cpp:1800
HntdTmLtchMPBttn::~HntdTmLtchMPBttn
~HntdTmLtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:1485
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:1016
LtchMPBttn::unlatch
bool unlatch()
Sets the values of the flags needed to unlatch a latched MPB.
Definition ButtonToSwitch_ESP32.cpp:1103
LtchMPBttn::getUnlatchRlsPend
const bool getUnlatchRlsPend() const
Returns the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:1031
LtchMPBttn::getUnlatchPend
const bool getUnlatchPend() const
Returns the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:1026
LtchMPBttn::~LtchMPBttn
virtual ~LtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:969
LtchMPBttn::setUnlatchPend
void setUnlatchPend(const bool &newVal)
Sets the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:1081
LtchMPBttn::setTrnOffASAP
void setTrnOffASAP(const bool &newVal)
Sets the value of the trnOffASAP attribute.
Definition ButtonToSwitch_ESP32.cpp:1070
LtchMPBttn::getTrnOffASAP
bool getTrnOffASAP()
Returns the value of the trnOffASAP attribute flag.
Definition ButtonToSwitch_ESP32.cpp:1021
LtchMPBttn::setUnlatchRlsPend
void setUnlatchRlsPend(const bool &newVal)
Sets the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch_ESP32.cpp:1092
LtchMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:973
LtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1003
LtchMPBttn::LtchMPBttn
LtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:951
SldrDALtchMPBttn::setFnWhnTrnOnSldrDirUp
void setFnWhnTrnOnSldrDirUp(void(*newFnWhnTrnOn)())
Sets the function that will be called every time the slider direction is set to be incrementing (up).
Definition ButtonToSwitch_ESP32.cpp:2902
SldrDALtchMPBttn::getFnWhnTrnOnSldrDirUp
fncPtrType getFnWhnTrnOnSldrDirUp()
Returns the function set to be called when the slider direction is set to be incrementing (up).
Definition ButtonToSwitch_ESP32.cpp:2743
SldrDALtchMPBttn::getFVPPWhnTrnOnSldrMinArgPtr
void * getFVPPWhnTrnOnSldrMinArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object's...
Definition ButtonToSwitch_ESP32.cpp:2823
SldrDALtchMPBttn::getFVPPWhnTrnOnSldrDirUp
fncVdPtrPrmPtrType getFVPPWhnTrnOnSldrDirUp()
Returns a pointer to the function that is set to be executed every time the slider direction is set t...
Definition ButtonToSwitch_ESP32.cpp:2778
SldrDALtchMPBttn::setFVPPWhnTrnOffSldrMaxArgPtr
void setFVPPWhnTrnOffSldrMaxArgPtr(void *newFVPPWhnTrnOffArgPtr)
Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrMax() metho...
Definition ButtonToSwitch_ESP32.cpp:2978
SldrDALtchMPBttn::getFnWhnTrnOffSldrMax
fncPtrType getFnWhnTrnOffSldrMax()
Returns the function that is set to be executed every time the object's Output Current Value (otptCur...
Definition ButtonToSwitch_ESP32.cpp:2748
SldrDALtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
Definition ButtonToSwitch_ESP32.cpp:2725
SldrDALtchMPBttn::setFnWhnTrnOffSldrDirUp
void setFnWhnTrnOffSldrDirUp(void(*newFnWhnTrnOff)())
Sets the function that will be called every time the slider direction is set to be decrementing (down...
Definition ButtonToSwitch_ESP32.cpp:2895
SldrDALtchMPBttn::setFVPPWhnTrnOffSldrMin
void setFVPPWhnTrnOffSldrMin(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribu...
Definition ButtonToSwitch_ESP32.cpp:3001
SldrDALtchMPBttn::getFVPPWhnTrnOffSldrDirUp
fncVdPtrPrmPtrType getFVPPWhnTrnOffSldrDirUp()
Returns a pointer to the function that is set to be executed every time the slider direction is set t...
Definition ButtonToSwitch_ESP32.cpp:2768
SldrDALtchMPBttn::setFVPPWhnTrnOnSldrMin
void setFVPPWhnTrnOnSldrMin(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribu...
Definition ButtonToSwitch_ESP32.cpp:3017
SldrDALtchMPBttn::setOtptSldrSpd
bool setOtptSldrSpd(const uint16_t &newVal)
Sets the output slider speed (otptSldrSpd) attribute.
Definition ButtonToSwitch_ESP32.cpp:3049
SldrDALtchMPBttn::setFVPPWhnTrnOnSldrMax
void setFVPPWhnTrnOnSldrMax(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribu...
Definition ButtonToSwitch_ESP32.cpp:2985
SldrDALtchMPBttn::setFVPPWhnTrnOnSldrDirUpArgPtr
void setFVPPWhnTrnOnSldrDirUpArgPtr(void *newFVPPWhnTrnOnArgPtr)
Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrDirUp() meth...
Definition ButtonToSwitch_ESP32.cpp:2962
SldrDALtchMPBttn::getOtptValMax
uint16_t getOtptValMax()
Returns the top output current value register setting.
Definition ButtonToSwitch_ESP32.cpp:2855
SldrDALtchMPBttn::getOtptCurValIsMin
bool getOtptCurValIsMin()
Returns the result of comparing the Output Current Value to the Minimum value setting
Definition ButtonToSwitch_ESP32.cpp:2839
SldrDALtchMPBttn::setSldrDirDn
bool setSldrDirDn()
Sets the value of the curSldrDirUp attribute to false.
Definition ButtonToSwitch_ESP32.cpp:3152
SldrDALtchMPBttn::setOtptValMax
bool setOtptValMax(const uint16_t &newVal)
Sets the output current value register maximum value attribute (otptValMax attribute).
Definition ButtonToSwitch_ESP32.cpp:3081
SldrDALtchMPBttn::getFVPPWhnTrnOffSldrMinArgPtr
void * getFVPPWhnTrnOffSldrMinArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object's...
Definition ButtonToSwitch_ESP32.cpp:2813
SldrDALtchMPBttn::getFVPPWhnTrnOffSldrMaxArgPtr
void * getFVPPWhnTrnOffSldrMaxArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object's...
Definition ButtonToSwitch_ESP32.cpp:2793
SldrDALtchMPBttn::swapSldrDir
bool swapSldrDir()
Inverts the current curSldrDirUp attribute value.
Definition ButtonToSwitch_ESP32.cpp:3253
SldrDALtchMPBttn::getFVPPWhnTrnOnSldrDirUpArgPtr
void * getFVPPWhnTrnOnSldrDirUpArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the slider d...
Definition ButtonToSwitch_ESP32.cpp:2783
SldrDALtchMPBttn::getFnWhnTrnOnSldrMin
fncPtrType getFnWhnTrnOnSldrMin()
Returns the function that is set to execute every time the object's Output Current Value (otptCurVal)...
Definition ButtonToSwitch_ESP32.cpp:2763
SldrDALtchMPBttn::setFVPPWhnTrnOffSldrDirUp
void setFVPPWhnTrnOffSldrDirUp(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function that will be called every time the slider direction is set to be decrementing (down).
Definition ButtonToSwitch_ESP32.cpp:2937
SldrDALtchMPBttn::~SldrDALtchMPBttn
~SldrDALtchMPBttn()
Virtual class destructor.
Definition ButtonToSwitch_ESP32.cpp:2721
SldrDALtchMPBttn::setOtptCurVal
bool setOtptCurVal(const uint16_t &newVal)
Sets the output current value register.
Definition ButtonToSwitch_ESP32.cpp:3033
SldrDALtchMPBttn::getFnWhnTrnOnSldrMax
fncPtrType getFnWhnTrnOnSldrMax()
Returns the function that is set to execute every time the object's Output Current Value (otptCurVal)...
Definition ButtonToSwitch_ESP32.cpp:2758
SldrDALtchMPBttn::getOtptCurVal
uint16_t getOtptCurVal()
Returns the Output Current Value (otpCurVal) attribute.
Definition ButtonToSwitch_ESP32.cpp:2828
SldrDALtchMPBttn::setSldrDirUp
bool setSldrDirUp()
Sets the value of the curSldrDirUp attribute to true.
Definition ButtonToSwitch_ESP32.cpp:3157
SldrDALtchMPBttn::getFVPPWhnTrnOnSldrMax
fncVdPtrPrmPtrType getFVPPWhnTrnOnSldrMax()
Returns the function that is set to execute every time the object's Output Current Value (otptCurVal)...
Definition ButtonToSwitch_ESP32.cpp:2798
SldrDALtchMPBttn::setFnWhnTrnOffSldrMaxPtr
void setFnWhnTrnOffSldrMaxPtr(void(*newFnWhnTrnOff)())
Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribu...
Definition ButtonToSwitch_ESP32.cpp:2909
SldrDALtchMPBttn::setFnWhnTrnOnSldrMaxPtr
void setFnWhnTrnOnSldrMaxPtr(void(*newFnWhnTrnOn)())
Sets a function that will be called every time the object's Output Current Value (otptCurVal) reaches...
Definition ButtonToSwitch_ESP32.cpp:2923
SldrDALtchMPBttn::getFVPPWhnTrnOffSldrDirUpArgPtr
void * getFVPPWhnTrnOffSldrDirUpArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the slider d...
Definition ButtonToSwitch_ESP32.cpp:2773
SldrDALtchMPBttn::setFVPPWhnTrnOnSldrDirUp
void setFVPPWhnTrnOnSldrDirUp(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function that will be called every time the slider direction is set to be incrementing (up).
Definition ButtonToSwitch_ESP32.cpp:2953
SldrDALtchMPBttn::setFVPPWhnTrnOnSldrMaxArgPtr
void setFVPPWhnTrnOnSldrMaxArgPtr(void *newFVPPWhnTrnOnArgPtr)
Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrMax() method...
Definition ButtonToSwitch_ESP32.cpp:2994
SldrDALtchMPBttn::getFVPPWhnTrnOffSldrMin
fncVdPtrPrmPtrType getFVPPWhnTrnOffSldrMin()
Returns the function that is set to execute every time the object's Output Current Value (otptCurVal)...
Definition ButtonToSwitch_ESP32.cpp:2808
SldrDALtchMPBttn::setFVPPWhnTrnOffSldrMinArgPtr
void setFVPPWhnTrnOffSldrMinArgPtr(void *newFVPPWhnTrnOffArgPtr)
Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrMin() metho...
Definition ButtonToSwitch_ESP32.cpp:3010
SldrDALtchMPBttn::getFVPPWhnTrnOffSldrMax
fncVdPtrPrmPtrType getFVPPWhnTrnOffSldrMax()
Returns the function that is set to be executed every time the object's Output Current Value (otptCur...
Definition ButtonToSwitch_ESP32.cpp:2788
SldrDALtchMPBttn::setFnWhnTrnOnSldrMinPtr
void setFnWhnTrnOnSldrMinPtr(void(*newFnWhnTrnOn)())
Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribu...
Definition ButtonToSwitch_ESP32.cpp:2930
SldrDALtchMPBttn::SldrDALtchMPBttn
SldrDALtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:2711
SldrDALtchMPBttn::setFVPPWhnTrnOffSldrDirUpArgPtr
void setFVPPWhnTrnOffSldrDirUpArgPtr(void *newFVPPWhnTrnOffArgPtr)
Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrDirUp() met...
Definition ButtonToSwitch_ESP32.cpp:2946
SldrDALtchMPBttn::getFVPPWhnTrnOnSldrMin
fncVdPtrPrmPtrType getFVPPWhnTrnOnSldrMin()
Returns the function that is set to execute every time the object's Output Current Value (otptCurVal)...
Definition ButtonToSwitch_ESP32.cpp:2818
SldrDALtchMPBttn::getFnWhnTrnOffSldrDirUp
fncPtrType getFnWhnTrnOffSldrDirUp()
Returns the function set to be called when the slider direction is set to be decrementing (down).
Definition ButtonToSwitch_ESP32.cpp:2738
SldrDALtchMPBttn::getSldrDirUp
bool getSldrDirUp()
Returns the value of the curSldrDirUp attribute.
Definition ButtonToSwitch_ESP32.cpp:2865
SldrDALtchMPBttn::setOtptSldrStpSize
bool setOtptSldrStpSize(const uint16_t &newVal)
Sets the output slider step size (otptSldrStpSize) attribute value.
Definition ButtonToSwitch_ESP32.cpp:3065
SldrDALtchMPBttn::getFnWhnTrnOffSldrMin
fncPtrType getFnWhnTrnOffSldrMin()
Returns the function that is set to execute every time the object's Output Current Value (otptCurVal)...
Definition ButtonToSwitch_ESP32.cpp:2753
SldrDALtchMPBttn::getOtptCurValIsMax
bool getOtptCurValIsMax()
Returns a boolean value indicating if the "Output Current Value" equals the maximum limit.
Definition ButtonToSwitch_ESP32.cpp:2833
SldrDALtchMPBttn::setSwpDirOnPrss
void setSwpDirOnPrss(const bool &newVal)
Sets the value of the "Auto-Swap Direction On Press" (autoSwpDirOnPrss) attribute.
Definition ButtonToSwitch_ESP32.cpp:3169
SldrDALtchMPBttn::getFVPPWhnTrnOnSldrMaxArgPtr
void * getFVPPWhnTrnOnSldrMaxArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object's...
Definition ButtonToSwitch_ESP32.cpp:2803
SldrDALtchMPBttn::setOtptValMin
bool setOtptValMin(const uint16_t &newVal)
Sets the output current value register minimum value attribute (otptValMin attribute).
Definition ButtonToSwitch_ESP32.cpp:3103
SldrDALtchMPBttn::setFVPPWhnTrnOffSldrMax
void setFVPPWhnTrnOffSldrMax(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribu...
Definition ButtonToSwitch_ESP32.cpp:2969
SldrDALtchMPBttn::getOtptValMin
uint16_t getOtptValMin()
Returns the bottom output current value register setting.
Definition ButtonToSwitch_ESP32.cpp:2860
SldrDALtchMPBttn::getOtptSldrSpd
unsigned long getOtptSldrSpd()
Returns the current setting for the Output Slider Speed value.
Definition ButtonToSwitch_ESP32.cpp:2845
SldrDALtchMPBttn::setFVPPWhnTrnOnSldrMinArgPtr
void setFVPPWhnTrnOnSldrMinArgPtr(void *newFVPPWhnTrnOnArgPtr)
Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrMin() method...
Definition ButtonToSwitch_ESP32.cpp:3026
SldrDALtchMPBttn::setFnWhnTrnOffSldrMinPtr
void setFnWhnTrnOffSldrMinPtr(void(*newFnWhnTrnOff)())
Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribu...
Definition ButtonToSwitch_ESP32.cpp:2916
SldrDALtchMPBttn::getOtptSldrStpSize
uint16_t getOtptSldrStpSize()
Returns the current setting for the Output Slider Step Size value.
Definition ButtonToSwitch_ESP32.cpp:2850
SldrDALtchMPBttn::setSwpDirOnEnd
void setSwpDirOnEnd(const bool &newVal)
Sets the value of the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) attribute.
Definition ButtonToSwitch_ESP32.cpp:3162
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:3971
SnglSrvcVdblMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:3943
SnglSrvcVdblMPBttn::~SnglSrvcVdblMPBttn
virtual ~SnglSrvcVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:3939
SnglSrvcVdblMPBttn::SnglSrvcVdblMPBttn
SnglSrvcVdblMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:3927
TgglLtchMPBttn::TgglLtchMPBttn
TgglLtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:1310
TgglLtchMPBttn::~TgglLtchMPBttn
virtual ~TgglLtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:1325
TmLtchMPBttn::TmLtchMPBttn
TmLtchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:1361
TmLtchMPBttn::getSrvcTime
const unsigned long int getSrvcTime() const
Returns the configured Service Time.
Definition ButtonToSwitch_ESP32.cpp:1395
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:1416
TmLtchMPBttn::setSrvcTime
bool setSrvcTime(const unsigned long int &newSrvcTime)
Sets a new value to the Service Time attribute.
Definition ButtonToSwitch_ESP32.cpp:1400
TmLtchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:1384
TmLtchMPBttn::~TmLtchMPBttn
virtual ~TmLtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:1380
TmVdblMPBttn::TmVdblMPBttn
TmVdblMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:3813
TmVdblMPBttn::~TmVdblMPBttn
virtual ~TmVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:3822
TmVdblMPBttn::clrStatus
void clrStatus()
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:3854
TmVdblMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:3826
TmVdblMPBttn::getVoidTime
const unsigned long int getVoidTime() const
Returns the voidTime attribute current value.
Definition ButtonToSwitch_ESP32.cpp:3865
TmVdblMPBttn::setVoidTime
bool setVoidTime(const unsigned long int &newVoidTime)
Sets a new value to the Void Time attribute.
Definition ButtonToSwitch_ESP32.cpp:3870
VdblMPBttn::setIsVoided
bool setIsVoided()
Sets the value of the isVoided attribute flag to true.
Definition ButtonToSwitch_ESP32.cpp:3538
VdblMPBttn::setFVPPWhnTrnOffVddArgPtr
void setFVPPWhnTrnOffVddArgPtr(void *newFVPPWhnTrnOffArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:3496
VdblMPBttn::getIsVoided
const bool getIsVoided() const
Returns the current value of the isVoided attribute flag.
Definition ButtonToSwitch_ESP32.cpp:3397
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:3367
VdblMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:3350
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:3461
VdblMPBttn::setFVPPWhnTrnOffVdd
void setFVPPWhnTrnOffVdd(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Voided Off State a....
Definition ButtonToSwitch_ESP32.cpp:3483
VdblMPBttn::getFVPPWhnTrnOffVddArgPtr
void * getFVPPWhnTrnOffVddArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:3382
VdblMPBttn::setFVPPWhnTrnOnVddArgPtr
void setFVPPWhnTrnOnVddArgPtr(void *newFVPPWhnTrnOnArgPtr)
Sets a pointer to an argument to be passed to the function set to execute every time the object enter...
Definition ButtonToSwitch_ESP32.cpp:3521
VdblMPBttn::~VdblMPBttn
virtual ~VdblMPBttn()
Default virtual destructor.
Definition ButtonToSwitch_ESP32.cpp:3346
VdblMPBttn::VdblMPBttn
VdblMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:3336
VdblMPBttn::getFnWhnTrnOffVdd
fncPtrType getFnWhnTrnOffVdd()
Returns the function that is set to execute every time the object exits the Voided State.
Definition ButtonToSwitch_ESP32.cpp:3362
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:3449
VdblMPBttn::getFrcOtptLvlWhnVdd
bool getFrcOtptLvlWhnVdd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch_ESP32.cpp:3372
VdblMPBttn::getStOnWhnOtpFrcd
bool getStOnWhnOtpFrcd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch_ESP32.cpp:3402
VdblMPBttn::getFVPPWhnTrnOnVdd
fncVdPtrPrmPtrType getFVPPWhnTrnOnVdd()
Returns a pointer to a function that is set to execute every time the object enters the Voided On Sta...
Definition ButtonToSwitch_ESP32.cpp:3387
VdblMPBttn::getFVPPWhnTrnOnVddArgPtr
void * getFVPPWhnTrnOnVddArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch_ESP32.cpp:3392
VdblMPBttn::setFVPPWhnTrnOnVdd
void setFVPPWhnTrnOnVdd(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Voided On State a....
Definition ButtonToSwitch_ESP32.cpp:3508
VdblMPBttn::setIsNotVoided
bool setIsNotVoided()
Sets the value of the isVoided attribute flag to false.
Definition ButtonToSwitch_ESP32.cpp:3533
VdblMPBttn::getFVPPWhnTrnOffVdd
fncVdPtrPrmPtrType getFVPPWhnTrnOffVdd()
Returns a pointer to a function that is set to execute every time the object enters the Voided Off St...
Definition ButtonToSwitch_ESP32.cpp:3377
XtrnUnltchMPBttn::clrStatus
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch_ESP32.cpp:2093
XtrnUnltchMPBttn::XtrnUnltchMPBttn
XtrnUnltchMPBttn()
Default constructor.
Definition ButtonToSwitch_ESP32.cpp:2043
XtrnUnltchMPBttn::begin
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch_ESP32.cpp:2059
MpbOtpts_t
Type to hold the complete set of output attribute flags from any DbncdMPBttn class and subclasses obj...
Definition ButtonToSwitch_ESP32.h:80