Skip to content

Commit ac0ef81

Browse files
author
Marcus Walther
committed
- removed $-sign from variable/parameter names in modelDescription of c++ runtime (FMU 1.0)
1 parent 058d92c commit ac0ef81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Compiler/Template/CodegenCppInit.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ template fmiModelDescriptionAttributes(SimCode simCode, String guid)
5757
match simCode
5858
case SIMCODE(modelInfo = MODELINFO(varInfo = vi as VARINFO(__), vars = SIMVARS(stateVars = listStates))) then
5959
let fmiVersion = '1.0'
60-
let modelName = dotPath(modelInfo.name)
60+
let modelName = System.stringReplace(dotPath(modelInfo.name),"$", "_D_")
6161
let modelIdentifier = System.stringReplace(fileNamePrefix,".", "_")
6262
let description = ''
6363
let author = ''
@@ -139,7 +139,7 @@ template scalarVariableAttributeXML(SimVar simVar, HashTableCrIListArray.HashTab
139139
let description = if comment then 'description="<%Util.escapeModelicaStringToXmlString(comment)%>"'
140140
let additionalAttributes = if generateFMUModelDescription then '' else 'isProtected="<%isProtected%>"'
141141
<<
142-
name="<%Util.escapeModelicaStringToXmlString(crefStrNoUnderscore(name))%>" valueReference="<%valueReference%>" <%description%> variability="<%variability%>" causality="<%causalityAtt%>" alias="<%alias%>" <%additionalAttributes%>
142+
name="<%System.stringReplace(Util.escapeModelicaStringToXmlString(crefStrNoUnderscore(name)),"$", "_D_")%>" valueReference="<%valueReference%>" <%description%> variability="<%variability%>" causality="<%causalityAtt%>" alias="<%alias%>" <%additionalAttributes%>
143143
>>
144144
end scalarVariableAttributeXML;
145145

0 commit comments

Comments
 (0)