modelica-tools / FMUComplianceChecker

FMI Compliance Checker for validation of FMUs 1.0 and 2.0
BSD 3-Clause "New" or "Revised" License
42 stars 31 forks source link

FMUChecker missing check for optional authority in fmuResourceLocation URI #33

Open chrbertsch opened 6 years ago

chrbertsch commented 6 years ago

(moved from https://trac.fmi-standard.org/ticket/389; reported by: lausdahl)

The FMUChecker does not check if the FMU respects the FMI standard concerning the fmuResourceLocation URI for the instantiate call.

The check must check that instantiate can be called with the scheme file and a fully qualified path both with and without the authority as described in the standard:

Argument fmuResourceLocation is an URI according to the IETF RFC3986 syntax to indicate the location to the “resources” directory of the unzipped FMU archive. The following schemes must be understood by the FMU:

Mandatory: file with absolute path (either including or omitting the authority component)
Optional: http, “https”, “ftp”
Reserved: fmi2 for FMI for PLM. 

The FMU checker only tries to call it with authority. e.g. "file:///C:/temp/MyFMU/resources but it should also check that "file:/C:/temp/MyFMU/resources is accepted.

The defect was discovered when exported FMUs for the FMI standard version 2 was exported from FMI Toolbox for MATLAB/Simulink version 2.3.3 where the FMU checker reported that the FMU was ok. This as shown in the tool site for FMI.

However, they are not compliant because they only support the fmuResourceLocation with empty authority but the standard states that they must support an URI where the authority is left out.