aboutsummaryrefslogtreecommitdiffstats
path: root/analysis/rtt/src/logger.h
diff options
context:
space:
mode:
authorFilip Wandzio <contact@philw.dev>2025-09-05 03:30:24 +0200
committerFilip Wandzio <contact@philw.dev>2025-09-05 03:30:24 +0200
commit01713bbe20d2cf5aafbe5eb32721d3e4fc5823d8 (patch)
tree33748d0019e3939bd0daf50940407e51d4325a8f /analysis/rtt/src/logger.h
parent1ba21da6cbc63c0c549fb92731e25bedc482eb51 (diff)
downloade1-01713bbe20d2cf5aafbe5eb32721d3e4fc5823d8.tar.gz
e1-01713bbe20d2cf5aafbe5eb32721d3e4fc5823d8.zip
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 <contact@philw.dev>
Diffstat (limited to 'analysis/rtt/src/logger.h')
-rw-r--r--analysis/rtt/src/logger.h22
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 */
5void logger_init(const char *filename); 9void logger_init(const char *filename);
6void logger_cleanup(); 10
11/**
12 * @brief Closes the CSV file and cleans up resources.
13 */
14void 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 */
7void logger_handle_message(const void *payload, int payloadlen); 23void logger_handle_message(const void *payload, int payloadlen);
8 24
9#endif // LOGGER_H 25#endif