Voss Connection Detection  1
Detect a connector click using realtime code on Bela hardware
Tools

Miscelaneous tools for operating: Listing directories, writing to log files and getting last file modification times. More...

Classes

class  LogFile< num_cols >
 A class for opening a logfile, and writing data to a log. More...
 

Functions

bool StartupSanityChecks (BelaContext *context)
 Perform sanity checks on startup, for the parameters that should be set properly in 'settings'. Mainly checks for the sampling frequency and the number of channels. More...
 
std::vector< std::string > list_dir (const char *path)
 List the contents of a directory path, and return the contents. More...
 
time_t last_modification_time (const std::string &filepath)
 Determine the last modification time of a file and returns it as a time_t value. More...
 
double retrieveAsNumber (JSONObject &json, const std::string &str)
 Searches for the key str in the JSON object and returns a the number. Throws a runtime error if the key is not found, or it is not a number. More...
 

Detailed Description

Miscelaneous tools for operating: Listing directories, writing to log files and getting last file modification times.

Box for helpful functions and classes that do not really have a proper place.

Function Documentation

◆ last_modification_time()

time_t last_modification_time ( const std::string &  filepath)

Determine the last modification time of a file and returns it as a time_t value.

Parameters
filepathThe filepath to determine this from
Returns
Time in a time_t value.

Definition at line 123 of file tools.cpp.

◆ list_dir()

std::vector<std::string> list_dir ( const char *  path)

List the contents of a directory path, and return the contents.

Parameters
pathThe path to list
Returns
A vector of strings containing the path content

Definition at line 108 of file tools.cpp.

◆ retrieveAsNumber()

double retrieveAsNumber ( JSONObject &  json,
const std::string &  str 
)

Searches for the key str in the JSON object and returns a the number. Throws a runtime error if the key is not found, or it is not a number.

Parameters
jsonThe JSON object
strKey
Returns
The number

Definition at line 195 of file tools.cpp.

◆ StartupSanityChecks()

bool StartupSanityChecks ( BelaContext *  context)

Perform sanity checks on startup, for the parameters that should be set properly in 'settings'. Mainly checks for the sampling frequency and the number of channels.

Parameters
contextBelaContext
Returns
true if everything is OK.

Definition at line 54 of file tools.cpp.