]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/blob - rpp/rpp/rpp_file_process.tlc
2a457fefeb5ba5fce36148062ac759aca7343cd5
[jenkicar/rpp-simulink.git] / rpp / rpp / rpp_file_process.tlc
1 %% Copyright (C) 2013-2015 Czech Technical University in Prague
2 %%
3 %% Authors:
4 %%     - Carlos Jenkins <carlos@jenkins.co.cr>
5 %%
6 %% This document contains proprietary information belonging to Czech
7 %% Technical University in Prague. Passing on and copying of this
8 %% document, and communication of its contents is not permitted
9 %% without prior written authorization.
10 %%
11 %% File : rpp_file_process.tlc
12 %% Abstract:
13 %%     Code generation custom file processing template.
14 %%
15 %%     This file should decide which \textit{main} to generate according to configuration, in
16 %%     particular which mode, Single Tasking or Multitasking, is chosen. The RPP Target ignores
17 %%     this settings because it uses a tasking system based on tasking features provided by
18 %%     FreeRTOS. In consequence is only a wrapper to the \textit{Single Tasking} main, which
19 %%     clearly is not for single tasking.
20 %%
21 %% References:
22 %%     ecoder_ug.pdf p. 556
23 %%     ecoder_ref.pdf p. 1347
24
25
26 %selectfile NULL_FILE
27
28 %assign ::modelName = CompiledModel.Name
29 %assign ::solverMode = CompiledModel.FixedStepOpts.SolverMode
30 %assign ::fundamentalStepSize = CompiledModel.FundamentalStepSize
31 %assign ::tid01Eq = CompiledModel.FixedStepOpts.TID01EQ
32 %assign ::numSampleTimes = CompiledModel.NumSynchronousSampleTimes
33
34 %% Need to set the template compliance flag before you can use the API
35 %<LibSetCodeTemplateComplianceLevel(1)>
36
37 %% Create a the main file
38 %if LibIsSingleTasking()
39     %include "rpp_srmain.tlc"
40     %<FcnSingleTaskingMain()>
41 %else
42     %exit Multirate system has been detected and tasking mode is set ...
43     to Auto or MultiTasking. Multitasking mode is not yet supported. ...
44     Please select SingleTasking in Tasking mode in model Configuration ...
45     Parameters to avoid this error. Note that the resulting code will ...
46     run in a single task.
47
48     %% This is prepared for future support of multitasking
49     %%include "rpp_mrmain.tlc"
50     %%<FcnMultiTaskingMain()>
51 %endif