From 5248c4c6fb37926ae15be6feee8d85a469795034 Mon Sep 17 00:00:00 2001 From: Nick Battle Date: Sat, 14 Sep 2024 10:43:46 +0100 Subject: [PATCH] Added PDF, section and page references for FMI2 DocLinks. --- .../combined/MaestroCheckCombinationTest.java | 2 +- fmi2/rule-model/Rules/CoSimulation.adoc | 4 +-- fmi2/rule-model/Rules/DefaultExperiment.adoc | 6 ++-- .../rule-model/Rules/FmiModelDescription.adoc | 34 +++++++++---------- fmi2/rule-model/Rules/LogCategories.adoc | 2 +- fmi2/rule-model/Rules/ModelExchange.adoc | 4 +-- fmi2/rule-model/Rules/ModelStructure.adoc | 2 +- fmi2/rule-model/Rules/ModelVariables.adoc | 8 ++--- fmi2/rule-model/Rules/TypeDefinitions.adoc | 8 ++--- fmi2/rule-model/Rules/UnitDefinitions.adoc | 4 +-- fmi2/vdmcheck/src/main/java/VDMCheckPlus.java | 2 +- fmi2/vdmcheck/src/main/scripts/VDMCheck2.sh | 2 +- .../src/test/java/MaestroCheckFMI2Test.java | 2 +- 13 files changed, 40 insertions(+), 40 deletions(-) diff --git a/combined/src/test/java/combined/MaestroCheckCombinationTest.java b/combined/src/test/java/combined/MaestroCheckCombinationTest.java index 9901312..4a06b26 100644 --- a/combined/src/test/java/combined/MaestroCheckCombinationTest.java +++ b/combined/src/test/java/combined/MaestroCheckCombinationTest.java @@ -61,7 +61,7 @@ public void testFMI2() throws Exception errors.get(0).message); Assert.assertTrue(errors.get(0).doclinks != null); Assert.assertEquals( - "#_definition_of_the_model_structure_modelstructure\n", + " Section 2.2.8, Page 58\n", errors.get(0).doclinks.get(0).toString()); errors = checker.check(null, build, null); diff --git a/fmi2/rule-model/Rules/CoSimulation.adoc b/fmi2/rule-model/Rules/CoSimulation.adoc index 38dcc6c..4b1ca99 100644 --- a/fmi2/rule-model/Rules/CoSimulation.adoc +++ b/fmi2/rule-model/Rules/CoSimulation.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_header_files_and_naming_of_functions") +-- @DocLink(" Section 2.1.1, Page 14") // {vdm} endif::[] // {vdm} @@ -31,7 +31,7 @@ See <<_header_files_and_naming_of_functions>> ifdef::hidden[] // {vdm} --- @DocLink("#_header_files_and_naming_of_functions") +-- @DocLink(" Section 2.1.1, Page 14") // {vdm} endif::[] // {vdm} diff --git a/fmi2/rule-model/Rules/DefaultExperiment.adoc b/fmi2/rule-model/Rules/DefaultExperiment.adoc index 8d8c924..d9cff6d 100644 --- a/fmi2/rule-model/Rules/DefaultExperiment.adoc +++ b/fmi2/rule-model/Rules/DefaultExperiment.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_a_default_experiment_defaultexperiment") +-- @DocLink(" Section 2.2.5, Page 45") // {vdm} endif::[] // {vdm} @@ -30,7 +30,7 @@ See <<_definition_of_a_default_experiment_defaultexperiment>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_a_default_experiment_defaultexperiment") +-- @DocLink(" Section 2.2.5, Page 45") // {vdm} endif::[] // {vdm} @@ -48,7 +48,7 @@ See <<_definition_of_a_default_experiment_defaultexperiment>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_a_default_experiment_defaultexperiment") +-- @DocLink(" Section 2.2.5, Page 45") // {vdm} endif::[] // {vdm} diff --git a/fmi2/rule-model/Rules/FmiModelDescription.adoc b/fmi2/rule-model/Rules/FmiModelDescription.adoc index 6109bcb..f114ddf 100644 --- a/fmi2/rule-model/Rules/FmiModelDescription.adoc +++ b/fmi2/rule-model/Rules/FmiModelDescription.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_inquire_platform_and_version_number_of_header_files") +-- @DocLink(" Section 2.1.4, Page 19") // {vdm} endif::[] // {vdm} @@ -31,7 +31,7 @@ See <<_inquire_platform_and_version_number_of_header_files>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_vendor_annotations_vendorannotations") +-- @DocLink(" Section 2.2.6, Page 45") // {vdm} endif::[] // {vdm} @@ -54,7 +54,7 @@ See <<_definition_of_vendor_annotations_vendorannotations>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_an_fmu_fmimodeldescription") +-- @DocLink(" Section 2.2.1, Page 31") // {vdm} endif::[] // {vdm} @@ -72,7 +72,7 @@ See <<_definition_of_an_fmu_fmimodeldescription>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_an_fmu_fmimodeldescription") +-- @DocLink(" Section 2.2.1, Page 31") // {vdm} endif::[] // {vdm} @@ -91,7 +91,7 @@ See <<_definition_of_an_fmu_fmimodeldescription>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_types_typedefinitions") +-- @DocLink(" Section 2.2.3, Page 40") // {vdm} endif::[] // {vdm} @@ -117,8 +117,8 @@ See <<_definition_of_types_typedefinitions>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") --- @DocLink("#_definition_of_types_typedefinitions") +-- @DocLink(" Section 2.2.7, Page 46") +-- @DocLink(" Section 2.2.3, Page 40") // {vdm} endif::[] // {vdm} @@ -148,7 +148,7 @@ validVariableTypes(fmd) == allOf ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_types_typedefinitions") +-- @DocLink(" Section 2.2.3, Page 40") // {vdm} endif::[] // {vdm} @@ -171,7 +171,7 @@ See <<_definition_of_types_typedefinitions>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} @@ -199,7 +199,7 @@ See <<_definition_of_model_variables_modelvariables>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} @@ -232,7 +232,7 @@ See <<_definition_of_model_variables_modelvariables>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_types_typedefinitions") +-- @DocLink(" Section 2.2.3, Page 40") // {vdm} endif::[] // {vdm} @@ -275,7 +275,7 @@ See <<_definition_of_types_typedefinitions>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} @@ -299,7 +299,7 @@ See <<_definition_of_model_variables_modelvariables>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} @@ -324,7 +324,7 @@ See <<_definition_of_model_variables_modelvariables>> ifdef::hidden[] // {vdm} --- @DocLink("#table-variableBase-attributes") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} @@ -356,7 +356,7 @@ See <> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_the_model_structure_modelstructure") +-- @DocLink(" Section 2.2.8, Page 58") // {vdm} endif::[] // {vdm} @@ -394,7 +394,7 @@ See <<_definition_of_the_model_structure_modelstructure>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_the_model_structure_modelstructure") +-- @DocLink(" Section 2.2.8, Page 58") // {vdm} endif::[] // {vdm} @@ -428,7 +428,7 @@ See <<_definition_of_the_model_structure_modelstructure>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_the_model_structure_modelstructure") +-- @DocLink(" Section 2.2.8, Page 58") // {vdm} endif::[] // {vdm} diff --git a/fmi2/rule-model/Rules/LogCategories.adoc b/fmi2/rule-model/Rules/LogCategories.adoc index b91e283..a0b1628 100644 --- a/fmi2/rule-model/Rules/LogCategories.adoc +++ b/fmi2/rule-model/Rules/LogCategories.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_log_categories_logcategories") +-- @DocLink(" Section 2.2.4, Page 44") // {vdm} endif::[] // {vdm} diff --git a/fmi2/rule-model/Rules/ModelExchange.adoc b/fmi2/rule-model/Rules/ModelExchange.adoc index 69afa35..0cc5693 100644 --- a/fmi2/rule-model/Rules/ModelExchange.adoc +++ b/fmi2/rule-model/Rules/ModelExchange.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_model_exchange_fmu_modelexchange") +-- @DocLink(" Section 3.3.1, Page 94") // {vdm} endif::[] // {vdm} @@ -31,7 +31,7 @@ See <<_model_exchange_fmu_modelexchange>> ifdef::hidden[] // {vdm} --- @DocLink("#_header_files_and_naming_of_functions") +-- @DocLink(" Section 2.1.1, Page 14") // {vdm} endif::[] // {vdm} diff --git a/fmi2/rule-model/Rules/ModelStructure.adoc b/fmi2/rule-model/Rules/ModelStructure.adoc index ae46f12..b6a731c 100644 --- a/fmi2/rule-model/Rules/ModelStructure.adoc +++ b/fmi2/rule-model/Rules/ModelStructure.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_the_model_structure_modelstructure") +-- @DocLink(" Section 2.2.8, Page 58") // {vdm} endif::[] // {vdm} diff --git a/fmi2/rule-model/Rules/ModelVariables.adoc b/fmi2/rule-model/Rules/ModelVariables.adoc index d80bb5a..0139120 100644 --- a/fmi2/rule-model/Rules/ModelVariables.adoc +++ b/fmi2/rule-model/Rules/ModelVariables.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} @@ -77,7 +77,7 @@ See <<_definition_of_model_variables_modelvariables>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} @@ -96,7 +96,7 @@ See <<_definition_of_model_variables_modelvariables>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} @@ -127,7 +127,7 @@ See <<_definition_of_model_variables_modelvariables>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_model_variables_modelvariables") +-- @DocLink(" Section 2.2.7, Page 46") // {vdm} endif::[] // {vdm} diff --git a/fmi2/rule-model/Rules/TypeDefinitions.adoc b/fmi2/rule-model/Rules/TypeDefinitions.adoc index 4e5a5ad..2b55637 100644 --- a/fmi2/rule-model/Rules/TypeDefinitions.adoc +++ b/fmi2/rule-model/Rules/TypeDefinitions.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_types_typedefinitions") +-- @DocLink(" Section 2.2.3, Page 40") // {vdm} endif::[] // {vdm} @@ -32,7 +32,7 @@ See <<_definition_of_types_typedefinitions>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_types_typedefinitions") +-- @DocLink(" Section 2.2.3, Page 40") // {vdm} endif::[] // {vdm} @@ -59,7 +59,7 @@ See <<_definition_of_types_typedefinitions>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_types_typedefinitions") +-- @DocLink(" Section 2.2.3, Page 40") // {vdm} endif::[] // {vdm} @@ -79,7 +79,7 @@ See <<_definition_of_types_typedefinitions>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_types_typedefinitions") +-- @DocLink(" Section 2.2.3, Page 40") // {vdm} endif::[] // {vdm} diff --git a/fmi2/rule-model/Rules/UnitDefinitions.adoc b/fmi2/rule-model/Rules/UnitDefinitions.adoc index a5f889b..dd5b8e3 100644 --- a/fmi2/rule-model/Rules/UnitDefinitions.adoc +++ b/fmi2/rule-model/Rules/UnitDefinitions.adoc @@ -12,7 +12,7 @@ endif::[] ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_units_unitdefinitions") +-- @DocLink(" Section 2.2.2, Page 35") // {vdm} endif::[] // {vdm} @@ -31,7 +31,7 @@ See <<_definition_of_units_unitdefinitions>> ifdef::hidden[] // {vdm} --- @DocLink("#_definition_of_units_unitdefinitions") +-- @DocLink(" Section 2.2.2, Page 35") // {vdm} endif::[] // {vdm} diff --git a/fmi2/vdmcheck/src/main/java/VDMCheckPlus.java b/fmi2/vdmcheck/src/main/java/VDMCheckPlus.java index f47e6c1..1f571fb 100644 --- a/fmi2/vdmcheck/src/main/java/VDMCheckPlus.java +++ b/fmi2/vdmcheck/src/main/java/VDMCheckPlus.java @@ -49,7 +49,7 @@ public static void main(String[] args) File filename = null; String vdmOUT = null; String xmlIN = null; - String prefix = "https://fmi-standard.org/docs/3.0/"; + String prefix = "https://github.com/modelica/fmi-standard/releases/download/v2.0.4/FMI-Specification-2.0.4.pdf"; for (int a=0; a < args.length; a++) { diff --git a/fmi2/vdmcheck/src/main/scripts/VDMCheck2.sh b/fmi2/vdmcheck/src/main/scripts/VDMCheck2.sh index 6ed085a..e696852 100755 --- a/fmi2/vdmcheck/src/main/scripts/VDMCheck2.sh +++ b/fmi2/vdmcheck/src/main/scripts/VDMCheck2.sh @@ -60,7 +60,7 @@ fi if [ -z "$LINK2" ] then - LINK2="https://fmi-standard.org/docs/2.0/" + LINK2="https://github.com/modelica/fmi-standard/releases/download/v2.0.4/FMI-Specification-2.0.4.pdf" fi if [ -z "$LINK3" ] diff --git a/fmi2/vdmcheck/src/test/java/MaestroCheckFMI2Test.java b/fmi2/vdmcheck/src/test/java/MaestroCheckFMI2Test.java index 633bcfe..bc8f87e 100644 --- a/fmi2/vdmcheck/src/test/java/MaestroCheckFMI2Test.java +++ b/fmi2/vdmcheck/src/test/java/MaestroCheckFMI2Test.java @@ -35,7 +35,7 @@ public void test() throws Exception errors.get(0).message); Assert.assertTrue(errors.get(0).doclinks != null); Assert.assertEquals( - "#_definition_of_the_model_structure_modelstructure\n", + " Section 2.2.8, Page 58\n", errors.get(0).doclinks.get(0).toString()); errors = checker.check(null, build, null);