Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public StateInitIO(ISpState <DemoMsgId> parent, DemoMachineObj machine)
     : base(parent, DemoStateId.InitIO, machine)
 {
     this.inputs  = DummyDI.InputsInstance;
     this.outputs = DummyDI.OutputsInstance;
 }
Ejemplo n.º 5
0
 public StateSimpleRecovery(ISpState <DemoMsgId> parent, DemoStateId id, DemoMachineObj machine)
     : base(parent, id, machine)
 {
     this.inputs  = DummyDI.InputsInstance;
     this.outputs = DummyDI.OutputsInstance;
 }
Ejemplo n.º 6
0
 public StateWaitOnStart(ISpState <DemoMsgId> parent, DemoStateId id, DemoMachineObj machine)
     : base(parent, id, machine)
 {
 }