www.gusucode.com > ecoder 案例源码程序 matlab代码 > ecoder/GnrtAddnlFilesReqrdToInterfaceWithAnApplicationExample.m
%% Generate Additional Files Required to Interface with an Application % Embedded Coder(R) provides an extensible API to augment generated code and to generate additional % files. The *File customization template* option on the *Code Generation > Templates* pane specifies a % custom Target Language Compiler (TLC) script that is executed at the end of the code generation % process. Using this script, you can generate additional code to interface seamlessly with your application. % % In this example, the TLC script file |rtwdemofileprocess.tlc| creates an additional entry point function, % |rtwdemo_fileprocess|, to call the step function and initialize the model if necessary. The initialization % function is transparent to the caller. %% Open Example Model % Open the example model |rtwdemo_fileprocess|. % Copyright 2015 The MathWorks, Inc. open_system('rtwdemo_fileprocess'); %% Instructions % # View the example file process script by double-clicking the yellow button in the model and clicking the % Edit button to the right of the *File customization template* option. % # Generate and inspect the code by double-clicking the blue button in the model. % # Note that an additional function, |rtwdemo_fileprocess|, appears at the end of |rtwdemo_fileprocess.c|, % and the entry point is declared |extern| in |rtwdemo_fileprocess.h| as specified by |rtwdemofileprocess.tlc|.