#ifndef LOGGER_H #define LOGGER_H /** * @brief Initializes the logger by opening the CSV file and writing the header. * * @param filename Path to the CSV log file. */ void logger_init(const char *filename); /** * @brief Closes the CSV file and cleans up resources. */ void logger_cleanup(void); /** * @brief Processes an incoming message payload, parses the timestamp, * calculates RTT and throughput, and logs this data to the CSV and stdout. * * @param payload Pointer to the message payload. * @param payloadlen Length of the payload in bytes. */ void logger_handle_message(const void *payload, int payloadlen); #endif