Skip to content

Commit

Permalink
Added extra argument to sample function
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14902 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
smiz committed Jan 23, 2013
1 parent 2cc65e1 commit 3375f15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Compiler/Template/CodegenAdevs.tpl
Expand Up @@ -165,7 +165,7 @@ case SIMCODE(modelInfo = MODELINFO(varInfo = vi as VARINFO(__))) then

AdevsSampleData** samples;
int numTimeEvents() const { return <%vi.numTimeEvents%>; }
bool sample(double tStart, double tInterval, int index);
bool sample(int bogus, double tStart, double tInterval, int index);

AdevsDelayData** delays;
int numDelays() const { return <%match simCode.delayedExps case DELAYED_EXPRESSIONS(__) then maxDelayedIndex%>; }
Expand Down Expand Up @@ -516,7 +516,7 @@ case SIMCODE(modelInfo = MODELINFO(vars = vars as SIMVARS(__))) then
restore_vars();
}

bool <%lastIdentOfPath(modelInfo.name)%>::sample(double tStart, double tInterval, int index)
bool <%lastIdentOfPath(modelInfo.name)%>::sample(int bogus, double tStart, double tInterval, int index)
{
if (samples[index] == NULL)
samples[index] = new AdevsSampleData(tStart,tInterval);
Expand Down Expand Up @@ -4123,7 +4123,7 @@ template daeExpCall(Exp call, Context context, Text &preExp /*BUFP*/,
expLst={s1}, attr=CALL_ATTR(__)) then
let argStr = daeExp(s1, context, &preExp, &varDecls)
unboxRecord(argStr, attr.ty, &preExp, &varDecls)

case exp as CALL(attr=CALL_ATTR(__)) then
let argStr = (expLst |> exp => '<%daeExp(exp, context, &preExp /*BUFC*/, &varDecls /*BUFD*/)%>' ;separator=", ")
let funName = '<%underscorePath(path)%>'
Expand Down

0 comments on commit 3375f15

Please sign in to comment.