Public Member Functions

void setFileType (WriteFileType newFileType)
 
void setEcho (bool newEcho)
 
void setEchoInterval (int newPeriod)
 
void setFormat (const char *newFormat)
 
void setHeader (const char *newHeader)
 
void setFooter (const char *newFooter)
 
void log (const float *array, int length)
 
void log (float value)
 
void init (const char *filename)
 
int getOffset ()
 
float getBufferStatus ()
 

Static Public Member Functions

static int getNumInstances ()
 
static void writeAllHeaders ()
 
static void writeAllFooters ()
 
static void writeAllOutputs (bool flush)
 
static void startThread ()
 
static void stopThread ()
 
static void run ()
 

Detailed Description

Member Function Documentation

void WriteFile::setFileType ( WriteFileType  newFileType)

Set the type of file to write, can be either kText or kBinary. Binary files can be imported e.g. in Matlab: fid=fopen('out','r'); A = fread(fid, 'float');

Examples:
logging-sensors/render.cpp.
void WriteFile::setFormat ( const char *  newFormat)

Set the format that you want to use for your output.

Only f is allowed (with modifiers). When in binary mode, the specified format is used only for echoing to console.

Examples:
logging-sensors/render.cpp, and write-file/render.cpp.
void WriteFile::setHeader ( const char *  newHeader)

Set one or more lines to be printed at the beginning of the file.

This is ignored in binary mode.

Examples:
logging-sensors/render.cpp, and write-file/render.cpp.
void WriteFile::setFooter ( const char *  newFooter)

Set one or more lines to be printed at the end of the file.

This is ignored in binary mode.

Examples:
logging-sensors/render.cpp, and write-file/render.cpp.
int WriteFile::getOffset ( )

Gets the distance between the write and read pointers of the buffer that holds data to be written to disk.

float WriteFile::getBufferStatus ( )

Inquiries the status of the buffer that holds data to be written to disk.

Returns
a value between 0 and 1, with 0 being buffer full (writing to disk not fast enough) and 1 being buffer empty (writing to disk is fast enough).

The documentation for this class was generated from the following file: