This section should help to give you a first taste of using FDR2, by leading you slowly through a simple example. The example deals with multiplexing of multiple streams of data down a single channel, using a second channel for returning acknowledgements. You will need the CSP script called `mbuff.csp', which may be found in the `demo' directory supplied with FDR2. (A printed version of that script can found in D Multiplexed Buffer Script.)
To invoke FDR2, type at the command prompt
fdr2
and wait a short period for the appearance of the main FDR2 window (see Figure 3 in 2.1 The Main Window). It is often useful to also have FDR2's status window open, especially when trying out a new script, because the status window will show parsing and compilation errors. You won't really need it for this example, but open it anyway:
Click Mouse-1 on the Options button, move the pointer over Show status and click again.
You now have two windows. Move them around by dragging their title bars until you find nice positions for them; if they have to overlap, have the main window to the front. You will make most subsequent input via the main window.
Next we need to have FDR2 load the script `mbuff.csp'. To do this
Click Mouse-1 on the File button, move the pointer over Load and click again.
The file selection window (see Figure 4 in 2.3.1 The Load command) will then appear. The window has two main areas, the one to the right for moving up and down the directory tree, and the one to the left for selecting a particular file. If, when you invoked FDR2, you had the correct current directory then you will see the file name `mbuff.csp' listed in the left-hand area, although to make the name visible you may need to drag a slider that appears to the right of that area when there are too many names for the space provided. If `mbuff.csp' does not appear in the list then you can go searching through the directory tree (for the `demo/misc' directory) by double-clicking Mouse-1 on the folder icons. When you've found it, have FDR2 load it:
Click Mouse-1 on the file name, and then click on Ok.
The file selection window will disappear, and after a short delay new information will appear within the main window: an assertion will appear in the Assertion List (just below the Tab Pane) and a list of processes in the area below that, exactly as in Figure 5.
The assertion was chosen by the writer of the script as the natural refinement check to perform. Notice there is currently a question mark (?) symbol against it. This is because FDR2 has not yet established whether the assertion holds, so the next thing to do is ask FDR2 to check the assertion; this is FDR2's main function:
Click Mouse-3 on the assertion, to produce a small action menu, and from this menu select Run with Mouse-1.
Alternatively, a faster way is just to double-click on the assertion. You will notice the question mark against the assertion change to a clock symbol, informing you that FDR2 has started working on the problem. You will also notice output appearing in the status window, which you will find very useful as you gain experience with FDR2; for now simply view it as reassurance of progress being made.
After a short period FDR2 will complete the check. You will notice the clock symbol against the assertion change to a tick. That tells you that FDR2 found the assertion to be correct, in this case showing that a combination of transmitters and receivers communicating through a pair of wires behaves like several independent one-place buffers. There is nothing more you can do with this assertion: it doesn't make sense to ask FDR2 why the implementation works...
Go to the Next or Previous section, the Detailed Contents, or the FS(E)L Home Page.