2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2009-2009 - DIGITEO - Antoine ELIAS
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 //hdf5FileToLoad : input block file
14 //hdf5FileToSave : output block file
15 //interfaceAlias : block interface function name ( ex "IN_f" )
16 //hdf5ContextFile : input context file
18 function xcosBlockEval(hdf5FileToLoad, hdf5FileToSave, interfaceAlias, hdf5ContextFile)
20 //replace scicos_getvalue by setvalue ( call by interfaceAlias )
23 scicos_getvalue = setvalue;
25 messagebox(['In block ' + o.gui + ': ';
27 'current parameter value kept'],'error','modal');
28 [str,n,line,func]=lasterror();
29 printf('do_eval: error %d - %s in %s at line %d\n', n, str, func, line);
34 import_from_hdf5(hdf5ContextFile);
35 %scicos_context = struct();
36 [%scicos_context, ierr] = script2var(context, %scicos_context)
38 import_from_hdf5(hdf5FileToLoad);
41 //create a structure with the new context
42 [new_scs_m, y, typ] = interfaceAlias('set', scs_m, []);
44 export_to_hdf5(hdf5FileToSave, "new_scs_m");
45 xcosNotify(hdf5FileToSave);