Skip to content
Snippets Groups Projects
Commit 29698f42 authored by Christian Koernig's avatar Christian Koernig
Browse files

Updated to SWIG 4

- added autodoc feature to swig header, enabled doxygen commenting
- It seems, SWIG needs doxygen comments in header, not source. So far, autodoc is used instead to provide at least some pydoc
parent 935b75b8
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ Additionally, a basic simulator interface can be used during DAQ logic developme
Prerequisites
-------------
- libusb1-dev
- SWIG 3 (v4 currently not supported)
- SWIG v4
- numpy
- pytango (optionally, only when using the tango server)
......
......@@ -19,8 +19,9 @@ amptek = ahi.AmptekHardwareInterface()
# To connect to a specific device, change the -1 to the serial number
# For basic tests, the simulator interface can be used, of no hardware is available.
# Use amptek.connectSimulator() instead
amptek.connectUSB(-1)
amptek.connectUSB(-1)
# amptek.connectSimulator()
......
......@@ -4,7 +4,7 @@
#define SWIG_FILE_WITH_INIT
#include "AmptekHardwareInterface.h"
%}
%feature("autodoc");
%include "numpy.i"
%include "std_string.i"
%init %{
......
......@@ -15,8 +15,8 @@ except AttributeError:
# HexitecIO extension module
_AmptekHardwareInterface = Extension("amptek_hardware_interface._AmptekHardwareInterface",
["python/amptek_hardware_interface/AmptekHardwareInterface.i",] + ["src/" + f for f in os.listdir("src") if os.path.isfile("src/" + f)],
include_dirs = [numpy_include, "include"],
swig_opts=['-c++',"-modern", "-nomodernargs" ],
include_dirs = [numpy_include, "include", "src"],
swig_opts=['-c++',"-doxygen"],
extra_compile_args = ["-std=c++11", "-g"],
libraries=["usb-1.0"]
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment