Opened 11 years ago
Closed 11 years ago
#2623 closed defect (fixed)
FMI resource location
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | FMI | Version: | trunk |
Keywords: | Cc: |
Description
In my FMU i need to load resources from the FMU resources directory. According to the FMI 1.0 spec the "fmiInstantiateSlave" has an "fmuLocation" argument, which unfortunately is rather ambigous.
==================
Argument fmuLocation is an URI according to the ietf RFC3986 syntax to indicate the access path to the FMU archive. The following protocols must be understood: (Mandatory) file:// (Optional) http(s): ftp:// (Reserved) ‘fmi://’ for fmi for PLM.
==================
This can be interpreted either as the path to the original, packed FMU, or as the path to the unpacked archive from which the FMU is being loaded. OpenModelica seem to use the former interpretation, supplying the path to the FMU file itself, whereas many other tools, including the FMU Compliance Checker provide the path to the unpacked data.
Imo, the second alternative is better as it allows the slave-module to use the already unpacked data, wheras the path to the FMU-zip requires the slave to unpack the archive a second time to be able to access the resources.
In the 2.0 version of the specification this has been cleared up and there it is required to use the path to the unpacked FMU.
Would you consider changing the implementation in OpenModelica. I would consider the "FMU Compliance Checker" to be a reference implementation.
Fixed in r20107.