12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Wayne.Lib;
- using Wayne.Lib.StateEngine;
- using Wayne.Lib.StateEngine.Generic;
- namespace SinochemInternetPlusApp.States.CarPlateManualMode
- {
- public class WaitForFueling : TimeoutState<FuelingPoint>
- {
- private byte sqNo;
- private bool cardReaderBackToIdle = false;
- private bool nozzleLifted = false;
- protected override void Enter(StateEntry stateEntry, ref Transition transition)
- {
- base.Enter(stateEntry, ref transition);
-
- nozzleLifted = false;
-
- DebugLog($"Start to set card reader back to CarPlateIdle, SqNo={sqNo}\n Waiting for Ack");
- }
- protected override void HandleNonTimeoutEvent(StateEngineEvent stateEngineEvent, ref Transition transition)
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if (nozzleLifted)
- {
- transition = new Transition(this, TransitionType.NozzleLifted);
- }
- }
- protected override void Timeout(ref Transition transition)
- {
- transition = new Transition(this, TransitionType.Timeout);
- }
- protected override int TimeoutInterval =>
- TimeoutValues.GetValueInMilliSec(TimeoutValues.FuelingPoint.Shared_WaitForFueling, 30 * 60);
- }
- }
|