Skip to content
/ imcpy Public

Python bindings for Inter-Module Communication Protocol (IMC)

License

Notifications You must be signed in to change notification settings

oysstu/imcpy

Repository files navigation

imcpy

Python bindings for Inter-Module Communication Protocol (IMC) used to communicate between modules in the LSTS toolchain.

Installation

Pip install (PyPi)

Precompiled wheels are available from PyPi, compiled against the standard IMC message set (LSTS). If your project does not use custom IMC messages, these wheels should be sufficient.

pip install imcpy

Check the release notes or pypi for the precompiled architectures and python versions.

Source install

Clone the project recursively

git clone --recursive https://github.com/oysstu/imcpy.git

This includes the pybind11 submodule.

Build the library

python3 setup.py install

If you use the system python and only want to install for a single user, you can add --user to the install command without needing administrator rights. On Windows, the Windows SDK must be installed with Visual Studio and the CMake executable must be on the system PATH.

(Optional) Use a specific IMC/Dune version

Replace the dune/imc submodules with the target versions

(Optional) Only generate bindings for a subset of IMC messages

A config file named whitelist.cfg can be placed in the root folder to only create bindings for a subset of the IMC messages. This can be necessary when compiling on embedded systems, as the linker consumes much memory for the full message set. If an unknown message is parsed, it will be returned as the Message baseclass rather than a specialized message. Look at minimal_whitelist.cfg for a set of messages that should always be included.

Recommendations

  • The imcpy library generates stub files for the bindings, meaning that you can have autocomplete and static type checking if your IDE supports them. This can for example be PyCharm or Jedi-based editors.

About

Python bindings for Inter-Module Communication Protocol (IMC)

Resources

License

Stars

Watchers

Forks

Packages

No packages published