Interface to MeasurementComputing devices using libusb for cross-platform usability.
This is a linux interface for MeasurementComputing DAQs found here.
I have made a few modifications (see commit history).
- Added support for USB-1608FS-PLUS
- Removed some redundant code.
- Removed need for stringutil.h. Moved datatypesandstatics.h into mccdevice.h
- Per-channel gain and slope. Moved these into device properties.
- Got rid of asynchronous polling (for now) because it relied on POSIX-only threading.
- Removed all the firmware flashing because the firmware location was hard-coded.
TODO:
- Setters and getters for channels/rate/range
- Platform-independent threading for asynchronous polling.
-
Install libusb-1.0. On OSX use homebrew, it is easier.
-
Include mccdevice.h into your project.
#include "mccdevice.h"
-
Compile your project.
-
SynchTest on OSX
- Compile A (libusb is on your path):
g++ -std=c++11 -o synchTest synchTest.cpp mccdevice.cpp -lusb-1.0
- OR Compile B (libusb is not on your path):
g++ -std=c++11 -o synchTest synchTest.cpp mccdevice.cpp -I/usr/local/include/libusb-1.0/ -L/usr/local/lib -lusb-1.0
- Test:
./synchTest
- Compile A (libusb is on your path):
-
LabStreamingLayer (OSX)
- Compile:
g++ -std=c++11 -o lslTest lslTest.cpp mccdevice.cpp -I/usr/local/include/libusb-1.0/ -I./lsl -L/usr/local/lib -lusb-1.0 -L./lsl -llsl64
- Test:
./lslTest
. Note that liblsl64.(so|dylib|a|lib|dll) must be installed to run. It is not sufficient to copy it locally.
- Compile:
-
ReceiveData on OSX
- Compile:
g++ -o runViewReceive ViewReceiveData.cpp -I ./lsl -L/usr/local/lib -llsl64
- Test:
./runReceive
. Note that liblsl64.(so|dylib|a|lib|dll) must be installed to run. It is not sufficient to copy it locally.
- Compile:
-
DAQ and LabStreamingLayer on OSX
- Compile:
g++ -std=c++11 -o testLSLSync lslSync.cpp mccdevice.cpp -I/usr/local/include/libusb-1.0/ -I./lsl -L/usr/local/lib -lusb-1.0 -L./lsl -llsl64
- Test:
./testLSLSync
.
- Compile:
-
-
Install libusb-1.0 using
sudo apt-get install libusb-1.0-0-dev
-
Include mccdevice.h into your project.
#include "mccdevice.h"
-
Compile your project:
-
SynchTest on Linux
- Compile A (libusb - in the path):
g++ -std=c++11 -o synchTest synchTest.cpp mccdevice.cpp -lusb-1.0
or Compile B (libusb - not in the path):g++ -std=c++11 -o syncTest synchTest.cpp mccdevice.cpp -I /usr/include/libusb-1.0/ -L /usr/lib/x86_64-linux-gnu/ -lusb-1.0
- Test:
./synchTest
- Compile A (libusb - in the path):
-
LabStreamingLayer on Linux
- Include: liblsl64.so must be in the building directory of the project
- Compile:
g++ -std=c++11 -o testLSL lslTest.cpp mccdevice.cpp -I /usr/include/libusb-1.0/ -I ./lsl -L /usr/lib/x86_64-linux-gnu/ -lusb-1.0 -L ./ -llsl64
- Test:
./lslTest
-
ReceiveData on Linux
- Include: liblsl64.so must be in the building directory of the project
- Compile:
g++ -o runViewReceive ViewReceiveData.cpp -I ./lsl -L ./ -llsl64
- Test:
./runReceive
-
DAQ and LabStreamingLayer on Linux
- Include: liblsl64.so must be in the building directory of the project
- Compile:
g++ -std=c++11 -o testLSLSync lslSync.cpp mccdevice.cpp -I /usr/include/libusb-1.0/ -I ./lsl -L /usr/lib/x86_64-linux-gnu/ -lusb-1.0 -L ./ -llsl64
- Test:
./testLSLSync
.
-