Something went wrong on our end
log_data.h 1.26 KiB
/*
* log_data.h
*
* Created on: Feb 20, 2016
* Author: ucart
*/
#ifndef LOG_DATA_H_
#define LOG_DATA_H_
#include "type_def.h"
#define LOG_STARTING_SIZE 60000 //262144 // 2^18 32768 2^15
// Maximum number of block outputs you can record, and maximum number of block parameters to record
#define MAX_LOG_NUM 50
void initialize_logging(log_t* log_struct, parameter_t* ps);
/**
* Adds the given block output to the data to be logged
*/
void addOutputToLog(log_t* log_struct, int controller_id, int output_id, char* units);
/**
* Adds the given block parameter to the data to be logged
*/
void addParamToLog(log_t* log_struct, int controller_id, int param_id, char* units);
/**
* @brief
* Logs the data obtained throughout the controller loop.
*
* @param log_struct
* structure of the data to be logged
*
* @return
* error message
*
*/
int log_data(log_t* log_struct, parameter_t* ps);
/**
* Fills up an xbox hueg amount of memory with log data
*/
void updateLog(log_t log_struct);
/**
* Prints all the log information.
*/
void printLogging(hardware_t *hardware_struct, log_t* log_struct, parameter_t* ps, raw_sensor_t* raw_sensors);
/**
* Resets and clears logged data
*/
void resetLogging();
#endif /* LOG_DATA_H_ */