We would want simulation to run in different modes, stepping (back and forth) and free-running until some Halt/Break condition is encountered. Now the basic support for clock return is implemented, so we can now think about how free-run until halt should be implemented.
Solution
Add a state to the simulator (indicating the status running : bool).
When a component returns with a Halt or Error then the state should be set to false. This state variable can be altered by the gui. We could either have a new run function in the Simulator, that calls clock or have clock itself be repetitive, either should work.
Problem
We would want simulation to run in different modes, stepping (back and forth) and free-running until some Halt/Break condition is encountered. Now the basic support for
clock
return is implemented, so we can now think about how free-run until halt should be implemented.Solution
Add a state to the simulator (indicating the status
running : bool
).When a component returns with a
Halt
orError
then the state should be set tofalse
. This state variable can be altered by thegui
. We could either have a newrun
function in theSimulator
, that callsclock
or haveclock
itself be repetitive, either should work.