diff --git a/.antora/antora.yml b/.antora/antora.yml new file mode 100644 index 0000000..e091a64 --- /dev/null +++ b/.antora/antora.yml @@ -0,0 +1,10 @@ +# Component name (without spaces!). All content repositories with the same component name are merged in Antora. +name: asamosi +version: + # Update version number accordingly. This is the version for the main branch + main: 'current' + v(*)-antora: V$1 + v(*): V$1 + V(*): V$1 + # Update version number accordingly. This is the version for any other activated branch (branch must be added in the generator site.yml!). Schema = 0.0.x- (only works for branches starting with "feature/") + (*): 'V3.6.0-$1' diff --git a/.antora/modules/sensor-model/nav.adoc b/.antora/modules/sensor-model/nav.adoc new file mode 100644 index 0000000..fe006b5 --- /dev/null +++ b/.antora/modules/sensor-model/nav.adoc @@ -0,0 +1,22 @@ +[preface] +* xref:00_preface/00_foreword.adoc[] +[preface] +* xref:00_preface/01_introduction.adoc[] +* xref:01_scope/01_scope.adoc[] +* xref:02_normative_references/01_normative_references.adoc[] +* xref:03_terms_and_definitions/01_terms_and_definitions.adoc[] +* xref:04_abbreviations/01_abbreviations.adoc[] +* xref:05_backward_compatibility/01_backward_compatibility.adoc[] + +[appendix] +* xref:xx_annexes/REPLACE_ME.adoc[] +[bibliography] +* xref:bibliography.adoc[] + +:sectnums!: +* xref:list_of_figures.adoc[] + +:sectnums!: +* xref:list_of_tables.adoc[] + +// TODO Replace with generator \ No newline at end of file diff --git a/.antora/modules/sensor-model/pages b/.antora/modules/sensor-model/pages new file mode 120000 index 0000000..b8f7789 --- /dev/null +++ b/.antora/modules/sensor-model/pages @@ -0,0 +1 @@ +../../../doc \ No newline at end of file diff --git a/README.md b/README.md index bc3bec1..132115d 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ The specification can be found in the [doc/osi-sensor-model-packaging_spec.adoc] For more detailed information see the [official documentation](https://opensimulationinterface.github.io/osi-documentation/#_osi_sensor_model_packaging). + + [Open Simulation Interface (OSI)]: https://github.com/OpenSimulationInterface/open-simulation-interface ## Usage diff --git a/doc/_config.adoc b/doc/_config.adoc new file mode 100644 index 0000000..4e8833a --- /dev/null +++ b/doc/_config.adoc @@ -0,0 +1,52 @@ + +// This file contains AsciiDoc attributes that shall be used in every AsciiDoc file. +// NOTE: Its content is only applied for Asciidoctor! +// If the same attribute is defined in the antora.yml (without @), the antora.yml definition takes precedence for Antora. + +ifndef::root-path[:root-path: ./] + +:partials-path: {root-path}../_additional_content +:appendix-caption: Annex + +// ifndef::use-antora-rules,include-only-once[] +ifndef::include-only-once[] +:GLO_VAR_STA_ASAM_OpenCRG: ASAM OpenCRG +:glo_var_sta_asam_opencrg: {GLO_VAR_STA_ASAM_OpenCRG} +:GLO_VAR_STA_ASAM_OpenDRIVE: ASAM OpenDRIVE +:GLO_VAR_STA_ASAM_OpenLABEL: ASAM OpenLABEL +:GLO_VAR_STA_ASAM_OpenODD: ASAM OpenODD +:GLO_VAR_STA_ASAM_OSI: ASAM OSIĀ® +:GLO_VAR_STA_ASAM_OpenSCENARIO: ASAM OpenSCENARIO +:GLO_VAR_STA_ASAM_OpenXOntology: ASAM OpenXOntology +:GLO_VAR_STA_BSI_PAS_1883: BSI PAS 1883 +:revnumber: --localbuild-- +:revdate: {docdate} +:bibtex-file: ./content/general_docs/bibliography.bib +// Replace PLACEHOLDER with the name of your standard, e.g. OpenDRIVE +:THIS_STANDARD: {GLO_VAR_STA_ASAM_OSI} +:asam-terminology: https://code.asam.net/common/asam-terminology/-/raw/main/terms_and_definitions_opendrive.adoc +:imagesdir: {root-path}/images +:include-only-once: true +:topicdir: topics +:reusedir: reuse +:toclevels: 3 +:xrefstyle: full +:images_open_simulation_interface: ./open-simulation-interface/doc/images +// :images_osi-sensor-model-packaging: ./osi-sensor-model-packaging/doc/images +:doc_open_simulation_interface: ../../open-simulation-interface/doc/ +:doc_osi-sensor-model-packaging: ../../osi-sensor-model-packaging/doc/ +// Since a document spanning multiple repos is rendered here, the pathing regarding images is a bit involved. +// We create a variable for every repo that is included. It point to the repo in question. +// If the subrepo is rendered seperatly, then the variable is set to just "./images" with ifdef. +// Please note that this variable has to used in all image includes. Includes here have to use "image::./images..." +// :images_osi_sensor_model_packaging: ./osi-sensor-model-packaging/doc/images // example +:imagesoutdir: ./images/generated_images +:page-feedbackurl: https://github.com/OpenSimulationInterface/osi-sensor-model-packaging/issues/new + + +endif::[] + + +ifdef::env-gitlab[] +:relfilesuffix: .adoc +endif::[] diff --git a/doc/misc/example.adoc b/doc/misc/example.adoc index 4234e35..4803e8b 100644 --- a/doc/misc/example.adoc +++ b/doc/misc/example.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Example: Simple sensor model FMU The following example shows the content of a `modelDescription.xml` file that satisfies OSMP requirements. diff --git a/doc/misc/introduction.adoc b/doc/misc/introduction.adoc index 40ea622..45e8ae7 100644 --- a/doc/misc/introduction.adoc +++ b/doc/misc/introduction.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Introduction _OSI Sensor Model Packaging_ (OSMP) is a package layer specification for the _Open Simulation Interface_ (OSI). diff --git a/doc/osi-sensor-model-packaging_spec.adoc b/doc/osi-sensor-model-packaging_spec.adoc index 0a1e0ae..9c446f8 100644 --- a/doc/osi-sensor-model-packaging_spec.adoc +++ b/doc/osi-sensor-model-packaging_spec.adoc @@ -1,22 +1,9 @@ -ifndef::THIS_STANDARD[] - -:asciidoc-resources: ../asciidoc-resources -include::{asciidoc-resources}/preamble.adoc[] - -:revnumber: --localbuild-- -:revdate: {docdate} - -:topicdir: topics -:reusedir: reuse - -:imagesdir: . -:images_open_simulation_interface: ./images - - -endif::[] - +:root-path: ./ +include::{root-path}_config.adoc[] = OSI Sensor Model Packaging +:antora_mapping: title;numbered +ifndef::use-antora-rules[] include::./misc/introduction.adoc[leveloffset=+1] == OSMP specification @@ -51,3 +38,5 @@ include::./setup/build_install_example.adoc[leveloffset=+2] include::./misc/example.adoc[leveloffset=+2] +endif::[] +:!antora-mapping: \ No newline at end of file diff --git a/doc/setup/build_install_example.adoc b/doc/setup/build_install_example.adoc index de3aa23..a5c3d83 100644 --- a/doc/setup/build_install_example.adoc +++ b/doc/setup/build_install_example.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Building and installing examples OSMP includes three examples located in `_osmp_/examples`: diff --git a/doc/spec/basic_conventions.adoc b/doc/spec/basic_conventions.adoc index 9da1a57..ac1427b 100644 --- a/doc/spec/basic_conventions.adoc +++ b/doc/spec/basic_conventions.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Basic conventions The model shall be packaged as a valid FMU for co-simulation, as specified in the FMI 2.0 standard cite:[fmi2.0]. diff --git a/doc/spec/binary_variables.adoc b/doc/spec/binary_variables.adoc index 287b37e..fa85c95 100644 --- a/doc/spec/binary_variables.adoc +++ b/doc/spec/binary_variables.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Binary variables FMI 2.0 cite:[fmi2.0] does not directly support the efficient exchange of arbitrary binary data between FMUs. diff --git a/doc/spec/ground_truth_init_parameters.adoc b/doc/spec/ground_truth_init_parameters.adoc index 33a2080..5ebd704 100644 --- a/doc/spec/ground_truth_init_parameters.adoc +++ b/doc/spec/ground_truth_init_parameters.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Ground truth initialization parameters All models can optionally consume `osi3::GroundTruth` via an initialization parameter called `OSMPGroundTruthInit`. diff --git a/doc/spec/model_types.adoc b/doc/spec/model_types.adoc index e88cc2e..2065daa 100644 --- a/doc/spec/model_types.adoc +++ b/doc/spec/model_types.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Model types The current specification supports packaging the following model types as _Functional Mock-up Units_ (FMUs): diff --git a/doc/spec/sensor_data_inputs.adoc b/doc/spec/sensor_data_inputs.adoc index ec43eeb..d000378 100644 --- a/doc/spec/sensor_data_inputs.adoc +++ b/doc/spec/sensor_data_inputs.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Sensor data inputs **Prefix** diff --git a/doc/spec/sensor_data_outputs.adoc b/doc/spec/sensor_data_outputs.adoc index 18e46cf..4d112ec 100644 --- a/doc/spec/sensor_data_outputs.adoc +++ b/doc/spec/sensor_data_outputs.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Sensor data outputs **Prefix** diff --git a/doc/spec/sensor_view_input_configuration.adoc b/doc/spec/sensor_view_input_configuration.adoc index bd90f68..c06b644 100644 --- a/doc/spec/sensor_view_input_configuration.adoc +++ b/doc/spec/sensor_view_input_configuration.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Sensor view input configuration For each notional sensor view input variable with the base prefix `OSMPSensorViewIn`, a corresponding calculated parameter with the base prefix `OSMPSensorViewInConfigRequest` and a parameter with the base prefix `OSMPSensorViewInConfig` can exist. diff --git a/doc/spec/sensor_view_inputs.adoc b/doc/spec/sensor_view_inputs.adoc index 43de6a9..9b1f735 100644 --- a/doc/spec/sensor_view_inputs.adoc +++ b/doc/spec/sensor_view_inputs.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Sensor view inputs **Prefix** diff --git a/doc/spec/sensor_view_outputs.adoc b/doc/spec/sensor_view_outputs.adoc index 995ae98..3086b29 100644 --- a/doc/spec/sensor_view_outputs.adoc +++ b/doc/spec/sensor_view_outputs.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Sensor view outputs **Prefix** diff --git a/doc/spec/traffic_command_inputs.adoc b/doc/spec/traffic_command_inputs.adoc index 6502d33..bc318fb 100644 --- a/doc/spec/traffic_command_inputs.adoc +++ b/doc/spec/traffic_command_inputs.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Traffic command inputs Traffic command inputs are present in traffic participant models. diff --git a/doc/spec/traffic_command_update_outputs.adoc b/doc/spec/traffic_command_update_outputs.adoc index 6ebbbdc..a50a883 100644 --- a/doc/spec/traffic_command_update_outputs.adoc +++ b/doc/spec/traffic_command_update_outputs.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Traffic command update outputs Traffic command update outputs are present in traffic participant models. diff --git a/doc/spec/traffic_update_outputs.adoc b/doc/spec/traffic_update_outputs.adoc index 65e483c..c67f1a1 100644 --- a/doc/spec/traffic_update_outputs.adoc +++ b/doc/spec/traffic_update_outputs.adoc @@ -1,3 +1,7 @@ +ifndef::include-only-once[] +:root-path: ../ +include::{root-path}_config.adoc[] +endif::[] = Traffic update outputs Traffic update outputs are present in traffic participant models. diff --git a/local_build_tools/asciidoctor.bat b/local_build_tools/asciidoctor.bat new file mode 100644 index 0000000..a5dd7d2 --- /dev/null +++ b/local_build_tools/asciidoctor.bat @@ -0,0 +1,3 @@ +@ECHO OFF +docker-compose up -d +PAUSE \ No newline at end of file diff --git a/local_build_tools/compose.yml b/local_build_tools/compose.yml new file mode 100644 index 0000000..a37849c --- /dev/null +++ b/local_build_tools/compose.yml @@ -0,0 +1,8 @@ +version: "2" + +services: + asciidoctor: + image: asciidoctor/docker-asciidoctor + volumes: + - ../:/documents + entrypoint: asciidoctor --failure-level WARN -r asciidoctor-kroki -a mathjax -r asciidoctor-bibtex --trace content/index.adoc -o local_build_tools/HTML_content_local_build.html \ No newline at end of file diff --git a/local_build_tools/windows_convert_symlinks(ADMIN).bat b/local_build_tools/windows_convert_symlinks(ADMIN).bat new file mode 100644 index 0000000..e75412f --- /dev/null +++ b/local_build_tools/windows_convert_symlinks(ADMIN).bat @@ -0,0 +1,13 @@ +@ECHO OFF +SET Targetpath=..\.antora\modules\sensor-model +SET Symlinkroot=..\..\.. + +@REM mklink /D %Targetpath%\images %Symlinkroot%\doc\images + +mklink /D %Targetpath%\pages %Symlinkroot%\doc + +@REM mklink /D %Targetpath%\partials %Symlinkroot%\_additional_content + +@REM mklink /D %Targetpath%\attachments %Symlinkroot%\_attachments + +PAUSE \ No newline at end of file