This software package describes software designed to interface with a VME DAQBox to readout CDT Cascade detectors and interface with mgmarino/VMELinux.
The C++ libraries interface with libHardwareLib
(from CDT), allowing
configuration and readout with JSON. This is then exported to a web interface
using autobahn and a corresponding web server is run
using crossbar.io.
The Makefile
(at top level) needs to be edited to give the path to
libHardwareLib
and the associated header files. Then simply:
./configure
make
should be enough to build the files. After this, one can also start a crossbar server to begin the web and web socket servers:
crossbar start
make
This is of course assuming crossbar is installed. At this point, one should be
able to connect to the server: http://ip_of_sbc:8080
. Also, one can look at
this jsfiddle to
see an example how to build a web interface with display, etc. Note that the
jsfiddle also uses as default server 10.155.59.160, which should work if the
SBC in cluster is running.
A full screen version of the example is available here.
The code here works to essentially convert HardwareLib structs to JSON objects to enable passing them across a web interface (or from a python instance). The following structs are convertible/converted to/from JSON:
Code to run the card is available on the CASCADE detectors SBC image here. This script to start the program as a runit daemon looks simply like:
#!/bin/sh
exec sudo -u daq \
/usr/bin/crossbar start \
--cbdir /home/daq/VMEDAQBox/.crossbar \
--logdir /home/daq/VMEDAQBox/.crossbar/log