1 /*
2  * Copyright 2018 Oticon A/S
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #ifndef P2G4_CHANNEL_AND_MODEM_PRIV_H
7 #define P2G4_CHANNEL_AND_MODEM_PRIV_H
8 
9 #include "bs_types.h"
10 #include "bs_pc_2G4.h"
11 #include "p2G4_pending_tx_rx_list.h"
12 
13 #ifdef __cplusplus
14 extern "C"{
15 #endif
16 
17 typedef struct {
18   uint64_t last_tx_ctr; //If the Tx doesn't change we don't need to recalculate the channel
19   uint64_t last_rx_ctr; //During the same Rx, if the Tx doesn't change we assume the channel doesnt change
20 
21   uint64_t rx_ctr; //This counter changes every time we are told to check if a packet is synchronized in this receiver
22 
23   double *att; //Array of attenuations from each possible transmitter [0..nbr_devices-1]
24   double SNR_ISI;
25 
26   double *rx_pow;     //Array of power received from each possible transmitter [0..nbr_devices-1]
27 
28   double RSSI_meas_power; //equivalent CW power in dBm in the analog input which we measure by the analog
29   double SNR_analog_o;
30 
31   double SNR_total;
32 
33   uint32_t BER;
34   uint32_t sync_prob;
35 } rec_status_t;
36 
37 #ifdef __cplusplus
38 }
39 #endif
40 
41 #endif
42