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

Commit eefcdcc

Browse files
atrosinenkoOpenModelica-Hudson
authored andcommitted
Fix String inputs/outputs handling for FMUs
Belonging to [master]: - #2625
1 parent baf7ba4 commit eefcdcc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Compiler/Template/CodegenC.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ template functionInput(SimCode simCode, ModelInfo modelInfo, String modelNamePre
16541654
{
16551655
TRACE_PUSH
16561656
1657-
<%vars.inputVars |> SIMVAR(__) hasindex i0 =>
1657+
<%vars.inputVars |> SIMVAR(name=name, type_=T_REAL()) hasindex i0 =>
16581658
'<%cref(name)%> = data->simulationInfo->inputVars[<%i0%>];'
16591659
;separator="\n"
16601660
%>
@@ -1667,7 +1667,7 @@ template functionInput(SimCode simCode, ModelInfo modelInfo, String modelNamePre
16671667
{
16681668
TRACE_PUSH
16691669
1670-
<%vars.inputVars |> SIMVAR(__) hasindex i0 =>
1670+
<%vars.inputVars |> SIMVAR(name=name, type_=T_REAL()) hasindex i0 =>
16711671
match cref2simvar(name, simCode)
16721672
case SIMVAR(aliasvar=NOALIAS()) then
16731673
'data->simulationInfo->inputVars[<%i0%>] = data->modelData-><%expTypeShort(type_)%>VarsData[<%index%>].attribute.start;'
@@ -1683,7 +1683,7 @@ template functionInput(SimCode simCode, ModelInfo modelInfo, String modelNamePre
16831683
{
16841684
TRACE_PUSH
16851685
1686-
<%vars.inputVars |> SIMVAR(__) hasindex i0 =>
1686+
<%vars.inputVars |> SIMVAR(name=name, type_=T_REAL()) hasindex i0 =>
16871687
match cref2simvar(name, simCode)
16881688
case SIMVAR(aliasvar=NOALIAS()) then
16891689
'data->modelData-><%expTypeShort(type_)%>VarsData[<%index%>].attribute.start = data->simulationInfo->inputVars[<%i0%>];'
@@ -1723,7 +1723,7 @@ template functionOutput(ModelInfo modelInfo, String modelNamePrefix)
17231723
{
17241724
TRACE_PUSH
17251725
1726-
<%vars.outputVars |> SIMVAR(__) hasindex i0 =>
1726+
<%vars.outputVars |> SIMVAR(name=name, type_=T_REAL()) hasindex i0 =>
17271727
'data->simulationInfo->outputVars[<%i0%>] = <%cref(name)%>;'
17281728
;separator="\n"
17291729
%>

0 commit comments

Comments
 (0)