2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2009-2009 - DIGITEO - Bruno JOFRET
5 // This file must be used under the terms of the CeCILL.
6 // This source file is licensed as described in the file COPYING, which
7 // you should have received as part of this distribution. The terms
8 // are also available at
9 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 function xcosCodeGeneration(hdf5FileToLoad, hdf5FileToSave)
15 //-- BJ : Alias Warning Function
18 hilite_obj = xcosShowBlockWarning;
19 unhilite_obj = xcosClearBlockWarning;
23 // This will create a scs_m variable.
24 status = import_from_hdf5(hdf5FileToLoad);
26 error(msprintf(gettext("%s: Unable to import data from %s"), "xcosCodeGeneration", hdf5FileToLoad));
29 ierr = execstr("[ok] = do_compile_superblock42(scs_m, [], [], %f); ", 'errcatch');
31 [msg, err] = lasterror();
33 deletefile(hdf5FileToSave);
38 status = export_to_hdf5(hdf5FileToSave, "XX");
40 error(msprintf(gettext("%s: Unable to export ''XX'' to %s"), "xcosCodeGeneration", hdf5FileToSave));
43 deletefile(hdf5FileToSave);