Opened 9 years ago
Last modified 7 years ago
#3241 assigned defect
Cpp runtime naming conventions
Reported by: | rfranke | Owned by: | niklwors |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Cpp Run-time | Version: | trunk |
Keywords: | Cc: | niklwors |
Description
Consider
package A package B model M end M; end B; package C model M end M; end C; end A;
translateModel(A.B.M) with +simCodeTarget=Cpp generates files that have A.B.M in their names. The classes inside the files just contain M in their name. This exhibits the risk that A.B.M and A.C.M collide if they shall be linked together, e.g. in a hierarchical FMU.
Is this a bug or a feature?
One might alternatively use underscores instead of dots for class names, like A_B_M. The Cpp FMU code generation currently messes up models with dots in their names. This ticket needs to be clarified, in order to know in which direction to proceed.
Change History (10)
comment:1 Changed 9 years ago by rfranke
comment:2 Changed 9 years ago by sjoelund.se
- Milestone changed from 1.9.3 to 1.9.4
Moved to new milestone 1.9.4
comment:3 Changed 9 years ago by lochel
- Component changed from Run-time to Cpp Run-time
- Owner changed from somebody to mwalther
comment:4 Changed 9 years ago by mwalther
- Cc niklwors added
comment:5 Changed 9 years ago by mwalther
- Owner changed from mwalther to niklwors
- Status changed from new to assigned
comment:6 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.9.4 to 1.9.5
Milestone pushed to 1.9.5
comment:7 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.9.5 to 1.10.0
Milestone renamed
comment:8 Changed 7 years ago by sjoelund.se
- Milestone changed from 1.10.0 to 1.11.0
Ticket retargeted after milestone closed
comment:9 Changed 7 years ago by sjoelund.se
- Milestone changed from 1.11.0 to 1.12.0
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:10 Changed 7 years ago by casella
- Milestone changed from 1.12.0 to Future
The milestone of this ticket has been reassigned to "Future".
If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.
If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".
In both cases, a short informative comment would be welcome.
SVN r25207 fixes the FMI Cpp export to consistently using short model identifiers, like M. This makes it work with the Cpp runtime.
Shouldn't the Cpp runtime be changed to using long model identifiers though, like A_B_M?
Basically some calls to
need to be replaced with
Or should identOfPath be used and let it return long model identifiers?