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.
These components are designed in AToM 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, the user may
press the ``to SVM Des.'' button to generate a .des file. Here
is the Sender.des generated by the SVM plugin: