C++17 & C++2a bindings for liboni
.
This is a header only library, so there is nothing to build. Just run
$ make install PREFIX=/path/to/install
to place headers in whatever path is specified by PREFIX. PREFIX defaults to
/usr/lib/include
. You can uninstall (delete headers) via
$ make uninstall PREFIX=/path/to/uninstall
When compiling programs using this library, you can use -std=c++2a
to expose
the frame_t.data
method:
template <typename raw_t>
std::span<const raw_t> data(size_t dev_idx)
Otherwise you must rely on begin()
and end()
to use frame data.
The cpponi-test directory contains minimal working programs that use this library
host_xilly
: Basic data acquisition loop. Communicate withliboni/liboni-test/firm_xilly
or actual hardware.
- Install google perftools:
$ sudo apt-get install google-perftools
- Link test programs against the CPU profiler:
$ cd cpponi-test
$ make profile
- Run the C
firmware
program to serve fake data. Provide a numerical argument specifying the number of fake frames to produce. It will tell you how long it takeshost
to sink all these frames. This is host processing time + UNIX pipe read/write.
$ cd ../liboni/liboni-test/bin
$ ./firm_xilly 10e6
- Run the
host_xilly
program while dumping profile info:
$ env CPUPROFILE=/tmp/host.prof ./host_xilly /tmp/cmd_32 /tmp/signal_8 /tmp/read_32 /tmp/write_32
- Examine output
$ google-pprof ./host_xilly /tmp/host.prof