Add a small FAPI Hex parser utility

Add utility functions to print the FAPI messages contents
Add dump functions for DL_TTI.request PDUs, remaining message structures to be finished
Add file examples.md with some examples on how to use nfapi_hex_parser
This commit is contained in:
Rúben Soares Silva
2025-01-23 13:34:24 +00:00
parent f9bff3d6a0
commit 1451f30b93
9 changed files with 1138 additions and 0 deletions
+2
View File
@@ -34,6 +34,8 @@
#include "assertions.h"
#include "debug.h"
#define INDENTED_PRINTF(format, ...) printf("%*s" format, depth * 2, "", ##__VA_ARGS__)
#define EQ_TLV(_tlv_a, _tlv_b) \
do { \
EQ(_tlv_a.tl.tag, _tlv_b.tl.tag); \
@@ -56,4 +56,15 @@ void copy_stop_request(const nfapi_nr_stop_request_scf_t *src, nfapi_nr_stop_req
void copy_stop_indication(const nfapi_nr_stop_indication_scf_t *src, nfapi_nr_stop_indication_scf_t *dst);
void copy_error_indication(const nfapi_nr_error_indication_scf_t *src, nfapi_nr_error_indication_scf_t *dst);
void dump_param_request(const nfapi_nr_param_request_scf_t *msg);
void dump_param_response(const nfapi_nr_param_response_scf_t *msg);
void dump_config_request(const nfapi_nr_config_request_scf_t *msg);
void dump_config_response(const nfapi_nr_config_response_scf_t *msg);
void dump_start_request(const nfapi_nr_start_request_scf_t *msg);
void dump_start_response(const nfapi_nr_start_response_scf_t *msg);
void dump_stop_request(const nfapi_nr_stop_request_scf_t *msg);
void dump_stop_indication(const nfapi_nr_stop_indication_scf_t *msg);
void dump_error_indication(const nfapi_nr_error_indication_scf_t *msg);
#endif // OPENAIRINTERFACE_NR_FAPI_P5_UTILS_H
@@ -75,4 +75,16 @@ size_t get_crc_indication_size(const nfapi_nr_crc_indication_t *msg);
size_t get_uci_indication_size(const nfapi_nr_uci_indication_t *msg);
size_t get_srs_indication_size(const nfapi_nr_srs_indication_t *msg);
size_t get_rach_indication_size(nfapi_nr_rach_indication_t *msg);
void dump_dl_tti_request(const nfapi_nr_dl_tti_request_t *msg);
void dump_ul_tti_request(const nfapi_nr_ul_tti_request_t *msg);
void dump_slot_indication(const nfapi_nr_slot_indication_scf_t *msg);
void dump_ul_dci_request(const nfapi_nr_ul_dci_request_t *msg);
void dump_tx_data_request(const nfapi_nr_tx_data_request_t *msg);
void dump_rx_data_indication(const nfapi_nr_rx_data_indication_t *msg);
void dump_crc_indication(const nfapi_nr_crc_indication_t *msg);
void dump_uci_indication(const nfapi_nr_uci_indication_t *msg);
void dump_srs_indication(const nfapi_nr_srs_indication_t *msg);
void dump_rach_indication(const nfapi_nr_rach_indication_t *msg);
#endif // OPENAIRINTERFACE_NR_FAPI_P7_UTILS_H