33#ifndef _BUTTONTOSWITCH_H_
34#define _BUTTONTOSWITCH_H_
40#define _HwMinDbncTime 20
41#define _StdPollDelay 10
42#define _MinSrvcTime 100
43#define _InvalidPinNum 0xFF
46const uint8_t IsOnBitPos {0};
47const uint8_t IsEnabledBitPos{1};
48const uint8_t PilotOnBitPos{2};
49const uint8_t WrnngOnBitPos{3};
50const uint8_t IsVoidedBitPos{4};
51const uint8_t IsOnScndryBitPos{5};
52const uint8_t OtptCurValBitPos{16};
76typedef void (*fncPtrType)();
77typedef fncPtrType (*ptrToTrnFnc)();
81unsigned long int findMCD(
unsigned long int a,
unsigned long int b);
122 static unsigned long int _updTimerPeriod;
134 static void _ISRMpbsRfrshCb();
144 const unsigned long int _stdMinDbncTime {_HwMinDbncTime};
146 uint8_t _mpbttnPin{};
149 unsigned long int _dbncTimeOrigSett{};
151 unsigned long int _dbncRlsTimerStrt{0};
152 unsigned long int _dbncRlsTimeTempSett{0};
153 unsigned long int _dbncTimerStrt{0};
154 unsigned long int _dbncTimeTempSett{0};
155 void (*_fnWhnTrnOff)() {
nullptr};
156 void (*_fnWhnTrnOn)() {
nullptr};
157 bool _isEnabled{
true};
158 volatile bool _isOn{
false};
159 bool _isOnDisabled{
false};
160 volatile bool _isPressed{
false};
161 unsigned long int _lstPollTime{0};
162 fdaDmpbStts _mpbFdaState {stOffNotVPP};
164 volatile bool _outputsChange {
false};
165 uint32_t _outputsChangeCnt{0};
166 unsigned long int _pollPeriodMs{0};
167 bool _prssRlsCcl{
false};
168 unsigned long int _strtDelay {0};
169 bool _sttChng {
true};
170 bool _updTmrAttchd{
false};
171 volatile bool _validDisablePend{
false};
172 volatile bool _validEnablePend{
false};
173 volatile bool _validPressPend{
false};
174 volatile bool _validReleasePend{
false};
177 const bool getIsPressed()
const;
178 virtual void mpbPollCallback();
179 virtual uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
182 void _setIsEnabled(
const bool &newEnabledValue);
183 void _setLstPollTime(
const unsigned long int &newLstPollTIme);
187 virtual void updFdaState();
189 unsigned long int _updTmrsMCDCalc();
190 virtual bool updValidPressesStatus();
206 DbncdMPBttn(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0);
229 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
398 bool init(
const uint8_t &mpbttnPin,
const bool &pulledUp =
true,
const bool &typeNO =
true,
const unsigned long int &dbncTimeOrigSett = 0);
444 bool setDbncTime(
const unsigned long int &newDbncTime);
509 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);
518 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);
528 void setStrtDelay(
const unsigned long int &newStrtDelay);
563 bool _isLatched{
false};
564 fdaLmpbStts _mpbFdaState {stOffNotVPP};
565 bool _trnOffASAP{
true};
566 volatile bool _validUnlatchPend{
false};
567 volatile bool _validUnlatchRlsPend{
false};
569 virtual void mpbPollCallback();
570 virtual void stDisabled_In(){};
571 virtual void stDisabled_Out(){};
572 virtual void stLtchNVUP_Do(){};
573 virtual void stOffNotVPP_In(){};
574 virtual void stOffNotVPP_Out(){};
575 virtual void stOffNVURP_Do(){};
576 virtual void stOffVPP_Out(){};
577 virtual void stOffVURP_Out(){};
578 virtual void stOnNVRP_Do(){};
579 virtual void updFdaState();
580 virtual void updValidUnlatchStatus() = 0;
587 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);
591 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
683 virtual void stOffNVURP_Do();
684 virtual void updValidUnlatchStatus();
691 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);
707 bool _tmRstbl {
true};
708 unsigned long int _srvcTime {};
709 unsigned long int _srvcTimerStrt{0};
711 virtual void stOffNotVPP_Out();
712 virtual void stOffVPP_Out();
713 virtual void updValidUnlatchStatus();
722 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);
745 bool setSrvcTime(
const unsigned long int &newSrvcTime);
770 void (*_fnWhnTrnOffPilot)() {
nullptr};
771 void (*_fnWhnTrnOffWrnng)() {
nullptr};
772 void (*_fnWhnTrnOnPilot)() {
nullptr};
773 void (*_fnWhnTrnOnWrnng)() {
nullptr};
774 bool _keepPilot{
false};
775 volatile bool _pilotOn{
false};
776 unsigned long int _wrnngMs{0};
777 volatile bool _wrnngOn {
false};
778 unsigned int _wrnngPrctg {0};
780 bool _validWrnngSetPend{
false};
781 bool _validWrnngResetPend{
false};
782 bool _validPilotSetPend{
false};
783 bool _validPilotResetPend{
false};
785 virtual void mpbPollCallback();
786 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
787 virtual void stDisabled_In();
788 virtual void stLtchNVUP_Do();
789 virtual void stOffNotVPP_In();
790 virtual void stOffVPP_Out();
791 virtual void stOnNVRP_Do();
792 void _turnOffPilot();
793 void _turnOffWrnng();
806 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);
810 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
924 bool setSrvcTime(
const unsigned long int &newSvcTime);
952 bool _xtrnUnltchPRlsCcl {
false};
954 virtual void stOffNVURP_Do();
955 virtual void updValidUnlatchStatus();
971 const bool &pulledUp,
const bool &typeNO,
const unsigned long int &dbncTimeOrigSett,
const unsigned long int &strtDelay);
980 const bool &pulledUp,
const bool &typeNO,
const unsigned long int &dbncTimeOrigSett,
const unsigned long int &strtDelay);
985 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1033 volatile bool _isOnScndry{
false};
1034 fdaDALmpbStts _mpbFdaState {stOffNotVPP};
1035 unsigned long _scndModActvDly {2000};
1036 unsigned long _scndModTmrStrt {0};
1037 bool _validScndModPend{
false};
1039 void (*_fnWhnTrnOffScndry)() {
nullptr};
1040 void (*_fnWhnTrnOnScndry)() {
nullptr};
1042 virtual void mpbPollCallback();
1043 virtual void stDisabled_In(){};
1044 virtual void stOnEndScndMod_Out(){};
1045 virtual void stOnScndMod_Do() = 0;
1046 virtual void stOnStrtScndMod_In(){};
1047 virtual void _turnOffScndry();
1048 virtual void _turnOnScndry();
1049 virtual void updFdaState();
1050 virtual bool updValidPressesStatus();
1051 virtual void updValidUnlatchStatus();
1059 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);
1068 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1152 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1154 virtual void stOnEndScndMod_Out();
1155 virtual void stOnScndMod_Do();
1156 virtual void stOnStrtScndMod_In();
1163 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);
1196 bool _autoSwpDirOnEnd{
true};
1197 bool _autoSwpDirOnPrss{
false};
1198 bool _curSldrDirUp{
true};
1199 uint16_t _initOtptCurVal{};
1200 uint16_t _otptCurVal{};
1201 unsigned long _otptSldrSpd{1};
1202 uint16_t _otptSldrStpSize{0x01};
1203 uint16_t _otptValMax{0xFFFF};
1204 uint16_t _otptValMin{0x0000};
1206 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1207 bool _setSldrDir(
const bool &newVal);
1209 void stOnEndScndMod_Out();
1210 virtual void stOnScndMod_Do();
1211 virtual void stOnStrtScndMod_In();
1220 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);
1451 void setFrcdOtptWhnVdd(
const bool &newVal);
1452 void setStOnWhnOtpFrcd(
const bool &newVal);
1471 fdaVmpbStts _mpbFdaState {stOffNotVPP};
1473 void (*_fnWhnTrnOffVdd)() {
nullptr};
1474 void (*_fnWhnTrnOnVdd)() {
nullptr};
1475 bool _frcOtptLvlWhnVdd {
true};
1476 bool _isVoided{
false};
1477 bool _stOnWhnOtptFrcd{
false};
1478 bool _validVoidPend{
false};
1479 bool _validUnvoidPend{
false};
1481 virtual void mpbPollCallback();
1482 uint32_t _otptsSttsPkg(uint32_t prevVal = 0);
1483 bool setVoided(
const bool &newVoidValue);
1484 virtual void stDisabled_In();
1485 virtual void stDisabled_Out();
1486 virtual void stOffNotVPP_In(){};
1487 virtual void stOffVddNVUP_Do(){};
1488 virtual void stOffVPP_Do(){};
1491 virtual void updFdaState();
1492 virtual bool updVoidStatus() = 0;
1501 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);
1607 unsigned long int _voidTime;
1608 unsigned long int _voidTmrStrt{0};
1610 virtual void stOffNotVPP_In();
1611 virtual void stOffVddNVUP_Do();
1612 virtual void stOffVPP_Do();
1613 bool updIsPressed();
1614 virtual bool updVoidStatus();
1623 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);
1631 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
1654 bool setVoidTime(
const unsigned long int &newVoidTime);
1676 virtual void stOffVddNVUP_Do();
1677 virtual bool updVoidStatus();
1684 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);
1692 virtual bool begin(
const unsigned long int &pollDelayMs = _StdPollDelay);
Models a Debounced Delayed Double Action Latched MPB combo switch (Debounced Delayed DALDD-MPB - DD-D...
Definition ButtonToSwitch.h:1150
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1955
~DDlydDALtchMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:1951
DDlydDALtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch.cpp:1946
Abstract class, base to model Double Action LDD-MPBs (DALDD-MPBs).
Definition ButtonToSwitch.h:1018
bool setScndModActvDly(const unsigned long &newVal)
Sets a new value for the scndModActvDly class attribute.
Definition ButtonToSwitch.cpp:1689
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:1682
fncPtrType getFnWhnTrnOnScndry()
Returns the function that is set to execute every time the object enters the Secondary On State.
Definition ButtonToSwitch.cpp:1646
void clrStatus(bool clrIsOn=true)
See DbncddMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1631
bool getIsOnScndry()
Returns the current value of the isOnScndry attribute flag.
Definition ButtonToSwitch.cpp:1651
unsigned long getScndModActvDly()
Returns the current value of the scndModActvDly class attribute.
Definition ButtonToSwitch.cpp:1656
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:1623
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:1674
fncPtrType getFnWhnTrnOffScndry()
returns the function that is set to execute every time the object enters the Secondary Off State.
Definition ButtonToSwitch.cpp:1641
~DblActnLtchMPBttn()
Virtual destructor.
Definition ButtonToSwitch.cpp:1619
DblActnLtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Abstract Class constructor.
Definition ButtonToSwitch.cpp:1614
Models a Debounced Delayed MPB (DD-MPB).
Definition ButtonToSwitch.h:493
DbncdDlydMPBttn()
Default constructor.
Definition ButtonToSwitch.cpp:794
void setStrtDelay(const unsigned long int &newStrtDelay)
Sets a new value to the "Start Delay" strtDelay attribute.
Definition ButtonToSwitch.cpp:815
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:805
Base class, models a Debounced Momentary Push Button (D-MPB).
Definition ButtonToSwitch.h:120
fncPtrType getFnWhnTrnOn()
Returns the function that is set to execute every time the object enters the On State.
Definition ButtonToSwitch.cpp:200
const unsigned long int getPollPeriodMs()
Returns the poll period time setting attribute's value.
Definition ButtonToSwitch.cpp:240
void resetFda()
Resets the MPB behavior automaton to it's Initial or Start State
Definition ButtonToSwitch.cpp:420
void clrStatus(bool clrIsOn=true)
Clears and resets flags, timers and counters modified through the object's signals processing.
Definition ButtonToSwitch.cpp:140
const unsigned long int getCurDbncTime() const
Returns the current debounce period time set for the object.
Definition ButtonToSwitch.cpp:190
void enable()
Enables the input signal processing.
Definition ButtonToSwitch.cpp:169
bool pause()
Pauses the software timer updating the computation of the object's internal flags value (object's sta...
Definition ButtonToSwitch.cpp:292
virtual ~DbncdMPBttn()
Default virtual destructor.
Definition ButtonToSwitch.cpp:109
void setIsOnDisabled(const bool &newIsOnDisabled)
Sets the value of the isOnDisabled attribute.
Definition ButtonToSwitch.cpp:517
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:255
bool end()
Detaches the object from the timer that monitors the input pins, compute and updates the object's sta...
Definition ButtonToSwitch.cpp:174
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:114
void resetDbncTime()
Resets the debounce process time of the object to the value used at instantiation.
Definition ButtonToSwitch.cpp:414
DbncdMPBttn()
Default class constructor.
Definition ButtonToSwitch.cpp:84
void disable()
Disables the input signal processing, ignoring the changes of its values.
Definition ButtonToSwitch.cpp:164
bool resume()
Restarts the software timer updating the calculation of the object internal flags.
Definition ButtonToSwitch.cpp:428
const bool getIsEnabled() const
Returns the value of the isEnabled attribute flag, indicating the Enabled or Disabled status of the o...
Definition ButtonToSwitch.cpp:205
const unsigned long int getLstPollTime()
Returns the time stamp of the last state update for the object.
Definition ButtonToSwitch.cpp:225
const bool getIsOnDisabled() const
Returns the value of the isOnDisabled attribute.
Definition ButtonToSwitch.cpp:215
void setFnWhnTrnOffPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object enters the Off State.
Definition ButtonToSwitch.cpp:483
const bool getOutputsChange() const
Returns the value of the outputsChange attribute flag.
Definition ButtonToSwitch.cpp:235
const bool getIsOn() const
Returns the value of the isOn attribute flag.
Definition ButtonToSwitch.cpp:210
bool getUpdTmrAttchd()
Returns the value of the Attached to the update timer attribute.
Definition ButtonToSwitch.cpp:250
void setFnWhnTrnOnPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object enters the On State.
Definition ButtonToSwitch.cpp:492
unsigned long int getStrtDelay()
Returns the current value of strtDelay attribute.
Definition ButtonToSwitch.cpp:245
const uint32_t getOtptsSttsPkgd()
Returns the relevant attribute flags values for the object state encoded as a 32 bits value.
Definition ButtonToSwitch.cpp:230
fncPtrType getFnWhnTrnOff()
Returns the function that is set to execute every time the object enters the Off State.
Definition ButtonToSwitch.cpp:195
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:540
bool setDbncTime(const unsigned long int &newDbncTime)
Sets the debounce process time.
Definition ButtonToSwitch.cpp:468
Models a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB).
Definition ButtonToSwitch.h:768
bool setSrvcTime(const unsigned long int &newSvcTime)
See TmLtchMPBttn::setSrvcTime(const unsigned long int)
Definition ButtonToSwitch.cpp:1337
fncPtrType getFnWhnTrnOnPilot()
Returns the function that is set to execute every time the object's Pilot attribute flag enters the O...
Definition ButtonToSwitch.cpp:1248
void setFnWhnTrnOffWrnngPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object's Warning is reset.
Definition ButtonToSwitch.cpp:1309
fncPtrType getFnWhnTrnOffWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch.cpp:1243
const bool getWrnngOn() const
Returns the current value of the warningOn attribute flag.
Definition ButtonToSwitch.cpp:1263
void setFnWhnTrnOnPilotPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object's Pilot is set.
Definition ButtonToSwitch.cpp:1316
HntdTmLtchMPBttn(const uint8_t &mpbttnPin, const unsigned long int &svcTime, const unsigned int &wrnngPrctg=0, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch.cpp:1207
const bool getPilotOn() const
Returns the current value of the pilotOn attribute flag.
Definition ButtonToSwitch.cpp:1258
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1221
fncPtrType getFnWhnTrnOffPilot()
Returns the function that is set to execute every time the object's Pilot attribute flag enters the O...
Definition ButtonToSwitch.cpp:1238
void setFnWhnTrnOnWrnngPtr(void(*newFnWhnTrnOn)())
Sets the function that will be called to execute every time the object's Wrnng is set.
Definition ButtonToSwitch.cpp:1323
bool setWrnngPrctg(const unsigned int &newWrnngPrctg)
Sets the value for the percentage of service time for calculating the warningOn flag value.
Definition ButtonToSwitch.cpp:1349
fncPtrType getFnWhnTrnOnWrnng()
Returns the function that is set to execute every time the object's Warning attribute flag enters the...
Definition ButtonToSwitch.cpp:1253
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:1213
void setFnWhnTrnOffPilotPtr(void(*newFnWhnTrnOff)())
Sets the function that will be called to execute every time the object's Pilot is reset.
Definition ButtonToSwitch.cpp:1302
void setKeepPilot(const bool &newKeepPilot)
Sets the configuration of the keepPilot service attribute.
Definition ButtonToSwitch.cpp:1330
Abstract class, base to model Latched Debounced Delayed MPBs (LDD-MPB).
Definition ButtonToSwitch.h:549
const bool getIsLatched() const
Returns the value of the isLatched attribute flag, indicating the Latched or Unlatched condition of t...
Definition ButtonToSwitch.cpp:846
bool unlatch()
Sets the values of the flags needed to unlatch a latched MPB.
Definition ButtonToSwitch.cpp:902
const bool getUnlatchRlsPend() const
Returns the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch.cpp:861
LtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch.cpp:824
const bool getUnlatchPend() const
Returns the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch.cpp:856
void setUnlatchPend(const bool &newVal)
Sets the value of the "Valid Unlatch Pending" attribute.
Definition ButtonToSwitch.cpp:888
void setTrnOffASAP(const bool &newVal)
Sets the value of the trnOffASAP attribute.
Definition ButtonToSwitch.cpp:881
bool getTrnOffASAP()
Returns the value of the trnOffASAP attribute flag.
Definition ButtonToSwitch.cpp:851
void setUnlatchRlsPend(const bool &newVal)
Sets the value of the "Valid Unlatch Release Pending" attribute.
Definition ButtonToSwitch.cpp:895
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:829
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:837
Models a Slider Double Action LDD-MPB combo switch, a.k.a. off/on/dimmer, a.k.a. off/on/volume radio ...
Definition ButtonToSwitch.h:1193
void clrStatus(bool clrIsOn=true)
Definition ButtonToSwitch.cpp:2018
bool setOtptSldrSpd(const uint16_t &newVal)
Sets the output slider speed (otptSldrSpd) attribute.
Definition ButtonToSwitch.cpp:2087
uint16_t getOtptValMax()
Returns the top output current value register setting.
Definition ButtonToSwitch.cpp:2052
bool getOtptCurValIsMin()
Returns the result of comparing the Output Current Value to the Minimum value setting
Definition ButtonToSwitch.cpp:2037
bool setSldrDirDn()
Sets the value of the curSldrDirUp attribute to false.
Definition ButtonToSwitch.cpp:2170
bool setOtptValMax(const uint16_t &newVal)
Sets the output current value register maximum value attribute (otptValMax attribute).
Definition ButtonToSwitch.cpp:2113
bool swapSldrDir()
Inverts the current curSldrDirUp attribute value.
Definition ButtonToSwitch.cpp:2280
~SldrDALtchMPBttn()
Virtual class destructor.
Definition ButtonToSwitch.cpp:2014
bool setOtptCurVal(const uint16_t &newVal)
Sets the output current value register.
Definition ButtonToSwitch.cpp:2074
uint16_t getOtptCurVal()
Returns the Output Current Value (otpCurVal) attribute.
Definition ButtonToSwitch.cpp:2027
bool setSldrDirUp()
Sets the value of the curSldrDirUp attribute to true.
Definition ButtonToSwitch.cpp:2175
bool getSldrDirUp()
Returns the value of the curSldrDirUp attribute.
Definition ButtonToSwitch.cpp:2062
bool setOtptSldrStpSize(const uint16_t &newVal)
Sets the output slider step size (otptSldrStpSize) attribute value.
Definition ButtonToSwitch.cpp:2100
bool getOtptCurValIsMax()
Returns a boolean value indicating if the "Output Current Value" equals the maximum limit.
Definition ButtonToSwitch.cpp:2032
SldrDALtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0, const uint16_t initVal=0xFFFF)
Class constructor.
Definition ButtonToSwitch.cpp:2008
void setSwpDirOnPrss(const bool &newVal)
Sets the value of the "Auto-Swap Direction On Press" (autoSwpDirOnPrss) attribute.
Definition ButtonToSwitch.cpp:2187
bool setOtptValMin(const uint16_t &newVal)
Sets the output current value register minimum value attribute (otptValMin attribute).
Definition ButtonToSwitch.cpp:2132
uint16_t getOtptValMin()
Returns the bottom output current value register setting.
Definition ButtonToSwitch.cpp:2057
unsigned long getOtptSldrSpd()
Returns the current setting for the Output Slider Speed value.
Definition ButtonToSwitch.cpp:2042
uint16_t getOtptSldrStpSize()
Returns the current setting for the Output Slider Step Size value.
Definition ButtonToSwitch.cpp:2047
void setSwpDirOnEnd(const bool &newVal)
Sets the value of the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) attribute.
Definition ButtonToSwitch.cpp:2180
Models a Single Service Voidable DD-MPB a.k.a. Trigger switch (SSVDD-MPB)
Definition ButtonToSwitch.h:1674
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:2733
SnglSrvcVdblMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch.cpp:2721
virtual ~SnglSrvcVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:2729
Models a Toggle Latch DD-MPB, a.k.a. a Toggle Switch (ToLDD-MPB).
Definition ButtonToSwitch.h:681
TgglLtchMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch.cpp:1104
Models a Timer Latch DD-MPB, a.k.a. Timer Switch (TiLDD-MPB).
Definition ButtonToSwitch.h:705
const unsigned long int getSrvcTime() const
Returns the configured Service Time.
Definition ButtonToSwitch.cpp:1153
void setTmerRstbl(const bool &newIsRstbl)
Configures the timer for the Service Time to be reseted before it reaches unlatching time.
Definition ButtonToSwitch.cpp:1170
bool setSrvcTime(const unsigned long int &newSrvcTime)
Sets a new value to the Service Time attribute.
Definition ButtonToSwitch.cpp:1158
void clrStatus(bool clrIsOn=true)
see DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1146
TmLtchMPBttn(const uint8_t &mpbttnPin, const unsigned long int &svcTime, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
Class constructor.
Definition ButtonToSwitch.cpp:1138
Models a Time Voidable DD-MPB, a.k.a. Anti-tampering switch (TVDD-MPB)
Definition ButtonToSwitch.h:1605
virtual ~TmVdblMPBttn()
Class virtual destructor.
Definition ButtonToSwitch.cpp:2643
void clrStatus()
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:2655
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:2647
TmVdblMPBttn(const uint8_t &mpbttnPin, unsigned long int voidTime, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0, const bool &isOnDisabled=false)
Class constructor.
Definition ButtonToSwitch.cpp:2638
const unsigned long int getVoidTime() const
Returns the voidTime attribute current value.
Definition ButtonToSwitch.cpp:2662
bool setVoidTime(const unsigned long int &newVoidTime)
Sets a new value to the Void Time attribute.
Definition ButtonToSwitch.cpp:2667
Abstract class, base to model Voidable DD-MPBs (VDD-MPB).
Definition ButtonToSwitch.h:1449
bool setIsVoided()
Sets the value of the isVoided attribute flag to true.
Definition ButtonToSwitch.cpp:2383
const bool getIsVoided() const
Returns the current value of the isVoided attribute flag.
Definition ButtonToSwitch.cpp:2321
fncPtrType getFnWhnTrnOnVdd()
Returns the function that is set to execute every time the object enters the Voided or "Voided On" St...
Definition ButtonToSwitch.cpp:2311
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:2297
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:2364
virtual ~VdblMPBttn()
Default virtual destructor.
Definition ButtonToSwitch.cpp:2293
fncPtrType getFnWhnTrnOffVdd()
Returns the function that is set to execute every time the object exits the Voided State.
Definition ButtonToSwitch.cpp:2306
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:2356
bool getFrcOtptLvlWhnVdd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch.cpp:2316
bool getStOnWhnOtpFrcd()
Returns the value of the frcOtptLvlWhnVdd attribute.
Definition ButtonToSwitch.cpp:2326
bool setIsNotVoided()
Sets the value of the isVoided attribute flag to false.
Definition ButtonToSwitch.cpp:2378
VdblMPBttn(const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0, const bool &isOnDisabled=false)
Class constructor.
Definition ButtonToSwitch.cpp:2287
Models an External Unlatch LDD-MPB, a.k.a. Emergency Latched Switch (XULDD-MPB)
Definition ButtonToSwitch.h:949
void clrStatus(bool clrIsOn=true)
See DbncdMPBttn::clrStatus(bool)
Definition ButtonToSwitch.cpp:1571
XtrnUnltchMPBttn(const uint8_t &mpbttnPin, DbncdDlydMPBttn *unLtchBttn, const bool &pulledUp, const bool &typeNO, const unsigned long int &dbncTimeOrigSett, const unsigned long int &strtDelay)
Class constructor.
Definition ButtonToSwitch.cpp:1543
virtual bool begin(const unsigned long int &pollDelayMs=_StdPollDelay)
See DbncdMPBttn::begin(const unsigned long int)
Definition ButtonToSwitch.cpp:1555
Type to hold the complete set of output attribute flags from any DbncdMPBttn class and subclasses obj...
Definition ButtonToSwitch.h:63