public SuperStateIdle(ISpState <DemoMsgId> parent, DemoStateId id, DemoMachineObj machine) : base(parent, id, machine) { this.waitOnStart = this.AddSubState(new StateWaitOnStart(this, DemoStateId.WaitOnStart, machine)); this.SetEntryState(this.waitOnStart); }
public SuperStateNotStarted(ISpState <DemoMsgId> parent, DemoStateId id, DemoMachineObj machine) : base(parent, id, machine) { // Create sub-states this.recovery = this.AddSubState(new StateSimpleRecovery(this, DemoStateId.SimpleRecovery, machine)); this.initialising = this.AddSubState(new StateInitIO(this, machine)); // Register events and internal result returns this.recovery.ToNextOnResult(DemoMsgId.RecoveryComplete, this.initialising); this.initialising.ToExitOnResult(DemoMsgId.InitComplete); this.SetEntryState(this.recovery); }
public SuperStateMain(DemoMachineObj machine) : base(DemoStateId.Initial, machine) { this.notStarted = this.AddSubState(new SuperStateNotStarted(this, DemoStateId.NotStarted, machine)); this.idle = this.AddSubState(new SuperStateIdle(this, DemoStateId.Idle, machine)); this.notStarted.ToNextOnResult(DemoMsgId.InitComplete, this.idle); //this.notStarted.ToNextOnResult(DemoMsgId.Tick, this.idle, new MsgTick()); Log.Warning(0, "----- Not started transitions -----"); //this.notStarted.DebugDumpTransitions(); //Log.Warning(0, "----- Main transitions -----"); // this.DebugDumpTransitions(); this.SetEntryState(this.notStarted); }
public StateInitIO(ISpState <DemoMsgId> parent, DemoMachineObj machine) : base(parent, DemoStateId.InitIO, machine) { this.inputs = DummyDI.InputsInstance; this.outputs = DummyDI.OutputsInstance; }
public StateSimpleRecovery(ISpState <DemoMsgId> parent, DemoStateId id, DemoMachineObj machine) : base(parent, id, machine) { this.inputs = DummyDI.InputsInstance; this.outputs = DummyDI.OutputsInstance; }
public StateWaitOnStart(ISpState <DemoMsgId> parent, DemoStateId id, DemoMachineObj machine) : base(parent, id, machine) { }