how to use incomming data to BCI2000

Forum for software developers to discuss BCI2000 software development
Locked
khosravifard
Posts: 11
Joined: 30 Dec 2012, 10:02

how to use incomming data to BCI2000

Post by khosravifard » 17 Jun 2013, 11:15

Hi,
I have written an external application in Java which sends some timing data to BCI2000. I could watch sent data on the timming window. I should mention that I use one of the existing application in BCI2000, but I do not want to use the existing one anymore. Is there anyway to not use the existing application or shall I add a new empty application to BCI2000? my second question is that how/where should I use these data in BCI2000?

many thanks for you help
mina

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

Re: how to use incomming data to BCI2000

Post by mellinger » 17 Jun 2013, 12:36

Hi,
Is there anyway to not use the existing application or shall I add a new empty application to BCI2000?
BCI2000 comes with a DummyApplication module, which you may use if you are not using one of the application modules coming with BCI2000.
my second question is that how/where should I use these data in BCI2000?
Which data?

Regards,
Juergen

khosravifard
Posts: 11
Joined: 30 Dec 2012, 10:02

Re: how to use incomming data to BCI2000

Post by khosravifard » 18 Jun 2013, 09:31

Hi

many thanks for the answers.
I have some data in my external application which relate to the time and frequency. External application display graphical stimuli and when I said time I mean when each trial of stimuli starts, ends, number of trail, etc. I also have some other information like frequency of object presentation on each trial.
How to use such theses data to mark signal or stamp signal block?

kind regards
mina

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

Re: how to use incomming data to BCI2000

Post by mellinger » 18 Jun 2013, 10:32

Hi,

as you are not providing details about how you are connecting to BCI2000, I can only give a general answer. Basically, what you need to do is to add so-called "States" of your own, and then set the values of those states from your external application.

If you are using the BCI2000Remote interface, you may also use the "Set event" command to set a BCI2000 event-state with greater precision than possible through AppConnector.

Please use the Google site search button on www.bci2000.org/wiki in order to find details about how to create your own states/events in BCI2000.

Regards,
Juergen

khosravifard
Posts: 11
Joined: 30 Dec 2012, 10:02

Re: how to use incomming data to BCI2000

Post by khosravifard » 21 Jun 2013, 08:01

I just wrote a java program(which part of external application) that used UDP socket and I set the same ConnectorInputAddress in connector tab. I also managed to sent my timing data using sending massage protocol. now I become a little confused after reading more about BCI2000remote ,should I used this class instead? I also do not know shall I used the bool AddStateVariable( string name, int bitWidth, double initialValue ) form BCI2000remote class to create my own state? I would be grateful if you provide me some guide.

mina

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

Re: how to use incomming data to BCI2000

Post by mellinger » 24 Jun 2013, 11:55

Hi,

there is no Java JNI wrapper for BCI2000Remote at the moment. In case you are using .net, you will be able to interface with BCI2000Automation, though.

When using AppConnector, you need to create your own additional state variables in an operator startup script. If you are using a batch file BCI2000/batch to start up BCI2000, all you need to do is to add the following kind of command before the first "start executable ..." line:

Code: Select all

ADD STATE MyState 32 0 0 0
For more information, see the Operator Scripting reference page on the wiki.

HTH,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 0 guests