| ButtonToSwitch Library for Arduino v4.5.0 A library that provides elaborated switch mechanism behavior simulation for digital signals inputs

Loading...
Searching...
No Matches
HntdTmLtchMPBttn Class Reference

Models a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB). More...

`#include <ButtonToSwitch.h>`

Inheritance diagram for HntdTmLtchMPBttn:
[legend]
Collaboration diagram for HntdTmLtchMPBttn:
[legend]

## Public Member Functions
| HntdTmLtchMPBttn ()
| Default constructor.
| 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.
| HntdTmLtchMPBttn (const HntdTmLtchMPBttn &other)
| Copy constructor.
| ~HntdTmLtchMPBttn ()
| Class virtual destructor.
virtual bool | begin (const unsigned long int &pollDelayMs=_StdPollDelay)
| See DbncdMPBttn::begin(const unsigned long int)
void | clrStatus (bool clrIsOn=true)
| see DbncdMPBttn::clrStatus(bool)
fncPtrType | getFnWhnTrnOffPilot ()
| Returns the function that is set to execute every time the object's Pilot attribute flag enters the Off State.
fncPtrType | getFnWhnTrnOffWrnng ()
| Returns the function that is set to execute every time the object's Warning attribute flag enters the Off State.
fncPtrType | getFnWhnTrnOnPilot ()
| Returns the function that is set to execute every time the object's Pilot attribute flag enters the On State.
fncPtrType | getFnWhnTrnOnWrnng ()
| Returns the function that is set to execute every time the object's Warning attribute flag enters the On State.
fncVdPtrPrmPtrType | getFVPPWhnTrnOffPilot ()
| Returns a pointer to a function that is set to execute every time the object enters the Pilot Off State.
void * | getFVPPWhnTrnOffPilotArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Pilot Off State.
fncVdPtrPrmPtrType | getFVPPWhnTrnOnPilot ()
| Returns a pointer to a function that is set to execute every time the object enters the Pilot On State.
void * | getFVPPWhnTrnOnPilotArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Pilot On State.
fncVdPtrPrmPtrType | getFVPPWhnTrnOffWrnng ()
| Returns a pointer to a function that is set to execute every time the object enters the Warning Off State.
void * | getFVPPWhnTrnOffWrnngArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Warning Off State.
fncVdPtrPrmPtrType | getFVPPWhnTrnOnWrnng ()
| Returns a pointer to a function that is set to execute every time the object enters the Warning On State.
void * | getFVPPWhnTrnOnWrnngArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Warning On State.
const bool | getPilotOn () const
| Returns the current value of the pilotOn attribute flag.
const bool | getWrnngOn () const
| Returns the current value of the warningOn attribute flag.
void | setFnWhnTrnOffPilotPtr (void(*newFnWhnTrnOff)())
| Sets the function that will be called to execute every time the object's Pilot is reset.
void | setFnWhnTrnOffWrnngPtr (void(*newFnWhnTrnOff)())
| Sets the function that will be called to execute every time the object's Warning is reset.
void | setFnWhnTrnOnPilotPtr (void(*newFnWhnTrnOn)())
| Sets the function that will be called to execute every time the object's Pilot is set.
void | setFnWhnTrnOnWrnngPtr (void(*newFnWhnTrnOn)())
| Sets the function that will be called to execute every time the object's Wrnng is set.
void | setFVPPWhnTrnOffPilot (fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
| Sets a function to be executed every time the object enters the Pilot Off State.
void | setFVPPWhnTrnOffPilotArgPtr (void *newFVPPWhnTrnOffArgPtr)
| Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Pilot Off State.
void | setFVPPWhnTrnOnPilot (fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
| Sets a function to be executed every time the object enters the Pilot On State.
void | setFVPPWhnTrnOnPilotArgPtr (void *newFVPPWhnTrnOnArgPtr)
| Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Pilot On State.
void | setFVPPWhnTrnOffWrnng (fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
| Sets a function to be executed every time the object enters the Warning Off State.
void | setFVPPWhnTrnOffWrnngArgPtr (void *newFVPPWhnTrnOffArgPtr)
| Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Warning Off State.
void | setFVPPWhnTrnOnWrnng (fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
| Sets a function to be executed every time the object enters the Warning On State.
void | setFVPPWhnTrnOnWrnngArgPtr (void *newFVPPWhnTrnOnArgPtr)
| Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Warning On State.
void | setKeepPilot (const bool &newKeepPilot)
| Sets the configuration of the keepPilot service attribute.
bool | setSrvcTime (const unsigned long int &newSvcTime)
| See TmLtchMPBttn::setSrvcTime(const unsigned long int)
bool | setWrnngPrctg (const unsigned int &newWrnngPrctg)
| Sets the value for the percentage of service time for calculating the warningOn flag value.
Public Member Functions inherited from TmLtchMPBttn
| TmLtchMPBttn ()
| Default constructor.
| 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.
| TmLtchMPBttn (const TmLtchMPBttn &other)
| Copy constructor.
virtual | ~TmLtchMPBttn ()
| Class virtual destructor.
void | clrStatus (bool clrIsOn=true)
| see DbncdMPBttn::clrStatus(bool)
const unsigned long int | getSrvcTime () const
| Returns the configured Service Time.
bool | setSrvcTime (const unsigned long int &newSrvcTime)
| Sets a new value to the Service Time attribute.
void | setTmerRstbl (const bool &newIsRstbl)
| Configures the timer for the Service Time to be reseted before it reaches unlatching time.
Public Member Functions inherited from LtchMPBttn
| LtchMPBttn ()
| Default constructor.
| 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.
| LtchMPBttn (const LtchMPBttn &other)
| Copy constructor.
virtual | ~LtchMPBttn ()
| Class virtual destructor.
void | clrStatus (bool clrIsOn=true)
| See DbncdMPBttn::clrStatus(bool)
const bool | getIsLatched () const
| Returns the value of the isLatched attribute flag, indicating the Latched or Unlatched condition of the object.
bool | getTrnOffASAP ()
| Returns the value of the trnOffASAP attribute flag.
const bool | getUnlatchPend () const
| Returns the value of the "Valid Unlatch Pending" attribute.
const bool | getUnlatchRlsPend () const
| Returns the value of the "Valid Unlatch Release Pending" attribute.
void | setTrnOffASAP (const bool &newVal)
| Sets the value of the trnOffASAP attribute.
void | setUnlatchPend (const bool &newVal)
| Sets the value of the "Valid Unlatch Pending" attribute.
void | setUnlatchRlsPend (const bool &newVal)
| Sets the value of the "Valid Unlatch Release Pending" attribute.
bool | unlatch ()
| Sets the values of the flags needed to unlatch a latched MPB.
Public Member Functions inherited from DbncdDlydMPBttn
| DbncdDlydMPBttn ()
| Default constructor.
| 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)
| Class constructor.
| DbncdDlydMPBttn (const DbncdDlydMPBttn &other)
| Copy constructor.
virtual | ~DbncdDlydMPBttn ()
| Class destructor.
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)
void | setStrtDelay (const unsigned long int &newStrtDelay)
| Sets a new value to the "Start Delay" strtDelay attribute.
Public Member Functions inherited from DbncdMPBttn
| DbncdMPBttn ()
| Default class constructor.
| DbncdMPBttn (const uint8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0)
| Class constructor.
| DbncdMPBttn (const DbncdMPBttn &other)
| Copy constructor.
virtual | ~DbncdMPBttn ()
| Default virtual destructor.
void | clrStatus (bool clrIsOn=true)
| Clears and resets flags, timers and counters modified through the object's signals processing.
void | disable ()
| Disables the input signal processing, ignoring the changes of its values.
void | enable ()
| Enables the input signal processing.
bool | end ()
| Detaches the object from the timer that monitors the input pins, compute and updates the object's status.
const unsigned long int | getCurDbncTime () const
| Returns the current debounce period time set for the object.
fncPtrType | getFnWhnTrnOff ()
| Returns the function that is set to execute every time the object enters the Off State.
fncPtrType | getFnWhnTrnOn ()
| Returns the function that is set to execute every time the object enters the On State.
fncVdPtrPrmPtrType | getFVPPWhnTrnOff ()
| Returns a pointer to a function that is set to execute every time the object enters the Off State.
void * | getFVPPWhnTrnOffArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Off State.
fncVdPtrPrmPtrType | getFVPPWhnTrnOn ()
| Returns a pointer to a function that is set to execute every time the object enters the On State.
void * | getFVPPWhnTrnOnArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object enters the On State.
const bool | getIsEnabled () const
| Returns the value of the isEnabled attribute flag, indicating the Enabled or Disabled status of the object.
const bool | getIsOn () const
| Returns the value of the isOn attribute flag.
const bool | getIsOnDisabled () const
| Returns the value of the isOnDisabled attribute.
const unsigned long int | getLstPollTime ()
| Returns the time stamp of the last state update for the object.
const uint32_t | getOtptsSttsPkgd ()
| Returns the relevant attribute flags values for the object state encoded as a 32 bits value.
const bool | getOutputsChange () const
| Returns the value of the outputsChange attribute flag.
const unsigned long int | getPollPeriodMs ()
| Returns the poll period time setting attribute's value.
unsigned long int | getStrtDelay ()
| Returns the current value of strtDelay attribute.
bool | getUpdTmrAttchd ()
| Returns the value of the Attached to the update timer attribute.
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.
bool | pause ()
| Pauses the software timer updating the computation of the object's internal flags value (object's state).
void | resetDbncTime ()
| Resets the debounce process time of the object to the value used at instantiation.
void | resetFda ()
| Resets the MPB behavior automaton to it's Initial or Start State
bool | resume ()
| Restarts the software timer updating the calculation of the object internal flags.
void | setBeginDisabled (const bool &newBeginDisabled=false)
| Sets the starting isDisabled state.
bool | setDbncTime (const unsigned long int &newDbncTime)
| Sets the debounce process time.
void | setFnWhnTrnOffPtr (void(*newFnWhnTrnOff)())
| Sets the function that will be called to execute every time the object enters the Off State.
void | setFnWhnTrnOnPtr (void(*newFnWhnTrnOn)())
| Sets the function that will be called to execute every time the object enters the On State.
void | setFVPPWhnTrnOff (fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
| Sets a function to be executed every time the object enters the Off State.
void | setFVPPWhnTrnOffArgPtr (void *newFVPPWhnTrnOffArgPtr)
| Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Off State.
void | setFVPPWhnTrnOn (fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
| Sets a function to be executed every time the object enters the On State.
void | setFVPPWhnTrnOnArgPtr (void *newFVPPWhnTrnOnArgPtr)
| Sets a pointer to an argument to be passed to the function set to execute every time the object enters the On State.
void | setIsOnDisabled (const bool &newIsOnDisabled)
| Sets the value of the isOnDisabled attribute.
void | setOutputsChange (bool newOutputsChange)
| Sets the value of the attribute flag indicating if a change took place in any of the output attribute flags (IsOn included).

## Detailed Description

Models a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB).

The Staircase switch keeps the ON state since the moment the signal is stable (debouncing + delay process), and until the unlatch signal is provided by a preset timer started immediately after the MPB has passed the debounce & delay process. A warning flag might be configured to raise when the time left to keep the ON signal is close to expiration, based on a configurable percentage of the total Service Time. The time count down might be reseted by pressing the MPB before the timer expires by optionally configuring the object to do so with the provided method. A Pilot Signal attribute flag is included to emulate completely the staircase switches, that might be activated while the MPB is in Off state, by optionally configuring the object to do so with the provided method (This might be considered just a perk as it's not much more than the isOn flag negated output, but gives the advantage of freeing the designer of additional coding).

class HntdTmLtchMPBttn

## Constructor & Destructor Documentation

## ◆ HntdTmLtchMPBttn() [1/2]

HntdTmLtchMPBttn::HntdTmLtchMPBttn | ( | const uint8_t & | mpbttnPin,
|  | const unsigned long int & | svcTime,
|  | const unsigned int & | wrnngPrctg = 0,
|  | const bool & | pulledUp = true,
|  | const bool & | typeNO = true,
|  | const unsigned long int & | dbncTimeOrigSett = 0,
|  | const unsigned long int & | strtDelay = 0 )

Class constructor.

Parameters

  wrnngPrctg | Time before expiration of service time that the warning flag must be set. The time is expressed as a percentage of the total service time so it's a value in the 0 <= wrnngPrctg <= 100 range.

For the rest of the parameters see TmLtchMPBttn(const uint8_t, const unsigned long int, const bool, const bool, const unsigned long int, const unsigned long int)

Here is the call graph for this function:

## ◆ HntdTmLtchMPBttn() [2/2]

HntdTmLtchMPBttn::HntdTmLtchMPBttn | ( | const HntdTmLtchMPBttn & | other | ) |

Copy constructor.

Parameters

  other | Reference to an existing HntdTmLtchMPBttn object to be copied.

Here is the call graph for this function:

## Member Function Documentation

## ◆ getFnWhnTrnOffPilot()

fncPtrType HntdTmLtchMPBttn::getFnWhnTrnOffPilot | ( |  | ) |

Returns the function that is set to execute every time the object's Pilot attribute flag enters the Off State.

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffPilotPtr() method.

Returns
  A function pointer to the function set to execute every time the object's Pilot is set to the Off State.

Return values

  nullptr | if there is no function set to execute when the object's Pilot enters the Off State.

Warning
  The function code execution will become part of the list of procedures the object executes when it enters the Pilot Off State, including the possibility to modify attribute flags and others. Making the function code too time demanding must be handled with care, using alternative execution schemes, for example (and not limited to) the function might set flags, modify counters and parameters to set the conditions to execute some code in the main loop, and that suspends itself at the end of its code, to let a new function calling event resume it once again.

## ◆ getFnWhnTrnOffWrnng()

fncPtrType HntdTmLtchMPBttn::getFnWhnTrnOffWrnng | ( |  | ) |

Returns the function that is set to execute every time the object's Warning attribute flag enters the Off State.

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffWrnngPtr() method.

Returns
  A function pointer to the function set to execute every time the object's Warning is set to the Off State.

Return values

  nullptr | if there is no function set to execute when the object's Warning enters the Off State.

Warning
  The function code execution will become part of the list of procedures the object executes when it enters the Warning Off State, including the possibility to modify attribute flags and others. Making the function code too time demanding must be handled with care, using alternative execution schemes, for example (and not limited to) the function might set flags, modify counters and parameters to set the conditions to execute some code in the main loop, and that suspends itself at the end of its code, to let a new function calling event resume it once again.

## ◆ getFnWhnTrnOnPilot()

fncPtrType HntdTmLtchMPBttn::getFnWhnTrnOnPilot | ( |  | ) |

Returns the function that is set to execute every time the object's Pilot attribute flag enters the On State.

The function to be executed is an attribute that might be modified by the setFnWhnTrnOnPilotPtr() method.

Returns
  A function pointer to the function set to execute every time the object's Pilot is set to the On State.

Return values

  nullptr | if there is no function set to execute when the object's Pilot enters the On State.

Warning
  The function code execution will become part of the list of procedures the object executes when it enters the Pilot ON State, including the possibility to modify attribute flags and others. Making the function code too time demanding must be handled with care, using alternative execution schemes, for example (and not limited to) the function might set flags, modify counters and parameters to set the conditions to execute some code in the main loop, and that suspends itself at the end of its code, to let a new function calling event resume it once again.

## ◆ getFnWhnTrnOnWrnng()

fncPtrType HntdTmLtchMPBttn::getFnWhnTrnOnWrnng | ( |  | ) |

Returns the function that is set to execute every time the object's Warning attribute flag enters the On State.

The function to be executed is an attribute that might be modified by the setFnWhnTrnOnWarnngPtr() method.

Returns
  A function pointer to the function set to execute every time the object's Warning is set to the On State.

Return values

  nullptr | if there is no function set to execute when the object's Warning enters the On State.

Warning
  The function code execution will become part of the list of procedures the object executes when it enters the Warning On State, including the possibility to modify attribute flags and others. Making the function code too time demanding must be handled with care, using alternative execution schemes, for example (and not limited to) the function might set flags, modify counters and parameters to set the conditions to execute some code in the main loop, and that suspends itself at the end of its code, to let a new function calling event resume it once again.

## ◆ getFVPPWhnTrnOffPilot()

fncVdPtrPrmPtrType HntdTmLtchMPBttn::getFVPPWhnTrnOffPilot | ( |  | ) |

Returns a pointer to a function that is set to execute every time the object enters the Pilot Off State.

The pointer is one to a function with the signature void (fncPtr*) (void*) to allow for passing a void* argument to the function.

Returns
  fncVdPtrPrmPtrType The pointer to the function set to execute every time the object enters the Pilot Off State.

Return values

  nullptr | if there is no function with the described signature set to execute when the object enters the Pilot Off State.

## ◆ getFVPPWhnTrnOffPilotArgPtr()

void * HntdTmLtchMPBttn::getFVPPWhnTrnOffPilotArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Pilot Off State.

Returns
  void* Pointer to the argument to be passed to the function set to execute every time the object enters the Pilot Off State.

## ◆ getFVPPWhnTrnOffWrnng()

fncVdPtrPrmPtrType HntdTmLtchMPBttn::getFVPPWhnTrnOffWrnng | ( |  | ) |

Returns a pointer to a function that is set to execute every time the object enters the Warning Off State.

The pointer is one to a function with the signature void (fncPtr*) (void*) to allow for passing a void* argument to the function.

Returns
  fncVdPtrPrmPtrType The pointer to the function set to execute every time the object enters the Warning Off State.

Return values

  nullptr | if there is no function with the described signature set to execute when the object enters the Warning Off State.

## ◆ getFVPPWhnTrnOffWrnngArgPtr()

void * HntdTmLtchMPBttn::getFVPPWhnTrnOffWrnngArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Warning Off State.

Returns
  void* Pointer to the argument to be passed to the function set to execute every time the object enters the Warning Off State.

## ◆ getFVPPWhnTrnOnPilot()

fncVdPtrPrmPtrType HntdTmLtchMPBttn::getFVPPWhnTrnOnPilot | ( |  | ) |

Returns a pointer to a function that is set to execute every time the object enters the Pilot On State.

The pointer is one to a function with the signature void (fncPtr*) (void*) to allow for passing a void* argument to the function.

Returns
  fncVdPtrPrmPtrType The pointer to the function set to execute every time the object enters the Pilot On State.

Return values

  nullptr | if there is no function with the described signature set to execute when the object enters the Pilot On State.

## ◆ getFVPPWhnTrnOnPilotArgPtr()

void * HntdTmLtchMPBttn::getFVPPWhnTrnOnPilotArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Pilot On State.

Returns
  void* Pointer to the argument to be passed to the function set to execute every time the object enters the Pilot On State.

## ◆ getFVPPWhnTrnOnWrnng()

fncVdPtrPrmPtrType HntdTmLtchMPBttn::getFVPPWhnTrnOnWrnng | ( |  | ) |

Returns a pointer to a function that is set to execute every time the object enters the Warning On State.

The pointer is one to a function with the signature void (fncPtr*) (void*) to allow for passing a void* argument to the function.

Returns
  fncVdPtrPrmPtrType The pointer to the function set to execute every time the object enters the Warning On State.

Return values

  nullptr | if there is no function with the described signature set to execute when the object enters the Warning On State.

## ◆ getFVPPWhnTrnOnWrnngArgPtr()

void * HntdTmLtchMPBttn::getFVPPWhnTrnOnWrnngArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Warning On State.

Returns
  void* Pointer to the argument to be passed to the function set to execute every time the object enters the Warning On State.

## ◆ getPilotOn()

const bool HntdTmLtchMPBttn::getPilotOn | ( |  | ) | const

Returns the current value of the pilotOn attribute flag.

The pilotOn flag will be set when the isOn attribute flag is reset (~isOn), while the keepPilot attribute is set. If the keepPilot attribute is false the pilotOn will keep reset independently of the isOn flag value.

Returns
  The current value of the pilotOn flag

Return values

  true | the pilotOn flag value is true
  false | the pilotOn flag value is false

## ◆ getWrnngOn()

const bool HntdTmLtchMPBttn::getWrnngOn | ( |  | ) | const

Returns the current value of the warningOn attribute flag.

The warningOn flag will be set when the configured service time (to keep the ON signal set) is close to expiration, based on a configurable percentage of the total Service time.

Returns
  The current value of the warningOn attribute flag.

Note
  As there is no configuration setting to keep the warning flag from working, the way to force the flag to stay set or stay reset is by configuring the accepted limits:
  - 0: Will keep the warningOn flag always false (i.e. will turn to true 0 ms before reaching the end of Service Time).
  - 100: Will keep the warningOn flag always true (i.e. will turn to true for the 100% of the Service Time).

## ◆ setFnWhnTrnOffPilotPtr()

void HntdTmLtchMPBttn::setFnWhnTrnOffPilotPtr | ( | void(* | newFnWhnTrnOff )() | ) |

Sets the function that will be called to execute every time the object's Pilot is reset.

The function to be executed must be of the form void (*newFnWhnTrnOff)(), meaning it must take no arguments and must return no value, it will be executed only once by the object (recursion must be handled with the usual precautions). When instantiated the attribute value is set to nullptr.

Parameters

  newFnWhnTrnOff | Function pointer to the function intended to be called when the object's Pilot is reset. Passing nullptr as parameter deactivates the function execution mechanism.

## ◆ setFnWhnTrnOffWrnngPtr()

void HntdTmLtchMPBttn::setFnWhnTrnOffWrnngPtr | ( | void(* | newFnWhnTrnOff )() | ) |

Sets the function that will be called to execute every time the object's Warning is reset.

The function to be executed must be of the form void (*newFnWhnTrnOff)(), meaning it must take no arguments and must return no value, it will be executed only once by the object (recursion must be handled with the usual precautions). When instantiated the attribute value is set to nullptr.

Parameters

  newFnWhnTrnOff | Function pointer to the function intended to be called when the object's Warning is reset. Passing nullptr as parameter deactivates the function execution mechanism.

## ◆ setFnWhnTrnOnPilotPtr()

void HntdTmLtchMPBttn::setFnWhnTrnOnPilotPtr | ( | void(* | newFnWhnTrnOn )() | ) |

Sets the function that will be called to execute every time the object's Pilot is set.

The function to be executed must be of the form void (*newFnWhnTrnOn)(), meaning it must take no arguments and must return no value, it will be executed only once by the object (recursion must be handled with the usual precautions). When instantiated the attribute value is set to nullptr.

Parameters

  newFnWhnTrnOn | function pointer to the function intended to be called when the object's Pilot is set. Passing nullptr as parameter deactivates the function execution mechanism.

## ◆ setFnWhnTrnOnWrnngPtr()

void HntdTmLtchMPBttn::setFnWhnTrnOnWrnngPtr | ( | void(* | newFnWhnTrnOn )() | ) |

Sets the function that will be called to execute every time the object's Wrnng is set.

The function to be executed must be of the form void (*newFnWhnTrnOn)(), meaning it must take no arguments and must return no value, it will be executed only once by the object (recursion must be handled with the usual precautions). When instantiated the attribute value is set to nullptr.

Parameters

  newFnWhnTrnOn | function pointer to the function intended to be called when the object's Wrnng is set. Passing nullptr as parameter deactivates the function execution mechanism.

## ◆ setFVPPWhnTrnOffPilot()

void HntdTmLtchMPBttn::setFVPPWhnTrnOffPilot | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOff,
|  | void * | argPtr = nullptr )

Sets a function to be executed every time the object enters the Pilot Off State.

The function to be executed must be of the form void (newFVPPWhnTrnOff)(void), meaning it must take a void pointer as argument and must return no value, it will be executed only once by the object (recursion must be handled with the usual precautions). When the object is instantiated the attribute value is set to nullptr.

Parameters

  newFVPPWhnTrnOff | Function pointer to the function intended to be called when the object enters the Pilot Off State. Passing nullptr as parameter deactivates the function execution mechanism.
  argPtr | void pointer to an argument to be passed to the function when it is called.

## ◆ setFVPPWhnTrnOffPilotArgPtr()

void HntdTmLtchMPBttn::setFVPPWhnTrnOffPilotArgPtr | ( | void * | newFVPPWhnTrnOffArgPtr | ) |

Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Pilot Off State.

The argument pointer is passed to the function set to execute when the object enters the Pilot Off State. The pointer is set to nullptr when the object is instantiated.

Parameters

  newFVPPWhnTrnOffArgPtr | Pointer to an argument to be passed to the function set to execute every time the object enters the Pilot Off State.

## ◆ setFVPPWhnTrnOffWrnng()

void HntdTmLtchMPBttn::setFVPPWhnTrnOffWrnng | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOff,
|  | void * | argPtr = nullptr )

Sets a function to be executed every time the object enters the Warning Off State.

The function to be executed must be of the form void (newFVPPWhnTrnOff)(void), meaning it must take a void pointer as argument and must return no value, it will be executed only once by the object (recursion must be handled with the usual precautions). When the object is instantiated the attribute value is set to nullptr.

Parameters

  newFVPPWhnTrnOff | Function pointer to the function intended to be called when the object enters the Warning Off State. Passing nullptr as parameter deactivates the function execution mechanism.
  argPtr | void pointer to an argument to be passed to the function when it is called.

## ◆ setFVPPWhnTrnOffWrnngArgPtr()

void HntdTmLtchMPBttn::setFVPPWhnTrnOffWrnngArgPtr | ( | void * | newFVPPWhnTrnOffArgPtr | ) |

Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Warning Off State.

The argument pointer is passed to the function set to execute when the object enters the Warning Off State. The pointer is set to nullptr when the object is instantiated.

Parameters

  newFVPPWhnTrnOffArgPtr | Pointer to an argument to be passed to the function set to execute every time the object enters the Warning Off State.

## ◆ setFVPPWhnTrnOnPilot()

void HntdTmLtchMPBttn::setFVPPWhnTrnOnPilot | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOn,
|  | void * | argPtr = nullptr )

Sets a function to be executed every time the object enters the Pilot On State.

The function to be executed must be of the form void (newFVPPWhnTrnOn)(void), meaning it must take a void pointer as argument and must return no value, it will be executed only once by the object (recursion must be handled with the usual precautions). When the object is instantiated the attribute value is set to nullptr.

Parameters

  newFVPPWhnTrnOn | Function pointer to the function intended to be called when the object enters the Pilot On State. Passing nullptr as parameter deactivates the function execution mechanism.
  argPtr | void pointer to an argument to be passed to the function when it is called.

## ◆ setFVPPWhnTrnOnPilotArgPtr()

void HntdTmLtchMPBttn::setFVPPWhnTrnOnPilotArgPtr | ( | void * | newFVPPWhnTrnOnArgPtr | ) |

Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Pilot On State.

The argument pointer is passed to the function set to execute when the object enters the On State. The pointer is set to nullptr when the object is instantiated.

Parameters

  newFVPPWhnTrnOnArgPtr | Pointer to an argument to be passed to the function set to execute every time the object enters the Pilot On State.

## ◆ setFVPPWhnTrnOnWrnng()

void HntdTmLtchMPBttn::setFVPPWhnTrnOnWrnng | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOn,
|  | void * | argPtr = nullptr )

Sets a function to be executed every time the object enters the Warning On State.

The function to be executed must be of the form void (newFVPPWhnTrnOn)(void), meaning it must take a void pointer as argument and must return no value, it will be executed only once by the object (recursion must be handled with the usual precautions). When the object is instantiated the attribute value is set to nullptr.

Parameters

  newFVPPWhnTrnOn | Function pointer to the function intended to be called when the object enters the Warning On State. Passing nullptr as parameter deactivates the function execution mechanism.
  argPtr | void pointer to an argument to be passed to the function when it is called.

## ◆ setFVPPWhnTrnOnWrnngArgPtr()

void HntdTmLtchMPBttn::setFVPPWhnTrnOnWrnngArgPtr | ( | void * | newFVPPWhnTrnOnArgPtr | ) |

Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Warning On State.

The argument pointer is passed to the function set to execute when the object enters the Warning On State. The pointer is set to nullptr when the object is instantiated.

Parameters

  newFVPPWhnTrnOnArgPtr | Pointer to an argument to be passed to the function set to execute every time the object enters the Warning On State.

## ◆ setKeepPilot()

void HntdTmLtchMPBttn::setKeepPilot | ( | const bool & | newKeepPilot | ) |

Sets the configuration of the keepPilot service attribute.

Parameters

  newKeepPilot | The new setting for the keepPilot service attribute.

## ◆ setSrvcTime()

bool HntdTmLtchMPBttn::setSrvcTime | ( | const unsigned long int & | newSvcTime | ) |

See TmLtchMPBttn::setSrvcTime(const unsigned long int)

Note
  As the warningOn attribute flag behavior is based on a percentage of the service time setting, changing the value of that service time implies changing the time amount for the warning signal service, recalculating such time as the set percentage of the new service time.

Here is the call graph for this function:

## ◆ setWrnngPrctg()

bool HntdTmLtchMPBttn::setWrnngPrctg | ( | const unsigned int & | newWrnngPrctg | ) |

Sets the value for the percentage of service time for calculating the warningOn flag value.

The amount of time before expiration of service time that the warning flag must be set is defined as a percentage of the total service time so it's a value in the 0 <= wrnngPrctg <= 100 range.

Parameters

  newWrnngPrctg | The new percentage of service time value used to calculate the time before service time expiration to set the warningOn flag.

Returns
  Success changing the percentage to a new value

Return values

  true | the value was within range, the new value is set
  false | the value was outside range, the value change was dismissed.