Initialize:
initializes the temperature to “0” degree,
Boiler status= Boiler started
Warming up:
the temperature is increased by “1”,
the process takes 100ms,
Boiler status= Warming up
If the temperature is 50 degree the boiler is ready
Boiler ready:
Temperature is not changing;
Boiler status= Boiler ready,
start the shutdown procedure
Shutting Down:
The temperature is decreased by “1”,
the process takes 100ms,
Boiler status= Shutting down
If the temperature is 0 degree the shutdown is completed
Close:
Exit the program, Boiler status= Boiler is off
怎么用状态机写啊
initializes the temperature to “0” degree,
Boiler status= Boiler started
Warming up:
the temperature is increased by “1”,
the process takes 100ms,
Boiler status= Warming up
If the temperature is 50 degree the boiler is ready
Boiler ready:
Temperature is not changing;
Boiler status= Boiler ready,
start the shutdown procedure
Shutting Down:
The temperature is decreased by “1”,
the process takes 100ms,
Boiler status= Shutting down
If the temperature is 0 degree the shutdown is completed
Close:
Exit the program, Boiler status= Boiler is off
怎么用状态机写啊