#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <nsnet.h>
#include <nsutil.h>
#include <nsser.h>
#include <openedf.h>
#include <config.h>
Go to the source code of this file.
Defines | |
#define | PROTOWINDOW 17 |
include neuroserver network support include neuroserver serial port functions include neuroserver European Data Format (EDF) functions include Software VERSION number/system information maximum size of a serial port data chunk | |
#define | MINGOOD 6 |
#define | P2CHAN 6 |
Functions | |
int | isValidPacket (unsigned short nchan, unsigned short *samples) |
int | doesMatchP3 (unsigned char c, unsigned short *vals, int *nsamples) |
int | doesMatchP2 (unsigned char c, unsigned short *vals, int *nsamples) |
int | mGetOK (sock_t fd, struct InputBuffer *ib) |
get neuroserver response | |
void | resetBuffer (void) |
void | gobbleChars (int howMany) |
void | eatCharacter (unsigned char c) |
this function does the real data processing of serial input data | |
void | handleSamples (int packetCounter, int chan, unsigned short *vals) |
void | printHelp () |
prints command line options / brief description of the program | |
int | main (int argc, char **argv) |
Variables | |
char | buf [PROTOWINDOW] |
sock_t | sock_fd |
int | bufCount |
int | hasMatchedProtocol |
int | isP2 |
int | isP3 |
So far protocols P2 and P3 are supported. (For details regarding these protocols see )
Definition in file modeegdriver.c.
|
|
|
|
|
include neuroserver network support include neuroserver serial port functions include neuroserver European Data Format (EDF) functions include Software VERSION number/system information maximum size of a serial port data chunk
Definition at line 51 of file modeegdriver.c. Referenced by doesMatchOpenCNV(), doesMatchP2(), eatCharacter(), and main(). |
|
Definition at line 270 of file modeegdriver.c. References handleSamples(), MAXCHANNELS, PROTOWINDOW, rexit(), and rprintf(). Referenced by eatCharacter(). |
|
Definition at line 206 of file modeegdriver.c. References handleSamples(), isP3, MAXCHANNELS, rprintf(), and samples. Referenced by eatCharacter(). |
|
this function does the real data processing of serial input data number of frames until protocol is locked in place to store eeg data has the protocol been detected and validated ? not yet, or error previously now it detected the frame, from now on the protocol is fixed check packet for validity ok, didmatch is 0, so it didn't match so far Definition at line 127 of file modeegdriver.c. References buf, bufCount, doesMatchP2(), doesMatchP3(), hasMatchedProtocol, isP2, isP3, isValidPacket(), MAXCHANNELS, PROTOWINDOW, and rprintf(). |
|
Definition at line 119 of file modeegdriver.c. |
|
Definition at line 190 of file modeegdriver.c. References buf, EDFDecodedHeader::dataRecordChannels, EDFDecodedConfig::hdr, ib, MAXLEN, mGetOK(), sock_fd, and writeString(). |
|
Definition at line 104 of file modeegdriver.c. References samples. |
|
buffer for reading from serial port DEFAULTHOST; DEFAULTPORT; process command line inputs Definition at line 347 of file modeegdriver.c. References EDFDecodedConfig::chan, DEFAULTDEVICE, DEFAULTHOST, DEFAULTPORT, eatCharacter(), EDFPacket, ib, isEOF(), makeREDFConfig(), max_fd, MAXHEADERLEN, MAXLEN, mGetOK(), my_read(), openSerialPort(), OSTYPESTR, printHelp(), PROTOWINDOW, rconnectName(), readSerial(), rexit(), rinitNetworking(), rprintf(), rselect_timed(), rsocket(), EDFDecodedChannelHeader::sampleCount, ser_t, setblocking(), sock_fd, updateMaxFd(), writeBytes(), writeEDFString(), and writeString(). |
|
get neuroserver response
Definition at line 68 of file modeegdriver.c. |
|
prints command line options / brief description of the program
Definition at line 339 of file modeegdriver.c. References DEFAULTDEVICE, DEFAULTHOST, DEFAULTPORT, and rprintf(). Referenced by main(). |
|
Definition at line 114 of file modeegdriver.c. References bufCount. |
|
Definition at line 53 of file modeegdriver.c. Referenced by addBlock(), cmdDataFrame(), cmdSetHeader(), cmdStatus(), eatCharacter(), getDMY(), getHMS(), gobbleChars(), handleSamples(), monitorLog(), readEDFString(), readSerial(), rprintf(), storeEDFDouble(), storeEDFInt(), storeEDFString(), stringifyErrorCode(), waitForNetEvent(), writeBytes(), writeEDFString(), writeNSBytes(), writeSerial(), and writeString(). |
|
Definition at line 55 of file modeegdriver.c. Referenced by eatCharacter(), gobbleChars(), and resetBuffer(). |
|
Definition at line 60 of file modeegdriver.c. Referenced by eatCharacter(). |
|
Definition at line 61 of file modeegdriver.c. Referenced by eatCharacter(). |
|
Definition at line 61 of file modeegdriver.c. Referenced by doesMatchP3(), and eatCharacter(). |
|
Definition at line 54 of file modeegdriver.c. |