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

Loading...
Searching...
No Matches
SldrDALtchMPBttn Class Reference

Models a Slider Double Action LDD-MPB combo switch, a.k.a. off/on/dimmer, a.k.a. off/on/volume radio switch)(S-DALDD-MPB) More...

`#include <ButtonToSwitch_ESP32.h>`

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

## Public Member Functions
| SldrDALtchMPBttn ()
| Default constructor.
| SldrDALtchMPBttn (const int8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0, const uint16_t initVal=0xFFFF)
| Class constructor.
| ~SldrDALtchMPBttn ()
| Virtual class destructor.
void | clrStatus (bool clrIsOn=true)
fncPtrType | getFnWhnTrnOffSldrDirUp ()
| Returns the function set to be called when the slider direction is set to be decrementing (down).
fncPtrType | getFnWhnTrnOnSldrDirUp ()
| Returns the function set to be called when the slider direction is set to be incrementing (up).
fncPtrType | getFnWhnTrnOffSldrMax ()
| Returns the function that is set to be executed every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Value attribute setting (otptValMax).
fncPtrType | getFnWhnTrnOffSldrMin ()
| Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Minimum Output Current Value attribute setting (otptValMin).
fncPtrType | getFnWhnTrnOnSldrMax ()
| Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Current Value attribute setting (otptValMax).
fncPtrType | getFnWhnTrnOnSldrMin ()
| Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).
fncVdPtrPrmPtrType | getFVPPWhnTrnOffSldrDirUp ()
| Returns a pointer to the function that is set to be executed every time the slider direction is set to be decrementing (down).
void * | getFVPPWhnTrnOffSldrDirUpArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the slider direction is set to be decrementing (down).
fncVdPtrPrmPtrType | getFVPPWhnTrnOnSldrDirUp ()
| Returns a pointer to the function that is set to be executed every time the slider direction is set to be incrementing (up).
void * | getFVPPWhnTrnOnSldrDirUpArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the slider direction is set to be incrementing (up).
fncVdPtrPrmPtrType | getFVPPWhnTrnOffSldrMax ()
| Returns the function that is set to be executed every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Value attribute setting (otptValMax).
void * | getFVPPWhnTrnOffSldrMaxArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Current Value attribute setting (otptValMax).
fncVdPtrPrmPtrType | getFVPPWhnTrnOnSldrMax ()
| Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Current Value attribute setting (otptValMax).
void * | getFVPPWhnTrnOnSldrMaxArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Current Value attribute setting (otptValMax).
fncVdPtrPrmPtrType | getFVPPWhnTrnOffSldrMin ()
| Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Minimum Output Current Value attribute setting (otptValMin).
void * | getFVPPWhnTrnOffSldrMinArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute exits the Minimum Output Current Value attribute setting (otptValMin).
fncVdPtrPrmPtrType | getFVPPWhnTrnOnSldrMin ()
| Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).
void * | getFVPPWhnTrnOnSldrMinArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).
uint16_t | getOtptCurVal ()
| Returns the Output Current Value (otpCurVal) attribute.
bool | getOtptCurValIsMax ()
| Returns a boolean value indicating if the "Output Current Value" equals the maximum limit.
bool | getOtptCurValIsMin ()
| Returns the result of comparing the Output Current Value to the Minimum value setting
unsigned long | getOtptSldrSpd ()
| Returns the current setting for the Output Slider Speed value.
uint16_t | getOtptSldrStpSize ()
| Returns the current setting for the Output Slider Step Size value.
uint16_t | getOtptValMax ()
| Returns the top output current value register setting.
uint16_t | getOtptValMin ()
| Returns the bottom output current value register setting.
bool | getSldrDirUp ()
| Returns the value of the curSldrDirUp attribute.
void | setFnWhnTrnOffSldrDirUp (void(*newFnWhnTrnOff)())
| Sets the function that will be called every time the slider direction is set to be decrementing (down).
void | setFnWhnTrnOnSldrDirUp (void(*newFnWhnTrnOn)())
| Sets the function that will be called every time the slider direction is set to be incrementing (up).
void | setFnWhnTrnOffSldrMaxPtr (void(*newFnWhnTrnOff)())
| Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Value attribute setting (otptValMax).
void | setFnWhnTrnOffSldrMinPtr (void(*newFnWhnTrnOff)())
| Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Minimum Output Value attribute setting (otptValMin).
void | setFnWhnTrnOnSldrMaxPtr (void(*newFnWhnTrnOn)())
| Sets a function that will be called every time the object's Output Current Value (otptCurVal) reaches the Maximum Output Value attribute setting (otptValMax).
void | setFnWhnTrnOnSldrMinPtr (void(*newFnWhnTrnOn)())
| Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).
void | setFVPPWhnTrnOffSldrDirUp (fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
| Sets a function that will be called every time the slider direction is set to be decrementing (down).
void | setFVPPWhnTrnOffSldrDirUpArgPtr (void *newFVPPWhnTrnOffArgPtr)
| Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrDirUp() method.
void | setFVPPWhnTrnOnSldrDirUp (fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
| Sets a function that will be called every time the slider direction is set to be incrementing (up).
void | setFVPPWhnTrnOnSldrDirUpArgPtr (void *newFVPPWhnTrnOnArgPtr)
| Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrDirUp() method.
void | setFVPPWhnTrnOffSldrMax (fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
| Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Value attribute setting (otptValMax).
void | setFVPPWhnTrnOffSldrMaxArgPtr (void *newFVPPWhnTrnOffArgPtr)
| Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrMax() method.
void | setFVPPWhnTrnOnSldrMax (fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
| Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Value attribute setting (otptValMax).
void | setFVPPWhnTrnOnSldrMaxArgPtr (void *newFVPPWhnTrnOnArgPtr)
| Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrMax() method.
void | setFVPPWhnTrnOffSldrMin (fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
| Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Minimum Output Value attribute setting (otptValMin).
void | setFVPPWhnTrnOffSldrMinArgPtr (void *newFVPPWhnTrnOffArgPtr)
| Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrMin() method.
void | setFVPPWhnTrnOnSldrMin (fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
| Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Value attribute setting (otptValMin).
void | setFVPPWhnTrnOnSldrMinArgPtr (void *newFVPPWhnTrnOnArgPtr)
| Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrMin() method.
bool | setOtptCurVal (const uint16_t &newVal)
| Sets the output current value register.
bool | setOtptSldrSpd (const uint16_t &newVal)
| Sets the output slider speed (otptSldrSpd) attribute.
bool | setOtptSldrStpSize (const uint16_t &newVal)
| Sets the output slider step size (otptSldrStpSize) attribute value.
bool | setOtptValMax (const uint16_t &newVal)
| Sets the output current value register maximum value attribute (otptValMax attribute).
bool | setOtptValMin (const uint16_t &newVal)
| Sets the output current value register minimum value attribute (otptValMin attribute).
bool | setSldrDirDn ()
| Sets the value of the curSldrDirUp attribute to false.
bool | setSldrDirUp ()
| Sets the value of the curSldrDirUp attribute to true.
void | setSwpDirOnEnd (const bool &newVal)
| Sets the value of the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) attribute.
void | setSwpDirOnPrss (const bool &newVal)
| Sets the value of the "Auto-Swap Direction On Press" (autoSwpDirOnPrss) attribute.
bool | swapSldrDir ()
| Inverts the current curSldrDirUp attribute value.
Public Member Functions inherited from DblActnLtchMPBttn
| DblActnLtchMPBttn ()
| Abstract Class default constructor.
| DblActnLtchMPBttn (const int8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
| Abstract Class constructor.
| ~DblActnLtchMPBttn ()
| Virtual destructor.
virtual bool | begin (const unsigned long int &pollDelayMs=_StdPollDelay)
| See DbncdMPBttn::begin(const unsigned long int)
void | clrStatus (bool clrIsOn=true)
| See DbncddMPBttn::clrStatus(bool)
fncPtrType | getFnWhnTrnOffScndry ()
| returns the function that is set to execute every time the object enters the Secondary Off State.
fncPtrType | getFnWhnTrnOnScndry ()
| Returns the function that is set to execute every time the object enters the Secondary On State.
fncVdPtrPrmPtrType | getFVPPWhnTrnOffScndry ()
| Returns a pointer to a function that is set to execute every time the object enters the Secondary Mode Off State.
void * | getFVPPWhnTrnOffScndryArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Secondary Mode Off State.
fncVdPtrPrmPtrType | getFVPPWhnTrnOnScndry ()
| Returns a pointer to a function that is set to execute every time the object enters the Secondary Mode On State.
void * | getFVPPWhnTrnOnScndryArgPtr ()
| Returns a pointer to the argument to be passed to the function set to execute every time the object enters the Secondary Mode On State.
bool | getIsOnScndry ()
| Returns the current value of the isOnScndry attribute flag.
unsigned long | getScndModActvDly ()
| Returns the current value of the scndModActvDly class attribute.
const TaskHandle_t | getTaskWhileOnScndry ()
| Returns the task to be run while the object is in the Secondary On state.
void | setFnWhnTrnOffScndryPtr (void(*newFnWhnTrnOff)())
| Sets the function that will be called to execute every time the object enters the Secondary Off State.
void | setFnWhnTrnOnScndryPtr (void(*newFnWhnTrnOn)())
| Sets the function that will be called to execute every time the object enters the Secondary On State.
void | setFVPPWhnTrnOffScndry (fncVdPtrPrmPtrType newFVPPWhnTrnOff, void *argPtr=nullptr)
| Sets a function to be executed every time the object enters the Secondary Mode Off State.
void | setFVPPWhnTrnOffScndryArgPtr (void *newFVPPWhnTrnOffArgPtr)
| Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Secondary Mode Off State.
void | setFVPPWhnTrnOnScndry (fncVdPtrPrmPtrType newFVPPWhnTrnOn, void *argPtr=nullptr)
| Sets a function to be executed every time the object enters the Secondary Mode On State.
void | setFVPPWhnTrnOnScndryArgPtr (void *newFVPPWhnTrnOnArgPtr)
| Sets a pointer to an argument to be passed to the function set to execute every time the object enters the Secondary Mode On State.
bool | setScndModActvDly (const unsigned long &newVal)
| Sets a new value for the scndModActvDly class attribute.
void | setTaskWhileOnScndry (const TaskHandle_t &newTaskHandle)
| Sets the task to be run while the object is in the On state.
Public Member Functions inherited from LtchMPBttn
| LtchMPBttn ()
| Default constructor.
| LtchMPBttn (const int8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
| 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 int8_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 int8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0)
| see DbncdMPBttn::init(const int8_t, const bool, const bool, const unsigned long int)
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 int8_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. The timer daemon entry is deleted for the object.
const unsigned long int | getCurDbncTime () const
| Returns the current debounce period time set for the object.
fncPtrType | getFnWhnTrnOff ()
| Returns a pointer to a function that is set to execute every time the object enters the Off State.
fncPtrType | getFnWhnTrnOn ()
| Returns a pointer to a 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 flag.
const DbncdMPBttn * | getMpbInstnc () const
| Returns a pointer to the present instanced object.
const uint32_t | getOtptsSttsPkgd ()
| Returns the relevant attribute flags values for the object state encoded as a 32 bits value, required to pass current state of the object to another thread/task managing the outputs.
const bool | getOutputsChange () const
| Returns the value of the outputsChange attribute flag.
unsigned long int | getStrtDelay ()
| Returns the current value of strtDelay attribute.
const TaskHandle_t | getTaskToNotify () const
| Returns the task to be notified by the object when its output flags changes.
const TaskHandle_t | getTaskWhileOn ()
| Returns the task to be run (resumed) while the object is in the On state.
bool | init (const int8_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0)
| Initializes an object instantiated by the default constructor.
bool | pause ()
| Pauses the software timer updating the computation of the object's internal flags value.
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 (fncPtrType newFnWhnTrnOff)
| Sets the function that will be called to execute every time the object enters the Off State.
void | setFnWhnTrnOnPtr (fncPtrType 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 flag.
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).
void | setTaskToNotify (const TaskHandle_t &newTaskHandle)
| Sets the handle to the task to be notified by the object when its output attribute flags changes.
virtual void | setTaskWhileOn (const TaskHandle_t &newTaskHandle)
| Sets the task to be run while the object is in the On state.

## Detailed Description

Models a Slider Double Action LDD-MPB combo switch, a.k.a. off/on/dimmer, a.k.a. off/on/volume radio switch)(S-DALDD-MPB)

This is a subclass of the DALDD-MPB whose secondary behavior is analog to that of a Digital potentiometer (DigiPot) or a Discreet values increment/decrement register. That means that when in the second mode, while the MPB remains pressed, an attribute set as a register changes its value -the otptCurVal register-. When the timer callback function used to keep the MPB status updated is called -while in the secondary mode state- the time since the last call is calculated and the time lapse in milliseconds is converted into Steps, using as configurable factor the outputSliderSpeed in a pre-scaler fashion. At instantiation the outputSliderSpeed is configured to 1 (step/millisecond, i.e. 1 step for each millisecond). The resulting value in "steps" is then factored by the outputSliderStepSize, which holds the value that each step will modify the otptCurVal register. The implemented embedded behavior mechanisms of the class determine how the modification of the otpCurVal register will be made, and the associated effects to the instantiated object's attribute, such as (but not limited to):

- Incrementing otpCurVal register (by the quantity of steps multiplied by the step size) up to the "maximum value" setting.
- Decrementing otpCurVal register (by that quantity) down to the "minimum value" setting.
- Changing the modification's direction (from incrementing to decrementing or vice versa). The minimum and maximum values, the rate in steps/millisecond, the size of each step and the variation direction (sign of the variation, incrementing or decrementing) are all configurable, as is the starting value and the mechanism to revert the "direction" that includes:
- Revert directions in the next secondary mode entry.
- Automatically revert direction when reaching the minimum and maximum values setting.
- Revert direction by methods invocation (see setSldrDirDn(), setSldrDirUp(), swapSldrDir()).

class SldrDALtchMPBttn

## Constructor & Destructor Documentation

## ◆ SldrDALtchMPBttn()

SldrDALtchMPBttn::SldrDALtchMPBttn | ( | const int8_t & | mpbttnPin,
|  | const bool & | pulledUp = true,
|  | const bool & | typeNO = true,
|  | const unsigned long int & | dbncTimeOrigSett = 0,
|  | const unsigned long int & | strtDelay = 0,
|  | const uint16_t | initVal = 0xFFFF )

Class constructor.

Parameters

  initVal | (Optional) Initial value of the wiper (taking the analogy of a potentiometer working parts), in this implementation the value corresponds to the Output Current Value (otpCurVal) attribute of the class. As the attribute type is uint16_t and the minimum and maximum limits are set to 0x0000 and 0xFFFF respectively, the initial value might be set to any value of the type. If no value is provided 0xFFFF will be the instantiation value.

Note
  For the remaining parameters see DbncdDlydMPBttn(const int8_t, const bool, const bool, const unsigned long int, const unsigned long int)

Here is the call graph for this function:

## Member Function Documentation

## ◆ clrStatus()

void SldrDALtchMPBttn::clrStatus | ( | bool | clrIsOn = true | ) |

Note
  See DbncdMPBttn::clrStatus(bool)

Here is the call graph for this function:

## ◆ getFnWhnTrnOffSldrDirUp()

fncPtrType SldrDALtchMPBttn::getFnWhnTrnOffSldrDirUp | ( |  | ) |

Returns the function set to be called when the slider direction is set to be decrementing (down).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffSldrDirUpPtr() method, and is a function pointer to a function with the signature void (fncPtr*) ().

Returns
  fncPtrType A pointer to the function set to be called when the slider direction is set to be decrementing (down).

Return values

  nullptr | if there is no function set to be called when the slider direction is set to be decrementing (down).

## ◆ getFnWhnTrnOffSldrMax()

fncPtrType SldrDALtchMPBttn::getFnWhnTrnOffSldrMax | ( |  | ) |

Returns the function that is set to be executed every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Value attribute setting (otptValMax).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffSldrMaxPtr() method, and is a function pointer to a function with the signature void (fncPtr*) ().

Returns
  A function pointer to the function set to execute every time the object's otptCurVal changes from the otptValMax to a lesser value.

Return values

  nullptr | if there is no function set to execute when the object's otptCurVal changes from the otptValMax to a lesser value.

Warning
  The function code execution will become part of the list of procedures the object executes when otptCurVal changes after being equal to otptValMax, 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.

## ◆ getFnWhnTrnOffSldrMin()

fncPtrType SldrDALtchMPBttn::getFnWhnTrnOffSldrMin | ( |  | ) |

Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Minimum Output Current Value attribute setting (otptValMin).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffSldrMinPtr() method, and is a function pointer to a function with the signature void (fncPtr*) ().

Returns
  A function pointer to the function set to execute every time the object's otptCurVal changes from the otptValMin to a greater value.

Return values

  nullptr | if there is no function set to execute when the object's otptCurVal changes from the otptValMin to a lesser value.

Warning
  The function code execution will become part of the list of procedures the object executes when otptCurVal changes after being equal to otptValMin, 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.

## ◆ getFnWhnTrnOnSldrDirUp()

fncPtrType SldrDALtchMPBttn::getFnWhnTrnOnSldrDirUp | ( |  | ) |

Returns the function set to be called when the slider direction is set to be incrementing (up).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOnSldrDirUpPtr() method, and is a function pointer to a function with the signature void (fncPtr*) ().

Returns
  fncPtrType A pointer to the function set to be called when the slider direction is set to be incrementing (up).

Return values

  nullptr | if there is no function set to be called when the slider direction is set to be incrementing (up).

## ◆ getFnWhnTrnOnSldrMax()

fncPtrType SldrDALtchMPBttn::getFnWhnTrnOnSldrMax | ( |  | ) |

Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Current Value attribute setting (otptValMax).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOnSldrMaxPtr() method, and is a function pointer to a function with the signature void (fncPtr*) ().

Returns
  A function pointer to the function set to execute every time the object's otptCurVal reaches the otptValMax.

Return values

  nullptr | if there is no function set to execute when the object's otptCurVal reaches the otptValMax.

Warning
  The function code execution will become part of the list of procedures the object executes when otptCurVal reaches the otptValMax value, 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.

## ◆ getFnWhnTrnOnSldrMin()

fncPtrType SldrDALtchMPBttn::getFnWhnTrnOnSldrMin | ( |  | ) |

Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOnSldrMinPtr() method, and is a function pointer to a function with the signature void (fncPtr*) ().

Returns
  A function pointer to the function set to execute every time the object's otptCurVal reaches the otptValMin.

Return values

  nullptr | if there is no function set to execute when the object's otptCurVal reaches the otptValMin.

Warning
  The function code execution will become part of the list of procedures the object executes when it reaches the otptValMin, 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.

## ◆ getFVPPWhnTrnOffSldrDirUp()

fncVdPtrPrmPtrType SldrDALtchMPBttn::getFVPPWhnTrnOffSldrDirUp | ( |  | ) |

Returns a pointer to the function that is set to be executed every time the slider direction is set to be decrementing (down).

The function to be executed is an attribute that might be modified by the setFVPPWhnTrnOffSldrDirUp() method, and is a function pointer to a function with the signature void (fncPtr*) (void*).

Returns
  A function pointer to the function set to execute every time the slider direction is set to be decrementing (down).

Return values

  nullptr | if there is no function set to execute when the slider direction is set to be decrementing (down).

## ◆ getFVPPWhnTrnOffSldrDirUpArgPtr()

void * SldrDALtchMPBttn::getFVPPWhnTrnOffSldrDirUpArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the slider direction is set to be decrementing (down).

Returns
  A void* pointer to the argument to be passed to the function set to execute every time the slider direction is set to be decrementing (down).

Return values

  nullptr | if there is no argument for the function set to execute when the slider direction is set to be decrementing (down).

## ◆ getFVPPWhnTrnOffSldrMax()

fncVdPtrPrmPtrType SldrDALtchMPBttn::getFVPPWhnTrnOffSldrMax | ( |  | ) |

Returns the function that is set to be executed every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Value attribute setting (otptValMax).

The function to be executed is an attribute that might be modified by the setFVPPWhnTrnOffSldrMax() method, and is a function pointer to a function with the signature void (fncPtr*) (void*).

Returns
  A function pointer to the function set to execute every time the object's otptCurVal changes from the otptValMax to a lesser value.

Return values

  nullptr | if there is no function set to execute when the object's otptCurVal changes from the otptValMax to a lesser value.

Warning
  The function code execution will become part of the list of procedures the object executes when otptCurVal changes after being equal to otptValMax, 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.

## ◆ getFVPPWhnTrnOffSldrMaxArgPtr()

void * SldrDALtchMPBttn::getFVPPWhnTrnOffSldrMaxArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Current Value attribute setting (otptValMax).

Returns
  void* Pointer to the argument to be passed to the function set to execute every time the object's otptCurVal changes from the otptValMax to a lesser value.

Return values

  nullptr | if there is no argument for the function set to execute when the object's otptCurVal changes from the otptValMax to a lesser value.

## ◆ getFVPPWhnTrnOffSldrMin()

fncVdPtrPrmPtrType SldrDALtchMPBttn::getFVPPWhnTrnOffSldrMin | ( |  | ) |

Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Minimum Output Current Value attribute setting (otptValMin).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffSldrMinPtr() method, and is a function pointer to a function with the signature void (fncPtr*) (void*).

Returns
  A function pointer to the function set to execute every time the object's otptCurVal changes from the otptValMin to a greater value.

Return values

  nullptr | if there is no function set to execute when the object's otptCurVal changes from the otptValMin to a lesser value.

Warning
  The function code execution will become part of the list of procedures the object executes when otptCurVal changes after being equal to otptValMin, 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.

## ◆ getFVPPWhnTrnOffSldrMinArgPtr()

void * SldrDALtchMPBttn::getFVPPWhnTrnOffSldrMinArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute exits the Minimum Output Current Value attribute setting (otptValMin).

Returns
  void* Pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute exits the Minimum Output Current Value attribute setting (otptValMin).

Return values

  nullptr | if there is no argument for the function set to execute when the object's otptCurVal exits the otptValMin setting.

## ◆ getFVPPWhnTrnOnSldrDirUp()

fncVdPtrPrmPtrType SldrDALtchMPBttn::getFVPPWhnTrnOnSldrDirUp | ( |  | ) |

Returns a pointer to the function that is set to be executed every time the slider direction is set to be incrementing (up).

The function to be executed is an attribute that might be modified by the setFVPPWhnTrnOnSldrDirUp() method, and is a function pointer to a function with the signature void (fncPtr*) (void*).

Returns
  A function pointer to the function set to execute every time the slider direction is set to be incrementing (up).

Return values

  nullptr | if there is no function set to execute when the slider direction is set to be incrementing (up).

## ◆ getFVPPWhnTrnOnSldrDirUpArgPtr()

void * SldrDALtchMPBttn::getFVPPWhnTrnOnSldrDirUpArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the slider direction is set to be incrementing (up).

Returns
  void* A pointer to the argument to be passed to the function set to execute every time the slider direction is set to be incrementing (up).

Return values

  nullptr | if there is no argument for the function set to execute when the slider direction is set to be incrementing (up).

## ◆ getFVPPWhnTrnOnSldrMax()

fncVdPtrPrmPtrType SldrDALtchMPBttn::getFVPPWhnTrnOnSldrMax | ( |  | ) |

Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Current Value attribute setting (otptValMax).

The function to be executed is an attribute that might be modified by the setFVPPWhnTrnOnSldrMax() method, and is a function pointer to a function with the signature void (fncPtr*) (void*).

Returns
  A function pointer to the function set to execute every time the object's otptCurVal reaches the otptValMax.

Return values

  nullptr | if there is no function set to execute when the object's otptCurVal reaches the otptValMax.

Warning
  The function code execution will become part of the list of procedures the object executes when otptCurVal reaches the otptValMax value, 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.

## ◆ getFVPPWhnTrnOnSldrMaxArgPtr()

void * SldrDALtchMPBttn::getFVPPWhnTrnOnSldrMaxArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Current Value attribute setting (otptValMax).

Returns
  void* Pointer to the argument to be passed to the function set to execute every time the object enters the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Current Value attribute setting (otptValMax).

Return values

  nullptr | if there is no argument for the function set to execute when the object's otptCurVal reaches the otptValMax setting.

## ◆ getFVPPWhnTrnOnSldrMin()

fncVdPtrPrmPtrType SldrDALtchMPBttn::getFVPPWhnTrnOnSldrMin | ( |  | ) |

Returns the function that is set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOnSldrMinPtr() method, and is a function pointer to a function with the signature void (fncPtr*) (Void*).

Returns
  A function pointer to the function set to execute every time the object's otptCurVal reaches the otptValMin.

Return values

  nullptr | if there is no function set to execute when the object's otptCurVal reaches the otptValMin.

Warning
  The function code execution will become part of the list of procedures the object executes when otptCurVal reaches the otptValMin, 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.

## ◆ getFVPPWhnTrnOnSldrMinArgPtr()

void * SldrDALtchMPBttn::getFVPPWhnTrnOnSldrMinArgPtr | ( |  | ) |

Returns a pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).

Returns
  void* Pointer to the argument to be passed to the function set to execute every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).

## ◆ getOtptCurVal()

uint16_t SldrDALtchMPBttn::getOtptCurVal | ( |  | ) |

Returns the Output Current Value (otpCurVal) attribute.

Returns
  The otpCurVal register value.

## ◆ getOtptCurValIsMax()

bool SldrDALtchMPBttn::getOtptCurValIsMax | ( |  | ) |

Returns a boolean value indicating if the "Output Current Value" equals the maximum limit.

The value returned is the result of comparing the Output Current Value to the Maximum value setting

Returns
  The logical result of the comparison

Return values

  true | The Output Current Value is equal to the Maximum value setting, i.e. the otpCurVal has reached the "top" of the configured range of accepted values.
  false | The Output Current Value is not equal to the Maximum value setting.

## ◆ getOtptCurValIsMin()

bool SldrDALtchMPBttn::getOtptCurValIsMin | ( |  | ) |

Returns the result of comparing the Output Current Value to the Minimum value setting

The value returned is the result of comparing the Output Current Value to the Minimum value setting

Returns
  The logical result of the comparison

Return values

  true | The Output Current Value is equal to the Minimum value setting, i.e. the otpCurVal has reached the "bottom" of the configured range of accepted values.
  false | The Output Current Value is not equal to the Minimum value setting.

## ◆ getOtptSldrSpd()

unsigned long SldrDALtchMPBttn::getOtptSldrSpd | ( |  | ) |

Returns the current setting for the Output Slider Speed value.

The outputSliderSpeed attribute is the configurable factor used to convert the time passed since the MPB entered it's secondary mode in milliseconds into Steps -Slider mode steps- in a pre-scaler fashion.

Returns
  The outputSliderSpeed attribute value.

Note
  At instantiation the outputSliderSpeed is configured to 1 step/millisecond.

## ◆ getOtptSldrStpSize()

uint16_t SldrDALtchMPBttn::getOtptSldrStpSize | ( |  | ) |

Returns the current setting for the Output Slider Step Size value.

The outputSliderStepSize is the factor by which the change in steps is multiplied to calculate the total modification of the otpCurVal register. As the steps modification is calculated each time the timer callback function is called the variation is done in successive steps while the MPB is kept pressed, and not just when it is finally released.

Returns
  The outputSliderStepSize attribute value.

Note
  At instantiation the outputSliderStepSize is configured to 1 counts/step.

## ◆ getOtptValMax()

uint16_t SldrDALtchMPBttn::getOtptValMax | ( |  | ) |

Returns the top output current value register setting.

Returns
  The maximum output current value set.

## ◆ getOtptValMin()

uint16_t SldrDALtchMPBttn::getOtptValMin | ( |  | ) |

Returns the bottom output current value register setting.

Returns
  The minimum output current value set.

## ◆ getSldrDirUp()

bool SldrDALtchMPBttn::getSldrDirUp | ( |  | ) |

Returns the value of the curSldrDirUp attribute.

The curSldrDirUp attribute indicates the direction at which the outputCurrentValue register is being modified. If the current slider direction is up, means the change of value must be treated as an increment, while having the current slider direction down means it's value must be treated as a decrement.

Returns
  The current slider direction value

Return values

  true | The current slider direction is Up, the output current value will be incremented.
  false | The current slider direction is Down, the output current value will be decremented.

## ◆ setFnWhnTrnOffSldrDirUp()

void SldrDALtchMPBttn::setFnWhnTrnOffSldrDirUp | ( | void(* | newFnWhnTrnOff )() | ) |

Sets the function that will be called every time the slider direction is set to be decrementing (down).

The function to be executed is an attribute that might be modified by the setFnWhnTrnOffSldrDirUp() method, and is a function pointer to a function with the signature void (fncPtr*) ().

Parameters

  newFnWhnTrnOff | The function pointer to a function with the signature void (fncPtr*) ().

## ◆ setFnWhnTrnOffSldrMaxPtr()

void SldrDALtchMPBttn::setFnWhnTrnOffSldrMaxPtr | ( | void(* | newFnWhnTrnOff )() | ) |

Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Value attribute setting (otptValMax).

Parameters

  newFnWhnTrnOff | The function pointer to a function with the signature void (fncPtr*) ().

## ◆ setFnWhnTrnOffSldrMinPtr()

void SldrDALtchMPBttn::setFnWhnTrnOffSldrMinPtr | ( | void(* | newFnWhnTrnOff )() | ) |

Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Minimum Output Value attribute setting (otptValMin).

Parameters

  newFnWhnTrnOff | The function pointer to a function with the signature void (fncPtr*) ().

## ◆ setFnWhnTrnOnSldrDirUp()

void SldrDALtchMPBttn::setFnWhnTrnOnSldrDirUp | ( | void(* | newFnWhnTrnOn )() | ) |

Sets the function that will be called every time the slider direction is set to be incrementing (up).

Parameters

  newFnWhnTrnOn | Pointer to a function with the signature void (fncPtr*) ().

## ◆ setFnWhnTrnOnSldrMaxPtr()

void SldrDALtchMPBttn::setFnWhnTrnOnSldrMaxPtr | ( | void(* | newFnWhnTrnOn )() | ) |

Sets a function that will be called every time the object's Output Current Value (otptCurVal) reaches the Maximum Output Value attribute setting (otptValMax).

Parameters

  newFnWhnTrnOn | The function pointer to a function with the signature void (fncPtr*) ().

## ◆ setFnWhnTrnOnSldrMinPtr()

void SldrDALtchMPBttn::setFnWhnTrnOnSldrMinPtr | ( | void(* | newFnWhnTrnOn )() | ) |

Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Current Value attribute setting (otptValMin).

Parameters

  newFnWhnTrnOn | The function pointer to a function with the signature void (fncPtr*) ().

## ◆ setFVPPWhnTrnOffSldrDirUp()

void SldrDALtchMPBttn::setFVPPWhnTrnOffSldrDirUp | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOff,
|  | void * | argPtr = nullptr )

Sets a function that will be called every time the slider direction is set to be decrementing (down).

The function is set as a pointer to a function with the signature void (fncPtr*) (void*).

Parameters

  newFVPPWhnTrnOff | Pointer to the function to be called.
  argPtr | (optional) void* pointer to the argument passed to the function, if no value is provided nullptr will be set. The function argument pointer might be changed independently by the use of the void setFVPPWhnTrnOffSldrDirUpArgPtr (void*) method.

## ◆ setFVPPWhnTrnOffSldrDirUpArgPtr()

void SldrDALtchMPBttn::setFVPPWhnTrnOffSldrDirUpArgPtr | ( | void * | newFVPPWhnTrnOffArgPtr | ) |

Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrDirUp() method.

Parameters

  newFVPPWhnTrnOffArgPtr | Pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrDirUp() method.

## ◆ setFVPPWhnTrnOffSldrMax()

void SldrDALtchMPBttn::setFVPPWhnTrnOffSldrMax | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOff,
|  | void * | argPtr = nullptr )

Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Maximum Output Value attribute setting (otptValMax).

The function is set as a pointer to a function with the signature void (fncPtr*) (void*).

Parameters

  newFVPPWhnTrnOff | Pointer to the function to be called.
  argPtr | (optional) void* pointer to the argument passed to the function, if no value is provided nullptr will be set. The function argument pointer might be changed independently by the use of the void setFVPPWhnTrnOffSldrMaxArgPtr (void*) method.

## ◆ setFVPPWhnTrnOffSldrMaxArgPtr()

void SldrDALtchMPBttn::setFVPPWhnTrnOffSldrMaxArgPtr | ( | void * | newFVPPWhnTrnOffArgPtr | ) |

Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrMax() method.

Parameters

  newFVPPWhnTrnOffArgPtr | Pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrMax() method.

## ◆ setFVPPWhnTrnOffSldrMin()

void SldrDALtchMPBttn::setFVPPWhnTrnOffSldrMin | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOff,
|  | void * | argPtr = nullptr )

Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute changes after being equal to the Minimum Output Value attribute setting (otptValMin).

The function is set as a pointer to a function with the signature void (fncPtr*) (void*).

Parameters

  newFVPPWhnTrnOff | Pointer to the function to be called.
  argPtr | (optional) void* pointer to the argument passed to the function, if no value is provided nullptr will be set. The function argument pointer might be changed independently by the use of the void setFVPPWhnTrnOffSldrMinArgPtr (void*) method.

## ◆ setFVPPWhnTrnOffSldrMinArgPtr()

void SldrDALtchMPBttn::setFVPPWhnTrnOffSldrMinArgPtr | ( | void * | newFVPPWhnTrnOffArgPtr | ) |

Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrMin() method.

Parameters

  newFVPPWhnTrnOffArgPtr | Pointer to an argument to be passed to the function set by the setFVPPWhnTrnOffSldrMin() method.

## ◆ setFVPPWhnTrnOnSldrDirUp()

void SldrDALtchMPBttn::setFVPPWhnTrnOnSldrDirUp | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOn,
|  | void * | argPtr = nullptr )

Sets a function that will be called every time the slider direction is set to be incrementing (up).

The function is set as a pointer to a function with the signature void (fncPtr*) (void*).

Parameters

  newFVPPWhnTrnOn | Pointer to the function to be called.
  argPtr | (optional) void* pointer to the argument passed to the function, if no value is provided nullptr will be set. The function argument pointer might be changed independently by the use of the void setFVPPWhnTrnOnSldrDirUpArgPtr (void*) method.

## ◆ setFVPPWhnTrnOnSldrDirUpArgPtr()

void SldrDALtchMPBttn::setFVPPWhnTrnOnSldrDirUpArgPtr | ( | void * | newFVPPWhnTrnOnArgPtr | ) |

Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrDirUp() method.

Parameters

  newFVPPWhnTrnOnArgPtr | Pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrDirUp() method.

## ◆ setFVPPWhnTrnOnSldrMax()

void SldrDALtchMPBttn::setFVPPWhnTrnOnSldrMax | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOn,
|  | void * | argPtr = nullptr )

Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute reaches the Maximum Output Value attribute setting (otptValMax).

The function is set as a pointer to a function with the signature void (fncPtr*) (void*).

Parameters

  newFVPPWhnTrnOff | Pointer to the function to be called.
  argPtr | (optional) void* pointer to the argument passed to the function, if no value is provided nullptr will be set. The function argument pointer might be changed independently by the use of the void setFVPPWhnTrnOnSldrMaxArgPtr (void*) method.

## ◆ setFVPPWhnTrnOnSldrMaxArgPtr()

void SldrDALtchMPBttn::setFVPPWhnTrnOnSldrMaxArgPtr | ( | void * | newFVPPWhnTrnOnArgPtr | ) |

Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrMax() method.

Parameters

  newFVPPWhnTrnOnArgPtr | Pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrMax() method.

## ◆ setFVPPWhnTrnOnSldrMin()

void SldrDALtchMPBttn::setFVPPWhnTrnOnSldrMin | ( | fncVdPtrPrmPtrType | newFVPPWhnTrnOn,
|  | void * | argPtr = nullptr )

Sets a function that will be called every time the object's Output Current Value (otptCurVal) attribute reaches the Minimum Output Value attribute setting (otptValMin).

The function is set as a pointer to a function with the signature void (fncPtr*) (void*).

Parameters

  newFVPPWhnTrnOff | Pointer to the function to be called.
  argPtr | (optional) void* pointer to the argument passed to the function, if no value is provided nullptr will be set. The function argument pointer might be changed independently by the use of the void setFVPPWhnTrnOnSldrMinArgPtr (void*) method.

## ◆ setFVPPWhnTrnOnSldrMinArgPtr()

void SldrDALtchMPBttn::setFVPPWhnTrnOnSldrMinArgPtr | ( | void * | newFVPPWhnTrnOnArgPtr | ) |

Sets a pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrMin() method.

Parameters

  newFVPPWhnTrnOnArgPtr | Pointer to an argument to be passed to the function set by the setFVPPWhnTrnOnSldrMin() method.

## ◆ setOtptCurVal()

bool SldrDALtchMPBttn::setOtptCurVal | ( | const uint16_t & | newVal | ) |

Sets the output current value register.

The new value for the output current value register must be in the range otptValMin <= newVal <= otptValMax

Parameters

  newVal | The new value for the output current value register.

Returns
  The success in the value change

Return values

  true | The new value was within valid range, the output current value register is set to the parameter passed.
  false | The new value was outside valid range, the change was not made.

## ◆ setOtptSldrSpd()

bool SldrDALtchMPBttn::setOtptSldrSpd | ( | const uint16_t & | newVal | ) |

Sets the output slider speed (otptSldrSpd) attribute.

As described in the SldrDALtchMPBttn class definition, the otptSldrSpd value is the factor by which the time between two readings of the MPB pressing state in secondary mode is converted into "slider steps". At instantiation the value is set to 1, meaning 1 millisecond is equivalent to 1 step, the "**slowest**" speed configuration. Rising the value will make each millisecond represent more steps, making the change of current value faster.

Parameters

  newVal | The new value for the otptSldrSpd attribute.

Returns
  The success in the value of the attribute

Return values

  true | The parameter was a valid value, the attribute is set to the new value.
  false | The parameter is an invalid value, the attribute is not changed.

Note
  Making the otptSldrSpd equal to 0 would void the ability to change the slider value, so the range of acceptable values is 1<= newVal <= (2^16-1).

Warning
  A "wrong" combination of otptSldrSpd and otptSldrStpSize might result in value change between readings greater than the range set by the otptValMin and the otptValMax values. The relation between the four parameters must be kept in mind if the application developed gives the final user the capability to configure those values at runtime.

## ◆ setOtptSldrStpSize()

bool SldrDALtchMPBttn::setOtptSldrStpSize | ( | const uint16_t & | newVal | ) |

Sets the output slider step size (otptSldrStpSize) attribute value.

Parameters

  newVal | The new value for the outputSliderStepSize attribute.

Note
  The new value for the step size must be smaller or equal than the size of the valid range of otptCurVal attribute

Return values

  true | If newVal <= (otptValMax - otptValMin), the value of the outputSliderStepSize attribute is changed.
  false | Otherwise, and the value of the outputSliderStepSize attribute is not changed.

Note
  For the secondary function to work like a slider, the condition (newVal < ((_otptValMax - _otptValMin) / _otptSldrSpd)) must be kept
  For the secondary function to work like a slider or a toggle switch, the condition (newVal <= ((_otptValMax - _otptValMin) / _otptSldrSpd)) must be kept
  For the secondary function to work like a toggle switch, the condition (newVal = ((_otptValMax - _otptValMin) / _otptSldrSpd)) must be kept.

Warning
  As a consequence of the aforementioned notes, if both otptSldrStpSize and otptSldrSpd are being changed, the otptSldrSpd must be changed first to ensure the new otptSldrStpSize doesn't fail the range validation test included in this method.

## ◆ setOtptValMax()

bool SldrDALtchMPBttn::setOtptValMax | ( | const uint16_t & | newVal | ) |

Sets the output current value register maximum value attribute (otptValMax attribute).

The new value for the otptValMax attribute must be in the range otptValMin < newVal <= 0xFFFF

Parameters

  newVal | The new value for the otptValMax attribute.

Returns
  The success in the value change

Return values

  true | The new value was within valid range, the otptValMax attribute change was made.
  false | The new value was outside valid range, the change was not made.

Note
  Due to type constrains, the failure in the value change must be consequence of the selected newVal <= otptValMin

Warning
  If the otpValMax attribute intended change is to a smaller value, the otpCurVal might be left outside the new valid range (newVal < otpCurVal). In this case the otptCurVal will be changed to be equal to newVal, and so otptCurVal will become equal to otptValMax.

Here is the call graph for this function:

## ◆ setOtptValMin()

bool SldrDALtchMPBttn::setOtptValMin | ( | const uint16_t & | newVal | ) |

Sets the output current value register minimum value attribute (otptValMin attribute).

The new value for the otptValMin attribute must be in the range 0x0000<= newVal < otptValMax.

Parameters

  newVal | The new value for the otptValMin attribute.

Returns
  The success in the value change

Return values

  true | The new value was within valid range, the otptValMin attribute change was made.
  false | The new value was outside valid range, the change was not made.

Note
  Due to type constrains, the failure in the value change must be consequence of the selected newVal >= otptValMax

Warning
  If the otptValMin attribute intended change is to a greater value, the otptCurVal might be left outside the new valid range (newVal > otptCurVal). In this case the otptCurVal will be changed to be equal to newVal, and so otptCurVal will become equal to otptValMin.

Here is the call graph for this function:

## ◆ setSldrDirDn()

bool SldrDALtchMPBttn::setSldrDirDn | ( |  | ) |

Sets the value of the curSldrDirUp attribute to false.

The curSldrDirUp attribute dictates how the calculated output value change -resulting from the time lapse between checks, the otptSldrSpd and the otptSldrStpSize attributes- will be applied to the otptCurVal attribute.

- If curSldrDirUp = false, the output value change will be subtracted from otptCurVal, successively down to otptValMin.

Note
  If the method intends to set the curSldrDirUp to false when the otptCurVal = otptValMin the method will fail, returning false as result.

Returns
  The success in changing the slider direction

Return values

  true | The change of direction was successful
  true | The change of direction failed as the otptCurVal was equal to the extreme value

## ◆ setSldrDirUp()

bool SldrDALtchMPBttn::setSldrDirUp | ( |  | ) |

Sets the value of the curSldrDirUp attribute to true.

The curSldrDirUp attribute dictates how the calculated output value change -resulting from the time lapse between checks, the otptSldrSpd and the otptSldrStpSize attributes- will be applied to the otptCurVal attribute.

- If curSldrDirUp = true, the output value change will be added to otptCurVal, up to otptValMax.

Note
  If the method intends to set curSldrDirUp to true when the otptCurVal = otptValMax the method will fail, returning false as result.

Returns
  The success in changing the slider direction

Return values

  true | The change of direction was successful
  true | The change of direction failed as the otptCurVal was equal to the extreme value

## ◆ setSwpDirOnEnd()

void SldrDALtchMPBttn::setSwpDirOnEnd | ( | const bool & | newVal | ) |

Sets the value of the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) attribute.

The autoSwpDirOnEnd is one of the attributes that configures the slider behavior, setting what the MPB must do when reaching one of the output values range limits. If a limit -otptValMin or otptValMax- is reached while the MPBttn is kept pressed and in secondary mode, the otptCurVal register increment/decrement can be stopped until a change of direction is invoked through setSldrDirUp(), setSldrDirDn() or swpSldrDir() methods, or automatically through the "Auto-Swap Direction on Ends" (autoSwpDirOnEnd) and the "Swap Direction on MPB press" (autoSwpDirOnPrss). If the autoSwpDirOnEnd attribute is set (true) the increment direction of the otptCurVal will be automatically inverted when it reaches otptValMax or otptValMin. If it's not set the otptCurVal will not change value until one of the described alternative methods is invoked, or the MPB is released and pushed back if the autoSwpDirOnPrss is set -see setSwpDirOnPrss(const bool).

Parameters

  newVal | The new value for the autoSwpDirOnEnd attribute

## ◆ setSwpDirOnPrss()

void SldrDALtchMPBttn::setSwpDirOnPrss | ( | const bool & | newVal | ) |

Sets the value of the "Auto-Swap Direction On Press" (autoSwpDirOnPrss) attribute.

The autoSwpDirOnPrss is one of the attributes that configures the slider behavior, setting what the MPB must do when the MPB object enters in secondary mode, referring to the increment or decrement directions. If the autoSwpDirOnPrss attribute is set (true) the increment direction of the otptCurVal will be automatically inverted every time the MPB is pressed back into secondary mode. If the otptCurVal was incrementing when the MPB was last released. the otptCurVal will start decrementing the next time is pressed to enter secondary mode, and vice versa. If it's not set the otptCurVal will not change direction until it reaches one the limit values, or until one of the described alternative methods is invoked, or the MPB's autoSwpDirOnEnd attribute is set -see setSwpDirOnEnd(const bool) for more details.

Parameters

  newVal | The new value for the autoSwpDirOnPrss attribute

## ◆ swapSldrDir()

bool SldrDALtchMPBttn::swapSldrDir | ( |  | ) |

Inverts the current curSldrDirUp attribute value.

Whatever the previous value of the curSldrDirUp flag, the method invocation inverts it's value, and as a consequence the inverts the direction of the otptCurVal update. If it was incrementing it will start decrementing, and vice versa, considering all the other factors, attributes and attribute flags involved in the embedded object behavior (minimum and maximum settings, the direction changes if pressed, reaches limits, etc.)

Returns
  The new value of the curSldrDirUp attribute.