P300 Output --> Serial Com Port

Forum for software developers to discuss BCI2000 software development
mellinger
Posts: 1341
Joined: 12 Feb 2003, 11:06

Post by mellinger » 22 Mar 2009, 12:47

Gesanan,
If I want to read an integer form the socket the code would be like this??

Code:

Code: Select all

int i; 

receiving_udpsocket s( host.c_str() ); 
sockstream udpIn( s ); 
udpIn >> i; 
cout << "\nReceived int: " << i; 
Yes, this code should work for integers transmitted as ASCII strings, provided each of them is followed with white space (the last one as well).

Juergen

Locked

Who is online

Users browsing this forum: No registered users and 0 guests