Next: 8.5 Applet Interface
Up: 8. SCC - A
Previous: 8.3 Space Efficiency and
Contents
Index
8.4 Example
A sample model is provided in the test/applet/ subdirectory of
SVM. It demonstrates the use of SCC and the applet interface discussed
in section .
Figure 8.3:
The graphical representation of a sample model for SCC
|
The graphical design of the model is in Figure
8.3. This model uses the following features of
DCharts:
- default states;
- orthogonal components;
- recursive importation;
- deep history; and
- inner-first transition priorities.
sample.des, the textual model description is included below:
When the code (sample.java) is synthesized by SCC, the following
classes are defined:
- StateMachine. The common superclass of all DCharts
models.
- sample. The main class in the source file. Because sample.des only imports itself, no other model class is
generated.
- State. Data structure of the elements in the current
state list.
- History. Data structure to record the history of a
single state.
- EventList. Linked list for returning the enabled event
list.
- StringList. Linked list over strings.
- Hierarchy. Linked list for returning the DCharts
hierarchy.
Among the above classes, sample is the public class that can be
accessed by user classes or from the Java command-line. The user may
execute ``java sample'' to run the model.
Next: 8.5 Applet Interface
Up: 8. SCC - A
Previous: 8.3 Space Efficiency and
Contents
Index
Thomas Huining Feng
2004-04-28