#include <assert.h>
#include <time.h>
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stddef.h>
#include <openedf.h>
#include <unistd.h>
#include <edfmacros.h>
#include <nsutil.h>
Go to the source code of this file.
Defines | |
#define | MAXERRORLEN 1024 |
Functions | |
void | setLastError (const char *fmt,...) |
int | EDFUnpackInt (const char *inp, int fieldLen) |
double | EDFUnpackDouble (const char *inp, int fieldLen) |
const char * | EDFUnpackString (const char *inp, int fieldLen) |
void | storeEDFString (char *packet, size_t memsize, const char *str) |
void | storeEDFDouble (char *packet, size_t memsize, double d) |
void | storeEDFInt (char *packet, size_t memsize, int i) |
int | EDFEncodePacket (char *packet, const struct EDFDecodedConfig *cfg) |
void | EDFDecodeChannelHeader (struct EDFDecodedChannelHeader *result, const char *packet, int whichChannel, int totalChannels) |
void | EDFDecodeHeaderPreamble (struct EDFDecodedHeader *result, const char *packet) |
int | readEDFString (struct EDFDecodedConfig *cfg, const char *buf, int len) |
int | writeEDFString (const struct EDFDecodedConfig *cfg, char *buf, int *buflen) |
int | writeEDF (int fd, const struct EDFDecodedConfig *cfg) |
int | setEDFHeaderBytes (struct EDFDecodedConfig *cfg) |
int | readEDF (int fd, struct EDFDecodedConfig *cfg) |
double | getSecondsPerSample (const struct EDFDecodedConfig *cfg, int whichChan) |
double | getSamplesPerSecond (const struct EDFDecodedConfig *cfg, int whichChan) |
int | getDataRecordChunkSize (const struct EDFDecodedConfig *cfg) |
EDFInputIterator * | newEDFInputIterator (const struct EDFDecodedConfig *cfg) |
void | freeEDFInputIterator (struct EDFInputIterator *edfi) |
int | stepEDFInputIterator (struct EDFInputIterator *edfi) |
int | readDataRecord (const struct EDFInputIterator *edfi, FILE *fp) |
int | fetchSamples (const struct EDFInputIterator *edfi, short *samples, FILE *fp) |
int | isValidREDF (const struct EDFDecodedConfig *cfg) |
const char * | getDMY (void) |
const char * | getHMS (void) |
int | makeREDFConfig (struct EDFDecodedConfig *result, const struct EDFDecodedConfig *source) |
const char * | getLastError (void) |
|
Definition at line 38 of file openedf.c. Referenced by setLastError(). |
|
Definition at line 116 of file openedf.c. References LOADCFD, LOADCFI, LOADCFS, and sampleCount. Referenced by readEDF(), and readEDFString(). |
|
Definition at line 131 of file openedf.c. References LOADHFD, LOADHFI, and LOADHFS. Referenced by readEDF(), and readEDFString(). |
|
|
Definition at line 49 of file openedf.c. References EDFUnpackString(). |
|
Definition at line 44 of file openedf.c. References EDFUnpackString(). |
|
Definition at line 54 of file openedf.c. Referenced by EDFUnpackDouble(), and EDFUnpackInt(). |
|
Definition at line 294 of file openedf.c. References BYTESPERSAMPLE, EDFInputIterator::cfg, EDFDecodedConfig::chan, EDFInputIterator::dataRecord, EDFDecodedHeader::dataRecordChannels, EDFDecodedConfig::hdr, readDataRecord(), sampleCount, EDFDecodedChannelHeader::sampleCount, EDFInputIterator::sampleNum, and samples. Referenced by main(). |
|
Definition at line 261 of file openedf.c. References EDFInputIterator::dataRecord. Referenced by main(). |
|
Definition at line 240 of file openedf.c. References BYTESPERSAMPLE, cfg, EDFDecodedConfig::chan, EDFDecodedHeader::dataRecordChannels, EDFDecodedConfig::hdr, and EDFDecodedChannelHeader::sampleCount. Referenced by main(), newEDFInputIterator(), and readDataRecord(). |
|
Definition at line 338 of file openedf.c. References buf. Referenced by main(), and makeREDFConfig(). |
|
Definition at line 349 of file openedf.c. References buf. Referenced by main(), and makeREDFConfig(). |
|
|
|
Definition at line 235 of file openedf.c. References cfg, EDFDecodedConfig::chan, EDFDecodedHeader::dataRecordSeconds, EDFDecodedConfig::hdr, and EDFDecodedChannelHeader::sampleCount. Referenced by main(). |
|
Definition at line 230 of file openedf.c. References cfg, EDFDecodedConfig::chan, EDFDecodedHeader::dataRecordSeconds, EDFDecodedConfig::hdr, and EDFDecodedChannelHeader::sampleCount. |
|
Definition at line 312 of file openedf.c. References cfg, EDFDecodedConfig::chan, EDFDecodedHeader::dataRecordChannels, EDFDecodedConfig::hdr, EDFDecodedChannelHeader::sampleCount, and setLastError(). Referenced by makeREDFConfig(). |
|
Definition at line 367 of file openedf.c. References getDMY(), getHMS(), EDFDecodedConfig::hdr, isValidREDF(), EDFDecodedHeader::recordingStartDate, EDFDecodedHeader::recordingStartTime, and setEDFHeaderBytes(). Referenced by cmdSetHeader(), and main(). |
|
Definition at line 248 of file openedf.c. References cfg, and getDataRecordChunkSize(). Referenced by main(). |
|
Definition at line 279 of file openedf.c. References EDFInputIterator::cfg, EDFInputIterator::dataRecord, EDFInputIterator::dataRecordNum, getDataRecordChunkSize(), EDFDecodedConfig::hdr, and EDFDecodedHeader::headerRecordBytes. Referenced by fetchSamples(). |
|
Definition at line 204 of file openedf.c. References cfg, EDFDecodedConfig::chan, EDFDecodedHeader::dataRecordChannels, EDFDecodeChannelHeader(), EDFDecodeHeaderPreamble(), EDFDecodedConfig::hdr, EDFDecodedHeader::headerRecordBytes, MAXCHANNELS, and setEDFHeaderBytes(). Referenced by main(). |
|
Definition at line 145 of file openedf.c. References buf, cfg, EDFDecodedConfig::chan, EDFDecodedHeader::dataRecordChannels, EDFDecodeChannelHeader(), EDFDecodeHeaderPreamble(), EDFDecodedConfig::hdr, EDFDecodedHeader::headerRecordBytes, MAXCHANNELS, rprintf(), and setEDFHeaderBytes(). Referenced by cmdSetHeader(), and main(). |
|
Definition at line 198 of file openedf.c. References cfg, EDFDecodedHeader::dataRecordChannels, EDFDecodedConfig::hdr, and EDFDecodedHeader::headerRecordBytes. Referenced by main(), makeREDFConfig(), readEDF(), and readEDFString(). |
|
Definition at line 392 of file openedf.c. References MAXERRORLEN. Referenced by isValidREDF(). |
|
Definition at line 268 of file openedf.c. References EDFInputIterator::cfg, EDFDecodedConfig::chan, EDFInputIterator::dataRecordNum, EDFDecodedChannelHeader::sampleCount, and EDFInputIterator::sampleNum. Referenced by main(). |
|
Definition at line 72 of file openedf.c. References buf, and storeEDFString(). |
|
Definition at line 79 of file openedf.c. References buf, and storeEDFString(). |
|
Definition at line 62 of file openedf.c. References buf. Referenced by storeEDFDouble(), and storeEDFInt(). |
|
Definition at line 184 of file openedf.c. References cfg, EDFEncodePacket(), EDFDecodedConfig::hdr, EDFDecodedHeader::headerRecordBytes, and MAXCHANNELS. Referenced by main(). |
|
Definition at line 167 of file openedf.c. References buf, cfg, EDFEncodePacket(), EDFDecodedConfig::hdr, EDFDecodedHeader::headerRecordBytes, and MAXCHANNELS. Referenced by cmdSetHeader(), and main(). |