1 /* 2 * Copyright 2018 Oticon A/S 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * Phy activity dumping/tracing 9 * 10 * Unless told otherwise thru command line parameters the Phy will dump 11 * in results/<sim_id>/ all activity from all devices as well as information 12 * about the results it received from the modem models 13 * 14 * The dumping can be run in 2 modes: It can either dump, or compare what it 15 * would have dumped with the content of the files present in the disk 16 */ 17 #ifndef P2G4_DUMP_H 18 #define P2G4_DUMP_H 19 20 #include "bs_types.h" 21 #include "bs_pc_2G4_types.h" 22 #include "p2G4_channel_and_modem_priv.h" 23 #include "p2G4_pending_tx_rx_list.h" 24 25 #ifdef __cplusplus 26 extern "C"{ 27 #endif 28 29 /** 30 * Open all dump files (as configured from command line) 31 */ 32 void open_dump_files(uint8_t comp_i, uint8_t stop, uint8_t dump_imm, const char* s, 33 const char* p, const uint n_dev_i); 34 35 /** 36 * Close all dump files (the simulation has ended) 37 */ 38 int close_dump_files(); 39 40 /** 41 * Write to file information about a transmission 42 * (v2 API) 43 */ 44 void dump_tx(tx_el_t *tx, uint dev_nbr); 45 46 /** 47 * Write to file information about a completed reception 48 */ 49 void dump_rx(rx_status_t *rx_st, uint8_t* packet, uint d); 50 51 /** 52 * Write to file information about a completed RSSI measurement 53 */ 54 void dump_RSSImeas(p2G4_rssi_t *RSSI_req, p2G4_rssi_done_t* RSSI_res, uint d); 55 56 /** 57 * Write to file information about a completed CCA check 58 */ 59 void dump_cca(cca_status_t *cca, uint dev_nbr); 60 61 /** 62 * Write to file information about a modem model invocation 63 */ 64 void dump_ModemRx(bs_time_t now, uint tx_nbr, uint d, uint n_dev, uint CalNotRecal, p2G4_radioparams_t *radio_params, rec_status_t *rec_s, tx_l_c_t *txl_c ); 65 66 #ifdef __cplusplus 67 } 68 #endif 69 70 #endif 71