-
Notifications
You must be signed in to change notification settings - Fork 5
Syntax: Annotations and Pragmas
The textual SCCharts language supports several annotations to influence the visual representation of the model. Annotations are processed in sequential order.
Usage | Description | Example |
---|---|---|
Location: scchart <key>: The name of the synthesis option. The given name is evaluated case-insensitive and whitespace-ignoring. The options are searched for the first matching prefix. <value>: The value type depends on the option type:
|
Sets the synthesis option identified by to the given value.
The available synthesis options for a diagram are displayed in the sidebar of the diagram view.
The values from the sidebar will be ignored if a corresponding annotation is present.
Commonly Used:
|
|
Usage | Description | Example |
---|---|---|
Location: scchart, state, region, transition <key>: The ID of the layout option. The options are searched for the first matching postfix. <value>: The value type depends on the option type. The value is parsed case-sensitive. |
Sets the layout property identified by to the given value on the annotated element.
The available layout options are documented here. Layout options will only affect the annotated element and no underlying hierarchy levels. If a layout direction is specified with this annotation it overrides the layout direction set by HV-/VH-Layout in any parent element for this element. Special case: If the direction is set on the scchart element (top level) it overrides the default alternating layout. The layout option is identified by matching a postfix. Hence the key direction matches both org.eclipse.elk.direction and org.eclipse.elk.layered.priority.direction.
If none or multiple options match a warning is displayed. Commonly Used:
|
|
Usage | Description | Example |
---|---|---|
Location: scchart, state, region |
Defines the order of the alternating layout directions.
The annotation can be mixed and nested in the SCChart and will only affect succeeding hierarchy levels. The default is an implicit HVLayout starting at the top level state. |
|
Usage | Description | Example |
---|---|---|
Location: region |
The annotated region will be initially collapse or expanded. |
|
Usage | Description | Example |
---|---|---|
Location: scchart, state, region, transition |
The annotated element will be excluded from the diagram.
Transitions with a hidden source or target state will be hidden as well. |
|
Pragmas are annotations that are valid for the whole file in contrast to annotations that are valid for semantic model elements. They are placed in front of an .sctx.
Example
#pragma
scchart Testing {
...
}
Pragma | Effect |
---|---|
#KiCoEnv {<json>} | Configures the compiler environment. |
#hostcode <code> #hostcode-[c | c-header | java] <code> |
Allows hostcode additions that are placed at the beginning of the generated code file. The exact handling may depend on the used code generator. There are also language specific variants that will only affect the specific code generation, e.g. #hostcode-java. |
#code.naming | Configures the code generation to use different names for generated functions. #code.naming <TICK_FUNCTION_NAME>, <RESET_FUNCTION_NAME>, <LOGIC_FUNCTION_NAME>, <TICKDATA_STRUCT_NAME> #code.naming suffix |
#resource <file | directory> | The given resources (single files or directories) will be copied to the generated code folder (usually kieler-gen). Since this is the working directory for the compilation KIELER these files can be included via hostcode integration. All non-absolute paths will be resolved relative to the model file.
Example
|
#HideImportedSCCharts | This will hide all SCCharts that are imported from other files in the diagram, if the 'All SCCharts' synthesis option is activated. |
KIELER is an open source software project by the RTSYS Group at Kiel University, licensed under the Eclipse Public License or Eclipse Public License 2.0 | KIELER Mailing List
- Basic Syntax
- Annotations and Pragmas
- Dataflow
- Hostcode
- Timed Automata
- Object Orientation
- LEGO Mindstorms
- Developer Eclipse Setup with Oomph
- Semantics Release Process
- Build KIELER without Eclipse
- Automated Tests and Benchmarks
- Simulation Visualization (KViz)
- Legacy .sct Models
- Simulation Visualization (KViz)
- KiCo Tutorial