![]() |
Speeduino
|
All Schedule instances move through the same set of states (status) in the same sequence: they are a Finite State Machine (FSM). These methods enforce this ordering for the timer driven state transitions. More...
Typedefs | |
| typedef void(* | scheduleStateTranstionFunc) (Schedule *) |
| The type of function that is called during a state transition. Captures the actions to take as a result of the state transition. | |
Functions | |
| void | movetoNextState (Schedule &schedule, scheduleStateTranstionFunc pendingToRunning, scheduleStateTranstionFunc runningToOff, scheduleStateTranstionFunc runningToPending) |
| The engine/pump that moves a schedule through it's various timer driven states. | |
| void | defaultPendingToRunning (Schedule *schedule) |
| Default action for PENDING to RUNNING state transition. | |
| void | defaultRunningToOff (Schedule *schedule) |
| Default action for RUNNING to OFF state transition. | |
| void | defaultRunningToPending (Schedule *schedule) |
| Default action for RUNNING to PENDING state transition. | |
All Schedule instances move through the same set of states (status) in the same sequence: they are a Finite State Machine (FSM). These methods enforce this ordering for the timer driven state transitions.
The states transitions are (roughly):
* PENDING <-- * | | * V | * RUNNING --- * | * V * OFF *
The OFF to PENDING transition is handled by setFuelSchedule & setIgnitionSchedule
The type of function that is called during a state transition. Captures the actions to take as a result of the state transition.
Default action for PENDING to RUNNING state transition.
This should be called by another function that handles PENDING to RUNNING
| schedule | The schedule that is/will be moving from PENDING to RUNNING |

Default action for RUNNING to OFF state transition.
This should be called by another function that handles RUNNING to OFF
| schedule | The schedule that is/will be moving from RUNNING to OFF |

Default action for RUNNING to PENDING state transition.
This should be called by another function that handles RUNNING to PENDING
| schedule | The schedule that is/will be moving from RUNNING to PENDING |

| void movetoNextState | ( | Schedule & | schedule, |
| scheduleStateTranstionFunc | pendingToRunning, | ||
| scheduleStateTranstionFunc | runningToOff, | ||
| scheduleStateTranstionFunc | runningToPending | ||
| ) |
The engine/pump that moves a schedule through it's various timer driven states.
| schedule | The schedule to change the state of |
| pendingToRunning | Function to call if the schedule is moving from PENDING to RUNNING |
| runningToOff | Function to call if the schedule is moving from RUNNING to OFF |
| runningToPending | Function to call if the schedule is moving from RUNNING to PENDING |
