st/ dlca/dlc(1) v76frame( sabme : (.0.) ) t320(12.0) v76frame( sabme : (.0.) ) l_estabind( 0) v76frame( sabme : (.0.) ) t320(12.0 ) v76frame( sabme : (.0.) ) dicstopped( 0) _releaseind( 0) I_estabresp inst_1_dlcb.dlc beginning of PROCESS/ transition TR1 v76test/ dlcb/dlc(1) I_releaseind( 0) v76frame dm : (.0.) ) v76frame( dm : (.0.) Figure 7.52 MSC trace of the exception scenario (bug_exh4) process dispatch(1, 1) ready transition TR1 output to V76frame (V76para) Null Pid V76para ! present SABME ( DM ) DLCpeer:= V76frame(V76para) V76para ! SABME ! DLC TO DLCs(V76para ! DM ! DLCi) DLCs(DLCpeer) Figure 7.53 The process dispatch part1 (extract) 7.4.5.4 Correct the exception The simulation has revealed that we must protect the expressions after TO in the output state- ments to avoid having a Null Pid. For that, you will add a decision to test the value of the expression: if Null, the output is not performed. Exhaustive Simulation 239 A. Exit from the Simulator (answering No to the question). Do not exit from the Editor. B. In Windows (or Unix), make a copy of the file v76.pr into v76_v6.pr. C. In process dispatch, from the Framework window, create a new partition part1_2 and rename part1 part1_1. D. Split the state machine in part1_1 into two parts, one in part1_1 and the other in part1_2, as illustrated in Figures 7.54 and 7.55. E. Insert four decisions in part1_1 as illustrated in Figure 7.54. F. Insert a decision in part2 after answer UA, as shown in Figure 7.56. Take care of staying in state waitUA when the answer is Null (nextstate -). Save the SDL model. process dispatch(1, 1) /* Temporary variables: */ NEWTYPEDLCsArray ARRAY(DLCident, PID) DLCnum, DLCpeer DLCident, ENDNEWTYPE; uData Integer, ready V76para V76paramTyp; /* to store the PIDs of the instances V76frame (V76para) of process DLC, necessary in outputs to route signals : */ DLCs DLCsArray; V76para present SABME ) ( DM ) ( DISC) ( XIDcmd) ( XIDresp ) ELSE DLCs(V76para DLCs(V76para L_SetparmConf I ! DLCi) DISC ! DLCi) ( Null V76frame(V76para) V76frame(V76