sb120: #i111111# disabled failing tests for now

#111102# -o xmloff.Chart.XMLContentExporter
#111102# -o xmloff.Chart.XMLContentImporter
#111102# -o xmloff.Chart.XMLExporter
#111102# -o xmloff.Chart.XMLImporter
#111102# -o xmloff.Chart.XMLStylesExporter
#111102# -o xmloff.Chart.XMLStylesImporter
-o xmloff.Draw.XMLContentExporter
-o xmloff.Draw.XMLContentImporter
-o xmloff.Draw.XMLExporter
-o xmloff.Draw.XMLImporter
-o xmloff.Draw.XMLMetaExporter
-o xmloff.Draw.XMLMetaImporter
-o xmloff.Draw.XMLSettingsExporter
-o xmloff.Draw.XMLSettingsImporter
#i87695 -o xmloff.Draw.XMLStylesExporter
-o xmloff.Draw.XMLStylesImporter
-o xmloff.Impress.XMLContentExporter
-o xmloff.Impress.XMLContentImporter
-o xmloff.Impress.XMLExporter
#i111111# -o xmloff.Impress.XMLImporter
-o xmloff.Impress.XMLMetaExporter
-o xmloff.Impress.XMLMetaImporter
-o xmloff.Impress.XMLSettingsExporter
-o xmloff.Impress.XMLSettingsImporter
#i87695 -o xmloff.Impress.XMLStylesExporter
-o xmloff.Impress.XMLStylesImporter

#111102# -o xmloff.Chart.XMLContentExporter
#111102# -o xmloff.Chart.XMLContentImporter
#111102# -o xmloff.Chart.XMLExporter
#111102# -o xmloff.Chart.XMLImporter
#111102# -o xmloff.Chart.XMLStylesExporter
#111102# -o xmloff.Chart.XMLStylesImporter
-o xmloff.Draw.XMLContentExporter
-o xmloff.Draw.XMLContentImporter
-o xmloff.Draw.XMLExporter
-o xmloff.Draw.XMLImporter
-o xmloff.Draw.XMLMetaExporter
-o xmloff.Draw.XMLMetaImporter
-o xmloff.Draw.XMLSettingsExporter
-o xmloff.Draw.XMLSettingsImporter
#i87695 -o xmloff.Draw.XMLStylesExporter
-o xmloff.Draw.XMLStylesImporter
-o xmloff.Impress.XMLContentExporter
-o xmloff.Impress.XMLContentImporter
-o xmloff.Impress.XMLExporter
-o xmloff.Impress.XMLImporter
-o xmloff.Impress.XMLMetaExporter
-o xmloff.Impress.XMLMetaImporter
-o xmloff.Impress.XMLSettingsExporter
-o xmloff.Impress.XMLSettingsImporter
#i87695 -o xmloff.Impress.XMLStylesExporter
-o xmloff.Impress.XMLStylesImporter


chart47: #i111102# disable deadlocking tests again

#111102# -o xmloff.Chart.XMLContentExporter
#111102# -o xmloff.Chart.XMLContentImporter
#111102# -o xmloff.Chart.XMLExporter
#111102# -o xmloff.Chart.XMLImporter
#111102# -o xmloff.Chart.XMLStylesExporter
#111102# #i112047 -o xmloff.Chart.XMLStylesImporter
-o xmloff.Draw.XMLContentExporter
-o xmloff.Draw.XMLContentImporter
-o xmloff.Draw.XMLExporter
-o xmloff.Draw.XMLImporter
-o xmloff.Draw.XMLMetaExporter
#i111200 -o xmloff.Draw.XMLMetaImporter
#i111287 -o xmloff.Draw.XMLSettingsExporter
#i111287 -o xmloff.Draw.XMLSettingsImporter
#i87695 -o xmloff.Draw.XMLStylesExporter
-o xmloff.Draw.XMLStylesImporter
#i111224 -o xmloff.Impress.XMLContentExporter
-o xmloff.Impress.XMLContentImporter
#i112048 -o xmloff.Impress.XMLExporter
#i111111# -o xmloff.Impress.XMLImporter
-o xmloff.Impress.XMLMetaExporter
-o xmloff.Impress.XMLMetaImporter
#i111287 -o xmloff.Impress.XMLSettingsExporter
#i111287 -o xmloff.Impress.XMLSettingsImporter
#i87695 -o xmloff.Impress.XMLStylesExporter
-o xmloff.Impress.XMLStylesImporter

-o xmloff.Chart.XMLContentExporter
-o xmloff.Chart.XMLContentImporter
-o xmloff.Chart.XMLExporter
-o xmloff.Chart.XMLImporter
-o xmloff.Chart.XMLStylesExporter
#i112047 -o xmloff.Chart.XMLStylesImporter
-o xmloff.Draw.XMLContentExporter
-o xmloff.Draw.XMLContentImporter
-o xmloff.Draw.XMLExporter
-o xmloff.Draw.XMLImporter
-o xmloff.Draw.XMLMetaExporter
#i111200 -o xmloff.Draw.XMLMetaImporter
#i111287 -o xmloff.Draw.XMLSettingsExporter
#i111287 -o xmloff.Draw.XMLSettingsImporter
#i87695 -o xmloff.Draw.XMLStylesExporter
-o xmloff.Draw.XMLStylesImporter
#i111224 -o xmloff.Impress.XMLContentExporter
-o xmloff.Impress.XMLContentImporter
#i112048 -o xmloff.Impress.XMLExporter
#i111111# -o xmloff.Impress.XMLImporter
-o xmloff.Impress.XMLMetaExporter
-o xmloff.Impress.XMLMetaImporter
#i111287 -o xmloff.Impress.XMLSettingsExporter
#i111287 -o xmloff.Impress.XMLSettingsImporter
#i87695 -o xmloff.Impress.XMLStylesExporter
-o xmloff.Impress.XMLStylesImporter


fix for SCHEDULING-1380

fix for SCHEDULING-1380

git-svn-id: 27916816d6cfa57849e9a885196bf7392b80e1ac@20858 28e8926c-6b08-0410-baaa-805c5e19b8d6

function outputs = PAsolve(varargin)
    global ('PA_connected','DataRegistry', 'DataRegistryInit', 'SOLVEid')

    if ~exists('PA_connected') | PA_connected ~= 1
        error('A connection to the ProActive scheduler must be established in order to use PAsolve, see PAconnect');
    end

    if exists('SOLVEid') & type(SOLVEid) == 8
        SOLVEid = SOLVEid + 1;
    else
        SOLVEid = int32(0);
    end

    opt=PAoptions();

    deff ("y=ischar(x)","y=type(x)==10","n");
    if ischar(varargin(1)) then
        Func = varargin(1);
        NN=length(varargin)-1;
        Tasks = PATask(1,NN);
        Tasks(1,1:NN).Func = Func;
        for i=1:NN
            if typeof(varargin(i+1)) == 'list'
                Tasks(1,i).Params =varargin(i+1);
            else
                Tasks(1,i).Params =list(varargin(i+1));
            end
        end
        MM = 1;
    elseif typeof(varargin(1)) == 'PATask'
        if length(varargin) == 1
            Tasks = varargin(1);
            NN = size(Tasks,2);
            MM = size(Tasks,1);
        else
            NN=argn(2);
            MM = -1;
            for i=1:NN
                if typeof(varargin(i)) == 'PATask'
                    if (size(varargin(i),2) ~= 1)
                        error(strcat(['parameter ', string(i), ' should be a column vector.']));
                    end
                    sz = size(varargin(i),1);
                    if MM == -1
                        MM = sz;
                        Tasks=PATask(MM,NN);
                    elseif MM ~= sz
                        error(strcat(['parameter ', string(i), ' should be a column vector of the same length than other parameters.']));
                    end
                    Tasks(1:sz,i) = varargin(i);
                else
                    error(strcat(['parameter ', num2str(i), ' is a ', typeof(varargin(i)), ', expected PATask instead.']));
                end
            end

        end
    end

    jimport org.ow2.proactive.scheduler.ext.scilab.common.PASolveScilabGlobalConfig;
    jimport org.ow2.proactive.scheduler.ext.scilab.common.PASolveScilabTaskConfig;
    jimport org.ow2.proactive.scheduler.ext.common.util.FileUtils;
    jimport org.ow2.proactive.scheduler.ext.matsci.client.AODataspaceRegistry;
    jimport java.lang.String;
    jimport java.net.URL;
    jimport java.io.File;

    solve_config = jnewInstance(PASolveScilabGlobalConfig);

    solve_config.setDebug(opt.Debug);
    solve_config.setTimeStamp(opt.TimeStamp);
    solve_config.setFork(opt.Fork);
    solve_config.setRunAsMe(opt.RunAsMe);
    solve_config.setPriority(opt.Priority);
    solve_config.setTransferSource(opt.TransferSource);
    //solve_config.setTransferEnv(opt.TransferEnv);
    solve_config.setTransferVariables(opt.TransferVariables);
    solve_config.setKeepEngine(opt.KeepEngine);
    jinvoke(solve_config,'setWindowsStartupOptionsAsString',opt.WindowsStartupOptions);
    jinvoke(solve_config,'setLinuxStartupOptionsAsString',opt.LinuxStartupOptions);

    solve_config.setInputSpaceName('ScilabInputSpace');
    solve_config.setOutputSpaceName('ScilabOutputSpace');

    solve_config.setVersionPref(opt.VersionPref);
    solve_config.setVersionRejAsString(opt.VersionRej);
    solve_config.setVersionMin(opt.VersionMin);
    solve_config.setVersionMax(opt.VersionMax);
    solve_config.setCheckMatSciUrl(opt.FindScilabScript);
    if ischar(opt.CustomScript)
        selects = opt.CustomScript
        try
            url=URL.new(selects);
            ok = true;
        catch
            ok = false;
        end
        jremove(url);

        if ~ok
            solve_config.setCustomScriptUrl(strcat(['file:', selects]));
        else
            solve_config.setCustomScriptUrl(selects);
        end
    end

    solve_config.setZipSourceFiles(%f);

    curr_dir = pwd();
    fs=filesep();
    curr_dir_java = File.new(curr_dir);
    if ~jinvoke(curr_dir_java,'canWrite')
        jremove(curr_dir_java);
        error('Current Directory should have write access rights');
    end
    jremove(curr_dir_java);

    // PAScheduler sub directory init

    subdir = '.PAScheduler';
    solve_config.setTempSubDirName(subdir);

    if isempty(opt.CustomDataspaceURL)
        if ~isdir(strcat([curr_dir, fs, subdir]))
            mkdir(curr_dir,subdir);
        end
        pa_dir = strcat([curr_dir, fs, subdir]);
    else
        if isempty(opt.CustomDataspacePath)
            error('if CustomDataspaceURL is specified, CustomDataspacePath must be specified also');
        end
        if ~isdir(strcat([opt.CustomDataspacePath, fs, subdir]))
            mkdir(opt.CustomDataspacePath,subdir);
        end
        pa_dir = strcat([opt.CustomDataspacePath, fs, subdir]);
    end

    if isempty(opt.CustomDataspaceURL)
        if ~exists('DataRegistryInit') | DataRegistryInit ~= 1
            DataRegistry = AODataspaceRegistry.new('ScilabInputSpace','ScilabOutputSpace','ScilabSession',opt.Debug);
            DataRegistryInit = 1;
        end
        pair = DataRegistry.createDataSpace(curr_dir);
        px=jinvoke(pair,'getX');
        py=jinvoke(pair,'getY');
        pxs = jcast(px,'java.lang.String');
        pys = jcast(py,'java.lang.String');
        solve_config.setInputSpaceURL(pxs);
        solve_config.setOutputSpaceURL(pys);
        if opt.Debug then
            disp('using Dataspace:')
            disp(pxs)
        end

    else
        solve_config.setOutputSpaceURL(opt.CustomDataspaceURL);
        solve_config.setInputSpaceURL(opt.CustomDataspaceURL);
    end

    variableInFileBaseName = ['ScilabPAsolveVarIn_' string(SOLVEid)];
    variableOutFileBaseName = ['ScilabPAsolveVarOut_' string(SOLVEid)];
    outVarFiles = list(NN);
    //tmpFiles = list();
    taskFilesToClean = list();

    task_configs = jarray('org.ow2.proactive.scheduler.ext.scilab.common.PASolveScilabTaskConfig', NN,MM);
    for i=1:NN
        taskFilesToClean($+1)=list();
        for j=1:MM
            t_conf = jnewInstance(PASolveScilabTaskConfig);
            task_configs(i-1,j-1) = t_conf;
            if ~isempty(Tasks(j,i).Description) then
                t_conf.setDescription(Tasks(j,i).Description);
            end

            // Input Files
            if ~isempty(Tasks(j,i).InputFiles) then
                ilen = length(Tasks(j,i).InputFiles);
                if ilen > 0 then
                    inputFiles = jarray('java.lang.String', ilen);
                    filelist = Tasks(j,i).InputFiles;
                    for k=1:ilen
                        filename = filelist(k);
                        inputFiles(k-1)=String.new(strsubst(filename,'\','/'));
                    end

                    t_conf.setInputFiles(inputFiles);
                    t_conf.setInputFilesThere(%t);
                end
            end

            // Output Files
            if ~isempty(Tasks(j,i).OutputFiles) then
                filelist = Tasks(j,i).OutputFiles;
                ilen = length(filelist);
                if ilen > 0 then
                    outputFiles = jarray('java.lang.String', ilen);
                    for k=1:ilen
                        filename = filelist(k);
                        outputFiles(k-1)=String.new(strsubst(filename,'\','/'));
                    end

                    t_conf.setOutputFiles(outputFiles);
                    t_conf.setOutputFilesThere(%t);
                end
            end

            // Custom Script
            if ~isempty(Tasks(j,i).SelectionScript) then
                selects = Tasks(j,i).SelectionScript;
                try
                    url = URL.new(selects);
                    ok = true;
                catch
                    ok = false;
                end
                jremove(url);

                if ~ok
                    t_conf.setCustomScriptUrl(strcat(['file:', selects ]));
                else
                    t_conf.setCustomScriptUrl(selects);
                end
            end

            // Function
            Func = Tasks(j,i).Func;
            execstr(strcat(['functype = type(';Func;');']));
            if (functype <> 13) & (functype <> 11)  then
                error('invalid function type for function ""' + Func + '"". Consider calling this function with a macro instead.');
            end

            // Source Files

            if ~isempty(Tasks(j,i).Sources) then
                srcs = Tasks(j,i).Sources;
                for k=1:length(srcs)
                    srcPath = srcs(k);
                    if isfile(srcPath) then
                        [ppath,fname,extension]=fileparts(srcPath);
                        srcName = strcat(strcat([fname,extension]));
                        if ~isfile(strcat([pa_dir,fs,fname,extension])) then
                            if opt.Debug then
                                disp(strcat(['Copying file ', srcPath, ' to ',pa_dir]));
                            end
                            copyfile(srcPath,pa_dir);
                            // TODO find a cleaning mechanisme
                            //taskFilesToClean(i)=lstcat(taskFilesToClean(i), list(pa_dir+fs+fname+extension));
                            //tmpFiles($+1)=strcat([pa_dir,fs,fname,extension]);
                        end
                        strName = String.new(srcName);
                        t_conf.addSourceFile(strName);
                    else
                        error(strcat(['Source file ', srcPath, ' cannot be found']));
                    end

                end

            end

            // Saving main function name (with or without Sources attribute)
            sourceNames = jarray('java.lang.String', 1);
            sFN = 'ScilabPAsolve_src'+string(SOLVEid)+indToFile([i j])+'.bin';
            execstr('save(pa_dir+fs+sFN,'+Func+');');
            strName = String.new(sFN);
            sourceNames(0) = strName;
            t_conf.setFunctionVarFiles(sourceNames);
            code=[];
            taskFilesToClean(i)=lstcat(taskFilesToClean(i), list(pa_dir+fs+sFN));

            t_conf.setFunctionName(Func);
            t_conf.addSourceFile(sFN);

            // Params
            argi = Tasks(j,i).Params;
            if opt.TransferVariables
                inVarFN = strcat([variableInFileBaseName, indToFile([i j]), '.dat']);
                outVarFN = strcat([variableOutFileBaseName, indToFile([i j]), '.dat']);
                inVarFP = strcat([pa_dir, fs, inVarFN]);
                outVarFP = strcat([pa_dir, fs, outVarFN]);
                // Creating input parameters mat files
                fd=mopen(inVarFP,'wb');
                inl = argi;
                if length(inl) == 0
                    inl=list(%t);
                end
                for k=1:length(inl)
                    execstr('in'+string(k)+'=inl(k);');
                    execstr('save(fd,in'+string(k)+')');
                end
                mclose(fd);

                jinvoke(t_conf,'setInputVariablesFileName',inVarFN);
                jinvoke(t_conf,'setOutputVariablesFileName',outVarFN);
                if j > 1 & Tasks(j,i).Compose
                    cinVarFN = strcat([variableOutFileBaseName,indToFile([i j-1]),'.dat']);
                    cinVarFP = pa_dir+fs+cinVarFN;
                    jinvoke(t_conf,'setComposedInputVariablesFileName',cinVarFN);
                end
                outVarFiles(i) = outVarFP;
                taskFilesToClean(i)=lstcat(taskFilesToClean(i), list(inVarFP));
                //if j < MM
                // because of disconnected mode, the final out is handled
                //differently
                taskFilesToClean(i)=lstcat(taskFilesToClean(i), list(outVarFP));
                //end

                inputscript = 'i=0';
            else
                inputscript = createInputScript(argi);
            end

            t_conf.setInputScript(inputscript);

            //mainScript = createMainScript(Func, opt);
            mainScript = 'out = '+Tasks(j,i).Func+'(';
            if j > 1 & Tasks(j,i).Compose
                mainScript = mainScript + 'in';
                if length(argi) > 0 then
                    mainScript = mainScript + ',';
                end
            end
            if length(argi) > 0
                for k=1:length(argi)-1
                    mainScript = mainScript + 'in'+string(k)+',';
                end
                mainScript = mainScript + ('in'+string(length(argi)));
            end
            mainScript = mainScript + ');';
            t_conf.setMainScript(mainScript);

            t_conf.setOutputs('out');

        end
    end
    jimport org.ow2.proactive.scheduler.ext.scilab.client.ScilabSolver;
    jimport org.objectweb.proactive.api.PAFuture;
    solver = jnewInstance(ScilabSolver);

    pairinfolist = solver.solve(solve_config, task_configs);

    jobinfo = jinvoke(pairinfolist,'getX');
    resfutureList =  jinvoke(pairinfolist,'getY');
    jid = string(jinvoke(jobinfo,'getJobId'));
    disp('Job submitted : '+ jid);

    ftn = jinvoke(jobinfo,'getFinalTasksNamesAsList');

    taskinfo = struct('cleanFileSet',[],'cleanDirSet',[], 'outFile',[], 'jobid',[], 'taskid',[] );
    results=list(NN);
    for i=1:NN
        taskinfo.cleanFileSet = taskFilesToClean(i);
        taskinfo.cleanDirSet = list(pa_dir);
        taskinfo.outFile = outVarFiles(i);
        taskinfo.jobid = jid;
        taskinfo.taskid = jinvoke(ftn,'get',i-1);

        results(i)=PAResult(jinvoke(resfutureList,'get',i-1), taskinfo);

    end
    outputs = PAResL(results);
    jremove(solver, solve_config, task_configs);

endfunction

function nm=indToFile(ind)
    nm='';
    if ind==-1
        return;
    end
    for JJ=ind
        nm=strcat([nm, '_', string(JJ)]);
    end
endfunction

function inputScript = createInputScript(arg)
    // We transform the argument to executable scilab code
    argcode = sci2exp(arg,'in');
    // The inputscript will contain the argument and the code of the functions
    inputscript_array=[argcode];
    // The code defining the function is made of many lines, we pack it by using ASCII 31 delimiters
    s=size(inputscript_array);
    inputscript_str='';
    for j=1:(s(1)-1)
        inputscript_str=inputscript_str+inputscript_array(j)+ascii(31);
    end
    inputscript_str=inputscript_str+inputscript_array(s(1));
    // We tranform the final packed command as an assigment to evaluate
    inputscript_assignment = sci2exp(inputscript_str, 'inputscript');
    // We add the code used to decode the packed instructions
    inputscript_decode = 'TOKENS = tokens(inputscript,ascii(31)); execstr(TOKENS,''errcatch'',''m'');';
    inputScript = strcat([inputscript_assignment;';';inputscript_decode]);
endfunction

function mainScript = createMainScript(funcName, opt)
    debugv = opt.Debug;
    if debugv == 1
        //mainScript = strcat(['mode(3)';ascii(31);'out=';funcName;'(in)';ascii(31);ascii(30);'output = sci2exp(output,''''output'''',0)';ascii(31);'disp(out)']);
        mainScript = strcat(['mode(3)';ascii(31);'out=';funcName;'(in)';ascii(31);'disp(out)']);
    else
        //mainScript = strcat(['out=';funcName;'(in);';ascii(31);ascii(30);'output = sci2exp(output,''''output'''',0);']);
        mainScript = strcat(['out=';funcName;'(in);']);
    end
endfunction

function outputs = PAsolve(varargin)
    global ('PA_connected','DataRegistry', 'DataRegistryInit', 'SOLVEid')

    if ~exists('PA_connected') | PA_connected ~= 1
        error('A connection to the ProActive scheduler must be established in order to use PAsolve, see PAconnect');
    end

    if exists('SOLVEid') & type(SOLVEid) == 8
        SOLVEid = SOLVEid + 1;
    else
        SOLVEid = int32(0);
    end

    opt=PAoptions();

    deff ("y=ischar(x)","y=type(x)==10","n");
    if ischar(varargin(1)) then
        Func = varargin(1);
        NN=length(varargin)-1;
        Tasks = PATask(1,NN);
        Tasks(1,1:NN).Func = Func;
        for i=1:NN
            if typeof(varargin(i+1)) == 'list'
                Tasks(1,i).Params =varargin(i+1);
            else
                Tasks(1,i).Params =list(varargin(i+1));
            end
        end
        MM = 1;
    elseif typeof(varargin(1)) == 'PATask'
        if length(varargin) == 1
            Tasks = varargin(1);
            NN = size(Tasks,2);
            MM = size(Tasks,1);
        else
            NN=nargin;
            MM = -1;
            for i=1:NN
                if typeof(varargin(i)) == 'PATask'
                    if (size(varargin(i),2) ~= 1)
                        error(strcat(['parameter ', string(i), ' should be a column vector.']));
                    end
                    sz = size(varargin(i),1);
                    if MM == -1
                        MM = sz;
                        Tasks=PATask(MM,NN);
                    elseif MM ~= sz
                        error(strcat(['parameter ', string(i), ' should be a column vector of the same length than other parameters.']));
                    end
                    Tasks(1:sz,i) = varargin(i);
                else
                    error(strcat(['parameter ', num2str(i), ' is a ', typeof(varargin(i)), ', expected PATask instead.']));
                end
            end

        end
    end

    jimport org.ow2.proactive.scheduler.ext.scilab.common.PASolveScilabGlobalConfig;
    jimport org.ow2.proactive.scheduler.ext.scilab.common.PASolveScilabTaskConfig;
    jimport org.ow2.proactive.scheduler.ext.common.util.FileUtils;
    jimport org.ow2.proactive.scheduler.ext.matsci.client.AODataspaceRegistry;
    jimport java.lang.String;
    jimport java.net.URL;
    jimport java.io.File;

    solve_config = jnewInstance(PASolveScilabGlobalConfig);

    solve_config.setDebug(opt.Debug);
    solve_config.setTimeStamp(opt.TimeStamp);
    solve_config.setFork(opt.Fork);
    solve_config.setRunAsMe(opt.RunAsMe);
    solve_config.setPriority(opt.Priority);
    solve_config.setTransferSource(opt.TransferSource);
    //solve_config.setTransferEnv(opt.TransferEnv);
    solve_config.setTransferVariables(opt.TransferVariables);
    solve_config.setKeepEngine(opt.KeepEngine);
    jinvoke(solve_config,'setWindowsStartupOptionsAsString',opt.WindowsStartupOptions);
    jinvoke(solve_config,'setLinuxStartupOptionsAsString',opt.LinuxStartupOptions);

    solve_config.setInputSpaceName('ScilabInputSpace');
    solve_config.setOutputSpaceName('ScilabOutputSpace');

    solve_config.setVersionPref(opt.VersionPref);
    solve_config.setVersionRejAsString(opt.VersionRej);
    solve_config.setVersionMin(opt.VersionMin);
    solve_config.setVersionMax(opt.VersionMax);
    solve_config.setCheckMatSciUrl(opt.FindScilabScript);
    if ischar(opt.CustomScript)
        selects = opt.CustomScript
        try
            url=URL.new(selects);
            ok = true;
        catch
            ok = false;
        end
        jremove(url);

        if ~ok
            solve_config.setCustomScriptUrl(strcat(['file:', selects]));
        else
            solve_config.setCustomScriptUrl(selects);
        end
    end

    solve_config.setZipSourceFiles(%f);

    curr_dir = pwd();
    fs=filesep();
    curr_dir_java = File.new(curr_dir);
    if ~jinvoke(curr_dir_java,'canWrite')
        jremove(curr_dir_java);
        error('Current Directory should have write access rights');
    end
    jremove(curr_dir_java);

    // PAScheduler sub directory init

    subdir = '.PAScheduler';
    solve_config.setTempSubDirName(subdir);

    if isempty(opt.CustomDataspaceURL)
        if ~isdir(strcat([curr_dir, fs, subdir]))
            mkdir(curr_dir,subdir);
        end
        pa_dir = strcat([curr_dir, fs, subdir]);
    else
        if isempty(opt.CustomDataspacePath)
            error('if CustomDataspaceURL is specified, CustomDataspacePath must be specified also');
        end
        if ~isdir(strcat([opt.CustomDataspacePath, fs, subdir]))
            mkdir(opt.CustomDataspacePath,subdir);
        end
        pa_dir = strcat([opt.CustomDataspacePath, fs, subdir]);
    end

    if isempty(opt.CustomDataspaceURL)
        if ~exists('DataRegistryInit') | DataRegistryInit ~= 1
            DataRegistry = AODataspaceRegistry.new('ScilabInputSpace','ScilabOutputSpace','ScilabSession',opt.Debug);
            DataRegistryInit = 1;
        end
        pair = DataRegistry.createDataSpace(curr_dir);
        px=jinvoke(pair,'getX');
        py=jinvoke(pair,'getY');
        pxs = jcast(px,'java.lang.String');
        pys = jcast(py,'java.lang.String');
        solve_config.setInputSpaceURL(pxs);
        solve_config.setOutputSpaceURL(pys);
        if opt.Debug then
            disp('using Dataspace:')
            disp(pxs)
        end

    else
        solve_config.setOutputSpaceURL(opt.CustomDataspaceURL);
        solve_config.setInputSpaceURL(opt.CustomDataspaceURL);
    end

    variableInFileBaseName = ['ScilabPAsolveVarIn_' string(SOLVEid)];
    variableOutFileBaseName = ['ScilabPAsolveVarOut_' string(SOLVEid)];
    outVarFiles = list(NN);
    //tmpFiles = list();
    taskFilesToClean = list();

    task_configs = jarray('org.ow2.proactive.scheduler.ext.scilab.common.PASolveScilabTaskConfig', NN,MM);
    for i=1:NN
        taskFilesToClean($+1)=list();
        for j=1:MM
            t_conf = jnewInstance(PASolveScilabTaskConfig);
            task_configs(i-1,j-1) = t_conf;
            if ~isempty(Tasks(j,i).Description) then
                t_conf.setDescription(Tasks(j,i).Description);
            end

            // Input Files
            if ~isempty(Tasks(j,i).InputFiles) then
                ilen = length(Tasks(j,i).InputFiles);
                if ilen > 0 then
                    inputFiles = jarray('java.lang.String', ilen);
                    filelist = Tasks(j,i).InputFiles;
                    for k=1:ilen
                        filename = filelist(k);
                        inputFiles(k-1)=String.new(strsubst(filename,'\','/'));
                    end

                    t_conf.setInputFiles(inputFiles);
                    t_conf.setInputFilesThere(%t);
                end
            end

            // Output Files
            if ~isempty(Tasks(j,i).OutputFiles) then
                filelist = Tasks(j,i).OutputFiles;
                ilen = length(filelist);
                if ilen > 0 then
                    outputFiles = jarray('java.lang.String', ilen);
                    for k=1:ilen
                        filename = filelist(k);
                        outputFiles(k-1)=String.new(strsubst(filename,'\','/'));
                    end

                    t_conf.setOutputFiles(outputFiles);
                    t_conf.setOutputFilesThere(%t);
                end
            end

            // Custom Script
            if ~isempty(Tasks(j,i).SelectionScript) then
                selects = Tasks(j,i).SelectionScript;
                try
                    url = URL.new(selects);
                    ok = true;
                catch
                    ok = false;
                end
                jremove(url);

                if ~ok
                    t_conf.setCustomScriptUrl(strcat(['file:', selects ]));
                else
                    t_conf.setCustomScriptUrl(selects);
                end
            end

            // Function
            Func = Tasks(j,i).Func;
            execstr(strcat(['functype = type(';Func;');']));
            if (functype <> 13) & (functype <> 11)  then
                error('invalid function type for function ""' + Func + '"". Consider calling this function with a macro instead.');
            end

            // Source Files

            if ~isempty(Tasks(j,i).Sources) then
                srcs = Tasks(j,i).Sources;
                for k=1:length(srcs)
                    srcPath = srcs(k);
                    if isfile(srcPath) then
                        [ppath,fname,extension]=fileparts(srcPath);
                        srcName = strcat(strcat([fname,extension]));
                        if ~isfile(strcat([pa_dir,fs,fname,extension])) then
                            if opt.Debug then
                                disp(strcat(['Copying file ', srcPath, ' to ',pa_dir]));
                            end
                            copyfile(srcPath,pa_dir);
                            // TODO find a cleaning mechanisme
                            //taskFilesToClean(i)=lstcat(taskFilesToClean(i), list(pa_dir+fs+fname+extension));
                            //tmpFiles($+1)=strcat([pa_dir,fs,fname,extension]);
                        end
                        strName = String.new(srcName);
                        t_conf.addSourceFile(strName);
                    else
                        error(strcat(['Source file ', srcPath, ' cannot be found']));
                    end

                end

            end

            // Saving main function name (with or without Sources attribute)
            sourceNames = jarray('java.lang.String', 1);
            sFN = 'ScilabPAsolve_src'+string(SOLVEid)+indToFile([i j])+'.bin';
            execstr('save(pa_dir+fs+sFN,'+Func+');');
            strName = String.new(sFN);
            sourceNames(0) = strName;
            t_conf.setFunctionVarFiles(sourceNames);
            code=[];
            taskFilesToClean(i)=lstcat(taskFilesToClean(i), list(pa_dir+fs+sFN));

            t_conf.setFunctionName(Func);
            t_conf.addSourceFile(sFN);

            // Params
            argi = Tasks(j,i).Params;
            if opt.TransferVariables
                inVarFN = strcat([variableInFileBaseName, indToFile([i j]), '.dat']);
                outVarFN = strcat([variableOutFileBaseName, indToFile([i j]), '.dat']);
                inVarFP = strcat([pa_dir, fs, inVarFN]);
                outVarFP = strcat([pa_dir, fs, outVarFN]);
                // Creating input parameters mat files
                fd=mopen(inVarFP,'wb');
                inl = argi;
                if length(inl) == 0
                    inl=list(%t);
                end
                for k=1:length(inl)
                    execstr('in'+string(k)+'=inl(k);');
                    execstr('save(fd,in'+string(k)+')');
                end
                mclose(fd);

                jinvoke(t_conf,'setInputVariablesFileName',inVarFN);
                jinvoke(t_conf,'setOutputVariablesFileName',outVarFN);
                if j > 1 & Tasks(j,i).Compose
                    cinVarFN = strcat([variableOutFileBaseName,indToFile([i j-1]),'.dat']);
                    cinVarFP = pa_dir+fs+cinVarFN;
                    jinvoke(t_conf,'setComposedInputVariablesFileName',cinVarFN);
                end
                outVarFiles(i) = outVarFP;
                taskFilesToClean(i)=lstcat(taskFilesToClean(i), list(inVarFP));
                //if j < MM
                // because of disconnected mode, the final out is handled
                //differently
                taskFilesToClean(i)=lstcat(taskFilesToClean(i), list(outVarFP));
                //end

                inputscript = 'i=0';
            else
                inputscript = createInputScript(argi);
            end

            t_conf.setInputScript(inputscript);

            //mainScript = createMainScript(Func, opt);
            mainScript = 'out = '+Tasks(j,i).Func+'(';
            if j > 1 & Tasks(j,i).Compose
                mainScript = mainScript + 'in';
                if length(argi) > 0 then
                    mainScript = mainScript + ',';
                end
            end
            if length(argi) > 0
                for k=1:length(argi)-1
                    mainScript = mainScript + 'in'+string(k)+',';
                end
                mainScript = mainScript + ('in'+string(length(argi)));
            end
            mainScript = mainScript + ');';
            t_conf.setMainScript(mainScript);

            t_conf.setOutputs('out');

        end
    end
    jimport org.ow2.proactive.scheduler.ext.scilab.client.ScilabSolver;
    jimport org.objectweb.proactive.api.PAFuture;
    solver = jnewInstance(ScilabSolver);

    pairinfolist = solver.solve(solve_config, task_configs);

    jobinfo = jinvoke(pairinfolist,'getX');
    resfutureList =  jinvoke(pairinfolist,'getY');
    jid = string(jinvoke(jobinfo,'getJobId'));
    disp('Job submitted : '+ jid);

    ftn = jinvoke(jobinfo,'getFinalTasksNamesAsList');

    taskinfo = struct('cleanFileSet',[],'cleanDirSet',[], 'outFile',[], 'jobid',[], 'taskid',[] );
    results=list(NN);
    for i=1:NN
        taskinfo.cleanFileSet = taskFilesToClean(i);
        taskinfo.cleanDirSet = list(pa_dir);
        taskinfo.outFile = outVarFiles(i);
        taskinfo.jobid = jid;
        taskinfo.taskid = jinvoke(ftn,'get',i-1);

        results(i)=PAResult(jinvoke(resfutureList,'get',i-1), taskinfo);

    end
    outputs = PAResL(results);

endfunction

function nm=indToFile(ind)
    nm='';
    if ind==-1
        return;
    end
    for JJ=ind
        nm=strcat([nm, '_', string(JJ)]);
    end
endfunction

function inputScript = createInputScript(arg)
    // We transform the argument to executable scilab code
    argcode = sci2exp(arg,'in');
    // The inputscript will contain the argument and the code of the functions
    inputscript_array=[argcode];
    // The code defining the function is made of many lines, we pack it by using ASCII 31 delimiters
    s=size(inputscript_array);
    inputscript_str='';
    for j=1:(s(1)-1)
        inputscript_str=inputscript_str+inputscript_array(j)+ascii(31);
    end
    inputscript_str=inputscript_str+inputscript_array(s(1));
    // We tranform the final packed command as an assigment to evaluate
    inputscript_assignment = sci2exp(inputscript_str, 'inputscript');
    // We add the code used to decode the packed instructions
    inputscript_decode = 'TOKENS = tokens(inputscript,ascii(31)); execstr(TOKENS,''errcatch'',''m'');';
    inputScript = strcat([inputscript_assignment;';';inputscript_decode]);
endfunction

function mainScript = createMainScript(funcName, opt)
    debugv = opt.Debug;
    if debugv == 1
        //mainScript = strcat(['mode(3)';ascii(31);'out=';funcName;'(in)';ascii(31);ascii(30);'output = sci2exp(output,''''output'''',0)';ascii(31);'disp(out)']);
        mainScript = strcat(['mode(3)';ascii(31);'out=';funcName;'(in)';ascii(31);'disp(out)']);
    else
        //mainScript = strcat(['out=';funcName;'(in);';ascii(31);ascii(30);'output = sci2exp(output,''''output'''',0);']);
        mainScript = strcat(['out=';funcName;'(in);']);
    end
endfunction


Use real-time scalling when no SIGNAL block in model

function continueSimulation=pre_xcos_simulate(scs_m, needcompile)
    global %microdaq;
    %microdaq.private.has_mdaqBlock = %F;
    continueSimulation = %T;
    look_for_mdaqBlocks = %T;

    for i = 1:size(scs_m.objs)
        curObj= scs_m.objs(i);

        if (typeof(curObj) == "Block" & curObj.gui == "CLKINV_f")
            messagebox("Starting simulation inside of a superblock is not possible", "Simulation problem", "error");
            continueSimulation = %F;
            return;
        end

        if (typeof(curObj) == "Block" & curObj.gui == "CLOCK_c")
            sTsamp=curObj.model.rpar.objs(2).graphics.exprs(1);
            %microdaq.private.model_tsamp=strtod(sci2exp(eval(sTsamp)));
        end

        if (typeof(curObj) == "Block" & curObj.gui == "mdaq_setup")
            if scs_m.objs(i).model.rpar(1) == (-1) then
                scs_m.props.tf= 1.000D+12;
            else
                scs_m.props.tf=scs_m.objs(i).model.rpar(1);
            end

            // if model has microdaq block set real-time scaling to 1
            tmp = scs_m;

            perform_scan(tmp);
            if %microdaq.private.has_mdaqBlock then
                scs_m.props.tol(5) = 1;
            end

            if %microdaq.dsp_loaded == %T then
                look_for_mdaqBlocks = %F;
                if %microdaq.private.mdaq_signal_id == [] then
                    scs_m.props.tol(5) = 1;
                else
                    scs_m.props.tol(5) = 0;
                end

                [mdaq_ip_addr, result] = mdaq_get_ip();
                if result < 0 then
                    disp("Unable to get MicroDAQ IP address - run microdaq_setup!");
                    continueSimulation = %F;
                    %microdaq.dsp_loaded = %F;
                    break;
                end

                result = client_connect(mdaq_ip_addr, 4344);
                if result < 0 then
                    con = mdaqOpen();
                    result = mlink_set_obj(con, "ext_mode", 1);
                    mdaqClose(con);
                    if result == -25 then
                        message("ERROR: Unable to connect - your are running model in Standalone mode!");
                    else
                        message("ERROR: Unable to connect to MicroDAQ device!")
                        %microdaq.dsp_loaded = %F;
                    end
                    continueSimulation = %F;
                    break;
                end
                disp('### Starting model in Ext mode...');

                perform_scan(tmp);
                if %microdaq.private.has_mdaq_param_sim then
                    result = mdaqOpen();
                    if result > -1 then
                        %microdaq.private.connection_id = result;
                    else
                        message("ERROR: Unable to connect to MicroDAQ device!");
                        continueSimulation = %F;
                        %microdaq.private.connection_id = -1;
                    end
                end
            end
        end
    end

    if look_for_mdaqBlocks then
        tmp = scs_m;
        perform_scan(tmp);
        if %microdaq.private.has_mdaqBlock then
            disp("### Running model in simulation mode... ")
            close_last_connection();
            result = mdaqOpen();
            if result > -1 then
                %microdaq.private.connection_id = result;
            else
                message("ERROR: Unable to connect to MicroDAQ device!");
                continueSimulation = %F;
                %microdaq.private.connection_id = -1;
            end
        end

        %microdaq.private.mdaq_signal_id = [];
    end

    scs_m=resume(scs_m)
endfunction

function continueSimulation=pre_xcos_simulate(scs_m, needcompile)
    global %microdaq;
    %microdaq.private.has_mdaqBlock = %F;
    continueSimulation = %T;
    look_for_mdaqBlocks = %T;

    for i = 1:size(scs_m.objs)
        curObj= scs_m.objs(i);

        if (typeof(curObj) == "Block" & curObj.gui == "CLKINV_f")
            messagebox("Starting simulation inside of a superblock is not possible", "Simulation problem", "error");
            continueSimulation = %F;
            return;
        end

        if (typeof(curObj) == "Block" & curObj.gui == "CLOCK_c")
            sTsamp=curObj.model.rpar.objs(2).graphics.exprs(1);
            %microdaq.private.model_tsamp=strtod(sci2exp(eval(sTsamp)));
        end

        if (typeof(curObj) == "Block" & curObj.gui == "mdaq_setup")
            if scs_m.objs(i).model.rpar(1) == (-1) then
                scs_m.props.tf= 1.000D+12;
            else
                scs_m.props.tf=scs_m.objs(i).model.rpar(1);
            end

            // if model has microdaq block set real-time scaling to 1
            tmp = scs_m;

            perform_scan(tmp);
            if %microdaq.private.has_mdaqBlock then
                scs_m.props.tol(5) = 1;
            end

            if %microdaq.dsp_loaded == %T then
                look_for_mdaqBlocks = %F;
                scs_m.props.tol(5) = 0;

                [mdaq_ip_addr, result] = mdaq_get_ip();
                if result < 0 then
                    disp("Unable to get MicroDAQ IP address - run microdaq_setup!");
                    continueSimulation = %F;
                    %microdaq.dsp_loaded = %F;
                    break;
                end

                result = client_connect(mdaq_ip_addr, 4344);
                if result < 0 then
                    con = mdaqOpen();
                    result = mlink_set_obj(con, "ext_mode", 1);
                    mdaqClose(con);
                    if result == -25 then
                        message("ERROR: Unable to connect - your are running model in Standalone mode!");
                    else
                        message("ERROR: Unable to connect to MicroDAQ device!")
                        %microdaq.dsp_loaded = %F;
                    end
                    continueSimulation = %F;
                    break;
                end
                disp('### Starting model in Ext mode...');

                perform_scan(tmp);
                if %microdaq.private.has_mdaq_param_sim then
                    result = mdaqOpen();
                    if result > -1 then
                        %microdaq.private.connection_id = result;
                    else
                        message("ERROR: Unable to connect to MicroDAQ device!");
                        continueSimulation = %F;
                        %microdaq.private.connection_id = -1;
                    end
                end
            end
        end
    end

    if look_for_mdaqBlocks then
        tmp = scs_m;
        perform_scan(tmp);
        if %microdaq.private.has_mdaqBlock then
            disp("### Running model in simulation mode... ")
            close_last_connection();
            result = mdaqOpen();
            if result > -1 then
                %microdaq.private.connection_id = result;
            else
                message("ERROR: Unable to connect to MicroDAQ device!");
                continueSimulation = %F;
                %microdaq.private.connection_id = -1;
            end
        end

        %microdaq.private.mdaq_signal_id = 0;
    end

    scs_m=resume(scs_m)
endfunction


INTEGRATION: CWS impress34 (1.3.622); FILE MERGED 2005/02/17 13:46:52 sw 1.3.622.1: #i26264#

-o svx.SvxShapeDimensioning
-o svx.SvxShapeControl
-o svx.SvxGraphicObject
-o svx.AccessibleGraphicShape
#i37641#-o svx.AccessibleOLEShape
#i37641#-o svx.AccessiblePageShape
-o svx.AccessiblePresentationGraphicShape
#i37641#-o svx.AccessiblePresentationOLEShape
#i37641#-o svx.AccessibleShape
-o svx.GraphicExporter
-o svx.SvxDrawPage
-o svx.SvxShape
-o svx.SvxShapeCircle
-o svx.SvxShapeCollection
-o svx.SvxShapeConnector
-o svx.SvxShapeGroup
-o svx.SvxShapePolyPolygon
-o svx.SvxShapePolyPolygonBezier
-o svx.SvxUnoNumberingRules
-o svx.SvxUnoText
-o svx.SvxUnoTextContent
-o svx.SvxUnoTextContentEnum
-o svx.SvxUnoTextCursor
-o svx.SvxUnoTextField
-o svx.SvxUnoTextRange
-o svx.SvxUnoTextRangeEnumeration
#i37641#-o svx.AccessibleControlShape
-o svx.SvxGraphCtrlAccessibleContext
#i37641#-o svx.AccessiblePresentationShape
-o svx.AccessibleEditableTextPara

-o svx.SvxShapeDimensioning
-o svx.SvxShapeControl
-o svx.SvxGraphicObject
#i26126#-o svx.AccessibleGraphicShape
#i26126#-o svx.AccessibleOLEShape
#i26126#-o svx.AccessiblePageShape
#i26126#-o svx.AccessiblePresentationGraphicShape
#i26126#-o svx.AccessiblePresentationOLEShape
#i26126#-o svx.AccessibleShape
-o svx.GraphicExporter
-o svx.SvxDrawPage
-o svx.SvxShape
-o svx.SvxShapeCircle
-o svx.SvxShapeCollection
-o svx.SvxShapeConnector
-o svx.SvxShapeGroup
-o svx.SvxShapePolyPolygon
-o svx.SvxShapePolyPolygonBezier
-o svx.SvxUnoNumberingRules
-o svx.SvxUnoText
-o svx.SvxUnoTextContent
-o svx.SvxUnoTextContentEnum
-o svx.SvxUnoTextCursor
-o svx.SvxUnoTextField
-o svx.SvxUnoTextRange
-o svx.SvxUnoTextRangeEnumeration
#i26126#-o svx.AccessibleControlShape
-o svx.SvxGraphCtrlAccessibleContext
#i26126#-o svx.AccessiblePresentationShape
-o svx.AccessibleEditableTextPara


Inform when model terminated

Inform when model terminated

function []=post_xcos_simulate(%cpr, scs_m, needcompile)
    global %microdaq;

    for i = 1:size(scs_m.objs)
        curObj= scs_m.objs(i);
        if (typeof(curObj) == "Block" & curObj.gui == "mdaq_setup")
            if  %microdaq.dsp_loaded == %T then
                client_disconnect(1);
                %microdaq.dsp_loaded = %F;

                connection_id = mdaq_open();
                if connection_id < 0 then
                    return;
                end

                if connection_id > -1 then
                    mlink_set_obj(connection_id, 'model_stop_flag', 1 );
                    mlink_set_obj(connection_id, 'terminate_signal_task', 1 );
                    disp('### Model execution terminated');
                    // save dsp profiling data
                    if curObj.model.ipar(3) == 1 then
                        //get number of records
                        [nr_records, result] = mlink_profile_data_get(connection_id, 1);
                        if nr_records > 0 & nr_records < 250000 & result > -1 then
                            disp('### Downloading profiling data...');
                            [profile_data, result] = mlink_profile_data_get(connection_id, nr_records + 1);
                            if result > -1 then
                                if %microdaq.private.mdaq_hwid(4) == 0 then
                                    cpu_clock = 300000000;
                                else
                                    cpu_clock = 456000000;
                                end
                                profile_data = profile_data / (cpu_clock / 1000000);
                                dsp_exec_profile = tlist(["listtype","init","step","end"], [], []);
                                dsp_exec_profile.init = profile_data(3);
                                dsp_exec_profile.step = profile_data(4:nr_records);
                            dsp_exec_profile.end = profile_data(2);
                            save(TMPDIR + filesep() + "profiling_data", "dsp_exec_profile");
                            clear dsp_exec_profile;
                        end
                    end

                    // make scope nicer
                    list_fig=winsid();
                    for i=1:length(list_fig)
                        h=get_figure_handle(list_fig(i));
                        if h.children.type == "Axes" then
                            axes = h.children;
                            axes.grid = [1,1];
                            axes.grid_style = [9,10];
                            poliline = axes.children;
                            if isempty(poliline.children) then
                                poliline.polyline_style = 2;
                            end
                        end
                    end
                end
                mdaq_close(connection_id);
            end
        end
    end
end

if %microdaq.private.connection_id > -1 & %microdaq.private.has_mdaq_param_sim then
    mdaq_close(%microdaq.private.connection_id);
    %microdaq.private.connection_id = -1;
    %microdaq.private.has_mdaq_param_sim = %F;
end

if %microdaq.private.connection_id > -1 & %microdaq.private.has_mdaq_block then
    mdaq_close(%microdaq.private.connection_id);
    %microdaq.private.connection_id = -1;
    %microdaq.private.has_mdaq_block = %f
end

endfunction

function []=post_xcos_simulate(%cpr, scs_m, needcompile)
    global %microdaq;

    for i = 1:size(scs_m.objs)
        curObj= scs_m.objs(i);
        if (typeof(curObj) == "Block" & curObj.gui == "mdaq_setup")
            if  %microdaq.dsp_loaded == %T then
                client_disconnect(1);
                %microdaq.dsp_loaded = %F;

                connection_id = mdaq_open();
                if connection_id < 0 then
                    return;
                end

                if connection_id > -1 then
                    mlink_set_obj(connection_id, 'model_stop_flag', 1 );
                    mlink_set_obj(connection_id, 'terminate_signal_task', 1 );

                    // save dsp profiling data
                    if curObj.model.ipar(3) == 1 then
                        //get number of records
                        [nr_records, result] = mlink_profile_data_get(connection_id, 1);
                        if nr_records > 0 & nr_records < 250000 & result > -1 then
                            [profile_data, result] = mlink_profile_data_get(connection_id, nr_records + 1);
                            if result > -1 then
                                if %microdaq.private.mdaq_hwid(4) == 0 then
                                    cpu_clock = 300000000;
                                else
                                    cpu_clock = 456000000;
                                end
                                profile_data = profile_data / (cpu_clock / 1000000);
                                dsp_exec_profile = tlist(["listtype","init","step","end"], [], []);
                                dsp_exec_profile.init = profile_data(3);
                                dsp_exec_profile.step = profile_data(4:nr_records);
                            dsp_exec_profile.end = profile_data(2);
                            save(TMPDIR + filesep() + "profiling_data", "dsp_exec_profile");
                            clear dsp_exec_profile;
                        end
                    end

                    // make scope nicer
                    list_fig=winsid();
                    for i=1:length(list_fig)
                        h=get_figure_handle(list_fig(i));
                        if h.children.type == "Axes" then
                            axes = h.children;
                            axes.grid = [1,1];
                            axes.grid_style = [9,10];
                            poliline = axes.children;
                            if isempty(poliline.children) then
                                poliline.polyline_style = 2;
                            end
                        end
                    end
                end
                mdaq_close(connection_id);
            end
        end
    end
end

if %microdaq.private.connection_id > -1 & %microdaq.private.has_mdaq_param_sim then
    mdaq_close(%microdaq.private.connection_id);
    %microdaq.private.connection_id = -1;
    %microdaq.private.has_mdaq_param_sim = %F;
end

if %microdaq.private.connection_id > -1 & %microdaq.private.has_mdaq_block then
    mdaq_close(%microdaq.private.connection_id);
    %microdaq.private.connection_id = -1;
    %microdaq.private.has_mdaq_block = %f
end

endfunction


Fix bug when file not exists (mdaq_get_file_data)

function result = mdaq_get_file_data(filename, filetype, rows, cols)
    result = [];

    if (argn(2) > 4 | argn(2) < 2) | (filetype == 2 & argn(2) <> 4) then
        mprintf("Description:\n");
        mprintf("\tReads data from file created with MicroDAQ ''To File'' block\n");
        mprintf("Usage:\n");
        mprintf("\tmdaq_get_file_data(name, type, rows, cols);\n")
        mprintf("\tname - name of file from user-disk/dsp/data\n");
        mprintf("\ttype - (1 - text | 2 - binary)\n");
        mprintf("\trows - number of rows (optinal for text filetype)\n");
        mprintf("\tcols - number of rows (optinal for text filetype)\n");
        return;
    end

    [mdaq_ip_address, res] = mdaq_get_ip();
    if res < 0 then
        disp("ERROR: Unable to get IP address!")
        return;
    end
    [tmp_file res] = getURL('http://' + mdaq_ip_address + '/user-disk/dsp/data/' + filename, TMPDIR);

    if isfile(tmp_file) & (strindex(res,'404 - Not Found') == []) then
        if filetype == 1 then
            result = fscanfMat(tmp_file);
            if argn(2) == 4 then
                nrows = rows;
                if nrows > size(result, 1) then
                    nrows = size(result, 1);
                end
                ncols = cols;
                if ncols > size(result, 2) then
                    ncols = size(result, 2)
                end
                result = resize_matrix(result, nrows, ncols);
            end

        elseif filetype == 2 then
            fd1 = mopen(tmp_file,'rb');
            data_count = rows*cols;
            data = mget(rows*cols,'d',fd1);

            if size(data, 2) < data_count then
                //disp("ERROR: !");
                data_count = size(data, 2);
            end

            for i=1:cols
                result = [result; data(i:cols:data_count)];
            end
            result = result';
            mclose(fd1)
        else
            disp("ERROR: Invalid filetype! (1 - text, 2 - binary)");
        end
        mdelete(tmp_file);
    else
        disp("ERROR: File not found!");
    end

endfunction

function result = mdaq_get_file_data(filename, filetype, rows, cols)
    result = [];

    if (argn(2) > 4 | argn(2) < 2) | (filetype == 2 & argn(2) <> 4) then
        mprintf("Description:\n");
        mprintf("\tReads data from file created with MicroDAQ ''To File'' block\n");
        mprintf("Usage:\n");
        mprintf("\tmdaq_get_file_data(name, type, rows, cols);\n")
        mprintf("\tname - name of file from user-disk/dsp/data\n");
        mprintf("\ttype - (1 - text | 2 - binary)\n");
        mprintf("\trows - number of rows (optinal for text filetype)\n");
        mprintf("\tcols - number of rows (optinal for text filetype)\n");
        return;
    end

    [mdaq_ip_address, res] = mdaq_get_ip();
    if res < 0 then
        disp("ERROR: Unable to get IP address!")
        return;
    end
    tmp_file = getURL('http://' + mdaq_ip_address + '/user-disk/dsp/data/' + filename, TMPDIR);

    if isfile(tmp_file) then
        if filetype == 1 then
            result = fscanfMat(tmp_file);
            if argn(2) == 4 then
                nrows = rows;
                if nrows > size(result, 1) then
                    nrows = size(result, 1);
                end
                ncols = cols;
                if ncols > size(result, 2) then
                    ncols = size(result, 2)
                end
                result = resize_matrix(result, nrows, ncols);
            end

        elseif filetype == 2 then
            fd1 = mopen(tmp_file,'rb');
            data_count = rows*cols;
            data = mget(rows*cols,'d',fd1);

            if size(data, 2) < data_count then
                //disp("ERROR: !");
                data_count = size(data, 2);
            end

            for i=1:cols
                result = [result; data(i:cols:data_count)];
            end
            result = result';
            mclose(fd1)
        else
            disp("ERROR: Invalid filetype! (1 - text, 2 - binary)");
        end
        mdelete(tmp_file);
    else
        disp("ERROR: File not found!");
    end

endfunction


Minor fix in mdaq_fw_version()

Minor fix in mdaq_fw_version()

function fw_ver = mdaq_fw_version()
    connection_id = mdaq_open();
    if connection_id > -1  then
        result = [];
        [fw_ver, result] = call("sci_mlink_version",..
                                connection_id, 1, "i",..
                            "out",..
                                [4,1], 2, "i",..
                                [1,1], 3, "i");

            mdaq_close(connection_id);

            if result < 0 then
                disp(mdaq_error(result));
            end
    else
        disp("Unable to connect to MicroDAQ device!");
        fw_ver = [];
    end
    fw_ver = fw_ver';
    clear result;
endfunction

function fw_ver = mdaq_fw_version()
    connection_id = mdaq_open();
    if connection_id > -1  then
        result = [];
        [fw_ver, result] = call("sci_mlink_version",..
                                connection_id, 1, "i",..
                            "out",..
                                [4,1], 2, "i",..
                                [1,1], 3, "i");

            mdaq_close(connection_id);

            if result < 0 then
                disp(mdaq_error(result));
            end
    else
        disp("Unable to connect to MicroDAQ device!");
        fw_ver = [];
    end
    clear result;
endfunction


fdo#35690: disabling toolkit.AccessibleStatusBarItem as it crashes now

#i86007 -o toolkit.AccessibleButton
#i88332 -o toolkit.AccessibleCheckBox
#i86008 -o toolkit.AccessibleComboBox
-o toolkit.AccessibleDropDownComboBox
-o toolkit.AccessibleDropDownListBox
#i86110 -o toolkit.AccessibleEdit
-o toolkit.AccessibleFixedText
#i86110 -o toolkit.AccessibleList
#i86110 -o toolkit.AccessibleListBox
#i86110 -o toolkit.AccessibleListItem
-o toolkit.AccessibleMenu
-o toolkit.AccessibleMenuBar
#i86009 -o toolkit.AccessibleMenuItem
-o toolkit.AccessibleMenuSeparator
#i52607 -o toolkit.AccessiblePopupMenu
#i86107,i86110 -o toolkit.AccessibleRadioButton
-o toolkit.AccessibleScrollBar
#i111225 -o toolkit.AccessibleStatusBar
#fdo#35690 -o toolkit.AccessibleStatusBarItem
#i109643 -o toolkit.AccessibleTabControl
#i109643 -o toolkit.AccessibleTabPage
#i86287 -o toolkit.AccessibleToolBox
#i88605 -o toolkit.AccessibleToolBoxItem
-o toolkit.AccessibleWindow
-o toolkit.MutableTreeDataModel
-o toolkit.MutableTreeNode
-o toolkit.TabController
-o toolkit.TabControllerModel
-o toolkit.Toolkit
-o toolkit.UnoControlButton
-o toolkit.UnoControlButtonModel
-o toolkit.UnoControlCheckBox
-o toolkit.UnoControlCheckBoxModel
-o toolkit.UnoControlComboBox
-o toolkit.UnoControlComboBoxModel
-o toolkit.UnoControlContainer
-o toolkit.UnoControlContainerModel
-o toolkit.UnoControlCurrencyField
-o toolkit.UnoControlCurrencyFieldModel
-o toolkit.UnoControlDateField
-o toolkit.UnoControlDateFieldModel
#allegedly was i80788, but still broken: -o toolkit.UnoControlDialog
-o toolkit.UnoControlDialogModel
-o toolkit.UnoControlEdit
-o toolkit.UnoControlEditModel
#i86011 -o toolkit.UnoControlFileControl
-o toolkit.UnoControlFileControlModel
-o toolkit.UnoControlFixedLineModel
-o toolkit.UnoControlFixedText
-o toolkit.UnoControlFixedTextModel
#i86013 -o toolkit.UnoControlFormattedField
-o toolkit.UnoControlFormattedFieldModel
-o toolkit.UnoControlGroupBox
-o toolkit.UnoControlGroupBoxModel
-o toolkit.UnoControlImageControl
-o toolkit.UnoControlImageControlModel
#i86019 -o toolkit.UnoControlListBox
-o toolkit.UnoControlListBoxModel
-o toolkit.UnoControlNumericField
-o toolkit.UnoControlNumericFieldModel
-o toolkit.UnoControlPatternField
-o toolkit.UnoControlPatternFieldModel
-o toolkit.UnoControlProgressBarModel
-o toolkit.UnoControlRadioButton
-o toolkit.UnoControlRadioButtonModel
-o toolkit.UnoControlScrollBarModel
-o toolkit.UnoControlTimeField
-o toolkit.UnoControlTimeFieldModel
-o toolkit.UnoScrollBarControl
#i86020 -o toolkit.UnoSimpleAnimationControl
#i86021 -o toolkit.UnoSimpleAnimationControlModel
-o toolkit.UnoSpinButtonControl
-o toolkit.UnoSpinButtonControlModel
#i86022 -o toolkit.UnoThrobberControl
#i86023 -o toolkit.UnoThrobberControlModel
#i86298 -o toolkit.UnoTreeControl
-o toolkit.UnoTreeModel

#i86007 -o toolkit.AccessibleButton
#i88332 -o toolkit.AccessibleCheckBox
#i86008 -o toolkit.AccessibleComboBox
-o toolkit.AccessibleDropDownComboBox
-o toolkit.AccessibleDropDownListBox
#i86110 -o toolkit.AccessibleEdit
-o toolkit.AccessibleFixedText
#i86110 -o toolkit.AccessibleList
#i86110 -o toolkit.AccessibleListBox
#i86110 -o toolkit.AccessibleListItem
-o toolkit.AccessibleMenu
-o toolkit.AccessibleMenuBar
#i86009 -o toolkit.AccessibleMenuItem
-o toolkit.AccessibleMenuSeparator
#i52607 -o toolkit.AccessiblePopupMenu
#i86107,i86110 -o toolkit.AccessibleRadioButton
-o toolkit.AccessibleScrollBar
#i111225 -o toolkit.AccessibleStatusBar
-o toolkit.AccessibleStatusBarItem
#i109643 -o toolkit.AccessibleTabControl
#i109643 -o toolkit.AccessibleTabPage
#i86287 -o toolkit.AccessibleToolBox
#i88605 -o toolkit.AccessibleToolBoxItem
-o toolkit.AccessibleWindow
-o toolkit.MutableTreeDataModel
-o toolkit.MutableTreeNode
-o toolkit.TabController
-o toolkit.TabControllerModel
-o toolkit.Toolkit
-o toolkit.UnoControlButton
-o toolkit.UnoControlButtonModel
-o toolkit.UnoControlCheckBox
-o toolkit.UnoControlCheckBoxModel
-o toolkit.UnoControlComboBox
-o toolkit.UnoControlComboBoxModel
-o toolkit.UnoControlContainer
-o toolkit.UnoControlContainerModel
-o toolkit.UnoControlCurrencyField
-o toolkit.UnoControlCurrencyFieldModel
-o toolkit.UnoControlDateField
-o toolkit.UnoControlDateFieldModel
#allegedly was i80788, but still broken: -o toolkit.UnoControlDialog
-o toolkit.UnoControlDialogModel
-o toolkit.UnoControlEdit
-o toolkit.UnoControlEditModel
#i86011 -o toolkit.UnoControlFileControl
-o toolkit.UnoControlFileControlModel
-o toolkit.UnoControlFixedLineModel
-o toolkit.UnoControlFixedText
-o toolkit.UnoControlFixedTextModel
#i86013 -o toolkit.UnoControlFormattedField
-o toolkit.UnoControlFormattedFieldModel
-o toolkit.UnoControlGroupBox
-o toolkit.UnoControlGroupBoxModel
-o toolkit.UnoControlImageControl
-o toolkit.UnoControlImageControlModel
#i86019 -o toolkit.UnoControlListBox
-o toolkit.UnoControlListBoxModel
-o toolkit.UnoControlNumericField
-o toolkit.UnoControlNumericFieldModel
-o toolkit.UnoControlPatternField
-o toolkit.UnoControlPatternFieldModel
-o toolkit.UnoControlProgressBarModel
-o toolkit.UnoControlRadioButton
-o toolkit.UnoControlRadioButtonModel
-o toolkit.UnoControlScrollBarModel
-o toolkit.UnoControlTimeField
-o toolkit.UnoControlTimeFieldModel
-o toolkit.UnoScrollBarControl
#i86020 -o toolkit.UnoSimpleAnimationControl
#i86021 -o toolkit.UnoSimpleAnimationControlModel
-o toolkit.UnoSpinButtonControl
-o toolkit.UnoSpinButtonControlModel
#i86022 -o toolkit.UnoThrobberControl
#i86023 -o toolkit.UnoThrobberControlModel
#i86298 -o toolkit.UnoTreeControl
-o toolkit.UnoTreeModel


INTEGRATION: CWS unoapi1 (1.7.380); FILE MERGED 2007/07/11 13:05:20 cn 1.7.380.1: #i79479# update exclusion list

-o fwl.ContentHandlerFactory
-o fwl.FilterFactory
-o fwl.FrameLoaderFactory
-o fwl.SubstituteVariables
-o fwl.TypeDetection
# -o fwl.PathSettings
-o fwk.DispatchRecorder
-o fwk.DispatchRecorderSupplier
-o fwk.FooterMenuController
-o fwk.ObjectMenuController
-o fwk.StatusBarControllerFactory
-o fwk.ToolBarsMenuController
-o fwk.UICategoryDescription
#-o fwk.JobExecutor
#-o fwk.JobHandler
-o fwk.MailToDispatcher
-o fwk.ServiceHandler
-o fwk.SoundHandler
-o fwk.URLTransformer
-o fwk.MacrosMenuController
-o fwk.ModuleManager
-o fwk.UIElementFactoryManager
-o fwk.UICommandDescription
-o fwk.LayoutManager
-o fwk.UIConfigurationManager
-o fwk.MenuBarFactory
-o fwk.FontSizeMenuController
-o fwk.HeaderMenuController
-o fwk.ControlMenuController
-o fwk.FontMenuController
-o fwk.ModuleUIConfigurationManagerSupplier
-o fwk.ModuleUIConfigurationManager
-o fwk.PopupMenuControllerFactory
-o fwk.Frame
-o fwk.Desktop

-o fwl.ContentHandlerFactory
-o fwl.FilterFactory
-o fwl.FrameLoaderFactory
-o fwl.SubstituteVariables
-o fwl.TypeDetection
-o fwl.PathSettings
-o fwk.DispatchRecorder
-o fwk.DispatchRecorderSupplier
-o fwk.FooterMenuController
-o fwk.ObjectMenuController
-o fwk.StatusBarControllerFactory
-o fwk.ToolBarsMenuController
-o fwk.UICategoryDescription
-o fwk.JobExecutor
-o fwk.JobHandler
-o fwk.MailToDispatcher
-o fwk.ServiceHandler
-o fwk.SoundHandler
-o fwk.URLTransformer
-o fwk.MacrosMenuController
-o fwk.ModuleManager
-o fwk.UIElementFactoryManager
-o fwk.UICommandDescription
-o fwk.LayoutManager
-o fwk.UIConfigurationManager
-o fwk.MenuBarFactory
-o fwk.FontSizeMenuController
-o fwk.HeaderMenuController
-o fwk.ControlMenuController
-o fwk.FontMenuController
-o fwk.ModuleUIConfigurationManagerSupplier
-o fwk.ModuleUIConfigurationManager
-o fwk.PopupMenuControllerFactory
-o fwk.Frame
-o fwk.Desktop


Rename macro mdaq_open_webpanel -> mdaq_webpanel

function mdaq_webpanel()
    [ip_address, result] = mdaq_get_ip();
    if result < 0 then
        message("ERROR: Unable to get device IP address!");
        return;
    end
    if getos() == 'Windows' then
        unix_s("start http://" + ip_address);
    else
        unix_s("xdg-open http://" + ip_address);
    end
endfunction

function mdaq_open_webpanel()
    [ip_address, result] = mdaq_get_ip();
    if result < 0 then
        message("ERROR: Unable to get device IP address!");
        return;
    end
    if getos() == 'Windows' then
        unix_s("start http://" + ip_address);
    else
        unix_s("xdg-open http://" + ip_address);
    end
endfunction


INTEGRATION: CWS unoapi1 (1.2.26); FILE MERGED 2007/09/28 12:42:08 cn 1.2.26.1: #i79479# update list

-o sch.ChXChartDocument
# -o sch.AccArea
# -o sch.AccAxis
# -o sch.AccDataPoint
# -o sch.AccDataSeries
# -o sch.AccDiagram
# -o sch.AccFloor
# -o sch.AccGrid
# -o sch.AccLegend
# -o sch.AccLegendEntry
# -o sch.AccStatisticsObject
# -o sch.AccTitle
# -o sch.AccWall
# -o sch.AccessibleDocumentView
-o sch.ChXChartAxis
-o sch.ChXChartData
-o sch.ChXChartDataArray
-o sch.ChXChartView
#-o sch.ChXDataPoint
#-o sch.ChXDataRow
-o sch.ChXDiagram
-o sch.ChartArea
-o sch.ChartGrid
-o sch.ChartLegend
-o sch.ChartLine
-o sch.ChartTitle

-o sch.ChXChartDocument
-o sch.AccArea
-o sch.AccAxis
-o sch.AccDataPoint
-o sch.AccDataSeries
-o sch.AccDiagram
-o sch.AccFloor
-o sch.AccGrid
-o sch.AccLegend
-o sch.AccLegendEntry
-o sch.AccStatisticsObject
-o sch.AccTitle
-o sch.AccWall
-o sch.AccessibleDocumentView
-o sch.ChXChartAxis
-o sch.ChXChartData
-o sch.ChXChartDataArray
-o sch.ChXChartView
-o sch.ChXDataPoint
-o sch.ChXDataRow
-o sch.ChXDiagram
-o sch.ChartArea
-o sch.ChartGrid
-o sch.ChartLegend
-o sch.ChartLine
-o sch.ChartTitle


microdaq_setup improvements

microdaq_setup improvements

// Copyright (c) 2015, Embedded Solutions
// All rights reserved.

// This file is released under the 3-clause BSD license. See COPYING-BSD.

mode(-1)
global STATE
STATE = 1

titbx_path = "";
if getos() == 'Linux' then
    titbx_path = "/opt/ti";
elseif getos() == 'Windows' then
    titbx_path = "C:\ti";
end

//DIRECTORY BROWSER FUNCTIONS
function browse_dir_callback1()
    if isdir(titbx_path) then
        directory = uigetdir(titbx_path)
    else
        directory = uigetdir()
    end
    set(h(8),'String',directory)
    set(h(11),'Enable','on')
    set(h(12),'Enable','on')
endfunction

function [] = browse_dir_callback2()
    if isdir(titbx_path) then
        directory = uigetdir(titbx_path)
    else
        directory = uigetdir()
    end
    set(h(11),'String',directory)
    set(h(14),'Enable','on')
    set(h(15),'Enable','on')
endfunction

function [] = browse_dir_callback3()
    if isdir(titbx_path) then
        directory = uigetdir(titbx_path)
    else
        directory = uigetdir()
    end
    set(h(14),'String',directory)
    set(h(17),'Enable','on')
    set(h(18),'Enable','on')
endfunction

function [] = browse_dir_callback4()
    if isdir(titbx_path) then
        directory = uigetdir(titbx_path)
    else
        directory = uigetdir()
    end
    set(h(17),'String',directory)
    set(h(22),'Enable','on')
endfunction

//EDIT BOX CALLBACK
function [] = edit_callback1()
    set(h(11),'Enable','on')
    set(h(12),'Enable','on')
endfunction

function [] = edit_callback2()
    set(h(14),'Enable','on')
    set(h(15),'Enable','on')
endfunction

function [] = edit_callback3()
    set(h(17),'Enable','on')
    set(h(18),'Enable','on')
endfunction

function [] = edit_callback4()
     set(h(22),'Enable','on')
endfunction

//CHECK CONNECTION FUNCTION
function [] = connect_callback()
    set(h(21),'Enable','off')
    ip = get(h(20),'String')
    mdaq_set_ip(ip);

    result = mdaq_open();
    if result < 0  then
        messagebox('Unable to connect to MicroDAQ device!','Error','error')
        set(h(21),'Enable','on')
    else
        global %microdaq;
        messagebox(%microdaq.model + ' connected!','MicroDAQ info','info');
        set(h(21),'Enable','on')

        mdaq_close(result);
    end
endfunction

//CLOSE FUNCTION
function [] = close_callback()
    global STATE
    STATE = 0;
    close(fig);
endfunction

//HELP FUNCTION
function [] = help_callback()
    messagebox(help_desc,'MircDAQ setup help');
endfunction

//FINAL SETUP FUNCTION
function [] = setup_callback ()
    //get paths from edit boxes
    CCSRoot = get(h(8),'String');
    CompilerRoot = get(h(11),'String');
    XDCRoot = get(h(14),'String');
    BIOSRoot = get(h(17),'String');

    //Lock setup button
    set(h(22),'Enable','off');
    set(h(22),'String','Building...');

    dir_temp = pwd();

    //build system
    TARGET_ROOT = dirname(get_function_path('microdaq_setup'))+"\..\etc";
    FILE_ROOT = dirname(get_function_path('microdaq_setup'))+"\..\rt_templates\target_paths.mk"

    sysbios_build_cmd = "SET PATH=" + XDCRoot + filesep() + "jre" + filesep() + "bin" + filesep() +";%PATH% & ";
    sysbios_build_cmd = sysbios_build_cmd + XDCRoot + filesep() + 'xs --xdcpath=""' + BIOSRoot + '/packages;' + CCSRoot + '/ccs_base;""' + ' xdc.tools.configuro -o configPkg -t ti.targets.elf.C674 -p ti.platforms.evmOMAPL137 -r release -c ' + CompilerRoot + ' --compileOptions ""-g --optimize_with_debug""  sysbios.cfg'

    disp("Building TI SYS/BIOS real-time operating system for MicroDAQ");
    cd( TARGET_ROOT+ filesep() + 'sysbios' + filesep() + 'cpu0' + filesep());
    unix_w(sysbios_build_cmd);
    cd( TARGET_ROOT+ filesep() + 'sysbios' + filesep() + 'cpu1' + filesep());
    unix_w(sysbios_build_cmd);

    //path to /configPkg/linker.cmd
    LINKER0_PATH = TARGET_ROOT + '\sysbios\cpu0\configPkg\linker.cmd';
    LINKER1_PATH = TARGET_ROOT + '\sysbios\cpu1\configPkg\linker.cmd';

    if isfile(LINKER0_PATH) then
        [linker0,err] = mopen(LINKER0_PATH,'a')
        [linker1,err] = mopen(LINKER1_PATH,'a')
        if err < 0 then
            messagebox('Building failed.','Building sys','error');
            set(h(22),'callback','close_callback','String','Close','Enable','on');
        else
            //Append 'sysbios_linker.cmd' to /configPkg/linker.cmd
            SYSBIOS_LINKER_PATH = TARGET_ROOT + '\sysbios\sysbios_linker.cmd';
            [sysbios_linker,err] = mopen(SYSBIOS_LINKER_PATH, 'r');
            content = mgetl(sysbios_linker);
            mclose(sysbios_linker)
            mputl(content,linker0)
            mputl(content,linker1)
            mclose(linker0);
            mclose(linker1);

            //Generate 'target_path.mk'
            [f,result0] = mopen(FILE_ROOT,'w');
            if result0 < 0 then
                messagebox('Building failed. Cannot create file ''target_path.mk'' ','Building sys','error');
                close_callback();
                return
            else
                mputl('# MicroDAQ paths',f)
                mputl('',f)
                mputl('CompilerRoot  = '+CompilerRoot,f)
                mputl('TargetRoot    = '+TARGET_ROOT,f)
                mputl('CCSRoot       = '+CCSRoot,f)
                mputl('XDCRoot       = '+XDCRoot,f)
                mputl('BIOSRoot      = '+BIOSRoot,f)
                mclose(f)
            end

            ip = get(h(20),'String')
            mdaq_set_ip(ip);

            //close window
            messagebox('Completed.','Building sys','info');
            //consol success message
            disp('');

            cd(dir_temp);
            close_callback();
        end;

    else
        cd(dir_temp);
        messagebox('Building failed.','Building sys','error');
        set(h(22),'callback','close_callback','String','Close','Enable','on');
    end;

endfunction

// ------------ UI -------------

//width of edit box
edit_w = 300;
//edit box start posisiton
edit_x = 12;
//window width
window_w = 400;
//window height
window_h = 460;
//object offset in x axis
x_offset = 30;
//object offset in y axis
y_offset = 40;
//text margin
t_margin = 15;
//font size
font_size = 12;

//frame label
lab1 = 'MicroDAQ Setup';

//General installation description
line1 = 'The microdaq_setup wizard will configure MicorDAQ device to work';
line2 = 'with Scilab. Install TI Code Composer Studio 4/5 and connect your'
line3 = 'MicroDAQ device. Select Help button for more info.';

help_paths = [
'Code Composer Studio 4/5 install path → \ti\ccsv5';
'C6000 compiler install path → ti\ccsv5\tools\compiler\c6000_7.4.4';
'XDCTools install path → ti\xdctools_3_25_03_72';
'SYS/BIOS RTOS install path → ti\bios_6_35_04_50';
];

if getos() == 'Linux' then
    help_paths = [
    'Code Composer Studio 4/5 install path → /opt/ti/ccsv5';
    'C6000 compiler install path → /opt/ti/ccsv5/tools/compiler/c6000_7.4.4';
    'XDCTools install path → /opt/ti/xdctools_3_25_03_72';
    'SYS/BIOS RTOS install path → /opt/ti/bios_6_35_04_50';
    ];
elseif getos() == 'Windows' then
    help_paths = [
    'Code Composer Studio 4/5 install path → C:\ti\ccsv5';
    'C6000 compiler install path → C:\ti\ccsv5\tools\compiler\c6000_7.4.4';
    'XDCTools install path → C:\ti\xdctools_3_25_03_72';
    'SYS/BIOS RTOS install path → C:\ti\bios_6_35_04_50';
    ];
end

help_desc = ['Check your IP settings and verify connection with MicroDAQ';
'device with system ''ping'' command.';
'During installation point where Code Composer Studio';
'components are located. User has to provide directories with:';
'- Code Composer Studio 4/5 root directory';
'- C6000 compiler';
'- XDCTools';
'- SYS/BIOS';
'';
'Example directory structure with standard Code Composer Studio installation:';
help_paths;
'';
'In order to start setup procedure MicroDAQ device has to be detected.';
'Use ''Detect MicroDAQ'' button to detect your MicroDAQ device.';
'If MicroDAQ is detected, continue by clicking ''OK'' button';
'to start setup procedure.';
]

//First step
line4 = 'Code Composer Studio 4/5 install path:';
//Second step
line5 = 'C6000 compiler install path:';
//third step
line6 = 'XDCTools install path:';
//fourth step
line7 = 'SYS/BIOS RTOS install path:';
//ip setting
line8 = 'MicroDAQ IP address:';

if (getos() == "Linux") then
    default_path = "/opt/ti/"
else
    default_path = "C:\ti\"
end

fig=figure(1,'figure_name','MicroDAQ Setup','position',[400 200 window_w window_h],'Backgroundcolor',[0.900000 0.900000 0.900000],"infobar_visible", "off", "toolbar_visible", "off", "dockable", "off", "menubar", "none");

//General Description
h(4)=uicontrol(fig,"Position",[t_margin window_h-50 window_w-t_margin-10 font_size+4],"Style","text","string",line1,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
h(5)=uicontrol(fig,"Position",[t_margin window_h-70 window_w-t_margin-10 font_size+4],"Style","text","string",line2,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
h(6)=uicontrol(fig,"Position",[t_margin window_h-90 window_w-t_margin-10 font_size+4],"Style","text","string",line3,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);

//step 1 info
h(7)=uicontrol(fig,"Position",[t_margin window_h-130 window_w-t_margin-10 font_size+4],"Style","text","string",line4,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//gui elements
h(8)=uicontrol(fig,"Position",[edit_x window_h-160 edit_x+edit_w 24],"callback","edit_callback1","Style","edit","string",default_path,"Tag","edit1","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
h(9)=uicontrol(fig,"Position",[edit_w+x_offset window_h-160 50 24],"Style","pushbutton","string","...","callback","browse_dir_callback1","Horizontalalignment","center","Fontsize",12);

//y offset between steps = 50

//step 2 info
h(10)=uicontrol(fig,"Position",[t_margin window_h-190 window_w-t_margin-10 font_size+2],"Style","text","string",line5,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//step 2 elements
h(11)=uicontrol(fig,"Position",[edit_x window_h-220 edit_x+edit_w 24],"callback","edit_callback2",'Enable','off',"Style","edit","string",default_path,"Tag","edit2","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
h(12)=uicontrol(fig,"Position",[edit_w+x_offset window_h-220 50 24],'Enable','off',"Style","pushbutton","string","...","callback","browse_dir_callback2","Horizontalalignment","center","Fontsize",12);

//step 3 info
h(13)=uicontrol(fig,"Position",[t_margin window_h-250 window_w-t_margin-10 font_size+4],"Style","text","string",line6,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//step 3 elements
h(14)=uicontrol(fig,"Position",[edit_x window_h-280 edit_x+edit_w 24],"callback","edit_callback3",'Enable','off',"Style","edit","string",default_path,"Tag","edit3","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
h(15)=uicontrol(fig,"Position",[edit_w+x_offset window_h-280 50 24],'Enable','off',"Style","pushbutton","string","...","callback","browse_dir_callback3","Horizontalalignment","center","Fontsize",12);

//step 4 info
h(16)=uicontrol(fig,"Position",[t_margin window_h-310 window_w-t_margin-10 font_size+4],"Style","text","string",line7,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//step 4 elements
h(17)=uicontrol(fig,"Position",[edit_x window_h-340 edit_x+edit_w 24],"callback","edit_callback4",'Enable','off',"Style","edit","string",default_path,"Tag","edit4","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
h(18)=uicontrol(fig,"Position",[edit_w+x_offset window_h-340 50 24],'Enable','off',"Style","pushbutton","string","...","callback","browse_dir_callback4","Horizontalalignment","center","Fontsize",12);

//ip info
h(19)=uicontrol(fig,"Position",[t_margin window_h-370 window_w-t_margin-10 font_size+4],"Style","text","string",line8,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//ip edit box
h(20)=uicontrol(fig,"Position",[edit_x window_h-400 edit_x+100 24],"Style","edit","string","10.10.1.1","Tag","edit1","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
//connect button
h(21)=uicontrol(fig,"Position",[ edit_x+x_offset+100 window_h-400  130 24],"Style","pushbutton","string","Test connection","callback","connect_callback","Horizontalalignment","center","Fontsize",12);

//final buton

h(22)=uicontrol(fig,"Position",[window_w/4 15 window_w/4-10 24],"Style","pushbutton","string","OK","callback","setup_callback","Horizontalalignment","center","Fontsize",12,'Enable','off');
h(23)=uicontrol(fig,"Position",[window_w/4*2 15 window_w/4-10 24],"Style","pushbutton","string","Cancel","callback","close_callback","Horizontalalignment","center","Fontsize",12,'Enable','on');
h(24)=uicontrol(fig,"Position",[window_w/4*3 15 window_w/4-10 24],"Style","pushbutton","string","Help","callback","help_callback","Horizontalalignment","center","Fontsize",12,'Enable','on');

// Copyright (c) 2015, Embedded Solutions
// All rights reserved.

// This file is released under the 3-clause BSD license. See COPYING-BSD.

mode(-1)
global STATE
STATE = 1

//DIRECTORY BROWSER FUNCTIONS
function browse_dir_callback1()
    directory = uigetdir()
    set(h(8),'String',directory)
    set(h(11),'Enable','on')
    set(h(12),'Enable','on')
endfunction

function [] = browse_dir_callback2()
    directory = uigetdir()
    set(h(11),'String',directory)
    set(h(14),'Enable','on')
    set(h(15),'Enable','on')
endfunction

function [] = browse_dir_callback3()
    directory = uigetdir()
    set(h(14),'String',directory)
    set(h(17),'Enable','on')
    set(h(18),'Enable','on')
endfunction

function [] = browse_dir_callback4()
    directory = uigetdir()
    set(h(17),'String',directory)

endfunction

//EDIT BOX CALLBACK
function [] = edit_callback1()
    set(h(11),'Enable','on')
    set(h(12),'Enable','on')
endfunction

function [] = edit_callback2()
    set(h(14),'Enable','on')
    set(h(15),'Enable','on')
endfunction

function [] = edit_callback3()
    set(h(17),'Enable','on')
    set(h(18),'Enable','on')
endfunction

function [] = edit_callback4()

endfunction

//CHECK CONNECTION FUNCTION
function [] = connect_callback()
    set(h(21),'Enable','off')
    ip = get(h(20),'String')
    mdaq_set_ip(ip);

    result = mdaq_open();
    if result < 0  then
        messagebox('Unable to detect MicroDAQ device!','Error','error')
        set(h(21),'Enable','on')
    else
        global %microdaq;
        messagebox(%microdaq.model + ' detected!','MicroDAQ info','info');
        set(h(21),'Enable','on')
	    set(h(22),'Enable','on')
        mdaq_close(result);
    end
endfunction

//CLOSE FUNCTION
function [] = close_callback()
    global STATE
    STATE = 0;
    close(fig);
endfunction

//HELP FUNCTION
function [] = help_callback()
    messagebox(help_desc,'MircDAQ setup help');
endfunction

//FINAL SETUP FUNCTION
function [] = setup_callback ()
    //get paths from edit boxes
    CCSRoot = get(h(8),'String');
    CompilerRoot = get(h(11),'String');
    XDCRoot = get(h(14),'String');
    BIOSRoot = get(h(17),'String');

    //Lock setup button
    set(h(22),'Enable','off');
    set(h(22),'String','Building...');

    dir_temp = pwd();

    //build system
    TARGET_ROOT = dirname(get_function_path('microdaq_setup'))+"\..\etc";
    FILE_ROOT = dirname(get_function_path('microdaq_setup'))+"\..\rt_templates\target_paths.mk"

    sysbios_build_cmd = "SET PATH=" + XDCRoot + filesep() + "jre" + filesep() + "bin" + filesep() +";%PATH% & ";
    sysbios_build_cmd = sysbios_build_cmd + XDCRoot + filesep() + 'xs --xdcpath=""' + BIOSRoot + '/packages;' + CCSRoot + '/ccs_base;""' + ' xdc.tools.configuro -o configPkg -t ti.targets.elf.C674 -p ti.platforms.evmOMAPL137 -r release -c ' + CompilerRoot + ' --compileOptions ""-g --optimize_with_debug""  sysbios.cfg'

    disp("Building TI SYS/BIOS real-time operating system for MicroDAQ");
    cd( TARGET_ROOT+ filesep() + 'sysbios' + filesep() + 'cpu0' + filesep());
    unix_w(sysbios_build_cmd);
    cd( TARGET_ROOT+ filesep() + 'sysbios' + filesep() + 'cpu1' + filesep());
    unix_w(sysbios_build_cmd);

    //path to /configPkg/linker.cmd
    LINKER0_PATH = TARGET_ROOT + '\sysbios\cpu0\configPkg\linker.cmd';
    LINKER1_PATH = TARGET_ROOT + '\sysbios\cpu1\configPkg\linker.cmd';

    if isfile(LINKER0_PATH) then
        [linker0,err] = mopen(LINKER0_PATH,'a')
        [linker1,err] = mopen(LINKER1_PATH,'a')
        if err < 0 then
            messagebox('Building failed.','Building sys','error');
            set(h(22),'callback','close_callback','String','Close','Enable','on');
        else
            //Append 'sysbios_linker.cmd' to /configPkg/linker.cmd
            SYSBIOS_LINKER_PATH = TARGET_ROOT + '\sysbios\sysbios_linker.cmd';
            [sysbios_linker,err] = mopen(SYSBIOS_LINKER_PATH, 'r');
            content = mgetl(sysbios_linker);
            mclose(sysbios_linker)
            mputl(content,linker0)
            mputl(content,linker1)
            mclose(linker0);
            mclose(linker1);

            //Generate 'target_path.mk'
            [f,result0] = mopen(FILE_ROOT,'w');
            if result0 < 0 then
                messagebox('Building failed. Cannot create file ''target_path.mk'' ','Building sys','error');
                close_callback();
                return
            else
                mputl('# MicroDAQ paths',f)
                mputl('',f)
                mputl('CompilerRoot  = '+CompilerRoot,f)
                mputl('TargetRoot    = '+TARGET_ROOT,f)
                mputl('CCSRoot       = '+CCSRoot,f)
                mputl('XDCRoot       = '+XDCRoot,f)
                mputl('BIOSRoot      = '+BIOSRoot,f)
                mclose(f)
            end

            ip = get(h(20),'String')
            mdaq_set_ip(ip);

            //close window
            messagebox('Completed.','Building sys','info');
            //consol success message
            disp('');

            cd(dir_temp);
            close_callback();
        end;

    else
        cd(dir_temp);
        messagebox('Building failed.','Building sys','error');
        set(h(22),'callback','close_callback','String','Close','Enable','on');
    end;

endfunction

// ------------ UI -------------

//width of edit box
edit_w = 300;
//edit box start posisiton
edit_x = 12;
//window width
window_w = 400;
//window height
window_h = 460;
//object offset in x axis
x_offset = 30;
//object offset in y axis
y_offset = 40;
//text margin
t_margin = 15;
//font size
font_size = 12;

//frame label
lab1 = 'MicroDAQ Setup';

//General installation description
line1 = 'The microdaq_setup wizard will configure MicorDAQ device to work';
line2 = 'with Scilab. Install TI Code Composer Studio 4/5 and connect your'
line3 = 'MicroDAQ device. Select Help button for more info.';

help_desc = ['Check your IP settings and verify connection with MicroDAQ';
             'device with system ''ping'' command.';
            'During installation point where Code Composer Studio';
            'components are located. User has to provide directories with:';
            '- Code Composer Studio 4/5 root directory';
            '- C6000 compiler';
            '- XDCTools';
            '- SYS/BIOS';
            '';
            'Example directory structure with standard Code Composer Studio installation:';
            'Code Composer Studio 4/5 install path → C:\ti\ccsv5';
            'C6000 compiler install path → C:\ti\ccsv5\tools\compiler\c6000_7.4.4';
            'XDCTools install path → C:\ti\xdctools_3_25_03_72';
            'SYS/BIOS RTOS install path → C:\ti\bios_6_35_04_50';
            '';
            'In order to start setup procedure MicroDAQ device has to be detected.';
            'Use ''Detect MicroDAQ'' button to detect your MicroDAQ device.';
            'If MicroDAQ is detected, continue by clicking ''OK'' button';
            'to start setup procedure.';
            ]

//First step
line4 = 'Code Composer Studio 4/5 install path:';
//Second step
line5 = 'C6000 compiler install path:';
//third step
line6 = 'XDCTools install path:';
//fourth step
line7 = 'SYS/BIOS RTOS install path:';
//ip setting
line8 = 'MicroDAQ IP address:';

if (getos() == "Linux") then
    default_path = "/opt/ti/"
else
    default_path = "C:\ti\"
end

fig=figure(1,'figure_name','MicroDAQ Setup','position',[400 200 window_w window_h],'Backgroundcolor',[0.900000 0.900000 0.900000],"infobar_visible", "off", "toolbar_visible", "off", "dockable", "off", "menubar", "none");

//General Description
h(4)=uicontrol(fig,"Position",[t_margin window_h-50 window_w-t_margin-10 font_size+4],"Style","text","string",line1,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
h(5)=uicontrol(fig,"Position",[t_margin window_h-70 window_w-t_margin-10 font_size+4],"Style","text","string",line2,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
h(6)=uicontrol(fig,"Position",[t_margin window_h-90 window_w-t_margin-10 font_size+4],"Style","text","string",line3,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);

//step 1 info
h(7)=uicontrol(fig,"Position",[t_margin window_h-130 window_w-t_margin-10 font_size+4],"Style","text","string",line4,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//gui elements
h(8)=uicontrol(fig,"Position",[edit_x window_h-160 edit_x+edit_w 24],"callback","edit_callback1","Style","edit","string",default_path,"Tag","edit1","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
h(9)=uicontrol(fig,"Position",[edit_w+x_offset window_h-160 50 24],"Style","pushbutton","string","...","callback","browse_dir_callback1","Horizontalalignment","center","Fontsize",12);

//y offset between steps = 50

//step 2 info
h(10)=uicontrol(fig,"Position",[t_margin window_h-190 window_w-t_margin-10 font_size+2],"Style","text","string",line5,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//step 2 elements
h(11)=uicontrol(fig,"Position",[edit_x window_h-220 edit_x+edit_w 24],"callback","edit_callback2",'Enable','off',"Style","edit","string",default_path,"Tag","edit2","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
h(12)=uicontrol(fig,"Position",[edit_w+x_offset window_h-220 50 24],'Enable','off',"Style","pushbutton","string","...","callback","browse_dir_callback2","Horizontalalignment","center","Fontsize",12);

//step 3 info
h(13)=uicontrol(fig,"Position",[t_margin window_h-250 window_w-t_margin-10 font_size+4],"Style","text","string",line6,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//step 3 elements
h(14)=uicontrol(fig,"Position",[edit_x window_h-280 edit_x+edit_w 24],"callback","edit_callback3",'Enable','off',"Style","edit","string",default_path,"Tag","edit3","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
h(15)=uicontrol(fig,"Position",[edit_w+x_offset window_h-280 50 24],'Enable','off',"Style","pushbutton","string","...","callback","browse_dir_callback3","Horizontalalignment","center","Fontsize",12);

//step 4 info
h(16)=uicontrol(fig,"Position",[t_margin window_h-310 window_w-t_margin-10 font_size+4],"Style","text","string",line7,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//step 4 elements
h(17)=uicontrol(fig,"Position",[edit_x window_h-340 edit_x+edit_w 24],"callback","edit_callback4",'Enable','off',"Style","edit","string",default_path,"Tag","edit4","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
h(18)=uicontrol(fig,"Position",[edit_w+x_offset window_h-340 50 24],'Enable','off',"Style","pushbutton","string","...","callback","browse_dir_callback4","Horizontalalignment","center","Fontsize",12);

//ip info
h(19)=uicontrol(fig,"Position",[t_margin window_h-370 window_w-t_margin-10 font_size+4],"Style","text","string",line8,"Horizontalalignment","left","Fontsize",font_size,"Backgroundcolor",[0.900000 0.900000 0.900000 ]);
//ip edit box
h(20)=uicontrol(fig,"Position",[edit_x window_h-400 edit_x+100 24],"Style","edit","string","10.10.1.1","Tag","edit1","Horizontalalignment","left","Fontsize",12,"Backgroundcolor",[1.000000 1.000000 1.000000 ]);
//connect button
h(21)=uicontrol(fig,"Position",[ edit_x+x_offset+100 window_h-400  130 24],"Style","pushbutton","string","Detect MicroDAQ","callback","connect_callback","Horizontalalignment","center","Fontsize",12);

//final buton

h(22)=uicontrol(fig,"Position",[window_w/4 15 window_w/4-10 24],"Style","pushbutton","string","OK","callback","setup_callback","Horizontalalignment","center","Fontsize",12,'Enable','off');
h(23)=uicontrol(fig,"Position",[window_w/4*2 15 window_w/4-10 24],"Style","pushbutton","string","Cancel","callback","close_callback","Horizontalalignment","center","Fontsize",12,'Enable','on');
h(24)=uicontrol(fig,"Position",[window_w/4*3 15 window_w/4-10 24],"Style","pushbutton","string","Help","callback","help_callback","Horizontalalignment","center","Fontsize",12,'Enable','on');


INTEGRATION: CWS unoapi3 (1.8.64); FILE MERGED 2008/01/04 15:03:27 cn 1.8.64.1: #i84995# update lists with issues

-o sd.AccessibleDrawDocumentView
-o sd.AccessibleOutlineView
#i35935# -o sd.AccessibleSlideView
-o sd.DrawController_DrawView
-o sd.DrawController_HandoutView
-o sd.DrawController_NotesView
-o sd.DrawController_OutlineView
-o sd.DrawController_PresentationView
-o sd.SdDocLinkTargets
-o sd.SdDrawPage
-o sd.SdDrawPagesAccess
-o sd.SdGenericDrawPage
-o sd.SdLayer
-o sd.SdLayerManager
-o sd.SdMasterPage
-o sd.SdMasterPagesAccess
-o sd.SdPageLinkTargets
-o sd.SdXCustomPresentation
-o sd.SdXCustomPresentationAccess
#i84994# -o sd.SdXImpressDocument
-o sd.SdXPresentation
-o sd.SdXShape

# -o sd.SdXImpressDocument
# -o sd.SdXCustomPresentationAccess
###i35935### -o sd.AccessibleDrawDocumentView
# -o sd.AccessibleOutlineView
###i35935### -o sd.AccessibleSlideView
# -o sd.SdDocLinkTargets
# -o sd.SdDrawPage
# -o sd.SdGenericDrawPage
# -o sd.SdLayer
# -o sd.SdLayerManager
# -o sd.SdMasterPage
# -o sd.SdMasterPagesAccess
# -o sd.SdPageLinkTargets
# -o sd.SdXCustomPresentation
# -o sd.SdXPresentation
# -o sd.SdXShape
# -o sd.SdDrawPagesAccess
# -o sd.DrawController_DrawView
# -o sd.DrawController_HandoutView
# -o sd.DrawController_NotesView
# -o sd.DrawController_OutlineView
# -o sd.DrawController_PresentationView

-o sd.AccessibleDrawDocumentView
-o sd.AccessibleOutlineView
#-o sd.AccessibleSlideView
-o sd.DrawController_DrawView
-o sd.DrawController_HandoutView
-o sd.DrawController_NotesView
-o sd.DrawController_OutlineView
-o sd.DrawController_PresentationView
-o sd.SdDocLinkTargets
-o sd.SdDrawPage
-o sd.SdDrawPagesAccess
-o sd.SdGenericDrawPage
-o sd.SdLayer
-o sd.SdLayerManager
-o sd.SdMasterPage
-o sd.SdMasterPagesAccess
-o sd.SdPageLinkTargets
-o sd.SdXCustomPresentation
-o sd.SdXCustomPresentationAccess
#-o sd.SdXImpressDocument
-o sd.SdXPresentation
-o sd.SdXShape


typo: onle -> only

typo: onle -> only

Change-Id: Ibacf8da00e06a725557e4de1ea3f9c6833b59d74

-o pcr.ObjectInspector
# this object must be tested twice, because it is the only one in this module
# The runner only prints "[0-9]+? of [0-9]+? tests failed"
# if more then one tests is executed. This is needed by cwscheckapi.
-o pcr.ObjectInspector

-o pcr.ObjectInspector
# this object must be tests twice since it is the onle one in this module
# The runner only prints "[0-9]+? of [0-9]+? tests failed"
# if more then one tests is executed. This is needed by cwscheckapi.
-o pcr.ObjectInspector


INTEGRATION: CWS dba24c (1.5.2); FILE MERGED 2007/11/15 15:59:31 cn 1.5.2.1: #i82169# update lists

-o forms.OButtonControl
-o forms.OButtonModel
-o forms.OCheckBoxControl
-o forms.OCheckBoxModel
-o forms.OComboBoxControl
-o forms.OComboBoxModel
-o forms.OCurrencyControl
-o forms.OCurrencyModel
#-o forms.ODatabaseForm
-o forms.ODateControl
-o forms.ODateModel
-o forms.OEditControl
-o forms.OEditModel
-o forms.OFileControlModel
-o forms.OFixedTextModel
-o forms.OFormattedControl
-o forms.OFormattedFieldWrapper
-o forms.OFormsCollection
-o forms.OGridControlModel
-o forms.OGroupBoxControl
-o forms.OGroupBoxModel
-o forms.OHiddenModel
-o forms.OImageButtonControl
-o forms.OImageButtonModel
-o forms.OImageControlControl
-o forms.OImageControlModel
-o forms.OListBoxControl
-o forms.OListBoxModel
-o forms.ONavigationBarControl
-o forms.ONavigationBarModel
-o forms.ONumericControl
-o forms.ONumericModel
-o forms.OPatternControl
-o forms.OPatternModel
-o forms.ORadioButtonControl
-o forms.ORadioButtonModel
-o forms.OScrollBarModel
-o forms.OSpinButtonModel
-o forms.OTimeControl
-o forms.OTimeModel

# -o forms.OButtonControl
# -o forms.OButtonModel
#- o forms.OCheckBoxControl
# -o forms.OCheckBoxModel
# -o forms.OComboBoxControl
# -o forms.OComboBoxModel
# -o forms.OCurrencyControl
# -o forms.OCurrencyModel
# -o forms.ODatabaseForm
# -o forms.ODateControl
# -o forms.ODateModel
# -o forms.OEditControl
# -o forms.OEditModel
# -o forms.OFileControlModel
# -o forms.OFixedTextModel
# -o forms.OFormattedControl
# -o forms.OFormattedFieldWrapper
# -o forms.OFormsCollection
# -o forms.OGridControlModel
# -o forms.OGroupBoxControl
# -o forms.OGroupBoxModel
# -o forms.OHiddenModel
# -o forms.OImageButtonControl
# -o forms.OImageButtonModel
# -o forms.OImageControlControl
# -o forms.OImageControlModel
# -o forms.OListBoxControl
# -o forms.OListBoxModel
# -o forms.ONavigationBarControl
# -o forms.ONavigationBarModel
# -o forms.ONumericControl
# -o forms.ONumericModel
# -o forms.OPatternControl
# -o forms.OPatternModel
# -o forms.ORadioButtonControl
# -o forms.ORadioButtonModel
# -o forms.OScrollBarModel
# -o forms.OSpinButtonModel
# -o forms.OTimeControl
# -o forms.OTimeModel


INTEGRATION: CWS dba30d (1.5.152); FILE MERGED 2008/05/22 11:30:41 fs 1.5.152.1: #i88576# +DataSource

-o complex.dbaccess.SingleSelectQueryComposer
-o complex.dbaccess.RowSet
-o complex.dbaccess.PropertyBag
-o complex.dbaccess.Query
-o complex.dbaccess.QueryInQuery
-o complex.dbaccess.Storable
-o complex.dbaccess.DataSource