ButtonToSwitch Library for Arduino v4.5.0
A library that provides elaborated switch mechanism behavior simulation for digital signals inputs
Loading...
Searching...
No Matches
ButtonToSwitch.h
1
48#ifndef _BUTTONTOSWITCH_H_
49#define _BUTTONTOSWITCH_H_
50
51#include <Arduino.h>
52#include <stdint.h>
53
54//===========================>> BEGIN General use constant definitions
55#define _HwMinDbncTime 20 //Documented minimum wait time for a MPB signal to stabilize
56#define _StdPollDelay 10
57#define _MinSrvcTime 100
58#define _InvalidPinNum 0xFF // Value to give as "yet to be defined", the "Valid pin number" range and characteristics are development platform and environment related
59
60/*---------- DbncdMPBttn complete status related constants, argument structs, information packing and unpacking BEGIN -------*/
61const uint8_t IsOnBitPos {0};
62const uint8_t IsEnabledBitPos{1};
63const uint8_t PilotOnBitPos{2};
64const uint8_t WrnngOnBitPos{3};
65const uint8_t IsVoidedBitPos{4};
66const uint8_t IsOnScndryBitPos{5};
67const uint8_t OtptCurValBitPos{16};
68//===========================>> END General use constant definitions
69
70#ifndef MPBOTPTS_T
71 #define MPBOTPTS_T
78 struct MpbOtpts_t{
79 bool isOn;
80 bool isEnabled;
81 bool pilotOn;
82 bool wrnngOn;
83 bool isVoided;
84 bool isOnScndry;
85 uint16_t otptCurVal;
86 };
87#endif
88/*---------------- DbncdMPBttn complete status related constants, argument structs, information packing and unpacking END -------*/
89
90// Definition workaround to let a function/method return value to be a function pointer
91typedef void (*fncPtrType)();
92typedef fncPtrType (*ptrToTrnFnc)();
93
94/* Definition workaround to let a function/method return value to be a function pointer
95 to a function that receives a void* argument and returns no values: void (funcName*)(void*)
96 The resulting **fncVdPtrPrmPtrType** type then defines a pointer to a function of the described properties and signature*/
97typedef void (*fncVdPtrPrmPtrType)(void*);
98typedef fncVdPtrPrmPtrType (*ptrToTrnFncVdPtr)(void*);
99//===========================>> BEGIN General use function prototypes
100MpbOtpts_t otptsSttsUnpkg(uint32_t pkgOtpts);
101unsigned long int findMCD(unsigned long int a, unsigned long int b);
102//===========================>> END General use function prototypes
103
128
129//==========================================================>> Classes declarations BEGIN
130
141 static DbncdMPBttn** _mpbsInstncsLstPtr;
142 static unsigned long int _updTimerPeriod;
143/*
144 * This is the callback function to be executed by the TimerOne managed timer INT.
145 *
146 * The callback function duties:
147 * - Verify for a valid **_mpbsInstncsLstPtr**, if it's nullptr something failed, correct it by disabling the timer
148 * - Save the **current time** for reference and traverse the list till the end (nullptr).
149 * - For each MPB in the list verify the _updTmrAttchd == true
150 * - If _updTmrAttchd == true -> verify the ("current time" - _lstPollTime) >= _pollPeriodMs. If the condition is true:
151 * - Execute the objects mpbPollCallback()
152 * - Set _lstPollTime = "current time" *
153 */
154 static void _ISRMpbsRfrshCb();
155
156protected:
157 enum fdaDmpbStts {
158 stOffNotVPP,
159 stOffVPP,
160 stOn,
161 stOnVRP,
162 stDisabled
163 };
164 const unsigned long int _stdMinDbncTime {_HwMinDbncTime};
165
166 uint8_t _mpbttnPin{};
167 bool _pulledUp{};
168 bool _typeNO{};
169 unsigned long int _dbncTimeOrigSett{};
170
171 bool _beginDisabled{false};
172 unsigned long int _dbncRlsTimerStrt{0};
173 unsigned long int _dbncRlsTimeTempSett{0};
174 unsigned long int _dbncTimerStrt{0};
175 unsigned long int _dbncTimeTempSett{0};
176 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOff{nullptr}; // _fVPPWhnTrnOff
177 void* _fnVdPtrPrmWhnTrnOffArgPtr{nullptr}; // _fVPPWhnTrnOffArgPtr
178 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOn{nullptr}; // _fVPPWhnTrnOn
179 void* _fnVdPtrPrmWhnTrnOnArgPtr{nullptr}; // _fVPPWhnTrnOnArgPtr
180 void (*_fnWhnTrnOff)() {nullptr};
181 void (*_fnWhnTrnOn)() {nullptr};
182
183 bool _isEnabled{true};
184 volatile bool _isOn{false};
185 bool _isOnDisabled{false};
186 volatile bool _isPressed{false};
187 unsigned long int _lstPollTime{0};
188 fdaDmpbStts _mpbFdaState {stOffNotVPP};
189 DbncdMPBttn* _mpbInstnc{nullptr};
190 volatile bool _outputsChange {false};
191 uint32_t _outputsChangeCnt{0};
192 unsigned long int _pollPeriodMs{0};
193 bool _prssRlsCcl{false};
194 unsigned long int _strtDelay {0};
195 bool _sttChng {true};
196 bool _updTmrAttchd{false};
197 volatile bool _validDisablePend{false};
198 volatile bool _validEnablePend{false};
199 volatile bool _validPressPend{false};
200 volatile bool _validReleasePend{false};
201
202 void clrSttChng();
203 const bool getIsPressed() const;
204 virtual void mpbPollCallback();
205 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
206 void _popMpb(DbncdMPBttn** &DMpbTmrUpdLst, DbncdMPBttn* mpbToPop);
207 void _pushMpb(DbncdMPBttn** &DMpbTmrUpdLst, DbncdMPBttn* mpbToPush);
208 void _setIsEnabled(const bool &newEnabledValue);
209 void _setLstPollTime(const unsigned long int &newLstPollTIme);
210 void setSttChng();
211 void _turnOff();
212 void _turnOn();
213 virtual void updFdaState();
214 bool updIsPressed();
215 unsigned long int _updTmrsMCDCalc();
216 virtual bool updValidPressesStatus();
217
218public:
223 DbncdMPBttn();
232 DbncdMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp = true, const bool &typeNO = true, const unsigned long int &dbncTimeOrigSett = 0);
238 DbncdMPBttn(const DbncdMPBttn& other);
243 virtual ~DbncdMPBttn();
261 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
272 void clrStatus(bool clrIsOn = true);
283 void disable();
293 void enable();
307 bool end();
315 const unsigned long int getCurDbncTime() const;
326 fncPtrType getFnWhnTrnOff();
337 fncPtrType getFnWhnTrnOn();
346 fncVdPtrPrmPtrType getFVPPWhnTrnOff();
361 fncVdPtrPrmPtrType getFVPPWhnTrnOn();
367 void* getFVPPWhnTrnOnArgPtr();
376 const bool getIsEnabled() const;
385 const bool getIsOn () const;
397 const bool getIsOnDisabled() const;
405 const unsigned long int getLstPollTime();
413 const uint32_t getOtptsSttsPkgd();
424 const bool getOutputsChange() const;
434 const unsigned long int getPollPeriodMs();
444 unsigned long int getStrtDelay();
454 bool getUpdTmrAttchd();
460 bool init(const uint8_t &mpbttnPin, const bool &pulledUp = true, const bool &typeNO = true, const unsigned long int &dbncTimeOrigSett = 0);
471 bool pause();
477 void resetDbncTime();
483 void resetFda();
494 bool resume();
502 void setBeginDisabled(const bool &newBeginDisabled = false);
514 bool setDbncTime(const unsigned long int &newDbncTime);
522 void setFnWhnTrnOffPtr(void(*newFnWhnTrnOff)());
530 void setFnWhnTrnOnPtr(void (*newFnWhnTrnOn)());
539 void setFVPPWhnTrnOff(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
547 void setFVPPWhnTrnOffArgPtr(void* newFVPPWhnTrnOffArgPtr);
556 void setFVPPWhnTrnOn(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
564 void setFVPPWhnTrnOnArgPtr(void* newFVPPWhnTrnOnArgPtr);
575 void setIsOnDisabled(const bool &newIsOnDisabled);
583 void setOutputsChange(bool newOutputsChange);
584
585};
586
587//==========================================================>>
588
599public:
614 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);
620 DbncdDlydMPBttn(const DbncdDlydMPBttn& other);
624 virtual ~DbncdDlydMPBttn();
633 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);
643 void setStrtDelay(const unsigned long int &newStrtDelay);
644};
645
646//==========================================================>>
647
665protected:
666 enum fdaLmpbStts {
667 stOffNotVPP,
668 stOffVPP,
669 stOnNVRP,
670 stOnVRP,
671 stLtchNVUP,
672 stLtchdVUP,
673 stOffVUP,
674 stOffNVURP,
675 stOffVURP,
676 stDisabled
677 };
678 bool _isLatched{false};
679 fdaLmpbStts _mpbFdaState {stOffNotVPP};
680 bool _trnOffASAP{true};
681 volatile bool _validUnlatchPend{false};
682 volatile bool _validUnlatchRlsPend{false};
683
684 virtual void mpbPollCallback();
685 virtual void stDisabled_In(){};
686 virtual void stDisabled_Out(){};
687 virtual void stLtchNVUP_Do(){};
688 virtual void stOffNotVPP_In(){};
689 virtual void stOffNotVPP_Out(){};
690 virtual void stOffNVURP_Do(){};
691 virtual void stOffVPP_Out(){};
692 virtual void stOffVURP_Out(){};
693 virtual void stOnNVRP_Do(){};
694 virtual void updFdaState();
695 virtual void updValidUnlatchStatus() = 0;
696public:
700 LtchMPBttn();
706 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);
712 LtchMPBttn(const LtchMPBttn& other);
716 virtual ~LtchMPBttn();
720 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
724 void clrStatus(bool clrIsOn = true);
733 const bool getIsLatched() const;
743 bool getTrnOffASAP();
751 const bool getUnlatchPend() const;
759 const bool getUnlatchRlsPend() const;
771 void setTrnOffASAP(const bool &newVal);
779 void setUnlatchPend(const bool &newVal);
787 void setUnlatchRlsPend(const bool &newVal);
798 bool unlatch();
799};
800
801//==========================================================>>
802
811protected:
812 virtual void stOffNVURP_Do();
813 virtual void updValidUnlatchStatus();
814
815public:
826 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);
832 TgglLtchMPBttn(const TgglLtchMPBttn& other);
836 virtual ~TgglLtchMPBttn();
837};
838
839//==========================================================>>
840
851protected:
852 bool _tmRstbl {true};
853 unsigned long int _srvcTime {};
854 unsigned long int _srvcTimerStrt{0};
855
856 virtual void stOffNotVPP_Out();
857 virtual void stOffVPP_Out();
858 virtual void updValidUnlatchStatus();
859
860public:
865 TmLtchMPBttn();
873 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);
879 TmLtchMPBttn(const TmLtchMPBttn &other);
883 virtual ~TmLtchMPBttn();
887 void clrStatus(bool clrIsOn = true);
893 const unsigned long int getSrvcTime() const;
906 bool setSrvcTime(const unsigned long int &newSrvcTime);
914 void setTmerRstbl(const bool &newIsRstbl);
915};
916
917//==========================================================>>
918
930protected:
931 unsigned int _wrnngPrctg {0};
932
933 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffPilot{nullptr}; // _fVPPWhnTrnOffPilot
934 void* _fnVdPtrPrmWhnTrnOffPilotArgPtr{nullptr}; // _fVPPWhnTrnOffPilotArgPtr
935 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnPilot{nullptr}; // _fVPPWhnTrnOnPilot
936 void* _fnVdPtrPrmWhnTrnOnPilotArgPtr{nullptr}; // _fVPPWhnTrnOnPilotArgPtr
937 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffWrnng{nullptr}; // _fVPPWhnTrnOffWrnng
938 void* _fnVdPtrPrmWhnTrnOffWrnngArgPtr{nullptr}; // _fVPPWhnTrnOffWrnngArgPtr
939 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnWrnng{nullptr}; // _fVPPWhnTrnOnWrnng
940 void* _fnVdPtrPrmWhnTrnOnWrnngArgPtr{nullptr}; // _fVPPWhnTrnOnWrnngArgPtr
941 void (*_fnWhnTrnOffPilot)() {nullptr};
942 void (*_fnWhnTrnOffWrnng)() {nullptr};
943 void (*_fnWhnTrnOnPilot)() {nullptr};
944 void (*_fnWhnTrnOnWrnng)() {nullptr};
945 bool _keepPilot{false};
946 volatile bool _pilotOn{false};
947 unsigned long int _wrnngMs{0};
948 volatile bool _wrnngOn {false};
949
950 bool _validWrnngSetPend{false};
951 bool _validWrnngResetPend{false};
952 bool _validPilotSetPend{false};
953 bool _validPilotResetPend{false};
954
955 virtual void mpbPollCallback();
956 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
957 virtual void stDisabled_In();
958 virtual void stLtchNVUP_Do();
959 virtual void stOffNotVPP_In();
960 virtual void stOffVPP_Out();
961 virtual void stOnNVRP_Do();
962 void _turnOffPilot();
963 void _turnOffWrnng();
964 void _turnOnPilot();
965 void _turnOnWrnng();
966 bool updPilotOn();
967 bool updWrnngOn();
968public:
981 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);
995 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
999 void clrStatus(bool clrIsOn = true);
1010 fncPtrType getFnWhnTrnOffPilot();
1021 fncPtrType getFnWhnTrnOffWrnng();
1032 fncPtrType getFnWhnTrnOnPilot();
1043 fncPtrType getFnWhnTrnOnWrnng();
1052 fncVdPtrPrmPtrType getFVPPWhnTrnOffPilot();
1067 fncVdPtrPrmPtrType getFVPPWhnTrnOnPilot();
1082 fncVdPtrPrmPtrType getFVPPWhnTrnOffWrnng();
1097 fncVdPtrPrmPtrType getFVPPWhnTrnOnWrnng();
1113 const bool getPilotOn() const;
1125 const bool getWrnngOn() const;
1133 void setFnWhnTrnOffPilotPtr(void(*newFnWhnTrnOff)());
1141 void setFnWhnTrnOffWrnngPtr(void(*newFnWhnTrnOff)());
1149 void setFnWhnTrnOnPilotPtr(void(*newFnWhnTrnOn)());
1157 void setFnWhnTrnOnWrnngPtr(void(*newFnWhnTrnOn)());
1166 void setFVPPWhnTrnOffPilot(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
1174 void setFVPPWhnTrnOffPilotArgPtr(void* newFVPPWhnTrnOffArgPtr);
1183 void setFVPPWhnTrnOnPilot(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
1191 void setFVPPWhnTrnOnPilotArgPtr(void* newFVPPWhnTrnOnArgPtr);
1200 void setFVPPWhnTrnOffWrnng(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
1208 void setFVPPWhnTrnOffWrnngArgPtr(void* newFVPPWhnTrnOffArgPtr);
1217 void setFVPPWhnTrnOnWrnng(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
1225 void setFVPPWhnTrnOnWrnngArgPtr(void* newFVPPWhnTrnOnArgPtr);
1231 void setKeepPilot(const bool &newKeepPilot);
1237 bool setSrvcTime(const unsigned long int &newSvcTime);
1249 bool setWrnngPrctg (const unsigned int &newWrnngPrctg);
1250};
1251
1252//==========================================================>>
1253
1263protected:
1264 DbncdDlydMPBttn* _unLtchBttn {nullptr};
1265 bool _xtrnUnltchPRlsCcl {false};
1266
1267 virtual void stOffNVURP_Do();
1268 virtual void updValidUnlatchStatus();
1269
1270public:
1288 XtrnUnltchMPBttn(const uint8_t &mpbttnPin, DbncdDlydMPBttn* unLtchBttn,
1289 const bool &pulledUp, const bool &typeNO, const unsigned long int &dbncTimeOrigSett, const unsigned long int &strtDelay);
1297 XtrnUnltchMPBttn(const uint8_t &mpbttnPin,
1298 const bool &pulledUp, const bool &typeNO, const unsigned long int &dbncTimeOrigSett, const unsigned long int &strtDelay);
1302 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
1306 void clrStatus(bool clrIsOn = true);
1307};
1308
1309//==========================================================>>
1310
1336protected:
1337 enum fdaDALmpbStts{
1338 stOffNotVPP,
1339 stOffVPP,
1340 stOnMPBRlsd,
1341 //--------
1342 stOnStrtScndMod,
1343 stOnScndMod,
1344 stOnEndScndMod,
1345 //--------
1346 stOnTurnOff,
1347 //--------
1348 stDisabled
1349 };
1350 volatile bool _isOnScndry{false};
1351 fdaDALmpbStts _mpbFdaState {stOffNotVPP};
1352 unsigned long _scndModActvDly {2000};
1353 unsigned long _scndModTmrStrt {0};
1354 bool _validScndModPend{false};
1355
1356 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffScndry{nullptr}; // _fVPPWhnTrnOffScndry
1357 void* _fnVdPtrPrmWhnTrnOffScndryArgPtr{nullptr}; // _fVPPWhnTrnOffScndryArgPtr
1358 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnScndry{nullptr}; // _fVPPWhnTrnOnScndry
1359 void* _fnVdPtrPrmWhnTrnOnScndryArgPtr{nullptr}; // _fVPPWhnTrnOnScndryArgPtr
1360 void (*_fnWhnTrnOffScndry)() {nullptr};
1361 void (*_fnWhnTrnOnScndry)() {nullptr};
1362
1363 virtual void mpbPollCallback();
1364 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1365 virtual void stDisabled_In(){};
1366 virtual void stOnEndScndMod_Out(){};
1367 virtual void stOnScndMod_Do() = 0;
1368 virtual void stOnStrtScndMod_In(){};
1369 virtual void _turnOffScndry();
1370 virtual void _turnOnScndry();
1371 virtual void updFdaState();
1372 virtual bool updValidPressesStatus();
1373 virtual void updValidUnlatchStatus();
1374
1375public:
1385 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);
1394 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
1398 void clrStatus(bool clrIsOn = true);
1407 fncPtrType getFnWhnTrnOffScndry();
1416 fncPtrType getFnWhnTrnOnScndry();
1425 fncVdPtrPrmPtrType getFVPPWhnTrnOffScndry();
1440 fncVdPtrPrmPtrType getFVPPWhnTrnOnScndry();
1454 bool getIsOnScndry();
1462 unsigned long getScndModActvDly();
1470 void setFnWhnTrnOffScndryPtr(void(*newFnWhnTrnOff)());
1478 void setFnWhnTrnOnScndryPtr(void (*newFnWhnTrnOn)());
1487 void setFVPPWhnTrnOffScndry(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
1495 void setFVPPWhnTrnOffScndryArgPtr(void* newFVPPWhnTrnOffArgPtr);
1504 void setFVPPWhnTrnOnScndry(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
1512 void setFVPPWhnTrnOnScndryArgPtr(void* newFVPPWhnTrnOnArgPtr);
1523 bool setScndModActvDly(const unsigned long &newVal);
1524};
1525
1526//==========================================================>>
1527
1541protected:
1542 virtual void stOnEndScndMod_Out();
1543 virtual void stOnScndMod_Do();
1544 virtual void stOnStrtScndMod_In();
1545public:
1555 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);
1563 void clrStatus(bool clrIsOn = true);
1564};
1565
1566//==========================================================>>
1567
1586protected:
1587 bool _autoSwpDirOnEnd{true}; // Changes slider direction automatically when reaches _otptValMax or _otptValMin
1588 bool _autoSwpDirOnPrss{false};// Changes slider direction each time it enters slider mode
1589 bool _curSldrDirUp{true};
1590 uint16_t _initOtptCurVal{};
1591 uint16_t _otptCurVal{};
1592 bool _otptCurValIsMax{false};
1593 bool _otptCurValIsMin{false};
1594 unsigned long _otptSldrSpd{1};
1595 uint16_t _otptSldrStpSize{0x01};
1596 uint16_t _otptValMax{0xFFFF};
1597 uint16_t _otptValMin{0x0000};
1598
1599
1600
1601 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffSldrMax{nullptr}; // _fVPPWhnTrnOffSldrMax
1602 void* _fnVdPtrPrmWhnTrnOffSldrMaxArgPtr{nullptr}; // _fVPPWhnTrnOffSldrMaxArgPtr
1603 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnSldrMax{nullptr}; // _fVPPWhnTrnOnSldrMax
1604 void* _fnVdPtrPrmWhnTrnOnSldrMaxArgPtr{nullptr}; // _fVPPWhnTrnOnSldrMaxArgPtr
1605 void (*_fnWhnTrnOffSldrMax)() {nullptr};
1606 void (*_fnWhnTrnOnSldrMax)() {nullptr};
1607
1608 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffSldrMin{nullptr}; // _fVPPWhnTrnOffSldrMin
1609 void* _fnVdPtrPrmWhnTrnOffSldrMinArgPtr{nullptr}; // _fVPPWhnTrnOffSldrMinArgPtr
1610 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnSldrMin{nullptr}; // _fVPPWhnTrnOnSldrMin
1611 void* _fnVdPtrPrmWhnTrnOnSldrMinArgPtr{nullptr}; // _fVPPWhnTrnOnSldrMinArgPtr
1612 void (*_fnWhnTrnOffSldrMin)() {nullptr};
1613 void (*_fnWhnTrnOnSldrMin)() {nullptr};
1614
1615
1616
1617 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1618 bool _setSldrDir(const bool &newVal);
1619 void stOnEndScndMod_Out();
1620 virtual void stOnScndMod_Do();
1621 virtual void stOnStrtScndMod_In();
1622 void _turnOffSldrMax();
1623 void _turnOnSldrMax();
1624 void _turnOffSldrMin();
1625 void _turnOnSldrMin();
1626
1627public:
1639 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);
1648 void clrStatus(bool clrIsOn = true);
1654 uint16_t getOtptCurVal();
1664 bool getOtptCurValIsMax();
1674 bool getOtptCurValIsMin();
1684 unsigned long getOtptSldrSpd();
1694 uint16_t getOtptSldrStpSize();
1700 uint16_t getOtptValMax();
1706 uint16_t getOtptValMin();
1716 bool getSldrDirUp();
1728 bool setOtptCurVal(const uint16_t &newVal);
1743 bool setOtptSldrSpd(const uint16_t &newVal);
1760 bool setOtptSldrStpSize(const uint16_t &newVal);
1776 bool setOtptValMax(const uint16_t &newVal);
1792 bool setOtptValMin(const uint16_t &newVal);
1805 bool setSldrDirDn();
1818 bool setSldrDirUp();
1828 void setSwpDirOnEnd(const bool &newVal);
1837 void setSwpDirOnPrss(const bool &newVal);
1845 bool swapSldrDir();
1846};
1847
1848//==========================================================>>
1849
1869private:
1870 void setFrcdOtptWhnVdd(const bool &newVal);
1871 void setStOnWhnOtpFrcd(const bool &newVal);
1872
1873protected:
1874 enum fdaVmpbStts{
1875 stOffNotVPP,
1876 stOffVPP,
1877 stOnNVRP,
1878 //--------
1879 stOnVVP,
1880 stOnVddNVUP,
1881 stOffVddNVUP,
1882 stOffVddVUP,
1883 stOffUnVdd,
1884 //--------
1885 stOnVRP,
1886 stOnTurnOff,
1887 stOff,
1888 //--------
1889 stDisabled
1890 };
1891 fdaVmpbStts _mpbFdaState {stOffNotVPP};
1892
1893 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOffVdd{nullptr}; // _fVPPWhnTrnOffVdd
1894 void* _fnVdPtrPrmWhnTrnOffVddArgPtr{nullptr}; // _fVPPWhnTrnOffVddArgPtr
1895 fncVdPtrPrmPtrType _fnVdPtrPrmWhnTrnOnVdd{nullptr}; // _fVPPWhnTrnOnVdd
1896 void* _fnVdPtrPrmWhnTrnOnVddArgPtr{nullptr}; // _fVPPWhnTrnOnVddArgPtr
1897 void (*_fnWhnTrnOffVdd)() {nullptr};
1898 void (*_fnWhnTrnOnVdd)() {nullptr};
1899 bool _frcOtptLvlWhnVdd {true};
1900 bool _isVoided{false};
1901 bool _stOnWhnOtptFrcd{false};
1902 bool _validVoidPend{false};
1903 bool _validUnvoidPend{false};
1904
1905 virtual void mpbPollCallback();
1906 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1907 bool setVoided(const bool &newVoidValue);
1908 virtual void stDisabled_In();
1909 virtual void stDisabled_Out();
1910 virtual void stOffNotVPP_In(){};
1911 virtual void stOffVddNVUP_Do(){}; //This provides a setting point for calculating the _validUnvoidPend
1912 virtual void stOffVPP_Do(){}; // This provides a setting point for the voiding mechanism to be started
1913 void _turnOffVdd();
1914 void _turnOnVdd();
1915 virtual void updFdaState();
1916 virtual bool updVoidStatus() = 0;
1917
1918public:
1922 VdblMPBttn();
1930 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);
1934 virtual ~VdblMPBttn();
1938 void clrStatus(bool clrIsOn = true);
1947 fncPtrType getFnWhnTrnOffVdd();
1956 fncPtrType getFnWhnTrnOnVdd();
1966 bool getFrcOtptLvlWhnVdd();
1975 fncVdPtrPrmPtrType getFVPPWhnTrnOffVdd();
1990 fncVdPtrPrmPtrType getFVPPWhnTrnOnVdd();
2004 const bool getIsVoided() const;
2016 bool getStOnWhnOtpFrcd();
2024 void setFnWhnTrnOffVddPtr(void(*newFnWhnTrnOff)());
2032 void setFnWhnTrnOnVddPtr(void(*newFnWhnTrnOn)());
2041 void setFVPPWhnTrnOffVdd(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void* argPtr = nullptr);
2049 void setFVPPWhnTrnOffVddArgPtr(void* newFVPPWhnTrnOffArgPtr);
2058 void setFVPPWhnTrnOnVdd(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void* argPtr = nullptr);
2066 void setFVPPWhnTrnOnVddArgPtr(void* newFVPPWhnTrnOnArgPtr);
2077 bool setIsNotVoided();
2085 bool setIsVoided();
2086};
2087
2088//==========================================================>>
2089
2099protected:
2100 unsigned long int _voidTime;
2101 unsigned long int _voidTmrStrt{0};
2102
2103 virtual void stOffNotVPP_In();
2104 virtual void stOffVddNVUP_Do(); //This provides a setting point for calculating the _validUnvoidPend
2105 virtual void stOffVPP_Do(); // This provides a setting point for the voiding mechanism to be started
2106 bool updIsPressed();
2107 virtual bool updVoidStatus();
2108
2109public:
2113 TmVdblMPBttn();
2121 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);
2125 virtual ~TmVdblMPBttn();
2129 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
2133 void clrStatus();
2141 const unsigned long int getVoidTime() const;
2152 bool setVoidTime(const unsigned long int &newVoidTime);
2153};
2154
2155//==========================================================>>
2156
2173protected:
2174 virtual void stOffVddNVUP_Do(); //This provides the calculation for the _validUnvoidPend
2175 virtual bool updVoidStatus();
2176
2177public:
2188 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);
2192 virtual ~SnglSrvcVdblMPBttn();
2196 virtual bool begin(const unsigned long int &pollDelayMs = _StdPollDelay);
2197};
2198
2199//==========================================================>>
2200
2201#endif /*_BUTTONTOSWITCH_H_*/
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:2345
~DDlydDALtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:2341
DDlydDALtchMPBttn()
Default class constructor.
Definition ButtonToSwitch.cpp:2332
bool setScndModActvDly(const unsigned long &newVal)
Sets a new value for the scndModActvDly class attribute.
Definition ButtonToSwitch.cpp:2064
void setFnWhnTrnOnScndryPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object enters the Secondary On State.
Definition ButtonToSwitch.cpp:2023
fncVdPtrPrmPtrType getFVPPWhnTrnOnScndry()
Returns a pointer to a function that is set to execute every time the object enters the Secondary Mod...
Definition ButtonToSwitch.cpp:1972
fncPtrType getFnWhnTrnOnScndry()
Returns the function that is set to execute every time the object enters the Secondary On State.
Definition ButtonToSwitch.cpp:1957
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.cpp:2056
void * getFVPPWhnTrnOffScndryArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:1967
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1942
bool getIsOnScndry()
Returns the current value of the isOnScndry attribute flag.
Definition ButtonToSwitch.cpp:1982
DblActnLtchMPBttn()
Abstract Class default constructor.
Definition ButtonToSwitch.cpp:1921
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.cpp:2047
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.cpp:2030
unsigned long getScndModActvDly()
Returns the current value of the scndModActvDly class attribute.
Definition ButtonToSwitch.cpp:1987
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:1934
void * getFVPPWhnTrnOnScndryArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:1977
void setFnWhnTrnOffScndryPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object enters the Secondary Off State...
Definition ButtonToSwitch.cpp:2015
fncPtrType getFnWhnTrnOffScndry()
returns the function that is set to execute every time the object enters the Secondary Off State.
Definition ButtonToSwitch.cpp:1952
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.cpp:2039
~DblActnLtchMPBttn()
Virtual destructor.
Definition ButtonToSwitch.cpp:1930
fncVdPtrPrmPtrType getFVPPWhnTrnOffScndry()
Returns a pointer to a function that is set to execute every time the object enters the Secondary Mod...
Definition ButtonToSwitch.cpp:1962
Models a Debounced Delayed MPB (DD-MPB).
Definition ButtonToSwitch.h:598
virtual ~DbncdDlydMPBttn()
Class destructor.
Definition ButtonToSwitch.cpp:918
DbncdDlydMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:901
void setStrtDelay(const unsigned long int &newStrtDelay)
Sets a new value to the "Start Delay" strtDelay attribute.
Definition ButtonToSwitch.cpp:932
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.cpp:922
void setBeginDisabled(const bool &newBeginDisabled=false)
Sets the starting isDisabled state.
Definition ButtonToSwitch.cpp:537
fncPtrType getFnWhnTrnOn()
Returns the function that is set to execute every time the object enters the On State.
Definition ButtonToSwitch.cpp:252
void setFVPPWhnTrnOff(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Off State.
Definition ButtonToSwitch.cpp:573
const unsigned long int getPollPeriodMs()
Returns the poll period time setting attribute's value.
Definition ButtonToSwitch.cpp:312
void resetFda()
Resets the MPB behavior automaton to it's Initial or Start State
Definition ButtonToSwitch.cpp:488
void clrStatus(bool clrIsOn=true)
Clears and resets flags, timers and counters modified through the object's signals processing.
Definition ButtonToSwitch.cpp:192
const unsigned long int getCurDbncTime() const
Returns the current debounce period time set for the object.
Definition ButtonToSwitch.cpp:242
void enable()
Enables the input signal processing.
Definition ButtonToSwitch.cpp:221
bool pause()
Pauses the software timer updating the computation of the object's internal flags value (object's sta...
Definition ButtonToSwitch.cpp:377
virtual ~DbncdMPBttn()
Default virtual destructor.
Definition ButtonToSwitch.cpp:155
fncVdPtrPrmPtrType getFVPPWhnTrnOff()
Returns a pointer to a function that is set to execute every time the object enters the Off State.
Definition ButtonToSwitch.cpp:257
void setIsOnDisabled(const bool &newIsOnDisabled)
Sets the value of the isOnDisabled attribute.
Definition ButtonToSwitch.cpp:622
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.cpp:327
bool end()
Detaches the object from the timer that monitors the input pins, compute and updates the object's sta...
Definition ButtonToSwitch.cpp:226
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.cpp:160
void resetDbncTime()
Resets the debounce process time of the object to the value used at instantiation.
Definition ButtonToSwitch.cpp:482
void setFVPPWhnTrnOn(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the On State.
Definition ButtonToSwitch.cpp:589
fncVdPtrPrmPtrType getFVPPWhnTrnOn()
Returns a pointer to a function that is set to execute every time the object enters the On State.
Definition ButtonToSwitch.cpp:267
DbncdMPBttn()
Default class constructor.
Definition ButtonToSwitch.cpp:99
void disable()
Disables the input signal processing, ignoring the changes of its values.
Definition ButtonToSwitch.cpp:216
bool resume()
Restarts the software timer updating the calculation of the object internal flags.
Definition ButtonToSwitch.cpp:496
const bool getIsEnabled() const
Returns the value of the isEnabled attribute flag, indicating the Enabled or Disabled status of the o...
Definition ButtonToSwitch.cpp:277
const unsigned long int getLstPollTime()
Returns the time stamp of the last state update for the object.
Definition ButtonToSwitch.cpp:297
const bool getIsOnDisabled() const
Returns the value of the isOnDisabled attribute.
Definition ButtonToSwitch.cpp:287
void * getFVPPWhnTrnOnArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:272
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.cpp:598
void * getFVPPWhnTrnOffArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:262
void setFnWhnTrnOffPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object enters the Off State.
Definition ButtonToSwitch.cpp:559
const bool getOutputsChange() const
Returns the value of the outputsChange attribute flag.
Definition ButtonToSwitch.cpp:307
const bool getIsOn() const
Returns the value of the isOn attribute flag.
Definition ButtonToSwitch.cpp:282
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.cpp:582
bool getUpdTmrAttchd()
Returns the value of the Attached to the update timer attribute.
Definition ButtonToSwitch.cpp:322
void setFnWhnTrnOnPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object enters the On State.
Definition ButtonToSwitch.cpp:566
unsigned long int getStrtDelay()
Returns the current value of strtDelay attribute.
Definition ButtonToSwitch.cpp:317
const uint32_t getOtptsSttsPkgd()
Returns the relevant attribute flags values for the object state encoded as a 32 bits value.
Definition ButtonToSwitch.cpp:302
fncPtrType getFnWhnTrnOff()
Returns the function that is set to execute every time the object enters the Off State.
Definition ButtonToSwitch.cpp:247
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.cpp:645
bool setDbncTime(const unsigned long int &newDbncTime)
Sets the debounce process time.
Definition ButtonToSwitch.cpp:544
bool setSrvcTime(const unsigned long int &newSvcTime)
See TmLtchMPBttn::setSrvcTime(const unsigned long int)
Definition ButtonToSwitch.cpp:1631
fncVdPtrPrmPtrType getFVPPWhnTrnOffWrnng()
Returns a pointer to a function that is set to execute every time the object enters the Warning Off S...
Definition ButtonToSwitch.cpp:1464
void * getFVPPWhnTrnOffWrnngArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:1469
fncPtrType getFnWhnTrnOnPilot()
Returns the function that is set to execute every time the object's Pilot attribute flag enters the O...
Definition ButtonToSwitch.cpp:1434
void * getFVPPWhnTrnOnWrnngArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:1479
fncVdPtrPrmPtrType getFVPPWhnTrnOnWrnng()
Returns a pointer to a function that is set to execute every time the object enters the Warning On St...
Definition ButtonToSwitch.cpp:1474
void setFnWhnTrnOffWrnngPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object's Warning is reset.
Definition ButtonToSwitch.cpp:1535
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.cpp:1616
fncPtrType getFnWhnTrnOffWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch.cpp:1429
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.cpp:1565
fncVdPtrPrmPtrType getFVPPWhnTrnOnPilot()
Returns a pointer to a function that is set to execute every time the object enters the Pilot On Stat...
Definition ButtonToSwitch.cpp:1454
const bool getWrnngOn() const
Returns the current value of the warningOn attribute flag.
Definition ButtonToSwitch.cpp:1489
void setFnWhnTrnOnPilotPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object's Pilot is set.
Definition ButtonToSwitch.cpp:1542
const bool getPilotOn() const
Returns the current value of the pilotOn attribute flag.
Definition ButtonToSwitch.cpp:1484
void setFVPPWhnTrnOffPilot(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Pilot Off State.
Definition ButtonToSwitch.cpp:1556
void * getFVPPWhnTrnOffPilotArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:1449
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1407
fncPtrType getFnWhnTrnOffPilot()
Returns the function that is set to execute every time the object's Pilot attribute flag enters the O...
Definition ButtonToSwitch.cpp:1424
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.cpp:1582
HntdTmLtchMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:1368
void setFnWhnTrnOnWrnngPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object's Wrnng is set.
Definition ButtonToSwitch.cpp:1549
void * getFVPPWhnTrnOnPilotArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:1459
void setFVPPWhnTrnOffWrnng(fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Warning Off State.
Definition ButtonToSwitch.cpp:1590
bool setWrnngPrctg(const unsigned int &newWrnngPrctg)
Sets the value for the percentage of service time for calculating the warningOn flag value.
Definition ButtonToSwitch.cpp:1643
fncPtrType getFnWhnTrnOnWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch.cpp:1439
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.cpp:1599
fncVdPtrPrmPtrType getFVPPWhnTrnOffPilot()
Returns a pointer to a function that is set to execute every time the object enters the Pilot Off Sta...
Definition ButtonToSwitch.cpp:1444
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:1399
void setFnWhnTrnOffPilotPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object's Pilot is reset.
Definition ButtonToSwitch.cpp:1528
void setFVPPWhnTrnOnWrnng(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Warning On State.
Definition ButtonToSwitch.cpp:1607
void setFVPPWhnTrnOnPilot(fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
Sets a function to be executed every time the object enters the Pilot On State.
Definition ButtonToSwitch.cpp:1573
void setKeepPilot(const bool &newKeepPilot)
Sets the configuration of the keepPilot service attribute.
Definition ButtonToSwitch.cpp:1624
~HntdTmLtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:1395
const bool getIsLatched() const
Returns the value of the isLatched attribute flag, indicating the Latched or Unlatched condition of t...
Definition ButtonToSwitch.cpp:979
bool unlatch()
Sets the values of the flags needed to unlatch a latched MPB.
Definition ButtonToSwitch.cpp:1035
const bool getUnlatchRlsPend() const
Returns the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch.cpp:994
const bool getUnlatchPend() const
Returns the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch.cpp:989
virtual ~LtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:959
void setUnlatchPend(const bool &newVal)
Sets the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch.cpp:1021
void setTrnOffASAP(const bool &newVal)
Sets the value of the trnOffASAP attribute.
Definition ButtonToSwitch.cpp:1014
bool getTrnOffASAP()
Returns the value of the trnOffASAP attribute flag.
Definition ButtonToSwitch.cpp:984
void setUnlatchRlsPend(const bool &newVal)
Sets the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch.cpp:1028
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:962
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:970
LtchMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:941
void clrStatus(bool clrIsOn=true)
Definition ButtonToSwitch.cpp:2400
bool setOtptSldrSpd(const uint16_t &newVal)
Sets the output slider speed (otptSldrSpd) attribute.
Definition ButtonToSwitch.cpp:2471
uint16_t getOtptValMax()
Returns the top output current value register setting.
Definition ButtonToSwitch.cpp:2436
bool getOtptCurValIsMin()
Returns the result of comparing the Output Current Value to the Minimum value setting
Definition ButtonToSwitch.cpp:2420
bool setSldrDirDn()
Sets the value of the curSldrDirUp attribute to false.
Definition ButtonToSwitch.cpp:2554
bool setOtptValMax(const uint16_t &newVal)
Sets the output current value register maximum value attribute (otptValMax attribute).
Definition ButtonToSwitch.cpp:2497
bool swapSldrDir()
Inverts the current curSldrDirUp attribute value.
Definition ButtonToSwitch.cpp:2666
~SldrDALtchMPBttn()
Virtual class destructor.
Definition ButtonToSwitch.cpp:2396
bool setOtptCurVal(const uint16_t &newVal)
Sets the output current value register.
Definition ButtonToSwitch.cpp:2458
uint16_t getOtptCurVal()
Returns the Output Current Value (otpCurVal) attribute.
Definition ButtonToSwitch.cpp:2409
bool setSldrDirUp()
Sets the value of the curSldrDirUp attribute to true.
Definition ButtonToSwitch.cpp:2559
SldrDALtchMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:2386
bool getSldrDirUp()
Returns the value of the curSldrDirUp attribute.
Definition ButtonToSwitch.cpp:2446
bool setOtptSldrStpSize(const uint16_t &newVal)
Sets the output slider step size (otptSldrStpSize) attribute value.
Definition ButtonToSwitch.cpp:2484
bool getOtptCurValIsMax()
Returns a boolean value indicating if the "Output Current Value" equals the maximum limit.
Definition ButtonToSwitch.cpp:2414
void setSwpDirOnPrss(const bool &newVal)
Sets the value of the "Auto-Swap Direction On Press" (autoSwpDirOnPrss) attribute.
Definition ButtonToSwitch.cpp:2571
bool setOtptValMin(const uint16_t &newVal)
Sets the output current value register minimum value attribute (otptValMin attribute).
Definition ButtonToSwitch.cpp:2516
uint16_t getOtptValMin()
Returns the bottom output current value register setting.
Definition ButtonToSwitch.cpp:2441
unsigned long getOtptSldrSpd()
Returns the current setting for the Output Slider Speed value.
Definition ButtonToSwitch.cpp:2426
uint16_t getOtptSldrStpSize()
Returns the current setting for the Output Slider Step Size value.
Definition ButtonToSwitch.cpp:2431
void setSwpDirOnEnd(const bool &newVal)
Sets the value of the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) attribute.
Definition ButtonToSwitch.cpp:2564
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:3262
virtual ~SnglSrvcVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:3258
SnglSrvcVdblMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:3246
TgglLtchMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:1236
virtual ~TgglLtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:1251
TmLtchMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:1283
const unsigned long int getSrvcTime() const
Returns the configured Service Time.
Definition ButtonToSwitch.cpp:1313
void setTmerRstbl(const bool &newIsRstbl)
Configures the timer for the Service Time to be reseted before it reaches unlatching time.
Definition ButtonToSwitch.cpp:1331
bool setSrvcTime(const unsigned long int &newSrvcTime)
Sets a new value to the Service Time attribute.
Definition ButtonToSwitch.cpp:1318
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1306
virtual ~TmLtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:1302
TmVdblMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:3159
virtual ~TmVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:3168
void clrStatus()
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:3180
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:3172
const unsigned long int getVoidTime() const
Returns the voidTime attribute current value.
Definition ButtonToSwitch.cpp:3187
bool setVoidTime(const unsigned long int &newVoidTime)
Sets a new value to the Void Time attribute.
Definition ButtonToSwitch.cpp:3192
bool setIsVoided()
Sets the value of the isVoided attribute flag to true.
Definition ButtonToSwitch.cpp:2900
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.cpp:2872
const bool getIsVoided() const
Returns the current value of the isVoided attribute flag.
Definition ButtonToSwitch.cpp:2807
fncPtrType getFnWhnTrnOnVdd()
Returns the function that is set to execute every time the object enters the Voided or "Voided On" St...
Definition ButtonToSwitch.cpp:2777
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:2763
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.cpp:2849
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.cpp:2863
void * getFVPPWhnTrnOffVddArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:2792
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.cpp:2888
virtual ~VdblMPBttn()
Default virtual destructor.
Definition ButtonToSwitch.cpp:2759
VdblMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:2749
fncPtrType getFnWhnTrnOffVdd()
Returns the function that is set to execute every time the object exits the Voided State.
Definition ButtonToSwitch.cpp:2772
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.cpp:2842
bool getFrcOtptLvlWhnVdd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch.cpp:2782
bool getStOnWhnOtpFrcd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch.cpp:2812
fncVdPtrPrmPtrType getFVPPWhnTrnOnVdd()
Returns a pointer to a function that is set to execute every time the object enters the Voided On Sta...
Definition ButtonToSwitch.cpp:2797
void * getFVPPWhnTrnOnVddArgPtr()
Returns a pointer to the argument to be passed to the function set to execute every time the object e...
Definition ButtonToSwitch.cpp:2802
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.cpp:2879
bool setIsNotVoided()
Sets the value of the isVoided attribute flag to false.
Definition ButtonToSwitch.cpp:2895
fncVdPtrPrmPtrType getFVPPWhnTrnOffVdd()
Returns a pointer to a function that is set to execute every time the object enters the Voided Off St...
Definition ButtonToSwitch.cpp:2787
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1878
XtrnUnltchMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:1846
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:1862
Type to hold the complete set of output attribute flags from any DbncdMPBttn class and subclasses obj...
Definition ButtonToSwitch.h:78