From 01713bbe20d2cf5aafbe5eb32721d3e4fc5823d8 Mon Sep 17 00:00:00 2001 From: Filip Wandzio Date: Fri, 5 Sep 2025 03:30:24 +0200 Subject: Standarize the project directory for monorepo-like developer experience Move the clang formatter to the root of the three so all nested projects could use it Provide README for all other projects Refactor the code in rtt agregator Signed-off-by: Filip Wandzio --- analysis/rtt/src/logger.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'analysis/rtt/src/logger.h') 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 @@ - #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); -void logger_cleanup(); + +/** + * @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 // LOGGER_H +#endif -- cgit v1.2.3