]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/commitdiff
Implemented metadata print option in TLC. Changed hello_world demo to include the...
authorCarlos Jenkins <carlos@jenkins.co.cr>
Thu, 13 Jun 2013 11:33:53 +0000 (13:33 +0200)
committerCarlos Jenkins <carlos@jenkins.co.cr>
Thu, 13 Jun 2013 11:33:53 +0000 (13:33 +0200)
rpp/blocks/rpp_lib.slx
rpp/demos/hello_world.slx
rpp/rpp/rpp.tlc
rpp/rpp/rpp_srmain.tlc

index 401287964e86286fb311ebe3184c0ed08c1c87b6..de27a3deb088b2d85ce5dd58de24b586903db308 100644 (file)
Binary files a/rpp/blocks/rpp_lib.slx and b/rpp/blocks/rpp_lib.slx differ
index e874434e5a24d1eb021a491005ed20b3d2da0e1d..79df6947a4c0edaf17d10d110c71de45b8ba29ac 100644 (file)
Binary files a/rpp/demos/hello_world.slx and b/rpp/demos/hello_world.slx differ
index afe80e9cdea23324fcaa6060378010d9217f0375..23ec59572c22c8d8afe403ab8a71e2d2d2707c9c 100644 (file)
   oIdx = oIdx + 1;
 
 
+  rtwoptions(oIdx).prompt          = 'Print model metadata to SCI at start';
+  rtwoptions(oIdx).type            = 'Checkbox';
+  rtwoptions(oIdx).default         = 'on';
+  rtwoptions(oIdx).tlcvariable     = 'rppPrintMeta';
+  rtwoptions(oIdx).makevariable    = 'RPP_PRINT_META';
+  rtwoptions(oIdx).tooltip         = ['Print model metadata (model name, compilation time and TLC version) at the start of the model.'];
+  rtwoptions(oIdx).callback        = '';
+
+  oIdx = oIdx + 1;
+
+
   % Configure code generation settings
   rtwgensettings.BuildDirSuffix = '_rpp';
   rtwgensettings.Version        = '1';
index afbfe8b825e5992397591620be50093393a38942..45d47242a3382b0c55fb999de128ac75e8d9d7b9 100644 (file)
         /* Initialize RPP board */
         rpp_init();
 
-        #ifdef DEBUG
+        %if rppPrintMeta
         %assign model_info = SPRINTF("'%s' - %s (TLC %s)\\r\\n", LibGetMdlPubHdrBaseName(), TLC_TIME, TLC_VERSION)
         rpp_sci_printf((const char*)
                 "%<model_info>"
             );
-        #endif
+        %endif
 
         /* Initialize model */
         %<LibCallModelInitialize()>\