Skip to content

Commit 155cde9

Browse files
committed
Use new documentation structure
Signed-off-by: Daniel Becker <[email protected]>
1 parent 8c2d33f commit 155cde9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1005
-627
lines changed

.antora/antora.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Component name (without spaces!). All content repositories with the same component name are merged in Antora.
2+
name: asamosi
3+
version:
4+
# Update version number accordingly. This is the version for the main branch
5+
main: 'current'
6+
master: 'current'
7+
v(*)-antora: V$1
8+
v(*): V$1
9+
V(*): V$1
10+
# 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/")
11+
(*): 'V3.6.0-$1'

.antora/modules/sensor-model/nav.adoc

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[preface]
2+
* xref:00_preface/00_foreword.adoc[]
3+
[preface]
4+
* xref:00_preface/01_introduction.adoc[]
5+
* xref:01_scope/01_scope.adoc[]
6+
* xref:02_normative_references/01_normative_references.adoc[]
7+
* xref:03_terms_and_definitions/01_terms_and_definitions.adoc[]
8+
* xref:04_abbreviations/01_abbreviations.adoc[]
9+
* xref:05_backward_compatibility/01_backward_compatibility.adoc[]
10+
11+
[appendix]
12+
* xref:xx_annexes/REPLACE_ME.adoc[]
13+
[bibliography]
14+
* xref:bibliography.adoc[]
15+
16+
:sectnums!:
17+
* xref:list_of_figures.adoc[]
18+
19+
:sectnums!:
20+
* xref:list_of_tables.adoc[]
21+
22+
// TODO Replace with generator

.antora/modules/sensor-model/pages

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../doc

.github/pull_request_template.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ Add @mentions of the person or team responsible for reviewing proposed changes.
1919
- [ ] I have made corresponding changes to the [documentation](https://github.com/OpenSimulationInterface/osi-documentation) for osi-sensor-model-packaging.
2020
- [ ] My changes generate no new warnings.
2121
- [ ] I have added tests that prove my fix is effective or that my feature works.
22-
- [ ] New and existing unit tests / travis ci pass locally with my changes.
22+
- [ ] New and existing unit tests / Github Actions pass locally with my changes.
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
name: Antora build trigger
3+
4+
on:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
trigger_antora:
12+
name: Trigger antora generator
13+
14+
runs-on: Ubuntu-latest
15+
16+
env:
17+
MUP_KEY: ${{ secrets.MACHINE_USER_PAT }}
18+
19+
steps:
20+
- name: Trigger generator
21+
if: ${{ env.MUP_KEY != '' }}
22+
uses: peter-evans/repository-dispatch@v2
23+
with:
24+
token: ${{ secrets.MACHINE_USER_PAT }}
25+
event-type: antora-build-trigger
26+
repository: OpenSimulationInterface/osi-antora-generator
27+
client-payload: '{"src": "${{ github.repository }}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "head_ref": "${{ github.head_ref }}"}'
28+

.github/workflows/protobuf.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: ProtoBuf CI Builds
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ master ]
7+
8+
# this is a test
9+
10+
jobs:
11+
build-osmp-examples:
12+
name: Build OSMP examples
13+
14+
runs-on: ubuntu-22.04
15+
16+
steps:
17+
- name: Checkout OSI
18+
uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
22+
- name: Setup Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: '3.7'
26+
27+
# cache dependencies
28+
- name: Cache Dependencies
29+
id: cache-depends
30+
uses: actions/cache@v3
31+
with:
32+
path: protobuf-3.15.8
33+
key: ${{ runner.os }}-v2-depends
34+
35+
# Download and build protobuf
36+
- name: Download ProtoBuf
37+
if: steps.cache-depends.outputs.cache-hit != 'true'
38+
run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protobuf-all-3.15.8.tar.gz && tar xzvf protobuf-all-3.15.8.tar.gz
39+
40+
- name: Build ProtoBuf
41+
if: steps.cache-depends.outputs.cache-hit != 'true'
42+
working-directory: protobuf-3.15.8
43+
run: ./configure DIST_LANG=cpp --prefix=/usr && make
44+
45+
- name: Install ProtoBuf
46+
working-directory: protobuf-3.15.8
47+
run: sudo make install && sudo ldconfig
48+
49+
# prepare build
50+
- name: Prepare C++ Build
51+
working-directory: examples
52+
run: mkdir build
53+
54+
- name: cmake prepare
55+
working-directory: examples/build
56+
run: cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
57+
58+
- name: Build C++
59+
working-directory: examples/build
60+
run: cmake --build .
61+
62+

.travis.yml

-44
This file was deleted.

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# OSI Sensor Model Packaging
22

3-
[![Build Status](https://travis-ci.com/OpenSimulationInterface/osi-sensor-model-packaging.svg?branch=master)](https://travis-ci.com/OpenSimulationInterface/osi-sensor-model-packaging)
3+
[![ProtoBuf CI Builds](https://github.com/OpenSimulationInterface/osi-sensor-model-packaging/actions/workflows/protobuf.yml/badge.svg)](https://github.com/OpenSimulationInterface/osi-sensor-model-packaging/actions/workflows/protobuf.yml)
44

55
OSI Sensor Model Packaging specifies ways in which models (like e.g. environmental effect models, sensor models and logical models) using the [Open Simulation Interface (OSI)][] are to be packaged for their use in simulation environments using FMI 2.0.
6-
The specification can be found in the [doc/specification.rst](doc/specification.rst) document in this repository.
6+
The specification can be found in the [doc/osi-sensor-model-packaging_spec.adoc](doc/osi-sensor-model-packaging_spec.adoc) document in this repository.
77

8-
For more detailed information see the [official documentation](https://opensimulationinterface.github.io/osi-documentation/osi-sensor-model-packaging/README.html).
8+
For more detailed information see the [official documentation](https://opensimulationinterface.github.io/osi-documentation/#_osi_sensor_model_packaging).
9+
10+
<!-- TODO: Update link with new Antora hosting -->
911

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

@@ -30,7 +32,7 @@ Install `protobuf` 3.0.0:
3032
$ sudo apt-get install libprotobuf-dev protobuf-compiler
3133
```
3234

33-
##### Build and install example
35+
##### Build examples
3436
```bash
3537
$ git clone https://github.com/OpenSimulationInterface/osi-sensor-model-packaging.git
3638
$ cd osi-sensor-model-packaging
@@ -39,6 +41,5 @@ $ cd examples
3941
$ mkdir -p build
4042
$ cd build
4143
$ cmake ..
42-
$ make
43-
$ sudo make install
44+
$ cmake --build .
4445
```

doc/_config.adoc

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
// This file contains AsciiDoc attributes that shall be used in every AsciiDoc file.
3+
// NOTE: Its content is only applied for Asciidoctor!
4+
// If the same attribute is defined in the antora.yml (without @), the antora.yml definition takes precedence for Antora.
5+
6+
ifndef::root-path[:root-path: ./]
7+
8+
:partials-path: {root-path}../_additional_content
9+
:appendix-caption: Annex
10+
11+
// ifndef::use-antora-rules,include-only-once[]
12+
ifndef::include-only-once[]
13+
:GLO_VAR_STA_ASAM_OpenCRG: ASAM OpenCRG
14+
:glo_var_sta_asam_opencrg: {GLO_VAR_STA_ASAM_OpenCRG}
15+
:GLO_VAR_STA_ASAM_OpenDRIVE: ASAM OpenDRIVE
16+
:GLO_VAR_STA_ASAM_OpenLABEL: ASAM OpenLABEL
17+
:GLO_VAR_STA_ASAM_OpenODD: ASAM OpenODD
18+
:GLO_VAR_STA_ASAM_OSI: ASAM OSI®
19+
:GLO_VAR_STA_ASAM_OpenSCENARIO: ASAM OpenSCENARIO
20+
:GLO_VAR_STA_ASAM_OpenXOntology: ASAM OpenXOntology
21+
:GLO_VAR_STA_BSI_PAS_1883: BSI PAS 1883
22+
:revnumber: --localbuild--
23+
:revdate: {docdate}
24+
:bibtex-file: ./content/general_docs/bibliography.bib
25+
// Replace PLACEHOLDER with the name of your standard, e.g. OpenDRIVE
26+
:THIS_STANDARD: {GLO_VAR_STA_ASAM_OSI}
27+
:asam-terminology: https://code.asam.net/common/asam-terminology/-/raw/main/terms_and_definitions_opendrive.adoc
28+
:imagesdir: {root-path}/images
29+
:include-only-once: true
30+
:topicdir: topics
31+
:reusedir: reuse
32+
:toclevels: 3
33+
:xrefstyle: full
34+
:images_open_simulation_interface: ./open-simulation-interface/doc/images
35+
// :images_osi-sensor-model-packaging: ./osi-sensor-model-packaging/doc/images
36+
:doc_open_simulation_interface: ../../open-simulation-interface/doc/
37+
:doc_osi-sensor-model-packaging: ../../osi-sensor-model-packaging/doc/
38+
// Since a document spanning multiple repos is rendered here, the pathing regarding images is a bit involved.
39+
// We create a variable for every repo that is included. It point to the repo in question.
40+
// If the subrepo is rendered seperatly, then the variable is set to just "./images" with ifdef.
41+
// Please note that this variable has to used in all image includes. Includes here have to use "image::./images..."
42+
// :images_osi_sensor_model_packaging: ./osi-sensor-model-packaging/doc/images // example
43+
:imagesoutdir: ./images/generated_images
44+
:page-feedbackurl: https://github.com/OpenSimulationInterface/osi-sensor-model-packaging/issues/new
45+
46+
47+
endif::[]
48+
49+
50+
ifdef::env-gitlab[]
51+
:relfilesuffix: .adoc
52+
endif::[]

doc/examples.rst

-9
This file was deleted.

doc/misc/example.adoc

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
ifndef::include-only-once[]
2+
:root-path: ../
3+
include::{root-path}_config.adoc[]
4+
endif::[]
5+
= Example: Simple sensor model FMU
6+
7+
The following example shows the content of a `modelDescription.xml` file that satisfies OSMP requirements.
8+
The example describes a sensor model FMU with one input, one output, and no additional features:
9+
10+
[source,xml,linenums]
11+
----
12+
<?xml version="1.0" encoding="UTF-8"?>
13+
<fmiModelDescription
14+
fmiVersion="2.0"
15+
modelName="OSI Sensor Model Packaging Demo FMU"
16+
guid="aabc2174e20f08597cfae6947c96bf86"
17+
variableNamingConvention="structured">
18+
<CoSimulation
19+
modelIdentifier="OSMPDemoFMU"
20+
canNotUseMemoryManagementFunctions="true"/>
21+
<DefaultExperiment startTime="0.0" stepSize="0.020"/>
22+
<VendorAnnotations>
23+
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp version="1.3.0" osi-version="3.5.0"/></Tool>
24+
</VendorAnnotations>
25+
<ModelVariables>
26+
<ScalarVariable name="OSMPSensorViewIn.base.lo" valueReference="0" causality="input" variability="discrete">
27+
<Integer start="0"/>
28+
<Annotations>
29+
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorViewIn" role="base.lo" mime-type="application/x-open-simulation-interface; type=SensorView; version=3.5.0"/></Tool>
30+
</Annotations>
31+
</ScalarVariable>
32+
<ScalarVariable name="OSMPSensorViewIn.base.hi" valueReference="1" causality="input" variability="discrete">
33+
<Integer start="0"/>
34+
<Annotations>
35+
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorViewIn" role="base.hi" mime-type="application/x-open-simulation-interface; type=SensorView; version=3.5.0"/></Tool>
36+
</Annotations>
37+
</ScalarVariable>
38+
<ScalarVariable name="OSMPSensorViewIn.size" valueReference="2" causality="input" variability="discrete">
39+
<Integer start="0"/>
40+
<Annotations>
41+
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorViewIn" role="size" mime-type="application/x-open-simulation-interface; type=SensorView; version=3.5.0"/></Tool>
42+
</Annotations>
43+
</ScalarVariable>
44+
<ScalarVariable name="OSMPSensorDataOut.base.lo" valueReference="3" causality="output" variability="discrete" initial="exact">
45+
<Integer start="0"/>
46+
<Annotations>
47+
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorDataOut" role="base.lo" mime-type="application/x-open-simulation-interface; type=SensorData; version=3.5.0"/></Tool>
48+
</Annotations>
49+
</ScalarVariable>
50+
<ScalarVariable name="OSMPSensorDataOut.base.hi" valueReference="4" causality="output" variability="discrete" initial="exact">
51+
<Integer start="0"/>
52+
<Annotations>
53+
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorDataOut" role="base.hi" mime-type="application/x-open-simulation-interface; type=SensorData; version=3.5.0"/></Tool>
54+
</Annotations>
55+
</ScalarVariable>
56+
<ScalarVariable name="OSMPSensorDataOut.size" valueReference="5" causality="output" variability="discrete" initial="exact">
57+
<Integer start="0"/>
58+
<Annotations>
59+
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp-binary-variable name="OSMPSensorDataOut" role="size" mime-type="application/x-open-simulation-interface; type=SensorData; version=3.5.0"/></Tool>
60+
</Annotations>
61+
</ScalarVariable>
62+
</ModelVariables>
63+
<ModelStructure>
64+
<Outputs>
65+
<Unknown index="4"/>
66+
<Unknown index="5"/>
67+
<Unknown index="6"/>
68+
</Outputs>
69+
</ModelStructure>
70+
</fmiModelDescription>
71+
----

doc/misc/introduction.adoc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ifndef::include-only-once[]
2+
:root-path: ../
3+
include::{root-path}_config.adoc[]
4+
endif::[]
5+
= Introduction
6+
7+
_OSI Sensor Model Packaging_ (OSMP) is a package layer specification for the _Open Simulation Interface_ (OSI).
8+
It specifies how models that use OSI are packaged as _Functional Mock-up Units_ (FMUs) in accordance with the _Functional Mock-up Interface 2.0_ (FMI 2.0).
9+
10+
This is version 1.3.0 of this specification. The version number is to be
11+
interpreted according to the https://semver.org/spec/v2.0.0.html[_Semantic Versioning Specification 2.0.0_].

0 commit comments

Comments
 (0)