edrdo / pyimc

Python bindings for Inter-Module Communication Protocol (IMC)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

License:Other


Languages

Language:Python 84.9%Language:C++ 13.8%Language:CMake 1.2%