Skip to content

Commit

Permalink
Use new documentation structure
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Becker <danielb.ac@me.com>
  • Loading branch information
dbeckerAC committed Jan 30, 2023
1 parent 8c2d33f commit 155cde9
Show file tree
Hide file tree
Showing 50 changed files with 1,005 additions and 627 deletions.
11 changes: 11 additions & 0 deletions .antora/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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'
master: '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: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Add @mentions of the person or team responsible for reviewing proposed changes.
- [ ] I have made corresponding changes to the [documentation](https://github.com/OpenSimulationInterface/osi-documentation) for osi-sensor-model-packaging.
- [ ] My changes generate no new warnings.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] New and existing unit tests / travis ci pass locally with my changes.
- [ ] New and existing unit tests / Github Actions pass locally with my changes.
28 changes: 28 additions & 0 deletions .github/workflows/antora-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

name: Antora build trigger

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
trigger_antora:
name: Trigger antora generator

runs-on: Ubuntu-latest

env:
MUP_KEY: ${{ secrets.MACHINE_USER_PAT }}

steps:
- name: Trigger generator
if: ${{ env.MUP_KEY != '' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.MACHINE_USER_PAT }}
event-type: antora-build-trigger
repository: OpenSimulationInterface/osi-antora-generator
client-payload: '{"src": "${{ github.repository }}", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "head_ref": "${{ github.head_ref }}"}'

62 changes: 62 additions & 0 deletions .github/workflows/protobuf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: ProtoBuf CI Builds

on:
push:
pull_request:
branches: [ master ]

# this is a test

jobs:
build-osmp-examples:
name: Build OSMP examples

runs-on: ubuntu-22.04

steps:
- name: Checkout OSI
uses: actions/checkout@v2
with:
submodules: true

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'

# cache dependencies
- name: Cache Dependencies
id: cache-depends
uses: actions/cache@v3
with:
path: protobuf-3.15.8
key: ${{ runner.os }}-v2-depends

# Download and build protobuf
- name: Download ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
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

- name: Build ProtoBuf
if: steps.cache-depends.outputs.cache-hit != 'true'
working-directory: protobuf-3.15.8
run: ./configure DIST_LANG=cpp --prefix=/usr && make

- name: Install ProtoBuf
working-directory: protobuf-3.15.8
run: sudo make install && sudo ldconfig

# prepare build
- name: Prepare C++ Build
working-directory: examples
run: mkdir build

- name: cmake prepare
working-directory: examples/build
run: cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..

- name: Build C++
working-directory: examples/build
run: cmake --build .


44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# OSI Sensor Model Packaging

[![Build Status](https://travis-ci.com/OpenSimulationInterface/osi-sensor-model-packaging.svg?branch=master)](https://travis-ci.com/OpenSimulationInterface/osi-sensor-model-packaging)
[![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)

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.
The specification can be found in the [doc/specification.rst](doc/specification.rst) document in this repository.
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.

For more detailed information see the [official documentation](https://opensimulationinterface.github.io/osi-documentation/osi-sensor-model-packaging/README.html).
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

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

##### Build and install example
##### Build examples
```bash
$ git clone https://github.com/OpenSimulationInterface/osi-sensor-model-packaging.git
$ cd osi-sensor-model-packaging
Expand All @@ -39,6 +41,5 @@ $ cd examples
$ mkdir -p build
$ cd build
$ cmake ..
$ make
$ sudo make install
$ cmake --build .
```
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::[]
9 changes: 0 additions & 9 deletions doc/examples.rst

This file was deleted.

71 changes: 71 additions & 0 deletions doc/misc/example.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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.
The example describes a sensor model FMU with one input, one output, and no additional features:

[source,xml,linenums]
----
<?xml version="1.0" encoding="UTF-8"?>
<fmiModelDescription
fmiVersion="2.0"
modelName="OSI Sensor Model Packaging Demo FMU"
guid="aabc2174e20f08597cfae6947c96bf86"
variableNamingConvention="structured">
<CoSimulation
modelIdentifier="OSMPDemoFMU"
canNotUseMemoryManagementFunctions="true"/>
<DefaultExperiment startTime="0.0" stepSize="0.020"/>
<VendorAnnotations>
<Tool name="net.pmsf.osmp" xmlns:osmp="http://xsd.pmsf.net/OSISensorModelPackaging"><osmp:osmp version="1.3.0" osi-version="3.5.0"/></Tool>
</VendorAnnotations>
<ModelVariables>
<ScalarVariable name="OSMPSensorViewIn.base.lo" valueReference="0" causality="input" variability="discrete">
<Integer start="0"/>
<Annotations>
<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>
</Annotations>
</ScalarVariable>
<ScalarVariable name="OSMPSensorViewIn.base.hi" valueReference="1" causality="input" variability="discrete">
<Integer start="0"/>
<Annotations>
<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>
</Annotations>
</ScalarVariable>
<ScalarVariable name="OSMPSensorViewIn.size" valueReference="2" causality="input" variability="discrete">
<Integer start="0"/>
<Annotations>
<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>
</Annotations>
</ScalarVariable>
<ScalarVariable name="OSMPSensorDataOut.base.lo" valueReference="3" causality="output" variability="discrete" initial="exact">
<Integer start="0"/>
<Annotations>
<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>
</Annotations>
</ScalarVariable>
<ScalarVariable name="OSMPSensorDataOut.base.hi" valueReference="4" causality="output" variability="discrete" initial="exact">
<Integer start="0"/>
<Annotations>
<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>
</Annotations>
</ScalarVariable>
<ScalarVariable name="OSMPSensorDataOut.size" valueReference="5" causality="output" variability="discrete" initial="exact">
<Integer start="0"/>
<Annotations>
<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>
</Annotations>
</ScalarVariable>
</ModelVariables>
<ModelStructure>
<Outputs>
<Unknown index="4"/>
<Unknown index="5"/>
<Unknown index="6"/>
</Outputs>
</ModelStructure>
</fmiModelDescription>
----
11 changes: 11 additions & 0 deletions doc/misc/introduction.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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).
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).

This is version 1.3.0 of this specification. The version number is to be
interpreted according to the https://semver.org/spec/v2.0.0.html[_Semantic Versioning Specification 2.0.0_].
Loading

0 comments on commit 155cde9

Please sign in to comment.