tate waitRed. State good is not reached, signal red is not detected by the observer. system syst1 block block1 SIGNAL process lights orange, ready block1 lights orange orange, orange, ready Figure 5.77 Model with two consecutive outputs observer obs1 waitOrange waitRed waitOrange OUTPUT orange OUTPUTre FROM lights1 FROM lights1 waitRed SUCCESS STATE good ; Figure 5.78 Ordinary GOAL observer: no success The following probe is declared to access instance 1 of process lights: PROBE lights1 syst1 ! block1 ! lights (1) ; If we transform the ordinary observer into an event observer, after each SDL model transition several transitions in each observer are executed. Now the observer in Figure 5.79 will detect a success in the SDL model represented in Figure 5.77, because the Simulator executes two transitions in the observer obs1 it goes from state waitOrange to state waitRed and then to state good. To enter the keyword EVENT, type it before obs1 in the Framework view. Remark: the observers generated when compiling observer MSCs are event observers. Automatic Observation of Simulations 163 EVENT observer bbs1 waitOrange waitRed OUTPUT orange OUTPUT red waitOrange FROM lights1 FROM lights1 waitRed SUCCESS STATE good Figure 5.79 Event GOAL observer: success reached 5.3.6.2 Using a GOAL observer to detect the execution of a transition The second transition in process lights, as shown in Figure 5.80, is labeled trl. The GOAL observer obsTrans represented in Figure 5.81 detects the execution of transition trl. Then, if X is not equal to 0, the observer goes to state good. process lights ready X Integer:= 0; orange orange lights ready X:=X + 1 ready Figure 5.80 Process lights modified observer obsTrans SUCCESS STATE good ; TRANS lights1 : tr1 lights1 ! x Figure 5.81 Detecting execution of transition trl 164 Validation of Communications Systems with SDL Remember that the following probe is declared to access instance 1 of process lights: PROBE lights1 syst1 ! block1 ! lights (1) ; 5.3.6.3 Using a GOAL observer to detect a value