IF_Module_nb_iot.h 1.62 KB
Newer Older
1 2 3 4 5 6 7 8

/*This is the interface module between PHY
* this will trigger the corresponding function in MAC or PHY layer according to the type of the message
*
*
*
*/

9
#include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h"
10

11 12


13 14 15 16
#define NUMBER_OF_UE_MAX 20

typedef struct{
	
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
//flag to show which message is
uint8_t UL_MSG_flag;

//rnti
rnti_t rntiP;
//Pointer to sdu
uint8_t *sdu;
//Pointer to sdu length 
uint16_t sdu_lenP;
//HARQ ID
int harq_pidP;
//MSG3 flag
uint8_t *msg3_flagP;
//ACK/NAK
boolean_t NAK;
Nick Ho's avatar
Nick Ho committed
32 33
// ULSCH consecutive error
uint32_t ulsch_consecutive_errors;
34 35 36 37 38 39

}UL_SPEC_t;

//UL_IND
typedef struct{

40 41 42 43 44 45 46 47 48 49 50 51 52
 /*Start at the common part*/

 int test;
 //Module ID
 module_id_t module_id;
 //CC ID
 int CC_id;
 //frame 
 frame_t frame;
 //subframe
 sub_frame_t subframe;
 //Number of availble UE
 int UE_NUM;
Nick Ho's avatar
Nick Ho committed
53

54 55 56 57 58
 /*preamble part*/
 //index of the preamble
 uint16_t preamble_index;
 //timing offset by PHY
 int16_t timing_offset;
59

60 61
 /*UE specific part*/
 UL_SPEC_t UL_SPEC_Info[NUMBER_OF_UE_MAX]; 
62

63
 }UL_IND_t;
64

65

66
typedef struct{
67

68 69 70 71 72 73 74 75 76 77 78
 /*Common part*/
 module_id_t module_idP; 
 int CC_id;
 frame_t frameP;
 sub_frame_t subframeP;

 rnti_t rntiP;

 /*Downlink data*/
 //TB size for Downlink data
 uint8_t TBindex;
79 80
 //PDU for Downlink
 uint8_t *pdu_payload;
81 82 83 84

 /*DCI start*/
 // Format of DCI
 uint8_t DCI_Format;
85
 // Content of DCI
86
 void *DCI_Content;
87 88 89 90

}Sched_Rsp_t;

/*Interface for uplink, transmitting the Preamble(list), ULSCH SDU, NAK, Tick (trigger scheduler)
91
*/
Nick Ho's avatar
Nick Ho committed
92
void UL_indication(UL_IND_t UL_INFO);
93 94

/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
95
void Schedule_Response(Sched_Rsp_t Sched_INFO);
96 97

/*Interface for Configuration*/
98
//void Config_Request();