Skip to content

Commit

Permalink
Merge pull request #85 from OpenSimulationInterface/antora/base-antor…
Browse files Browse the repository at this point in the history
…a-setup

Build: Create base Antora setup
  • Loading branch information
philipwindecker authored Oct 11, 2022
2 parents 1e35638 + c0f93f3 commit 1241cec
Show file tree
Hide file tree
Showing 24 changed files with 177 additions and 17 deletions.
10 changes: 10 additions & 0 deletions .antora/antora.yml
Original file line number Diff line number Diff line change
@@ -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-<branch-name> (only works for branches starting with "feature/")
(*): 'V3.6.0-$1'
22 changes: 22 additions & 0 deletions .antora/modules/sensor-model/nav.adoc
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions .antora/modules/sensor-model/pages
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<!-- TODO: Update link with new Antora hosting -->

[Open Simulation Interface (OSI)]: https://github.com/OpenSimulationInterface/open-simulation-interface

## Usage
Expand Down
52 changes: 52 additions & 0 deletions doc/_config.adoc
Original file line number Diff line number Diff line change
@@ -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::[]
4 changes: 4 additions & 0 deletions doc/misc/example.adoc
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions doc/misc/introduction.adoc
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
23 changes: 6 additions & 17 deletions doc/osi-sensor-model-packaging_spec.adoc
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -51,3 +38,5 @@ include::./setup/build_install_example.adoc[leveloffset=+2]

include::./misc/example.adoc[leveloffset=+2]

endif::[]
:!antora-mapping:
4 changes: 4 additions & 0 deletions doc/setup/build_install_example.adoc
Original file line number Diff line number Diff line change
@@ -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`:
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/basic_conventions.adoc
Original file line number Diff line number Diff line change
@@ -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].
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/binary_variables.adoc
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/ground_truth_init_parameters.adoc
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/model_types.adoc
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/sensor_data_inputs.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ifndef::include-only-once[]
:root-path: ../
include::{root-path}_config.adoc[]
endif::[]
= Sensor data inputs

**Prefix**
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/sensor_data_outputs.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ifndef::include-only-once[]
:root-path: ../
include::{root-path}_config.adoc[]
endif::[]
= Sensor data outputs

**Prefix**
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/sensor_view_input_configuration.adoc
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/sensor_view_inputs.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ifndef::include-only-once[]
:root-path: ../
include::{root-path}_config.adoc[]
endif::[]
= Sensor view inputs

**Prefix**
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/sensor_view_outputs.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ifndef::include-only-once[]
:root-path: ../
include::{root-path}_config.adoc[]
endif::[]
= Sensor view outputs

**Prefix**
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/traffic_command_inputs.adoc
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/traffic_command_update_outputs.adoc
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions doc/spec/traffic_update_outputs.adoc
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 3 additions & 0 deletions local_build_tools/asciidoctor.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@ECHO OFF
docker-compose up -d
PAUSE
8 changes: 8 additions & 0 deletions local_build_tools/compose.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions local_build_tools/windows_convert_symlinks(ADMIN).bat
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1241cec

Please sign in to comment.