next up previous contents index
Next: 6.6 Debugging Up: 6.5 Distributed Simulation Previous: 6.5.1 The SVMDNS daemon   Contents   Index

6.5.2 Example

A simple Echo example is studied in the section. There are two components in the system: Sender and Echo. The Sender randomly generates a message and sends it to the message port of the Echo. The Echo sends back this message to the Sender after 1 second. When the Sender receives the message, it sends another random message to the Echo. This loop continues forever.

Figure 6.6: Sender of the Echo example
Image atom3sender

Figure 6.7: Echo of the Echo example
Image atom3echo

Figure 6.8: Name pattern of the Echo server
Image atom3echopattern

Figure 6.9: Port name of the Echo server
Image atom3echoport

These components are designed in AToM$^3$ as shown in Figure 6.6 and Figure 6.7. In Figure 6.7, an input/output port named message is defined for the Echo component. The Sender component in Figure 6.6 also has a port called message. The port of the Sender is connected to the port of the Echo. The name pattern of the server is Echo (Figure 6.8). This matches the Echo component only. The link between the Sender port and the server has a property that specifies the server port message (Figure 6.9). The enter actions of the Send state of the Sender component is hidden. Those actions import necessary Python libraries and initialize a list of random messages.

When the Sender component is loaded into AToM$^3$, the user may press the ``to SVM Des.'' button to generate a .des file. Here is the Sender.des generated by the SVM plugin:

Sender.des

Here is Echo.des:

Echo.des

This example can also be found in [39].


next up previous contents index
Next: 6.6 Debugging Up: 6.5 Distributed Simulation Previous: 6.5.1 The SVMDNS daemon   Contents   Index
Thomas Huining Feng 2004-04-28