Anti-Sway Capstone 1.0
Loading...
Searching...
No Matches
record.h File Reference

Data Recording Interface Header. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef int FileID_t
 A File.
 

Functions

FileID_t OpenDataFile (char *name, char **entry_names, int num_entries)
 
int RecordData (FileID_t file, double data[], int data_length)
 
int RecordValue (FileID_t file, char *value_name, double value)
 
int SaveDataFiles ()
 

Detailed Description

Data Recording Interface Header.

Author
Anti-Sway Team: Nguyen, Tri; Espinola, Malachi; Tevy, Vattanary; Hokenstad, Ethan; Neff, Callen)
Version
0.1
Date
2024-06-03

Function Documentation

◆ OpenDataFile()

FileID_t OpenDataFile ( char * name,
char ** entry_names,
int num_entries )

Opens a data file

Parameters
nameThe name of the file
entry_namesThe name of each entry
num_entriesThe number of entries
Returns
The file ID upon success, or negative upon failure
Here is the call graph for this function:

◆ RecordData()

int RecordData ( FileID_t file,
double data[],
int data_length )

Records data for each entry

Parameters
fileThe FileID_t to record upon
dataThe array of data to record (in order of the entries)
data_lengthThe length of the data array
Returns
0 iff success, negative upon failure
Here is the call graph for this function:

◆ RecordValue()

int RecordValue ( FileID_t file,
char * value_name,
double value )

Records one-time data

Parameters
fileThe FileID_t to record upon
value_nameThe name of the value
valueThe value to record
Returns
0 iff success, negative upon failure

◆ SaveDataFiles()

int SaveDataFiles ( )

Records all data into actual files, and closes all files

Returns
0 iff success, negative upon failure
Here is the call graph for this function: