Visual Studio supported languages

Forum for software developers to discuss BCI2000 software development
Locked
fapplin
Posts: 10
Joined: 15 Jun 2010, 08:06

Visual Studio supported languages

Post by fapplin » 15 Jun 2010, 08:23

This site says that the version 3 of BCI2000 will work in Visual Studio. Does this mean that other Visual Studio languages (such as Visual Basic or C#) can be used to tie into BCI2000?

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 15 Jun 2010, 08:45

No. It means that BCI2000 version 3 may be compiled using the Microsoft Visual C++ compiler coming with Visual Studio.

fapplin
Posts: 10
Joined: 15 Jun 2010, 08:06

Post by fapplin » 15 Jun 2010, 08:57

Could Visual Basic or Visual C# talk to the BCI2000 modules via DLL calls or any other means?

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 17 Jun 2010, 08:52

The operator module has been separated into a functional core, which is provided as a DLL, and the GUI, which is an application linking against the DLL.

You could, in principle, write a GUI application in VB or C# that uses the DLL. For a documentation of the DLL's exported functions, see its header file at
BCI2000/src/core/Operator/OperatorLib/BCI_OperatorLib.h.

fapplin
Posts: 10
Joined: 15 Jun 2010, 08:06

Post by fapplin » 17 Jun 2010, 09:45

Thanks. We have many experiments already written in C# that we are sending simple event codes to BioSemi with. We would like to try BCI2000 and see if we can do the same kind of things. Some of our experiments have people picking playing cards (like guessing at suits or color). So, our GUI is a little different than an experiment where you just display a picture for a specified period of time.

Do you know if anyone has done this, yet (using the DLL via VB or C#)?

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 17 Jun 2010, 10:58

I'm not aware of anyone who has used the DLL from languages other than C++ so far.

Also, using the Operator DLL would not allow you to control stimulus presentation, or the event codes written into the BCI2000 data file. For this, you would need to modify an application module, which currently requires C++ coding.

fapplin
Posts: 10
Joined: 15 Jun 2010, 08:06

Post by fapplin » 17 Jun 2010, 11:09

So, could we have our C# application communicate via TCP/IP to BCI2000?

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 17 Jun 2010, 12:00

You can communicate with BCI2000 over UDP. For details, see
http://www.bci2000.org/wiki/index.php/T ... _Connector.

As an example, if your C# app is presenting stimuli, and BCI2000 is used for recording brain signals, the setup would be as follows:
Run an empty dummy app on the BCI2000 side, i.e. an application module that contains only the AppConnector filters.
The C# app would use the AppConnector protocol to set a StimulusCode state, indicating when stimuli have been presented, and which.

fapplin
Posts: 10
Joined: 15 Jun 2010, 08:06

Post by fapplin » 17 Jun 2010, 12:07

Thanks. We'll try that.

Locked

Who is online

Users browsing this forum: No registered users and 2 guests