AppConnector C# retrieve messages
Posted: 17 Nov 2011, 09:50
Hi there,
I'm trying to retrieve messages from BCI2000 over UDP connection.
I'm using the AppConnector: http://www.bci2000.org/wiki/index.php/T ... _Connector
and I receive messages that have the following format:
EmotivGyroX 26720
EmotivGyroY 26832
EmotivCQCMS 1
EmotivCQDRL 1
EmotivCQFP1 0
EmotivCQAF3 0
EmotivCQF7 0
EmotivCQF3 0
EmotivCQFC5 0
EmotivCQT7 0
EmotivCQP7 0
EmotivCQO1 0
EmotivCQO2 0
EmotivCQP8 0
EmotivCQT8 0
EmotivCQFC6 0
EmotivCQF4 0
EmotivCQF8 0
EmotivCQAF4 0
EmotivCQFP2 0
Running 1
Recording 1
SourceTime 36288
FixationViolated 0
GazeCorrectionMode 0
TargetCode 0
ResultCode 0
Feedback 0
CursorPosX 0
CursorPosY 0
CursorPosZ 0
StimulusTime 36277
Signal(0,0) 5.21222
I read on the BCI-Wiki: http://www.bci2000.org/wiki/index.php/T ... 0_Messages
that each message starts with a descriptor.
How can I read the descriptor value?
I retrieve messages with the following code:
receive_byte_array = listener.Receive(ref groupEP);
udpMessage = Encoding.ASCII.GetString(receive_byte_array, 0, receive_byte_array.Length);
But the variable "udpMessage" just contains the content, no descriptor value...
How to extract the descriptor value?
Another question: Are messages always in the same order?
Any help would be great
Nadine
I'm trying to retrieve messages from BCI2000 over UDP connection.
I'm using the AppConnector: http://www.bci2000.org/wiki/index.php/T ... _Connector
and I receive messages that have the following format:
EmotivGyroX 26720
EmotivGyroY 26832
EmotivCQCMS 1
EmotivCQDRL 1
EmotivCQFP1 0
EmotivCQAF3 0
EmotivCQF7 0
EmotivCQF3 0
EmotivCQFC5 0
EmotivCQT7 0
EmotivCQP7 0
EmotivCQO1 0
EmotivCQO2 0
EmotivCQP8 0
EmotivCQT8 0
EmotivCQFC6 0
EmotivCQF4 0
EmotivCQF8 0
EmotivCQAF4 0
EmotivCQFP2 0
Running 1
Recording 1
SourceTime 36288
FixationViolated 0
GazeCorrectionMode 0
TargetCode 0
ResultCode 0
Feedback 0
CursorPosX 0
CursorPosY 0
CursorPosZ 0
StimulusTime 36277
Signal(0,0) 5.21222
I read on the BCI-Wiki: http://www.bci2000.org/wiki/index.php/T ... 0_Messages
that each message starts with a descriptor.
How can I read the descriptor value?
I retrieve messages with the following code:
receive_byte_array = listener.Receive(ref groupEP);
udpMessage = Encoding.ASCII.GetString(receive_byte_array, 0, receive_byte_array.Length);
But the variable "udpMessage" just contains the content, no descriptor value...
How to extract the descriptor value?
Another question: Are messages always in the same order?
Any help would be great
Nadine