Go up to 2 Using the Toolkit Go forward to 2.2 Writing the Program |
If you view this document in HTML format on our Web page, you should see a button labelled "Press Me" embedded below. If you do not see this button but the string "Please enable Java!" instead, you must enable Java on your Web browser1 and then reload the page by pressing the "Reload" button.
In case your browser does not support Java or you read this document in text form, we include an image of the window below.
Do as the "Press Me" button says; you should see a window pop up that visualizes a program implementing the example described above. The window displays three network nodes linked by three pairs of channels; the receiver side of each channel is denoted by a small bullet where the channel touches the node. The nodes contain labels "0", "1", and "2"; the small numerical subscript of each label denotes the current local time of this node; the small number in the left upper corner of the window denotes the global network time.
Pressing the "Run" button starts execution. After the program has terminated, press "Reset" to initialize the visualization again. "Walk" lets the program run in slow mode, "Interrupt" suspends the program, "Step" allows the program advance one step (i.e., one communication operation). "Redraw" redraws the screen, "Quit" lets the visualization terminate (if the network is currently executing, you have to interrupt it before).
During execution, the current state of each node is represented by the color of its boundary:
Likewise, channel states are denoted by boundary colors:
Textual explanations of the different states are given in the bottom line of the window when you move the mouse cursor over the node respectively channel. Simultaneously, a window pops up that exhibits the internal state of the node respectively channel (in the case of the later, about the queue of messages contained in the channel). A node can be dragged to a different location by clicking on it and moving the mouse while keeping the mouse button pressed.
Selecting in menu "Help" one of the items "About Algorithm" or "About Toolkit" lets some informative panels pop up. Selecting "Home", "Copying", or "Help" loads the corresponding Web page into a window of your Web browser.