Allocate/deallocate memory, and save data.
More...
|
void | cleanupThreadArgs (ThreadSafeArgs *args) |
| Clean up the thread-safe argument structure.
|
|
int | readTaskState (FILE *log, LogData *logData) |
| Read task state data from a binary log file.
|
|
void | saveParametersToFile (const char *paramFolderFS, TaskParameters *parameters, uint16_t parameters_index) |
| Write parameters to text file.
|
|
void | saveTaskState (FILE *log, LogData *logData) |
| Write task state data to binary log file.
|
|
Allocate/deallocate memory, and save data.
◆ cleanupThreadArgs()
Clean up the thread-safe argument structure.
- Parameters
-
◆ readTaskState()
int readTaskState |
( |
FILE * | log, |
|
|
LogData * | logData ) |
Read task state data from a binary log file.
This function reads a single record from the binary log file log
and populates the provided pointers trial
, state
, and set_index
with the data read from the file.
- Parameters
-
log | The binary log file to read from. |
logData | Pointer to the data structure to read into. |
- Returns
- 1 if successful, 0 if the end of file is reached or an error occurs.
◆ saveParametersToFile()
void saveParametersToFile |
( |
const char * | paramFolderFS, |
|
|
TaskParameters * | parameters, |
|
|
uint16_t | parameters_index ) |
Write parameters to text file.
- Parameters
-
paramFolderFS | Folder where the parameters files will be saved, using forward-slashes for file-separators and no "final" file separator. |
parameters | Pointer to TaskParameters parameter struct. |
parameters_index | Index to be associated with the saved parameters. |
◆ saveTaskState()
void saveTaskState |
( |
FILE * | log, |
|
|
LogData * | logData ) |
Write task state data to binary log file.
- Parameters
-
log | Pointer to log file where data will be dumped. |
logData | Pointer to the data struct to dump to the file. |