Skip to content

Commit

Permalink
- added the new output_type to the list of default runtime parameters…
Browse files Browse the repository at this point in the history
… (cpp-runtime)

- removed some unused code
  • Loading branch information
Marcus Walther committed Dec 4, 2015
1 parent df90683 commit 3524221
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -328,9 +328,6 @@ template simulationWriteOutputHeaderFile(SimCode simCode ,Text& extraFuncs,Text&
::=
match simCode
case SIMCODE(modelInfo=MODELINFO(__),simulationSettingsOpt = SOME(settings as SIMULATION_SETTINGS(__))) then
let n = numProtectedParamVars(modelInfo)
let outputtype = match settings.outputFormat case "mat" then "MatFileWriter" case "buffer" then "BufferReaderWriter" else "TextFileWriter"
let numparams = match settings.outputFormat case "csv" then "1" else n
<<
#pragma once

Expand Down Expand Up @@ -2214,6 +2211,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
let moLib = makefileParams.compileDir
let home = makefileParams.omhome
let &includeMeasure = buffer "" /*BUFD*/
let outputtype = settings.outputFormat
<<
#include <Core/ModelicaDefine.h>
#include <Core/Modelica.h>
Expand Down Expand Up @@ -2285,6 +2283,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
opts["-G"] = "<%intervals%>";
opts["-T"] = "<%tol%>";
opts["-I"] = "<%solver%>";
opts["-P"] = "<%outputtype%>";
opts["-R"] = "<%simulationLibDir(simulationCodeTarget(),simCode , &extraFuncs , &extraFuncsDecl, extraFuncsNamespace)%>";
opts["-M"] = "<%moLib%>";
opts["-F"] = "<%simulationResults(getRunningTestsuite(),simCode , &extraFuncs , &extraFuncsDecl, extraFuncsNamespace)%>";
Expand Down
Expand Up @@ -110,7 +110,7 @@ SimSettings OMCFactory::readSimulationParameter(int argc, const char* argv[])
("log-settings,V", po::value< vector<string> >(), "log information: init, nls, ls, solv, output, event, model, other")
("alarm,A", po::value<unsigned int >()->default_value(360), "sets timeout in seconds for simulation")
("output-type,O", po::value< string >()->default_value("all"), "the points in time written to result file: all (output steps + events), step (just output points), none")
("output-format,P", po::value< string >()->default_value("mat"), "The simulation results output format")
("output-format,P", po::value< string >()->default_value("mat"), "The simulation results output format")
;

// a group for all options that should not be visible if '--help' is set
Expand Down

0 comments on commit 3524221

Please sign in to comment.