Calling Sequence of Module Events

The following order shows the calling sequence of ATEasy Application modules, Program, System, Driver events during a run of an ATEasy application.

Events Sequence running a program - Start to finish without any Abort

1.      System: OnInit

2.      Driver(s): OnInit *

3.      System: OnInitSystem

4.      System.OnInitSwitchUut ***

5.      Driver(s).OnInitSwitchUut ***

6.      Program.OnInitSwitchUut ***

7.      System: OnInitProgram

8.      Driver(s): OnInitProgram *

9.      Program: OnInit

10.   System: OnInitTask

11.   Driver(s): OnInitTask *

12.   Program: OnInitTask

13.   System: OnInitTest

14.   Driver(s): OnInitTest *

15.   Program:OnInitTest

16.   Program:OnEndTest

17.   Driver(s): OnEndTest *

18.   System: OnEndTest

19.   Program:OnEndTask

20.   Driver(s): OnEndTask **

21.   System: OnEndTask

22.   Program:OnEnd

23.   Driver(s):OnEndProgram **

24.   System:OnEndProgram

25.   Program.OnEndSwitchUut ***

26.   Driver(s).OnEndSwitchUut ***

27.   Ssytem.OnEndSwitchUut ***

28.   System: OnEndSystem

29.   Driver(s): OnEnd **

30.   System: OnEnd

Events Sequence running a program and pressing Abort in the middle of a test

The steps from the beginning to # 10 (Program:OnInitTest) will be same as above:

1.      Program.OnAbort

2.      Driver(s).OnAbort **

3.      System.OnAbort 

Events Sequence running a program and pressing Reset when Paused in a test

The steps from the beginning to # 10 (Program:OnInitTest) will be same as above:

1.      System.OnInit

2.      Driver(s).OnInit **

3.      System.OnInitSystem

Comments

        * If your system drivers folder has multiple drivers, each driver's OnInitxxx event is called from start to end : Driver1.OnInitxxx, Driver2.OnInitxxx, ... DriverN.OnInitxxx.

        ** Each driver OnEndxxx (or OnAbort) event is called from end to start : DriverN.OnEndxxx, ... Driver1.OnEndxxx.

        *** Location of these event in the sequence depends on App.UutSwitchLevel property or the Uut statement.

        If a module event is empty containing no code, it will not be called.

        For each test in a program, the steps from # 13 to # 18 will be repeated.

        For each task, the steps from # 10 to # 21 will be repeated. 

The example ModuleEvents.prj in the ATEasy\Examples directory demonstrates the sequence of module events by generating trace out from each event procedure.