#include <assert.h>
#include <openedf.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <pctimer.h>
#include <ctype.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 | MINLINELENGTH 4 |
#define | DELIMS " \r\n" |
Functions | |
void | resetSampleBuffers () |
void | initSampleBuffers () |
void | writeBuffers () |
void | handleSamples (int packetCounter, int channels, int *samples) |
int | isANumber (const char *str) |
void | serverDied (void) |
int | main (int argc, char **argv) |
Variables | |
const char * | helpText |
EDFDecodedConfig | cfg |
InputBuffer | ib |
char | lineBuf [MAXLEN] |
int | linePos = 0 |
int | blockCounter = 0 |
unsigned short ** | sampleBuffers |
unsigned int | sampleCount |
Options | opts |
|
Definition at line 52 of file writeedf.c. |
|
Definition at line 51 of file writeedf.c. |
|
Definition at line 105 of file writeedf.c. References cfg, EDFDecodedConfig::chan, rprintf(), sampleBuffers, EDFDecodedChannelHeader::sampleCount, sampleCount, samples, and writeBuffers(). Referenced by doesMatchOpenCNV(), doesMatchP2(), doesMatchP3(), and main(). |
|
Definition at line 81 of file writeedf.c. References cfg, EDFDecodedConfig::chan, EDFDecodedHeader::dataRecordChannels, EDFDecodedConfig::hdr, resetSampleBuffers(), sampleBuffers, and EDFDecodedChannelHeader::sampleCount. Referenced by main(). |
|
Definition at line 121 of file writeedf.c. Referenced by idleHandler(), and main(). |
|
Definition at line 135 of file writeedf.c. References cfg, cur, DEFAULTHOST, DEFAULTPORT, DELIMS, EDFPacket, Options::eegNum, Options::filename, getOK(), handleSamples(), helpText, Options::hostname, ib, initSampleBuffers(), isANumber(), isEOF(), Options::isFilenameSet, Options::isLimittedTime, lineBuf, linePos, MAXCHANNELS, MAXHEADERLEN, MINLINELENGTH, ob, opts, pctimer(), Options::port, rconnectName(), readEDFString(), readline(), rexit(), rinitNetworking(), rprintf(), rselect(), rsleep(), rsocket(), samples, Options::seconds, serverDied(), sock_fd, sock_t, and writeString(). |
|
Definition at line 76 of file writeedf.c. References sampleCount. Referenced by initSampleBuffers(), and writeBuffers(). |
|
Definition at line 129 of file writeedf.c. References rprintf(). |
|
Definition at line 90 of file writeedf.c. References blockCounter, cfg, EDFDecodedHeader::dataRecordChannels, Options::filename, EDFDecodedConfig::hdr, opts, resetSampleBuffers(), rprintf(), sampleBuffers, and sampleCount. Referenced by handleSamples(). |
|
Definition at line 69 of file writeedf.c. |
|
Definition at line 64 of file writeedf.c. |
|
Initial value: "writeedf v 0.34 by Rudi Cilibrasi\n" "\n" "Usage: writeedf [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" " -s <num> Only record this many seconds.\n" " (default is to record until interrupted)\n" " -e <intnum> Integer ID specifying which EEG to log (default: 0)\n" "The filename specifies the new EDF file to create.\n" Definition at line 37 of file writeedf.c. |
|
Definition at line 66 of file writeedf.c. |
|
Definition at line 67 of file writeedf.c. |
|
Definition at line 68 of file writeedf.c. |
|
Definition at line 74 of file writeedf.c. |
|
Definition at line 71 of file writeedf.c. Referenced by handleSamples(), initSampleBuffers(), and writeBuffers(). |
|
Definition at line 72 of file writeedf.c. Referenced by EDFDecodeChannelHeader(), EDFEncodePacket(), fetchSamples(), handleSamples(), resetSampleBuffers(), and writeBuffers(). |