defs_NB_IoT.h 2.44 KB
Newer Older
1 2 3 4 5


#ifndef __openair_SCHED_NB_IOT_H__
#define __openair_SCHED_NB_IOT_H__

6
#include "PHY/defs.h"
7
#include "PHY/defs_NB_IoT.h"
8 9
//#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair2/PHY_INTERFACE/nfapi_interface.h"
10

11 12 13 14 15 16 17 18 19


enum openair_HARQ_TYPE_NB_IoT {
  openair_harq_DL_NB_IoT = 0,
  openair_harq_UL_NB_IoT,
  openair_harq_RA_NB_IoT
};


20
void process_schedule_rsp_NB_IoT(Sched_Rsp_NB_IoT_t *sched_rsp,
21
                          		 PHY_VARS_eNB_NB_IoT *eNB,
22
                          		 eNB_rxtx_proc_t *proc);
Nick Ho's avatar
Nick Ho committed
23

24
/*Processing the ue-specific resources for uplink in NB-IoT*/
25
void phy_procedures_eNB_uespec_RX_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); // UL_IND_NB_IoT_t *UL_INFO);
26 27

/* For NB-IoT, we put NPBCH in later part, since it would be scheduled by MAC scheduler,this generates NRS/NPSS/NSSS*/
28
void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); 
29 30

/*Generate the ulsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/
31
void generate_eNB_ulsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu);
32 33

/*Generate the dlsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/
34
void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,nfapi_dl_config_request_pdu_t *dl_config_pdu);
35 36

/*Process all the scheduling result from MAC and also common signals.*/
37
void phy_procedures_eNB_TX_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc,int do_meas);
38

39
int8_t find_ue_NB_IoT(uint16_t rnti, PHY_VARS_eNB *eNB);
40

41 42
NB_IoT_DL_FRAME_PARMS *get_NB_IoT_frame_parms(module_id_t Mod_id, uint8_t CC_id);

43 44
int16_t get_hundred_times_delta_IF_eNB_NB_IoT(PHY_VARS_eNB_NB_IoT *phy_vars_eNB,uint8_t UE_id,uint8_t harq_pid, uint8_t bw_factor);

45 46 47 48 49 50
uint32_t is_SIB1_NB_IoT(const frame_t          frameP,
                        long                   schedulingInfoSIB1,   //from the mib
                        int                    physCellId,           //by configuration
                        NB_IoT_eNB_NDLSCH_t   *ndlsch_SIB1
                        );

Matthieu Kanj's avatar
Matthieu Kanj committed
51
uint32_t rx_nprach_NB_IoT(PHY_VARS_eNB *eNB,int frame, uint8_t subframe, uint16_t *rnti, uint16_t *preamble_index, uint16_t *timing_advance);
52

Matthieu Kanj's avatar
Matthieu Kanj committed
53
void npusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
54 55 56 57

////////////////// NB-IoT testing ////////////////////
void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t data_or_control);

58 59 60
#endif