Voss Connection Detection  1
Detect a connector click using realtime code on Bela hardware
LogFile< num_cols > Class Template Reference

A class for opening a logfile, and writing data to a log. More...

#include <conndetect.h>

Public Member Functions

 LogFile (const char *filename, const char *header, bool createUnique=true)
 Initialize a log file. More...
 
 ~LogFile ()
 
void log (const std::array< float, num_cols > &data)
 Log the data to the file. More...
 

Detailed Description

template<us num_cols>
class LogFile< num_cols >

A class for opening a logfile, and writing data to a log.

Template Parameters
num_colsThe number of data columns in the logfile

Definition at line 14 of file conndetect.h.

Constructor & Destructor Documentation

◆ LogFile()

template<us num_cols>
LogFile< num_cols >::LogFile ( const char *  filename,
const char *  header,
bool  createUnique = true 
)

Initialize a log file.

Parameters
filenameThe file name to write to.
headerThe first row in the file. Should specify the data that is
createUniqueIf set to true, it will add a number at the end of the file name, to create a unique file name. If set to false, it will overwrite the file given as argument filename.

Create an unique file name.

One way or another, directly giving parameters to constructor results in a crash.

Definition at line 133 of file tools.cpp.

◆ ~LogFile()

template<us num_cols>
LogFile< num_cols >::~LogFile

Definition at line 182 of file tools.cpp.

Member Function Documentation

◆ log()

template<us num_cols>
void LogFile< num_cols >::log ( const std::array< float, num_cols > &  data)

Log the data to the file.

Parameters
datato log.

Definition at line 177 of file tools.cpp.


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