#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <openedf.h>
#include <sys/time.h>
#include <pctimer.h>
#include <ctype.h>
#include <nsutil.h>
#include <nsnet.h>
#include <gtk/gtk.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" |
#define | VIEWWIDTH 768 |
#define | VIEWHEIGHT 128 |
#define | TOPMARGIN 80 |
#define | MARGIN 160 |
#define | DRAWINGAREAHEIGHT (TOPMARGIN + VIEWHEIGHT*2 + MARGIN) |
#define | UPDATEINTERVAL 64 |
Functions | |
void | idleHandler (void) |
void | initGTKSystem (void) |
int | isANumber (const char *str) |
check, if data is a number | |
void | serverDied (void) |
action to take if server died | |
int | main (int argc, char **argv) |
void | handleSample (int channel, int val) |
gboolean | readHandler (GIOChannel *source, GIOCondition cond, gpointer data) |
Variables | |
sock_t | sock_fd |
char | EDFPacket [MAXHEADERLEN] |
GIOChannel * | neuroserver |
const char * | helpText |
InputBuffer | ib |
char | lineBuf [MAXLEN] |
int | linePos = 0 |
Options | opts |
GtkWidget * | window |
GtkWidget * | onscreen |
GdkPixmap * | offscreen = NULL |
|
Definition at line 53 of file main.c. Referenced by idleHandler(), and main(). |
|
Definition at line 172 of file main.c. Referenced by initGTKSystem(). |
|
|
|
Definition at line 52 of file main.c. Referenced by idleHandler(), and main(). |
|
|
|
Definition at line 174 of file main.c. Referenced by handleSample(). |
|
|
|
Definition at line 167 of file main.c. Referenced by handleSample(), and initGTKSystem(). |
|
Definition at line 183 of file main.c. References onscreen, UPDATEINTERVAL, and VIEWWIDTH. Referenced by idleHandler(). |
|
Definition at line 233 of file main.c. References cur, DELIMS, EDFPacket, handleSample(), ib, isANumber(), isEOF(), lineBuf, linePos, max_fd, MAXCHANNELS, MINLINELENGTH, readline(), rprintf(), rselect(), samples, sock_fd, and updateMaxFd(). Referenced by readHandler(). |
|
Definition at line 287 of file main.c. References DRAWINGAREAHEIGHT, neuroserver, onscreen, readHandler(), sock_fd, VIEWWIDTH, and window. Referenced by main(). |
|
check, if data is a number
|
|
buffer for reading from serial port DEFAULTHOST; DEFAULTPORT; process command line inputs Definition at line 89 of file main.c. References cfg, DEFAULTHOST, DEFAULTPORT, EDFPacket, Options::eegNum, getOK(), helpText, Options::hostname, ib, initGTKSystem(), isEOF(), MAXHEADERLEN, opts, pctimer(), Options::port, rconnectName(), readEDFString(), readline(), rexit(), rinitNetworking(), rprintf(), rsocket(), serverDied(), sock_fd, and writeString(). |
|
Definition at line 281 of file main.c. References idleHandler(). Referenced by initGTKSystem(). |
|
action to take if server died
Definition at line 83 of file main.c. References rprintf(). Referenced by main(). |
|
Definition at line 38 of file main.c. Referenced by idleHandler(), and main(). |
|
Initial value: "sampleClient v 0.34 by Rudi Cilibrasi\n" "\n" "Usage: sampleClient [options]\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" " -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 40 of file main.c. Referenced by main(). |
|
Definition at line 66 of file main.c. Referenced by getOK(), getResponseCode(), handleSamples(), idleHandler(), initInputBuffer(), inputBufferEmpty(), isEOF(), main(), makeNewClient(), my_read(), readline(), and readlinebuf(). |
|
Definition at line 67 of file main.c. Referenced by getLineBuf(), idleHandler(), and main(). |
|
Definition at line 68 of file main.c. Referenced by idleHandler(), and main(). |
|
Definition at line 39 of file main.c. Referenced by initGTKSystem(). |
|
|
|
Definition at line 177 of file main.c. Referenced by handleSample(), and initGTKSystem(). |
|
Definition at line 70 of file main.c. Referenced by handleSamples(), initSampleBuffer(), main(), writeBuffers(), writeBufferToFile(), and writeSampleBuffer(). |
|
Definition at line 37 of file main.c. Referenced by attemptBind(), getOK(), getResponseCode(), handleSamples(), idleHandler(), initGTKSystem(), main(), raccept(), rbindAll(), rconnectName(), rsocket(), setblocking(), setnonblocking(), and setNSnonblocking(). |
|
Definition at line 176 of file main.c. Referenced by initGTKSystem(). |