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...
|
| SldrDALtchMPBttn (GPIO_TypeDef *mpbttnPort, const uint16_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 (gpioPinId_t mpbttnPinStrct, 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) |
|
uint16_t | getOtptCurVal () |
| Returns the Output Current Value (otpCurVal) attribute.
|
|
bool | getOtptCurValIsMax () |
| Returns the result of comparing the Output Current Value to the Maximum value setting
|
|
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.
|
|
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.
|
|
| DblActnLtchMPBttn (GPIO_TypeDef *mpbttnPort, const uint16_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 (gpioPinId_t mpbttnPinStrct, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0) |
| 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.
|
|
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.
|
|
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.
|
|
| LtchMPBttn (GPIO_TypeDef *mpbttnPort, const uint16_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 (gpioPinId_t mpbttnPinStrct, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0) |
| Class constructor.
|
|
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 trnOffASfAP class attribute flag.
|
|
const bool | getUnlatchPend () const |
| Returns the value of the validUnlatchPending attribute.
|
|
const bool | getUnlatchRlsPend () const |
| Returns the value of the validUnlatchReleasePending attribute.
|
|
bool | resetFda () |
| See DbncdMPBttn::resetFda()
|
|
void | setTrnOffASAP (const bool &newVal) |
| Sets the value of the trnOffASAP attribute flag.
|
|
void | setUnlatchPend (const bool &newVal) |
| Sets the value of the validUnlatchPending attribute.
|
|
void | setUnlatchRlsPend (const bool &newVal) |
| Sets the value of the validUnlatchRlsPending attribute.
|
|
bool | unlatch () |
| Sets the values of the flags needed to unlatch a latched MPB.
|
|
| DbncdDlydMPBttn () |
| Default constructor.
|
|
| DbncdDlydMPBttn (GPIO_TypeDef *mpbttnPort, const uint16_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 (gpioPinId_t mpbttnPinStrct, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0) |
| Class constructor.
|
|
bool | init (GPIO_TypeDef *mpbttnPort, const uint16_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(GPIO_TypeDef*, const uint16_t, const bool, const bool, const unsigned long int)
|
|
bool | init (gpioPinId_t mpbttnPinStrct, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0, const unsigned long int &strtDelay=0) |
| see DbncdMPBttn::init(gpioPinId_t, const bool, const bool, const unsigned long int)
|
|
void | setStrtDelay (const unsigned long int &newStrtDelay) |
| Sets a new value to the delay attribute.
|
|
| DbncdMPBttn () |
| Default class constructor.
|
|
| DbncdMPBttn (GPIO_TypeDef *mpbttnPort, const uint16_t &mpbttnPin, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0) |
| Class constructor.
|
|
| DbncdMPBttn (gpioPinId_t mpbttnPinStrct, const bool &pulledUp=true, const bool &typeNO=true, const unsigned long int &dbncTimeOrigSett=0) |
| Class 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 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.
|
|
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 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 (GPIO_TypeDef *mpbttnPort, const uint16_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 | init (gpioPinId_t mpbttnPinStrct, 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.
|
|
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 | setIsOnDisabled (const bool &newIsOnDisabled) |
| Sets the value of the isOnDisabled attribute.
|
|
void | setOutputsChange (bool newOutputChange) |
| 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 pointer to the task to be notified by the object when its output attribute flags changes.
|
|
virtual void | setTaskWhileOn (const TaskHandle_t &newTaskHandle) |
| Sets the handle to the task to be run while the object is in the On state.
|
|
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