Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

readedf.c File Reference

#include <assert.h>
#include <stdlib.h>
#include <openedf.h>
#include <string.h>
#include <sys/time.h>
#include <pctimer.h>
#include <nsutil.h>
#include <nsnet.h>

Go to the source code of this file.

Data Structures

struct  Options
 Command line options will be decoded into this structure. More...


Defines

#define SPEEDUPFACTOR   4.0

Functions

void printHeader (const struct EDFDecodedHeader *hdr)
void handleSamples (sock_t sock_fd, int packetCounter, int chan, short *vals)
int main (int argc, char **argv)

Variables

const char * helpText
Options opts
OutputBuffer ob
InputBuffer ib


Define Documentation

#define SPEEDUPFACTOR   4.0
 

Definition at line 64 of file readedf.c.

Referenced by main().


Function Documentation

void handleSamples sock_t  sock_fd,
int  packetCounter,
int  chan,
short *  vals
 

Definition at line 73 of file readedf.c.

References buf, MAXLEN, ob, sock_fd, and writen().

int main int  argc,
char **  argv
 

check filename

open file

start networking

configure neuroserver connection

now decode EDF header

check for 24bit BDF data format

write header to data file (if not in CSV mode)

data0 data1 data2 ...

Definition at line 86 of file readedf.c.

References cfg, EDFDecodedConfig::chan, Options::channelReadFlags, cur, EDFDecodedHeader::dataRecordChannels, DEFAULTHOST, DEFAULTPORT, EDFPacket, fetchSamples(), Options::filename, freeEDFInputIterator(), getDataRecordChunkSize(), getResponseCode(), getSamplesPerSecond(), handleSamples(), EDFDecodedConfig::hdr, EDFDecodedHeader::headerRecordBytes, helpText, Options::hostname, ib, Options::isFilenameSet, Options::isMaxSpeed, makeREDFConfig(), MAXCHANNELS, MAXHEADERLEN, newEDFInputIterator(), ob, opts, pctimer(), Options::port, printHeader(), rconnectName(), readEDF(), rexit(), rinitNetworking(), rprintf(), rsleep(), rsocket(), samples, setEDFHeaderBytes(), sock_fd, sock_t, SPEEDUPFACTOR, stepEDFInputIterator(), Options::userSpecifiedChannels, writeBytes(), writeEDF(), writeEDFString(), and writeString().

void printHeader const struct EDFDecodedHeader hdr  ) 
 

Definition at line 66 of file readedf.c.

References EDFDecodedHeader::dataRecordChannels, EDFDecodedHeader::dataRecordCount, and EDFDecodedHeader::dataRecordSeconds.

Referenced by main().


Variable Documentation

const char* helpText
 

Initial value:

"readedf   v 0.43 by Rudi Cilibrasi\n"
"\n"
"Usage:  readedf [options] <filename>\n"
"\n"
"        -p port          Port number to use (default 8336)\n"
"        -n hostname      Host name of the NeuroCaster server to connect to\n"
"                         (this defaults to 'localhost')\n"
"        -c numlist       Numlist must be a comma-separated list of integers\n"
"                         that specify what channels to send. The first\n"
"                         channel is numbered 0. The default is all channels.\n"
"        -f               Fast Mode. Send data at maximum speed.\n"
"                         Default behavior sends data at EDF sampling rate.\n"

Definition at line 34 of file readedf.c.

struct InputBuffer ib
 

Definition at line 62 of file readedf.c.

struct OutputBuffer ob
 

Definition at line 61 of file readedf.c.

Referenced by handleSamples(), initOutputBuffer(), main(), makeNewClient(), sendClientMsg(), and writeString().

struct Options opts
 

Definition at line 59 of file readedf.c.


Generated on Tue Feb 8 00:05:20 2005 for Neuroserver by doxygen 1.3.3