rasProject_01 / weSweetHome  R. 150 2026-10-25
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
state_t::[union].__unnamed0__ Union Reference

Just one enter function (type). More...

Data Fields

enterState_t const doEnter
 This state machine's function to enter it.
enterStateF_t const doEnterF
 Float control substitute or addendum to ::state_t.doEnter.
enterStateS_t const doEnterS
 Character control substitute or addendum to ::state_t.doEnter.

Detailed Description

Just one enter function (type).

Any state machine object (instance) will have a distinct final enter function, the type of which is specific for the state machine type. Hence a union over the (currently three) possible function types is well justified.
The enter function type is held (here) in the state machine object to allow state machine code to use its own enter function.
The same holds for the ::doLeave and ::tickCheck types.
Note: The only use as of now (2017..2026) is the timer class calling its registered leave function. (If this could be changed the whole registration feature could be killed / banned.)

Note2: Unions of state variables designated for use only in separate types were already banned as of Rev. 86. The savings of memory space by those unions were not worth the danger of hard to find errors, when underlying the assumptions were violated.

Field Documentation

◆ doEnter

enterState_t const doEnter

This state machine's function to enter it.

The fitting function to enter this state, respectively to start its transition from OFF to ON might be recorded in and then called via this function pointer.


The documentation for this union was generated from the following files: