Skip to content

Model C Library of the DSE Core Platform.

License

Notifications You must be signed in to change notification settings

trulede/dse.modelc

 
 

Repository files navigation

Dynamic Simulation Environment - Model C Library

CI Super Linter GitHub

Introduction

Model C Library of the Dynamic Simulation Environment (DSE) Core Platform.

Project Structure

L- dse/modelc   Model C Library source code.
L- extra        Build infrastructure.
  L- tools      Containerised tools.
L- licenses     Third Party Licenses.
L- tests        Unit and integration tests.

Usage

Simulations can be run using the simer tool (part of this project).

# Define a shell function for the Simer tool.
$ export SIMER_IMAGE=ghcr.io/boschglobal/dse-simer:latest
$ simer() { ( cd "$1" && shift && docker run -it --rm -v $(pwd):/sim $SIMER_IMAGE "$@"; ) }

# Download and run a simulation ...
$ export MODELC_URL=https://github.com/boschglobal/dse.modelc/releases/download/v2.0.7/ModelC-2.0.7-linux-amd64.zip
$ curl -fSL -o /tmp/modelc.zip $MODELC_URL; unzip -d /tmp /tmp/modelc.zip
$ simer /tmp/ModelC-2.0.7-linux-amd64/examples/minimal

# OR build locally and then run an example simulation ...
$ make
$ simer dse/modelc/build/_out/examples/minimal

Documentation for the simer tool is available here : https://boschglobal.github.io/dse.doc/docs/user/simer

Build

Note : see the following section on configuring toolchains.

# Get the repo.
$ git clone https://github.com/boschglobal/dse.modelc.git
$ cd dse.modelc

# Optionally set builder images.
$ export GCC_BUILDER_IMAGE=ghcr.io/boschglobal/dse-gcc-builder:main
$ export GCC_TESTER_IMAGE=ghcr.io/boschglobal/dse-python-builder:main

# Build.
$ make

# Run tests.
$ make test

# Build containerised tools.
$ make tools
$ make docker

# Remove (clean) temporary build artifacts.
$ make clean
$ make cleanall

Toolchains

The Model C Library is built using containerised toolchains. Those are available from the DSE C Library and can be built as follows:

$ git clone https://github.com/boschglobal/dse.clib.git
$ cd dse.clib
$ make docker

Alternatively, the latest Docker Images are available on ghcr.io and can be used as follows:

$ export GCC_BUILDER_IMAGE=ghcr.io/boschglobal/dse-gcc-builder:main
$ export GCC_TESTER_IMAGE=ghcr.io/boschglobal/dse-python-builder:main

Contribute

Please refer to the CONTRIBUTING.md file.

License

Dynamic Simulation Environment Model C Library is open-sourced under the Apache-2.0 license. See the LICENSE and NOTICE files for details.

Third Party Licenses

Third Party Licenses

About

Model C Library of the DSE Core Platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 77.8%
  • CMake 7.0%
  • Python 5.3%
  • Go 4.2%
  • Dockerfile 1.8%
  • Makefile 1.7%
  • Other 2.2%