Cok. A. Create a new directory, and copy all the files (except the MSCs) of the V.76 example into it. B. Load v76.sdt in the Organizer. C. If you added an observer process to the model as specified in Chapter 5, go back to the version without observer process: in the Organizer, select Edit > Connect, choose To an existing file, press the folder-shaped icon and connect to the file v76test.ssy. D. In the Organizer, select the procedure CRCok and choose Edit > Disconnect, and press Disconnect. E. Open the package V76 and remove the procedure CRCok. F. In the Organizer, press the Save button. G. Open the process DLC, go to the page part2, and transform the call to CRCok as indi- cated in Figure 8.2: the return value becomes an Integer instead of a Boolean, to simplify the example. H. With a text editor, create a file my_c.h containing the line shown in Figure 8.3. PROCESS DLC (0, maxDLC + 1) part2(2) CALL CRCok (V76para ! I !CRC) L_Datalnd (me, V76paral data) Figure 8.2 Modified call to procedure CRCok extern int CRCok (int crcl) ; Figure 8.3 The file my_c.h Other Simulator Features 269 I. In the Organizer, select the bar Used Files and press several times the Move Up button to move it above the bar SDL System Structure. J. Select the bar Used Files, choose Edit > Add Existing, select my_c.h and press Add. K. Open the package V76 and add use ctypes; use my_c; as illustrated in Figure 8.4. use ctypes; use my_c; PACKAGE V76 contents not shown Figure 8.4 The package V76 modified The clause use my_c imports the SDL package my_c generated by H2SDL (or by CPP2SDL) because the file my_c.h has been added in the Organizer. The clause use ctypes imports the SDL package ctypes required to import C into the SDL model. L. With a text editor, create a file my_c.c as shown in Figure 8.5. The function CRCok is defined, performing the same behavior as the SDL version. Here you could paste an actual CRC computation. #include "my_c.h" int CRCok (int crcl) if (crcl<0) return -1; else return 0; Figure 8.5 The C function CRCok in the file