If you don't know what this is, start with: fprime-python. This example
takes the SignalGen
component and implements it in Python. There are four key files to reference:
- PyApp/SignalGen/SignalGen.py: an implementation of the component in Python!
- PyApp/SignalGen/CMakeLists.txt: the
CMakeLists.txt
for integrating a component with fprime-python bindings - PyApp/CMakeLists.txt: the
CMakeLists.txt
deployment setup for running fprime-python applications - PyApp/Top/Main.cpp: the main file including the initialization for fprime-python
In order to setup this example, run the following commands.
git clone https://github.com/LeStarch/fprime-python-examples.git
cd fprime-python-examples/
git submodule update --init --recursive
To run, follow the standard generate and build steps for fprime deployments. The deployment is in the PyApp folder.
cd PyApp
fprime-util generate
fprime-util build
Running this example should be easy as long as PYTHONPATH is set. Python files end up in the build-artifacts/python
and thus this folder must be on the PYTHONPATH when running.
cd PyApp
PYTHONPATH=`pwd`/build-artifacts/python fprime-gds