Page 1 of 1

How to test the modules?

Posted: 08 Apr 2010, 08:27
by tmile77
Is there a way to create a testing environment for one filter in such a way that it runs independently from the other modules and the operator and that I can control the execution of its functions?

Reason why I want to do this is that I would like to control input and the output of the filter to be able to compare it (test it) against data created with the same filter but from another souce (same fileter programed in MATLAB for instance). I tried to do this with the UNITEST arhitecture, but I can't trick the filter into accesing the States and Parameters defined from outside.

Posted: 12 Apr 2010, 09:15
by mellinger
You might check out the BCI2000 command line framework, which lets you run individual BCI2000 filters as executables, taking input from stdin and writing to stdout. Documentation is provided at
http://www.bci2000.org/wiki/index.php/U ... Processing
On the wiki page, there is also an example how to run filters with modified parameters.

As an alternative, you may as well compile BCI2000 filters into DLLs which can then be loaded by Matlab as any other DLL. Documentation for the DLL framework is contained in the header file, at
trunk/src/core/Tools/cmdline/bci_dll.h,
and an example Matlab function accessing a DLL may be found at
trunk/src/core/Tools/cmdline/dll_example.m.