Let us call SimpleEntity a simple example of an Esterel module that specify a very simple application entity. This entity only needs one type of transmission which is partial-reliable/in-sequence/non-real-time/unicast. We focus here on the transmission specification aspect. Suppose for example this application just send a request/wait for a request and wait for a response/send a response.
The development of this application in ALFred involves the following steps:
------------------------------
| esterel + QoS specifications |
------------------------------
/ \
/ \
/ \
AlfAppli.strl QoSsetting.java
AlfAuto0.strl AlfAppliRun.java
AlfAuto1.strl AlfAppliInterface.java
: <ADU_type_0>.java,<ADU_type_1>.java,...
: <data_type_0>.java,<data_type_1>.java,...
: AlfAuto0Interface.java
: AlfAuto1Interface.java
:
:
The new module in the file "AlfAppli.strl" just contains the application specification in Esterel where we have added some removal of ADUs when they have been consumed by input signals (remember the ADUs are stored in an asynchronous queue). We have also added an input signal that allows a top level abortion from the environment. Here is the AlfAppli.strl file generated from the SimpleEntity example.
The Esterel specifications of the protocols to manage transmission of ADUs stands in the files "AlfAuto<no>.strl" where no is an integer smaller than the number of ADU types present in the specification.
The data interface to protocols automata is given in the Java library of ALFred and inherited in the files "AlfAuto<no>Interface.java".
SimpleEntity example: AlfAppliInterface.java and COMMAND.java.
The execution program has now to be completed by the user with the application call of the automaton. The parser has generated a skeleton AlfAppliRun.java that has to be filled by the user. Some initializations
appear in this file and the place where to put the part of application code is indicated under comments. Here you have to respect the Esterel syntax choices, except for the call of the automaton itself. The automaton (let us call it auto) is wrapped into the application handler from ALFred in order to take into account the reception events from the network. Here is a short description of the syntax for interaction between the automaton and its environment:
CSTE: auto.CSTE.
S from the environment: auto.inputS();.
handler.runAuto();;