diff options
Diffstat (limited to 'analysis/rtt/src/logger.h')
| -rw-r--r-- | analysis/rtt/src/logger.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/analysis/rtt/src/logger.h b/analysis/rtt/src/logger.h index f1602c9..904c327 100644 --- a/analysis/rtt/src/logger.h +++ b/analysis/rtt/src/logger.h | |||
| @@ -1,9 +1,25 @@ | |||
| 1 | |||
| 2 | #ifndef LOGGER_H | 1 | #ifndef LOGGER_H |
| 3 | #define LOGGER_H | 2 | #define LOGGER_H |
| 4 | 3 | ||
| 4 | /** | ||
| 5 | * @brief Initializes the logger by opening the CSV file and writing the header. | ||
| 6 | * | ||
| 7 | * @param filename Path to the CSV log file. | ||
| 8 | */ | ||
| 5 | void logger_init(const char *filename); | 9 | void logger_init(const char *filename); |
| 6 | void logger_cleanup(); | 10 | |
| 11 | /** | ||
| 12 | * @brief Closes the CSV file and cleans up resources. | ||
| 13 | */ | ||
| 14 | void logger_cleanup(void); | ||
| 15 | |||
| 16 | /** | ||
| 17 | * @brief Processes an incoming message payload, parses the timestamp, | ||
| 18 | * calculates RTT and throughput, and logs this data to the CSV and stdout. | ||
| 19 | * | ||
| 20 | * @param payload Pointer to the message payload. | ||
| 21 | * @param payloadlen Length of the payload in bytes. | ||
| 22 | */ | ||
| 7 | void logger_handle_message(const void *payload, int payloadlen); | 23 | void logger_handle_message(const void *payload, int payloadlen); |
| 8 | 24 | ||
| 9 | #endif // LOGGER_H | 25 | #endif |
