Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
Rename Periodic to Inferred clocks in FMI modelDescription
Browse files Browse the repository at this point in the history
This reflects the current proposal by the FMI working group.

Belonging to [master]:
  - #2287
  - OpenModelica/OpenModelica-testsuite#879
  • Loading branch information
rfranke authored and OpenModelica-Hudson committed Mar 17, 2018
1 parent 399b730 commit fc30ae1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Compiler/Template/CodegenFMUCommon.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
match subPartition
case SUBPARTITION(subClock=SUBCLOCK(factor=RATIONAL(nom=fsub, denom=fsuper), shift=RATIONAL(nom=snom, denom=sres))) then
<<
<Clock><Periodic
<Clock><Inferred
interval="<%realMul(bi, realDiv(intReal(fsub), intReal(fsuper)))%>"
<%if intGt(snom, 0) then 'shiftCounter="'+snom+'"'%>
<%if intGt(sres, 1) then 'resolution="'+sres+'"'%>
Expand All @@ -348,14 +348,16 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
match subPartition
case SUBPARTITION(subClock=SUBCLOCK(factor=RATIONAL(nom=fsub, denom=fsuper), shift=RATIONAL(nom=snom, denom=sres))) then
<<
<Clock><Periodic
<Clock><Inferred
intervalCounter="<%intMul(intMul(bic, fsub), sres)%>"
<%if intGt(snom, 0) then 'shiftCounter="'+intMul(intMul(snom, resi), fsuper)+'"'%>
resolution="<%intMul(intMul(resi, sres), fsuper)%>"
/></Clock>
>>
; separator="\n")
case INFERRED_CLOCK(__) then
case REAL_CLOCK()
case INTEGER_CLOCK()
case INFERRED_CLOCK() then
<<
<Clock><Inferred/></Clock>
>>
Expand Down

0 comments on commit fc30ae1

Please sign in to comment.