Skip to content

PMSFIT/osi-cpp

Repository files navigation

Open Simulation Interface (OSI) C++ Bindings

This C++ package provides C++ bindings for the ASAM Open Simulation Interface.

For more information on OSI see the official documentation or the class list for defined protobuf messages.

Usage

For usage examples, please refer to the official documentation:

Installation

Checkout the repository with submodules

  • Open a terminal.

  • Clone the osi-cpp repository, including sub-modules:

    git clone --recurse-submodules https://github.com/PMSFIT/osi-cpp.git
  • Switch to the repository directory:

    cd osi-cpp

Using vcpkg for dependencies

Especially for building on Windows, the use of vcpkg to handle dependencies is recommended. This can be achieved easily through the use of the CMake vcpkg preset when configuring:

In order to use the preset the environment variable VCPKG_ROOT has to be set to the root of your vcpkg installation. This can either be done manually, or through a CMake User preset that inherits from the vcpkg preset, i.e. by providing a CMakeUserPresets.json file with the following content:

{
  "version": 3,
  "configurePresets": [
    {
      "name": "default",
      "inherits": "vcpkg",
      "environment": {
        "VCPKG_ROOT": "C:\\vcpkg"
      }
    }
  ]
}

When building on windows for inclusion into a DLL, e.g. for FMU generation, you can inherit from the vcpkg-windows preset instead of the vcpkg preset to build for static linking into a DLL.

The build can then be performed in the following manner:

  • Configure the build:

    cmake --preset default
  • Perform the build:

    cmake --build build

See the vcpkg documentation for further information on the use of vcpkg in combination with CMake in various build environments.

Building without vcpkg

To build without the use of vcpkg to handle dependencies, you have to ensure that necessary prerequisites are installed and detectable by CMake.

Once this has been achieved, the build can be performed in the following manner:

  • Configure the build:

    cmake -B build
  • Perform the build:

    cmake --build build

Further information

For detailed installation instructions, please refer to the official documentation:

About

ASAM Open Simulation Interface C++ Bindings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages