Skip to content

Create python versions for all examples and add missing python bindings for devices

Daniel Joseph Antrim requested to merge dantrim_consolidate_examples into devel

What

This MR moves all examples to the src/examples directory. Previously there were a few remaining examples under src/libDevCom/examples.

Updates to examples/CMakeLists.txt

The src/examples/CMakeLists.txt file is updated to have explicit executable/target building for each example. This is in the same vein as for the main labRemote targets (tools/CMakeLists.txt).

Python versions for all examples

For all generic examples this MR adds the python version, doing more or less the same things as in the C++ version. There were a few C++ examples that did not yet have python version.

For a few, less general examples, there are no python versions since it does not make sense for the devices/etc that are being exampled to have python bindings (e.g. src/examples/uio_example.cpp).

As there are no bindings (yet) for libScope or libMeter, those examples that rely upon them are not provided with python bindings.

Add more python bindings for libDevCom

This MR also adds missing python bindings for the remaining devices in libDevCom:

  • I2CFTDICom
  • MPSSEChip
  • FT232H
  • DeviceCalibration (DummyCalibration, LinearCalibration, FileCalibration)
  • ADCDevice (AD799X, LTC2451, MAX11619, MCP3425, MCP3428)
  • DACDevice (AD56X9, DAC5571, DAC5574, MCP4801)

Several of these bindings are necessary to complete the python versions of the examples

Update the top-level README description of python bindings

The main repository's README is updated to improve the description of how to install the python bindings for labRemote.

Update examples/README

A table listing all examples, with the labRemote libraries, devices, and communication methods, is added to the README in the examples/ directory.

Here we can add further explanation and description for each of the examples, as has been already done for control_powersupply_example.

TODO

  • Explanatory readme in examples
  • Complete FTDI python bindings
  • Complete FTDI/FT232H-based examples
Edited by Daniel Joseph Antrim

Merge request reports