Jump to content

Contributions:SecondaryBCI2000Controller: Difference between revisions

From BCI2000 Wiki
Mellinger (talk | contribs)
Mellinger (talk | contribs)
Line 16: Line 16:


===Known Issues===
===Known Issues===
*When recording into a directory that already contains data files with the same base name, data file name will be out of sync between
*When recording into a directory that already contains data files with the same base name, data file name will be out of sync between the first and second instance of BCI2000. Also, run numbers stored within the files will be out of sync.
the first and second instance of BCI2000. Also, run numbers stored within the files will be out of sync.
*Log windows of primary and secondary BCI2000 instance will have the same location, hiding each other and possibly leading to confusion. The same applies to operator main windows if the second instance is not hidden by calling "Hide Window" from the secondary batch file.
*Log windows of primary and secondary BCI2000 instance will have the same location, hiding each other and possibly leading to confusion. The same applies to operator main windows if the second instance is not hidden by calling "Hide Window" from the secondary batch file.



Revision as of 13:17, 7 October 2022

Synopsis

An extension that controls a secondary BCI2000 instance from the GUI of a primary one.

Location

http://www.bci2000.org/svn/trunk/src/contrib/Extensions/SecondaryBCI2000Controller

Versioning

Author

  • Jürgen Mellinger (mellinger@neurotechcenter.org)

Version History

Source Code Revisions

  • Initial development: 6819
  • Tested under: 6819
  • Known to compile under: 6819

Known Issues

  • When recording into a directory that already contains data files with the same base name, data file name will be out of sync between the first and second instance of BCI2000. Also, run numbers stored within the files will be out of sync.
  • Log windows of primary and secondary BCI2000 instance will have the same location, hiding each other and possibly leading to confusion. The same applies to operator main windows if the second instance is not hidden by calling "Hide Window" from the secondary batch file.

Functional Description

The extension will start up a second instance of BCI2000, and synchronize data file storage and operation state between the two instances. This is useful to record from two different data sources at the same time, when online processing of one of the data sources is not required. In later analysis, data from the two sources may be aligned in time using BCI2000 time stamps found in the two data files.

Integration into BCI2000

Compile the extension into your source module by enabling contributed extensions in your CMake configuration. In your root build folder, run Configure.sh.cmd in order to bring up the CMake GUI; there, enable EXTENSIONS_SECONDARY_BCI2000_CONTROLLER.

Once the extension is built into the source module, enable it by starting the source module with the --SecondaryBCI2000=1 command line argument.

Usage

When the SecondaryBCI2000Controller extension has been enabled in the system at compile time, you will find a BCI2000TwiceStartup.bat batch file in your BCI2000 batch folder. Double-click it to start BCI2000.

Startup configuration of the secondary instance of BCI2000 is done in the file BCI2000TwiceSecondaryStartup.bat. You may load identical or different configuration parameter files in the two startup batch files.

Data file location is synchronized between the two BCI2000 instances. The second instance uses identical file names to the first one, with an appended _1 before the file name extension.

Parameters

The SecondaryBCI2000Controller extension is configured in the Source tab within the "Secondary BCI2000" section. The configurable parameters are:

SecondaryBCI2000

Enables/Disables the SecondaryBCI2000Controller.

SecondaryBCI2000TelnetPort

The telnet port that is used to control the secondary instance of BCI2000.

SecondaryBCI2000StartupScript

The script that is used to start up and configure the secondary instance of BCI2000. An example script is available as BCI2000TwiceSecondaryStartup.bat in your BCI2000 batch directory, and is called by the BCI2000TwiceStartup.bat batch file.

See also

Contributions:Extensions, User Reference:Operator Module Scripting