unsignedcharcooperation_flag;// for cooperative communication
unsignedcharis_secondary_eNB;// primary by default
unsignedcharis_init_sync;/// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system.
unsignedcharhas_valid_precoder;/// Flag to tell if secondary eNB has channel estimates to create NULL-beams from, and this B/F vector is created.
unsignedcharPeNB_id;/// id of Primary eNB
intrx_offset;/// Timing offset (used if is_secondary_eNB)
/// hold the precoder for NULL beam to the primary user
int**dl_precoder_SeNB[3];
///
charlog2_maxp;/// holds the maximum channel/precoder coefficient
/// if ==0 enables phy only test mode
intmac_enabled;
/// For emulation only (used by UE abstraction to retrieve DCI)
uint8_tnum_common_dci[2];// num_dci in even/odd subframes
///
uint8_tnum_ue_spec_dci[2];// num_dci in even/odd subframes
///
DCI_ALLOC_NB_IoT_tdci_alloc[2][NUM_DCI_MAX_NB_IoT];// dci_alloc from even/odd subframes
* NUMBER_OF_UE_MAX_NB_IoT maybe in the future should be dynamic because could be very large and the memory may explode
* (is almost the indication of the number of UE context that we are storing at PHY layer)
*
* reasoning: the following data structure (ndlsch, nulsch ecc..) are used to store the context that should be transmitted in at least n+4 subframe later
* (the minimum interval between NPUSCH and the ACK for this)
* the problem is that in NB_IoT the ACK for the UPLINK is contained in the DCI through the NDI field (if this value change from the previous one then it means ACK)
* but may we could schedule this DCI long time later so may lots of contents shuld be stored (there is no concept of phich channel in NB-IoT)
* For the DL transmission the UE send a proper ACK/NACK message
*
* *the HARQ process should be killed when the NDI change
*
* *In the Structure for nulsch we should also store the information related to the subframe (because each time we should read it and understand what should be done
* in that subframe)
*
*/
/*
* TIMING
* the entire transmission and scheduling are done for the "subframe" concept but the subframe = proc->subframe_tx (that in reality is the subframe_rx +4)
* (see USER/lte-enb/wakeup_rxtx )
*
* Related to FAPI:
* DCI and DL_CONFIG.request (also more that 1) and MAC_PDU are transmitted in the same subframe (our assumption) so will be all contained in the schedule_response getting from the scheduler
* DCI0 and UL_CONFIG.request are transmitted in the same subframe (our assumption) so contained in the schedule_response
*
*/
//TODO: check what should be NUMBER_OF_UE_MAX_NB_IoT value
/// \brief Component carrier ID for this PHY instance
uint8_tCC_id;
/// \brief Mapping of CC_id antennas to cards
openair0_rf_maprf_map;
//uint8_t local_flag;
/// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach)
runmode_NB_IoT_tmode;
/// \brief Indicator that UE should perform band scanning
intUE_scan;
/// \brief Indicator that UE should perform coarse scanning around carrier
intUE_scan_carrier;
/// \brief Indicator that UE is synchronized to an eNB
intis_synchronized;
/// Data structure for UE process scheduling
UE_proc_NB_IoT_tproc;
/// Flag to indicate the UE shouldn't do timing correction at all
intno_timing_correction;
/// \brief Total gain of the TX chain (16-bit baseband I/Q to antenna)
uint32_ttx_total_gain_dB;
/// \brief Total gain of the RX chain (antenna to baseband I/Q) This is a function of rx_gain_mode (and the corresponding gain) and the rx_gain of the card.
uint32_trx_total_gain_dB;
/// \brief Total gains with maximum RF gain stage (ExpressMIMO2/Lime)
uint32_trx_gain_max[4];
/// \brief Total gains with medium RF gain stage (ExpressMIMO2/Lime)
uint32_trx_gain_med[4];
/// \brief Total gains with bypassed RF gain stage (ExpressMIMO2/Lime)
uint32_trx_gain_byp[4];
/// \brief Current transmit power
int16_ttx_power_dBm[10];
/// \brief Total number of REs in current transmission
inttx_total_RE[10];
/// \brief Maximum transmit power
int8_ttx_power_max_dBm;
/// \brief Number of eNB seen by UE
uint8_tn_connected_eNB;
/// \brief indicator that Handover procedure has been initiated
uint8_tho_initiated;
/// \brief indicator that Handover procedure has been triggered
uint8_tho_triggered;
/// \brief Measurement variables.
PHY_MEASUREMENTS_NB_IoTmeasurements;
NB_IoT_DL_FRAME_PARMSframe_parms;
/// \brief Frame parame before ho used to recover if ho fails.
NB_IoT_DL_FRAME_PARMSframe_parms_before_ho;
NB_IoT_UE_COMMONcommon_vars;
NB_IoT_UE_PDSCH*pdsch_vars[2][NUMBER_OF_CONNECTED_eNB_MAX+1];// two RxTx Threads