<
From version < 38.1 >
edited by aas2
on 2016/05/09 13:43
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,42 +29,14 @@
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 -
33 -
34 -
35 -
36 -
37 -
38 38  [[image:attach:Screenshot_20160509_133139.png]]
39 39  
40 40  [[image:attach:Screenshot_20160509_134127.png]]
41 41  
42 -
43 -
44 44  [[image:attach:Screenshot_20160509_133254.png]]
45 45  
46 -
47 -
48 -
49 -
50 -
51 -
52 -
53 -
54 -
55 -
56 -
57 -
58 -
59 -
60 -
61 -
62 -
63 -
64 -
65 -
66 66  (% style="text-align: left;" %)
67 -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
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
68 68  
69 69  * //main_name// : The file name, including its file extension (e.g. //MyModel.sct//)
70 70  * //main_path// : The project relative path (e.g. //src/MyModel.sct//)
... ... @@ -73,9 +73,9 @@
73 73  
74 74  Further, similar variables for the //compiled main file// are set, which is the main file in the directory of kieler generated files (see below)
75 75  
76 -* //compiled_main_name// : The file name, including its file extension (e.g. //MyModel.sct//)
77 -* //compiled_//main_path : The project relative path (e.g. //kieler-gen/MyModel.sct//)
78 -* //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//)
79 79  * //compiled_//main_name_no_ext : The file name without its file extension (e.g. //MyModel//)
80 80  
81 81  [[image:attach:variable_selection_dialog.png]]
... ... @@ -86,8 +86,6 @@
86 86  
87 87  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.
88 88  
89 -
90 -
91 91  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**.
92 92  
93 93  [[image:attach:console_view.png]]
... ... @@ -112,41 +112,38 @@
112 112  
113 113  1. a unique **name**, which may not contain a comma
114 114  1. an **associated** project wizard
115 -1. information for a default **main file** for the project
116 -1. information for a default **model file** for the project
117 -1. information for a default **wrapper code snippet directory**
118 -1. default values for the KiCo compilation
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
119 119  
120 120  Besides the name, all of these are optional, but can improve the workflow.
121 121  
122 -The associated 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.
123 123  
124 -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.
125 125  
126 -The **snippets origin** is used to initialize the wrapper code snippet directory of a newly created project.
95 +[[image:attach:Screenshot_20160801_120238.png]]
127 127  
128 -The other fields are default settings for KiCo launch configurations.
97 +=== Paths for imported resources ===
129 129  
130 -[[image:attach:Screenshot_20160509_132406.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.
131 131  
132 -=== 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.
133 133  
134 -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//
135 135  
136 -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//
137 137  
138 138  ----
139 139  
140 140  == Project Wizards with Prom ==
141 141  
142 -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.
143 143  
144 -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.
145 145  
146 -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]]
147 147  
148 -[[image:attach:project_wizard.png]]
149 -
150 150  ----
151 151  
152 152  == Wrapper Code Generation ==
... ... @@ -177,6 +177,8 @@
177 177  
178 178  **${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.
179 179  
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 +
180 180  [[image:attach:template_file_structure.png]]
181 181  
182 182  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//
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -16810576
1 +18776101
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/16810576/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)