A lightweight C library for coupling simulation agents using DDS (Data Distribution Service) middleware, to perform Co-Simulation. It abstracts all DDS communication behind a simple, opaque C API — no DDS expertise required.
HSIL CoSim couples simulation agents over a DDS network using two data types:
| Type | Purpose |
|---|---|
GroupedData |
Bulk transmission of engineering signals (with fixed-layout) |
StreamingData |
Bus frames (CAN, Ethernet) and arbitrary binary streams |
docs/ - Documentation
examples/ - Usage examples in C++ and Python
lib/ - hsil_cosim library
include/ - Single public header file <hsil/hsil.h>
src/ - Source Files
tests/ - Unit tests
third_party/ - Third party projects used by this library
To fetch the code and all third-party dependencies automatically:
git clone --recurse-submodules <repository-url>If you cloned without submodules, fetch and initialize them by running:
git submodule update --init --recursiveChoose the platform instructions matching your system:
Compile and build the library in Release mode:
# Configure the project
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
# Build targets in parallel
cmake --build build --parallel
# Install library artifacts
cmake --install build --prefix /path/to/install/dirRun the commands below from inside an x64 Native Tools Command Prompt for VS 2022/2019:
Note: For multi-config generators, build type (Debug/ Release..) must be specified during build and install
# Configure solution
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
# Compile Release configuration
cmake --build build --config Release --parallel
# Install library artifacts
cmake --install build --config Release --prefix /path/to/install/dir(For Ninja-based compilation (single config generator) on Windows, run cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release followed by cmake --build build and cmake --install build --prefix /path/to/install/dir)
For full details, please refer the documentation from sections mention below:
- API Reference - Concepts, data types, error codes, and usage
- Building & Installing - Building, installing and linking the library
- Architecture & Design - Architecture layers and key design decisions
- Developer Guidelines - Library internals (adding a new DDS vendor)
- Testing Guide - Unit test design and execution
- Examples Guide - Simple examples in C++ and Python demonstrating library usage
Copyright 2026 dSPACE SE & Co. KG
Licensed under the Apache License, Version 2.0 (the "License"); you must not use this software except in compliance with the License. This software is not fully developed or tested. It is distributed free of charge and without any consideration. The software is provided "as is" in the hope that it may be useful to other users, but without any warranty of any kind, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The License is available in LICENSE. This notice is also included in NOTICE.