|
@@ -1,4 +1,6 @@
|
|
|
-h1(#YAKINDUSCT2Reference). SCT Reference
|
|
|
+h1(#YAKINDUStatechartToolsReference). YAKINDU Statechart Tools Reference
|
|
|
+
|
|
|
+{toc}
|
|
|
|
|
|
h2. Statechart elements
|
|
|
|
|
@@ -473,7 +475,7 @@ h2. SGen generator features
|
|
|
|
|
|
All generators can be customized by a generator model. This is a textual model in a file, specifying generator features, i.e. the outlet path. The following screenshot shows an sample configuration for the Java code generator.
|
|
|
|
|
|
-To get started with the generator model, Yakindu SCT includes a wizard that creates a basic configuration file with default values.
|
|
|
+To get started with the generator model, YAKINDU Statechart Tools includes a wizard that creates a basic configuration file with default values.
|
|
|
|
|
|
!images/sGenEditor.png!
|
|
|
|
|
@@ -747,14 +749,14 @@ p. ==<!-- End sgen_feature_template -->==
|
|
|
|
|
|
h2(#APISecification). API specifications of the generated code
|
|
|
|
|
|
-The explanations below are using the TrafficLight sample state machine to describe the API specifications of the code generated by the Yakindu C and Java code generators. The image below is showing the statechart. It models a pedestrian crossing with push-button operated traffic lights ("pelican crossing").
|
|
|
+The explanations below are using the _TrafficLight_ sample state machine to describe the API specifications of the code generated by the YAKINDU C and Java code generators. The image below is showing the statechart. It models a pedestrian crossing with push-button operated traffic lights ("pelican crossing").
|
|
|
|
|
|
!(img-rounded shadowed#SpecJava)images/TrafficLight.png!
|
|
|
|
|
|
|
|
|
h3(#JavaSpec). Specifications of Java code
|
|
|
|
|
|
-You can checkout the Java sample project _"org.yakindusct.examples.trafficlight":https://github.com/Yakindu/statecharts/tree/master/examples/org.yakindu.sct.examples.trafficlight_ from the "Yakindu Statechart Tools GitHub repository":https://github.com/Yakindu/statecharts. The Java example contains statechart, SGen model, graphical widgets, and some glue code to connect the generated code with the widgets. The graphical widgets are based on SWT.
|
|
|
+You can checkout the Java sample project _"org.yakindusct.examples.trafficlight":https://github.com/Yakindu/statecharts/tree/master/examples/org.yakindu.sct.examples.trafficlight_ from the "YAKINDU Statechart Tools GitHub repository":https://github.com/Yakindu/statecharts. The Java example contains statechart, SGen model, graphical widgets, and some glue code to connect the generated code with the widgets. The graphical widgets are based on SWT.
|
|
|
|
|
|
To execute the Java example, run the file _CrossingDemoCycleBased.java_ as "Java Application" from the Eclipse _Run As_ context menu.
|
|
|
|
|
@@ -1077,7 +1079,7 @@ h4(#JavaInterVar). Interfaces, Variable and Event access
|
|
|
|
|
|
==<!-- FIXME: It should be made clear what a statechart interface is, in contrast to e. g. am interface in a programming language. -->==
|
|
|
|
|
|
-In a Yakindu statechart, variables and events are contained in *interfaces*. There can be a single default, unnamed interface plus zero or more named interfaces. In the generated Java code, these interfaces are defined as internal Java interfaces inside of an interface which has the same name as the state machine. Let's have a look at the following sample statechart interface declaration:
|
|
|
+In a YAKINDU statechart, variables and events are contained in *interfaces*. There can be a single default, unnamed interface plus zero or more named interfaces. In the generated Java code, these interfaces are defined as internal Java interfaces inside of an interface which has the same name as the state machine. Let's have a look at the following sample statechart interface declaration:
|
|
|
|
|
|
bc(prettyprint)..
|
|
|
interface:
|
|
@@ -1201,7 +1203,7 @@ p. An additional interface @SCInterfaceListener@ is generated. This interface ha
|
|
|
|
|
|
h4(#JavaOperationCallbacks). Operation callbacks
|
|
|
|
|
|
-Yakindu Statechart Tools support client code operations that can be used by a state machine and are executed as as actions. These operations have to be implemented in order to make a statechart executable. The figure below shows a sample statechart using an operation:
|
|
|
+YAKINDU Statechart Tools support client code operations that can be used by a state machine and are executed as as actions. These operations have to be implemented in order to make a statechart executable. The figure below shows a sample statechart using an operation:
|
|
|
|
|
|
!images/OperationExample.png!
|
|
|
|
|
@@ -1325,7 +1327,7 @@ p. If the UI thread has been terminated by the user, the state machine will be s
|
|
|
|
|
|
h3(#SpecC). Specifications of C code
|
|
|
|
|
|
-You can checkout the C sample project _"org.yakindu.sct.examples.c.trafficlight":https://github.com/Yakindu/statecharts/tree/master/examples/org.yakindu.sct.examples.c.trafficlight_ from the "Yakindu Statechart Tools GitHub repository":https://github.com/Yakindu/statecharts. The C example contains statechart, SGen model, graphical widgets, and some glue code to connect the generated code with the widgets. The graphical widgets are based on Qt.
|
|
|
+You can checkout the C sample project _"org.yakindu.sct.examples.c.trafficlight":https://github.com/Yakindu/statecharts/tree/master/examples/org.yakindu.sct.examples.c.trafficlight_ from the "YAKINDU Statechart Tools GitHub repository":https://github.com/Yakindu/statecharts. The C example contains statechart, SGen model, graphical widgets, and some glue code to connect the generated code with the widgets. The graphical widgets are based on Qt.
|
|
|
|
|
|
To execute the C example, run the file _org_yakindu_sct_examples_c_trafficlight_ as _Local C/C++ application_ from the Eclipse _Run As_ context menu.
|
|
|
|
|
@@ -1363,7 +1365,7 @@ typedef void* sc_eventid;
|
|
|
#define bool_false false
|
|
|
|
|
|
#endif /* SC_TYPES_H_ */
|
|
|
-p. The header file contains some basic definitions for C++ compiler compatibility and typedefs to map the Yakindu statechart types to C types. The next header file is named after the statechart. In case of the traffic light example it is called _TrafficLightWaiting.h_:
|
|
|
+p. The header file contains some basic definitions for C++ compiler compatibility and typedefs to map the YAKINDU statechart types to C types. The next header file is named after the statechart. In case of the traffic light example it is called _TrafficLightWaiting.h_:
|
|
|
|
|
|
bc(prettyprint)..
|
|
|
#ifndef TRAFFICLIGHTWAITING_H_
|
|
@@ -1610,7 +1612,7 @@ You can conclude that in order to process the time events raised by the timing s
|
|
|
|
|
|
h4(#COperationCallbacks). Operation callbacks
|
|
|
|
|
|
-Yakindu Statechart Tools support client code operations that can be used by a state machine and are executed as as actions. These operations have to be implemented in order to make a statechart executable. The figure below shows a sample statechart using an operation:
|
|
|
+YAKINDU Statechart Tools support client code operations that can be used by a state machine and are executed as as actions. These operations have to be implemented in order to make a statechart executable. The figure below shows a sample statechart using an operation:
|
|
|
|
|
|
!images/OperationExample.png!
|
|
|
|
|
@@ -1731,7 +1733,7 @@ org_yakindu_sct_examples_c_trafficlight::~org_yakindu_sct_examples_c_trafficligh
|
|
|
}
|
|
|
h3(#CppSpec). Specifications of C++ code
|
|
|
|
|
|
-You can checkout the C++ sample project _"QtTrafficLightCpp":http://svn.codespot.com/a/eclipselabs.org/yakindu/SCT2/trunk/examples_ from the "Yakindu Google Code repository":http://svn.codespot.com/a/eclipselabs.org/yakindu/SCT2/trunk. The C++ example contains statechart, SGen model, graphical widgets, and some glue code to connect the generated code with the widgets. The graphical widgets are based on Qt.
|
|
|
+You can checkout the C++ sample project _"QtTrafficLightCpp":http://svn.codespot.com/a/eclipselabs.org/yakindu/SCT2/trunk/examples_ from the "YAKINDU Google Code repository":http://svn.codespot.com/a/eclipselabs.org/yakindu/SCT2/trunk. The C++ example contains statechart, SGen model, graphical widgets, and some glue code to connect the generated code with the widgets. The graphical widgets are based on Qt.
|
|
|
|
|
|
==<!-- FIXME: C: To execute the C example, run the file _org_yakindu_sct_examples_c_trafficlight_ as "Local C/C++ application" from the Eclipse _Run As_ context menu. -->==
|
|
|
|
|
@@ -1919,7 +1921,7 @@ h4(#CppInterVar). Interfaces, Variable and Event access
|
|
|
|
|
|
==<!-- FIXME: It should be made clear what a statechart interface is, in contrast to e. g. am interface in a programming language. -->==
|
|
|
|
|
|
-In a Yakindu statechart, variables and events are contained in *interfaces*. There can be a single default, unnamed interface plus zero or more named interfaces. In the generated C++ code, these interfaces are defined as internal subclasses inside of the main state machine class. Let's have a look at the following sample statechart interface declaration:
|
|
|
+In a YAKINDU statechart, variables and events are contained in *interfaces*. There can be a single default, unnamed interface plus zero or more named interfaces. In the generated C++ code, these interfaces are defined as internal subclasses inside of the main state machine class. Let's have a look at the following sample statechart interface declaration:
|
|
|
|
|
|
bc(prettyprint)..
|
|
|
interface:
|
|
@@ -1992,7 +1994,7 @@ The value of an event can be accessed only if the event has been processed in a
|
|
|
|
|
|
h4(#CppOperationCallbacks). Operation callbacks
|
|
|
|
|
|
-Yakindu Statechart Tools support client code operations that can be used by a state machine and are executed as as actions. These operations have to be implemented in order to make a statechart executable. The figure below shows a sample statechart using an operation:
|
|
|
+YAKINDU Statechart Tools support client code operations that can be used by a state machine and are executed as as actions. These operations have to be implemented in order to make a statechart executable. The figure below shows a sample statechart using an operation:
|
|
|
|
|
|
!images/OperationExample.png!
|
|
|
|