Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
/ pyimc Public archive

Python bindings for Inter-Module Communication Protocol (IMC)

License

Notifications You must be signed in to change notification settings

oysstu/pyimc

Repository files navigation

Archived: this project has been moved to imcpy due to a naming conflict with another project on pypi. The new project contains pre-compiled wheels for Linux (x86_64, aarcht64) and Windows for the last three versions of CPython.

pyimc

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

Installation

Clone this project using

git clone --recursive git://github.com/oysstu/pyimc.git

This includes the pybind11 submodule.

(Optional) Use a specific IMC/Dune version

The setup checks for a folder named imc and dune in the top folder. If these are not found, they are retrieved from the LSTS repositories (master). To use a different version, simply add a folder called dune or imc, respectively, in the top folder. They will automatically be used.

Build and install using setuptools (wrapper around cmake)

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) 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 pyimc 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