<
From version < 37.1 >
edited by aas2
on 2016/05/09 13:05
To version < 40.1 >
edited by aas2
on 2016/08/01 12:11
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -29,10 +29,15 @@
29 29  
30 30  The **Run As** command will search for a KiCo launch config for the project. If there is such a config, the selected file is only added to the list of model files that should be compiled. If there is none, a launch config is created by using the main file and environment the project has been created with. If the main file and environment information could not be found, dialogs will query it from the user.
31 31  
32 -[[image:attach:launch_config_tabs.png]]
32 +[[image:attach:Screenshot_20160509_133139.png]]
33 33  
34 -The **main file** of the launch config is used to set several file path variables, which can be used in several fields of the configuration, notably the shell commands to be executed, and wrapper code input. To use a variable, the syntax is **${**//variable_name//**}**. The variables that are set are
34 +[[image:attach:Screenshot_20160509_134127.png]]
35 35  
36 +[[image:attach:Screenshot_20160509_133254.png]]
37 +
38 +(% style="text-align: left;" %)
39 +A **main file** typically contains the entry point of the program on the target environment. Its wrapper code initializes and runs the model and sets inputs and outputs to the physical components of the target device. The main file of the launch config is used to set several file path variables, which can be used in several fields of the configuration, notably the shell commands to be executed, and wrapper code input. To use a variable, the syntax is **${**//variable_name//**}**. The variables that are set are
40 +
36 36  * //main_name// : The file name, including its file extension (e.g. //MyModel.sct//)
37 37  * //main_path// : The project relative path (e.g. //src/MyModel.sct//)
38 38  * //main_loc// : The absolute file system path (e.g. ///home/me/workspace/MyProject/src/MyModel.sct//)
... ... @@ -40,9 +40,9 @@
40 40  
41 41  Further, similar variables for the //compiled main file// are set, which is the main file in the directory of kieler generated files (see below)
42 42  
43 -* //compiled_main_name// : The file name, including its file extension (e.g. //MyModel.sct//)
44 -* //compiled_//main_path : The project relative path (e.g. //kieler-gen/MyModel.sct//)
45 -* //compiled_//main_loc : The absolute file system path (e.g. ///home/me/workspace/MyProject/kieler-gen/MyModel.sct//)
48 +* //compiled_main_name// : The file name, including its file extension (e.g. //MyModel.java)//
49 +* //compiled_//main_path : The project relative path (e.g. //kieler-gen/MyModel.java//)
50 +* //compiled_//main_loc : The absolute file system path (e.g. ///home/me/workspace/MyProject/kieler-gen/MyModel.java//)
46 46  * //compiled_//main_name_no_ext : The file name without its file extension (e.g. //MyModel//)
47 47  
48 48  [[image:attach:variable_selection_dialog.png]]
... ... @@ -53,8 +53,6 @@
53 53  
54 54  On the //Execute// tab, a list of **shell commands** can be added. They are typically used to further compile the KiCo and wrapper code output and afterwards deploy the result to the target platform. The commands are executed sequentially in order as they appear in the list, after the KiCo compilation and wrapper code generation finished successfully. If a command fails (returns a non-zero exit code), following commands will not be excuted. The name of commands have to be unique and must not contain a comma.
55 55  
56 -
57 -
58 58  The standard streams of executed shell commands (stdin, stderr, stdout), as well as errors from the KiCo compilation and wrapper code generation, are printed to the **Console View**.
59 59  
60 60  [[image:attach:console_view.png]]
... ... @@ -78,43 +78,39 @@
78 78  An environment consists of
79 79  
80 80  1. a unique **name**, which may not contain a comma
81 -1. a **related project wizard**
82 -1. information about a **main file** for the project
83 -1. information about the **target code** KiCo should produce
84 -1. information for **wrapper code generation**
85 -1. a list of **shell commands**, which should be run as part of a project launch
86 -1. an **associated launch shortcut**, which is used on the compiled main file
84 +1. an **associated** project wizard
85 +1. the path of the default **model file** for the project
86 +1. information about **folders and files** that should be imported at project setup
87 +1. **default values** for the KiCo compilation
87 87  
88 88  Besides the name, all of these are optional, but can improve the workflow.
89 89  
90 -The related project wizard is run as part of the Prom project wizard and takes care of the actual project creation.
91 +The associated project wizard is run as part of the Prom project wizard and takes care of the actual project creation. Afterwards the model file is created and finally other folders and files are imported.
91 91  
92 -A main file typically contains the entry point of the program on the target environment. Its wrapper code initializes and runs the model and sets inputs and outputs to the physical components of the target device. To ease the project setup and because wrapper code for a specific target platform is often similar, it is possible to define default content for the main file. Therefore the field **main file origin** can contain an absolute file path to a file with the default contents of a newly created main file for this environment. Furthermore, predefined wrapper code snippets can be injected as part of a project launch, which is described below.
93 +The default values for the KiCo compilation are used to compile model files in the project.
93 93  
94 -The **snippets origin** is used to initialize the wrapper code snippet directory of a newly created project.
95 +[[image:attach:Screenshot_20160801_120238.png]]
95 95  
96 -The other fields are default settings for KiCo launch configurations.
97 +=== Paths for imported resources ===
97 97  
98 -[[image:attach:environments_preferences.png]]
99 +To import a resource (folder or file), its project relative path has to be specified. The resource will be created at this location in the project.
99 99  
100 -=== Paths for initial content ===
101 +Furthermore, it is possible to specify initial content for these resources. This is done in the field //origin//. Without an origin specifed, an empty resource will be created.
101 101  
102 -The path of the main file origin accept an **absolute** file **path** as well as an **URL** with the platform protocol of Eclipse. An URL for the field has the form //plaftorm:/plugin/a.plugin.name/folder/in/the/plugin/file.txt//
103 +To specify intial content for a file, the origin has to be an **absolute file path** or an **URL** with the platform scheme of Eclipse. Such an URL has the form //plaftorm:/plugin/a.plugin.name/folder/in/the/plugin/file.txt//
103 103  
104 -The snippets origin works analog. It accepts an absolute directory path as well as an URL with the platform protocol which points to a directory. An URL for the field has the form //plaftorm:/plugin/a.plugin.name/folder/in/the/plugin//
105 +Specifying intial content for a folder is analog. Its origin has to be an **absolute directory path** or an **URL** in the form //plaftorm:/plugin/a.plugin.name/folder/in/the/plugin//
105 105  
106 106  ----
107 107  
108 108  == Project Wizards with Prom ==
109 109  
110 -Prom provides project wizards, which can **create and initialize a project** with a **model file**, a **main file** and wrapper code **snippets**. The wizards for different model file types (e.g. SCChart project vs Esterel project) differ only in the initial content for the model file. Other initial content is choosen from the environment, which is selected on the first page of a Prom wizard. The project creation itself is done by another wizard, that is started from within the Prom wizard.
111 +Prom provides project wizards, which can **create and initialize a project** with a **model file**, and **imported resources**. The wizards for different model file types (e.g. SCChart project vs Esterel project) differ only in the initial content for the model file. Other initial content is choosen from the environment, which is selected on the first page of a Prom wizard. The project creation itself is done by another wizard, that is started from within the Prom wizard.
111 111  
112 -If the //snippets directory// of an environment is a project relative path, the contents from the //snippets origin// will be copied to this location in the newly created project. If it is an absolute path, it is not copied to the project. Keeping snippets in a single, project indepentent folder, makes it easier to maintain them. For example it is possible to set an absolute path to a directory outside any project as directory for wrapper code snippets. This directory can then be easily maintained using a version control system. Furthermore, if an issue occurs, it has to be addressed only once, because the snippets are not copied to every new project.
113 +For example to create a project to develop Minstorms running leJOS, one can choose the SCCharts project wizard. In this wizard, one can choose the Mindstorms NXJ environment and define what will be initialized in the project (model file, initial resources). Now, when pressing the finish button, the related project wizard from the leJOS plugin will be started. When it finishes, the newly created project is initialized with a model file and the defined resources.
113 113  
114 -For example to create a project to develop Minstorms running leJOS, one can choose the SCCharts project wizard. In this wizard, one can choose the Mindstorms NXJ environment and define what will be initialized in the project (model file, main file, snippets). Now when pressing the finish button, the related project wizard from the leJOS plugin will be started. When it finishes, the newly created project is initialized with an initial model file, main file and wrapper code snippets.
115 +[[image:attach:Screenshot_20160801_121054.png]]
115 115  
116 -[[image:attach:project_wizard.png]]
117 -
118 118  ----
119 119  
120 120  == Wrapper Code Generation ==
... ... @@ -145,6 +145,8 @@
145 145  
146 146  **${outputs}** will be replaced with code to read outputs of the model. (<@output>...</@output> of a snippet definition). Reading outputs of the model should occur in the tick loop, after the tick function call.
147 147  
147 +**${releases}** will be replaced with code to free allocated resources. (<@release>...</@release> of a snippet definition). Releasing resources should occur after the tick loop at the end of the program.
148 +
148 148  [[image:attach:template_file_structure.png]]
149 149  
150 150  To ease the modification of the template file, one can open it with the text editor the final code will be for. This will enable syntax highlighting and code completion for the langauge, but it will not show any errors. You can open the file for example with the Java Editor of Eclipse using //Right Click > Open With > Other > Java Editor//
... ... @@ -161,8 +161,11 @@
161 161  
162 162  == Automatically generated files ==
163 163  
164 -Files created by Prom are saved in the directory **kieler-gen**. Thereby the directory structure of files is retained, but without a starting Java source folder. This is because //kieler-gen// itself is a Java source folder.
165 +Files created by Prom are either saved in the directory **kieler-gen** or in the **same directory as the input files** they correspond to. This is configured in the KiCo launch configuration.
165 165  
166 -For example (if //code// is not a Java source folder) the file //code/subfolder/MyModel.sct//, will be save to //kieler-gen/code/subfolder/MyModel.sct.//
167 +When choosing the kieler-gen folder, the directory structure of input files is retained. However a starting Java source folder will be skipped because //kieler-gen// itself is a Java source folder.
167 167  
168 -In contrast (if //src// is a Java source folder) the file //src/subfolder/MyModel.sct//, will be saved to //kieler-gen/subfolder/MyModel.sct.//
169 +For example
170 +
171 +* if //code// is not a Java source folder, the file //code/subfolder/MyModel.sct// will be save to //kieler-gen/code/subfolder/MyModel.sct.//
172 +* if //src// is a Java source folder, the file //src/subfolder/MyModel.sct//, will be saved to //kieler-gen/subfolder/MyModel.sct.//
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -16810575
1 +18776101
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/16810575/Project Creation, Initialization and Launch (Prom)
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/18776101/Project Creation, Initialization and Launch (Prom)