Commit 56d45ba3 authored by winckel's avatar winckel

Fixed warnings.

Moved some direct printf into logging system.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4491 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 008f7c19
......@@ -977,7 +977,7 @@ void add_ue_spec_dci(DCI_PDU *DCI_pdu,void *pdu,u16 rnti,unsigned char dci_size_
void schedule_SI(unsigned char Mod_id,u32 frame, unsigned char *nprb,unsigned int *nCCE) {
unsigned char bcch_sdu_length;
int mcs;
int mcs = -1;
void *BCCH_alloc_pdu=(void*)&eNB_mac_inst[Mod_id].BCCH_alloc_pdu;
bcch_sdu_length = mac_rrc_data_req(Mod_id,
......@@ -1103,7 +1103,7 @@ int schedule_MBMS(unsigned char Mod_id,u32 frame, u8 subframe) {
unsigned char mcch_sdu_length;
unsigned char header_len_mcch=0,header_len_msi=0,header_len_mtch=0, header_len_mtch_temp=0, header_len_mcch_temp=0, header_len_msi_temp=0;
int ii=0, msi_pos=0;
int mcch_mcs;
int mcch_mcs = -1;
u16 TBS,j,padding=0,post_padding=0;
mac_rlc_status_resp_t rlc_status;
int num_mtch;
......@@ -1575,7 +1575,8 @@ void schedule_RA(unsigned char Mod_id,u32 frame, unsigned char subframe,unsigned
u16 rrc_sdu_length;
unsigned char lcid,offset;
s8 UE_id;
unsigned short TBsize,msg4_padding,msg4_post_padding,msg4_header;
unsigned short TBsize = -1;
unsigned short msg4_padding,msg4_post_padding,msg4_header;
for (i=0;i<NB_RA_PROC_MAX;i++) {
......
......@@ -65,9 +65,11 @@ unsigned short fill_rar(u8 Mod_id,
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)dlsch_buffer;
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
uint8_t *rar = (uint8_t *)(dlsch_buffer+1);
int i,ra_idx;
int i;
int ra_idx = -1;
uint16_t rballoc;
uint8_t mcs,TPC,cqi_req,ULdelay,cqireq;
uint8_t mcs,TPC,ULdelay,cqireq;
//uint8_t cqi_req;
for (i=0;i<NB_RA_PROC_MAX;i++) {
if (eNB_mac_inst[Mod_id].RA_template[i].generate_rar == 1) {
......
......@@ -546,11 +546,11 @@ s8 ue_get_mbsfn_sf_alloction (unsigned char Mod_id, u8 mbsfn_sync_area, unsigned
int ue_query_mch(uint8_t Mod_id, uint32_t frame, uint32_t subframe, uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active) {
int i=0, j=0, ii=0, msi_pos=0, mcch_mcs;
int i=0, j=0, ii=0, msi_pos=0, mcch_mcs = - 1;
int mcch_flag=0, mtch_flag=0, msi_flag=0;
int mbsfn_period = 0;// 1<<(UE_mac_inst[Mod_id].mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
int mcch_period = 0;// 32<<(UE_mac_inst[Mod_id].mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
int mch_scheduling_period;
int mch_scheduling_period = -1;
if (UE_mac_inst[Mod_id].pmch_Config[0])
mch_scheduling_period = 8<<(UE_mac_inst[Mod_id].pmch_Config[0]->mch_SchedulingPeriod_r9);
......@@ -1270,8 +1270,8 @@ UE_L2_STATE_t ue_scheduler(u8 Mod_id,u32 frame, u8 subframe, lte_subframe_t dire
int lcid; // lcid index
int TTI= 1;
int bucketsizeduration;
int bucketsizeduration_max;
int bucketsizeduration = -1;
int bucketsizeduration_max = -1;
// mac_rlc_status_resp_t rlc_status[MAX_NUM_LCGID]; // 4
// s8 lcg_id;
struct RACH_ConfigCommon *rach_ConfigCommon = (struct RACH_ConfigCommon *)NULL;
......
......@@ -642,7 +642,7 @@ rlc_um_receive_process_dar (rlc_um_entity_t *rlcP, u32_t frame, u8_t eNB_flag, m
// -else:
// -place the received UMD PDU in the reception buffer.
signed int sn;
signed int sn = -1;
signed int in_window;
if (rlcP->rx_sn_length == 10) {
......
......@@ -174,7 +174,7 @@ typedef struct {
#define RLC_MAX_LC ((max_val_DRB_Identity+1)* MAX_MOBILES_PER_RG)
#endif
protected_rlc(void (*rlc_rrc_data_ind) (module_id_t , u32_t, u8_t, rb_id_t , sdu_size_t , char* );)
protected_rlc(void (*rlc_rrc_data_ind) (module_id_t , u32_t, u8_t, rb_id_t , sdu_size_t , u8_t* );)
protected_rlc(void (*rlc_rrc_data_conf) (module_id_t , rb_id_t , mui_t, rlc_tx_status_t );)
/*! \struct rlc_pointer_t
......
......@@ -42,10 +42,9 @@ rlc_op_status_t rrc_rlc_config_asn1_req (module_id_t module_idP, u32_t frameP, u
long int cnt2 = 0;
// long int mrb_id = 0;
long int mbms_service_id = 0;
long int mbms_session_id = 0;
// long int mbms_session_id = 0;
PMCH_Info_r9_t* pmch_info_r9 = NULL;
MBMS_SessionInfo_r9_t* mbms_session = NULL;
DL_UM_RLC_t* mbms_dl_UM_RLC = NULL;
rlc_op_status_t rlc_status = RLC_OP_STATUS_OK;
DL_UM_RLC_t dl_um_rlc;
#endif
......@@ -283,13 +282,14 @@ rlc_op_status_t rrc_rlc_config_asn1_req (module_id_t module_idP, u32_t frameP, u
} else {
lc_id = mbms_session->logicalChannelIdentity_r9 + (maxDRB + 3);
}
/*
if (mbms_session->sessionId_r9 != NULL) {
mbms_session_id = mbms_session->sessionId_r9->buf[0];
} else {
mbms_session_id = mbms_session->logicalChannelIdentity_r9;
}
*/
mbms_service_id = mbms_session->tmgi_r9.serviceId_r9.buf[2];// can use the pmch_index, here is the value 'cnt'
rb_id = (mbms_service_id * maxSessionPerPMCH) + lc_id;
......@@ -424,20 +424,20 @@ rlc_op_status_t rrc_rlc_add_rlc (module_id_t module_idP, u32_t frameP, rb_id_t
if ((chan_idP >= RLC_MAX_LC ) || (chan_idP < 1)) {
LOG_E(RLC,"Got wrong channel id %d\n",chan_idP);
exit -1;
exit (-1);
return RLC_OP_STATUS_BAD_PARAMETER;
}
if (rb_idP >= RLC_MAX_RB ) {
LOG_E(RLC,"Got wrong radio bearer id %d\n",rb_idP);
exit -1;
exit (-1);
return RLC_OP_STATUS_BAD_PARAMETER;
}
if (rlc[module_idP].m_lcid2rbid[chan_idP] != -1) {
LOG_E(RLC,"Error in RLC config channel ID already configured %d(module_id %d, state %d)\n",
chan_idP, module_idP, rlc[module_idP].m_lcid2rbid[chan_idP]);
exit -1;
exit (-1);
return RLC_OP_STATUS_BAD_PARAMETER;
}
for (index = 0; index < index_max; index++) {
......
......@@ -242,10 +242,10 @@ typedef struct
s16 (*get_PL)(u8 Mod_id,u8 eNB_index);
/// Function for UE MAC to retrieve the rssi
u8 (*get_RSSI)(u8 Mod_id);
s8 (*get_RSSI)(u8 Mod_id);
/// Function for UE MAC to retrieve the total gain
u8 (*get_rx_total_gain_dB)(u8 Mod_id);
s8 (*get_rx_total_gain_dB)(u8 Mod_id);
/// Function for UE MAC to retrieve the number of adjustent cells
u8 (*get_n_adj_cells)(u8 Mod_id);
......
......@@ -107,7 +107,7 @@ s8 mac_rrc_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu,u16 Sdu_len,u8 eNB
}
/********************************************************************************************************************/
void rlcrrc_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, unsigned int Sdu_size,u8 *Buffer){
void rlcrrc_data_ind(module_id_t Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, unsigned int Sdu_size,u8 *Buffer){
/********************************************************************************************************************/
#ifdef CELLULAR
rrc_L2_rlc_data_ind_rx(Mod_id,Srb_id, Sdu_size, Buffer);
......
......@@ -42,20 +42,29 @@
s8 mac_rrc_data_req(u8 Mod_id, u32 frame, u16 Srb_id, u8 Nb_tb, u8 *Buffer, u8 eNB_flag, u8 eNB_index,
u8 mbsfn_sync_area);
s8 mac_rrc_data_ind(u8 Mod_id, u32 frame, u16 Srb_id, u8 *Sdu, u16 Sdu_len, u8 eNB_flag, u8 eNB_index,
u8 mbsfn_sync_area);
void mac_lite_sync_ind(u8 Mod_id, u8 status);
void mac_rrc_meas_ind(u8, MAC_MEAS_REQ_ENTRY*);
void rlcrrc_data_ind(u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Rb_id, u32 sdu_size, u8 *Buffer);
void rlcrrc_data_ind(module_id_t Mod_id, u32 frame, u8 eNB_flag, unsigned int Rb_id, u32 sdu_size, u8 *Buffer);
u8 pdcp_rrc_data_req(u8 module_id, u32 frame, u8 eNB_flag, unsigned int rb_id, u32 muiP, u32 confirmP,
unsigned int sdu_buffer_size, u8* sdu_buffer, u8 mode);
void pdcp_rrc_data_ind(u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int Srb_id, unsigned int Sdu_size, u8 *Buffer);
void mac_out_of_sync_ind(u8 Mod_id, u32 frame, u16 CH_index);
char openair_rrc_eNB_init(u8 Mod_id);
char openair_rrc_ue_init(u8 Mod_id, unsigned char eNB_index);
int mac_get_rrc_status(u8 Mod_id, u8 eNB_flag, u8 index);
void mac_in_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index);
#endif
......@@ -508,7 +508,7 @@ u8 rrc_lite_data_req(u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int rb_id, u32
}
//-------------------------------------------------------------------------------------------//
void rrc_lite_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag,u32 Srb_id, u32 sdu_size,u8 *Buffer){
void rrc_lite_data_ind(module_id_t Mod_id, u32 frame, u8 eNB_flag,u32 Srb_id, u32 sdu_size,u8 *Buffer){
//-------------------------------------------------------------------------------------------//
u8 UE_index=(Srb_id-1)/NB_RB_MAX;
u8 DCCH_index = Srb_id % NB_RB_MAX;
......
......@@ -37,7 +37,6 @@
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
*/
#ifndef __OPENAIR_RRC_DEFS_H__
#define __OPENAIR_RRC_DEFS_H__
......@@ -94,7 +93,7 @@
//#define NUM_PRECONFIGURED_LCHAN (NB_CH_CX*2) //BCCH, CCCH
typedef enum {
typedef enum UE_STATE_e {
RRC_IDLE=0,
RRC_SI_RECEIVED,
RRC_CONNECTED,
......@@ -102,8 +101,7 @@ typedef enum {
RRC_HO_EXECUTION
} UE_STATE_t;
typedef enum {
typedef enum HO_STATE_e {
HO_IDLE=0,
HO_MEASURMENT,
HO_PREPARE,
......@@ -111,7 +109,6 @@ typedef enum {
HO_COMPLETE // initiated by the target eNB
} HO_STATE_t;
//#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG
#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; }
#define RRM_MALLOC(t,n) (t *) malloc16( sizeof(t) * n )
......@@ -127,11 +124,10 @@ typedef enum {
#define UNDEF_SECURITY_MODE 0xff
#define NO_SECURITY_MODE 0x33
#define CBA_OFFSET 0xfff4
// #define NUM_MAX_CBA_GROUP 4 // in the platform_constants
typedef struct{
typedef struct UE_RRC_INFO_s {
UE_STATE_t State;
u8 SIB1Status;
u8 SIStatus;
......@@ -151,17 +147,16 @@ typedef struct{
u32 T310_cnt;
u32 N310_cnt;
u32 N311_cnt;
}UE_RRC_INFO;
} __attribute__ ((__packed__)) UE_RRC_INFO;
typedef struct UE_S_TMSI_s {
uint8_t presence;
uint8_t mme_code;
uint32_t m_tmsi;
}__attribute__ ((__packed__)) UE_S_TMSI;
} __attribute__ ((__packed__)) UE_S_TMSI;
#if defined(ENABLE_ITTI)
typedef enum e_rab_satus_e
{
typedef enum e_rab_satus_e {
E_RAB_STATUS_NEW,
E_RAB_STATUS_DONE,
E_RAB_STATUS_FAILED,
......@@ -170,10 +165,10 @@ typedef enum e_rab_satus_e
typedef struct e_rab_param_s {
e_rab_t param;
uint8_t status;
} e_rab_param_t;
} __attribute__ ((__packed__)) e_rab_param_t;
#endif
typedef struct eNB_RRC_UE_INFO_s{
typedef struct eNB_RRC_UE_INFO_s {
u8 Status;
#if defined(ENABLE_ITTI)
......@@ -193,9 +188,9 @@ typedef struct eNB_RRC_UE_INFO_s{
/* list of e_rab to be setup by RRC layers */
e_rab_param_t e_rab[S1AP_MAX_E_RAB];
#endif
}__attribute__ ((__packed__)) eNB_RRC_UE_INFO;
} __attribute__ ((__packed__)) eNB_RRC_UE_INFO;
typedef struct eNB_RRC_INFO_s{
typedef struct eNB_RRC_INFO_s {
/* Number of UE handle by the eNB */
uint8_t Nb_ue;
......@@ -204,18 +199,18 @@ typedef struct eNB_RRC_INFO_s{
/* Information on UE */
eNB_RRC_UE_INFO UE[NUMBER_OF_UE_MAX];
}__attribute__ ((__packed__)) eNB_RRC_INFO;
} __attribute__ ((__packed__)) eNB_RRC_INFO;
typedef struct{
typedef struct RRC_INFO_s {
int Status;
union{
UE_RRC_INFO UE_info;
eNB_RRC_INFO CH_info;
}Info;
}RRC_INFO;
} RRC_INFO;
/* Intermediate structure for Hanodver management. Associated per-UE in eNB_RRC_INST */
typedef struct{
typedef struct HANDOVER_INFO_s {
u8 ho_prepare;
u8 ho_complete;
u8 modid_s; //Mod_id of serving cell
......@@ -226,7 +221,7 @@ typedef struct{
AS_Context_t as_context; /* They are mandatory for HO */
uint8_t buf[RRC_BUF_SIZE]; /* ASN.1 encoded handoverCommandMessage */
int size; /* size of above message in bytes */
}HANDOVER_INFO;
} HANDOVER_INFO;
#define RRC_HEADER_SIZE_MAX 64
#define RRC_BUFFER_SIZE_MAX 1024
......@@ -237,27 +232,27 @@ typedef struct{
}RRC_BUFFER;
#define RRC_BUFFER_SIZE sizeof(RRC_BUFFER)
typedef struct{
typedef struct RB_INFO_s {
u16 Rb_id; //=Lchan_id
LCHAN_DESC Lchan_desc[2];
MAC_MEAS_REQ_ENTRY *Meas_entry;
}RB_INFO;
} RB_INFO;
typedef struct SRB_INFO{
typedef struct SRB_INFO_s {
u16 Srb_id; //=Lchan_id
RRC_BUFFER Rx_buffer;
RRC_BUFFER Tx_buffer;
LCHAN_DESC Lchan_desc[2];
unsigned int Trans_id;
u8 Active;
}SRB_INFO;
} SRB_INFO;
typedef struct{
typedef struct RB_INFO_TABLE_ENTRY_s {
RB_INFO Rb_info;
u8 Active;
u32 Next_check_frame;
u8 Status;
}RB_INFO_TABLE_ENTRY;
} RB_INFO_TABLE_ENTRY;
typedef struct{
SRB_INFO Srb_info;
......@@ -266,19 +261,18 @@ typedef struct{
u32 Next_check_frame;
}SRB_INFO_TABLE_ENTRY;
typedef struct {
typedef struct MEAS_REPORT_LIST_s {
MeasId_t measId;
//CellsTriggeredList cellsTriggeredList;//OPTIONAL
u32 numberOfReportsSent;
} MEAS_REPORT_LIST;
typedef struct {
typedef struct HANDOVER_INFO_UE_s {
PhysCellId_t targetCellId;
u8 measFlag;
}HANDOVER_INFO_UE;
} HANDOVER_INFO_UE;
typedef struct{
typedef struct eNB_RRC_INST_s {
uint8_t *SIB1;
uint8_t sizeof_SIB1;
uint8_t *SIB23;
......@@ -334,13 +328,13 @@ typedef struct{
} eNB_RRC_INST;
#define MAX_UE_CAPABILITY_SIZE 255
typedef struct{
typedef struct OAI_UECapability_s {
uint8_t sdu[MAX_UE_CAPABILITY_SIZE];
uint8_t sdu_size;
UE_EUTRA_Capability_t *UE_EUTRA_Capability;
} OAI_UECapability_t;
typedef struct{
typedef struct UE_RRC_INST_s {
uint8_t *UECapability;
uint8_t UECapability_size;
UE_RRC_INFO Info[NB_SIG_CNX_UE];
......@@ -409,7 +403,7 @@ typedef struct{
/* Used integrity/ciphering algorithms */
e_SecurityAlgorithmConfig__cipheringAlgorithm ciphering_algorithm;
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
}UE_RRC_INST;
} UE_RRC_INST;
//main.c
int rrc_init_global_param(void);
......@@ -494,22 +488,20 @@ s32 rrc_ue_establish_srb2(u8 Mod_id,u32 frame, u8 eNB_index,struct SRB_ToAddMod
@returns 0 on success */
s32 rrc_ue_establish_drb(u8 Mod_id,u32 frame,u8 eNB_index,struct DRB_ToAddMod *DRB_config);
/** \brief Process MobilityControlInfo Message to proceed with handover and configure PHY/MAC
\param Mod_id Instance of UE on which to act
\param frame frame time interval
\param eNB_index Index of corresponding CH/eNB
\param mobilityControlInfo Pointer to mobilityControlInfo
*/
void rrc_ue_process_mobilityControlInfo(u8 Mod_id,u32 frame, u8 eNB_index,struct MobilityControlInfo *mobilityControlInfo);
void rrc_ue_process_mobilityControlInfo(u8 Mod_id,u32 frame, u8 eNB_index,struct MobilityControlInfo *mobilityControlInfo);
/** \brief Process a measConfig Message and configure PHY/MAC
\param Mod_id Instance of UE on which to act
\param frame frame time interval
\param eNB_index Index of corresponding CH/eNB
\param measConfig Pointer to MeasConfig IE from configuration*/
void rrc_ue_process_measConfig(u8 Mod_id,u32 frame, u8 eNB_index,MeasConfig_t *measConfig);
void rrc_ue_process_measConfig(u8 Mod_id,u32 frame, u8 eNB_index,MeasConfig_t *measConfig);
/** \brief Process a RadioResourceConfigDedicated Message and configure PHY/MAC
\param Mod_id Instance of UE on which to act
......@@ -576,33 +568,48 @@ void *rrc_ue_task(void *args_p);
\param UE_index Index of UE transmitting the messages*/
void rrc_eNB_generate_RRCConnectionReconfiguration_handover(u8 Mod_id, u32 frame, u16 UE_index, u8 *nas_pdu, u32 nas_length);
//L2_interface.c
s8 mac_rrc_lite_data_req( u8 Mod_id, u32 frame, unsigned short Srb_id, u8 Nb_tb, u8 *Buffer,u8 eNB_flag, u8 eNB_index, u8 mbsfn_sync_area);
s8 mac_rrc_lite_data_ind( u8 Mod_id, u32 frame, unsigned short Srb_id, u8 *Sdu, unsigned short Sdu_len,u8 eNB_flag,u8 eNB_index, u8 mbsfn_sync_area);
void mac_sync_ind( u8 Mod_id, u8 status);
u8 rrc_lite_data_req(u8 Mod_id, u32 frame, u8 eNB_flag, unsigned int rb_id, u32 muiP, u32 confirmP,
unsigned int sdu_size, u8* Buffer, u8 mode);
void rrc_lite_data_ind( u8 Mod_id, u32 frame, u8 eNB_flag, u32 Rb_id, u32 sdu_size,u8 *Buffer);
void rrc_lite_data_ind(module_id_t Mod_id, u32 frame, u8 eNB_flag, u32 Rb_id, u32 sdu_size,u8 *Buffer);
void rrc_lite_in_sync_ind(u8 Mod_id, u32 frame, u16 eNB_index);
void rrc_lite_out_of_sync_ind(u8 Mod_id, u32 frame, unsigned short eNB_index);
int decode_MCCH_Message(u8 Mod_id, u32 frame, u8 eNB_index, u8 *Sdu, u8 Sdu_len,u8 mbsfn_sync_area);
void decode_MBSFNAreaConfiguration(u8 Mod_id, u8 eNB_index, u32 frame,u8 mbsfn_sync_area);
int decode_BCCH_DLSCH_Message(u8 Mod_id,u32 frame,u8 eNB_index,u8 *Sdu,u8 Sdu_len);
int decode_SIB1(u8 Mod_id,u8 eNB_index);
int decode_SIB1(u8 Mod_id,u8 eNB_index);
int decode_SI(u8 Mod_id,u32 frame,u8 eNB_index,u8 si_window);
void ue_meas_filtering(u8 Mod_id,u32 frame,u8 eNB_index);
void ue_measurement_report_triggering(u8 Mod_id, u32 frame,u8 eNB_index);
int mac_get_rrc_lite_status(u8 Mod_id,u8 eNB_flag,u8 index);
void rrc_eNB_generate_UECapabilityEnquiry(u8 Mod_id, u32 frame, u16 UE_index);
void rrc_eNB_generate_SecurityModeCommand(u8 Mod_id, u32 frame, u16 UE_index);
void rrc_eNB_process_MeasurementReport(u8 Mod_id,u32 frame, u16 UE_index,MeasResults_t *measResults2) ;
void rrc_eNB_generate_HandoverPreparationInformation (u8 Mod_id, u32 frame, u8 UE_index, PhysCellId_t targetPhyId) ;
void check_handovers(u8 Mod_id, u32 frame);
u8 check_trigger_meas_event(u8 Mod_id,u32 frame, u8 eNB_index, u8 ue_cnx_index, u8 meas_index,
Q_OffsetRange_t ofn, Q_OffsetRange_t ocn, Hysteresis_t hys,
Q_OffsetRange_t ofs, Q_OffsetRange_t ocs, long a3_offset, TimeToTrigger_t ttt);
......@@ -613,8 +620,7 @@ u8 check_trigger_meas_event(u8 Mod_id,u32 frame, u8 eNB_index, u8 ue_cnx_index,
void rrc_remove_UE (u8 Mod_id, u8 UE_id);
long binary_search_int(int elements[], long numElem, int value);
long binary_search_float(float elements[], long numElem, float value);
#endif
/** @ */
......@@ -1739,6 +1739,7 @@ void dump_sib13(SystemInformationBlockType13_r9_t *sib13) {
}
#endif
//const char SIBPeriod[7][7]= {"80ms\0","160ms\0","320ms\0","640ms\0","1280ms\0","2560ms\0","5120ms\0"};
int decode_SI(u8 Mod_id,u32 frame,u8 eNB_index,u8 si_window) {
......@@ -1898,7 +1899,6 @@ int decode_SI(u8 Mod_id,u32 frame,u8 eNB_index,u8 si_window) {
return 0;
}
// layer 3 filtering of RSRP (EUTRA) measurements: 36.331, Sec. 5.5.3.2
void ue_meas_filtering(u8 Mod_id,u32 frame,u8 eNB_index){
float a = UE_rrc_inst[Mod_id].filter_coeff_rsrp; // 'a' in 36.331 Sec. 5.5.3.2
......
......@@ -401,7 +401,7 @@ RRC_status_t rrc_rx_tx(u8 Mod_id,u32 frame, u8 eNB_flag,u8 index){
}
long binary_search_int(int elements[], long numElem, int value) {
long first, last, middle, search;
long first, last, middle, search = -1;
first = 0;
last = numElem-1;
middle = (first+last)/2;
......@@ -432,7 +432,7 @@ long binary_search_int(int elements[], long numElem, int value) {
Used for RSRP and RSRQ measurement mapping. Can potentially be used for other things
*/
long binary_search_float(float elements[], long numElem, float value) {
long first, last, middle, search;
long first, last, middle;
first = 0;
last = numElem-1;
middle = (first+last)/2;
......
......@@ -557,11 +557,11 @@ void get_beta_map() {
}
fclose(fp);
// }
// LOG_D(OCM,"Print the table for mcs %d\n",mcs);
printf("Print the table for mcs %d\n",mcs);
LOG_D(OCM,"Print the table for mcs %d\n",mcs);
// printf("Print the table for mcs %d\n",mcs);
for (t = 0; t<table_length[mcs]; t++)
// LOG_D(OCM,"%lf %lf \n ",sinr_bler_map[mcs][0][t],sinr_bler_map[mcs][1][t]);
printf("%lf %lf \n ",sinr_bler_map[mcs][0][t],sinr_bler_map[mcs][1][t]);
LOG_D(OCM,"%lf %lf \n ",sinr_bler_map[mcs][0][t],sinr_bler_map[mcs][1][t]);
// printf("%lf %lf \n ",sinr_bler_map[mcs][0][t],sinr_bler_map[mcs][1][t]);
}
free(file_path);
}
......@@ -603,7 +603,8 @@ void get_MIESM_param() {
fclose(fp);
for (t = 0; t < 162; t++){
// MI_map_4Qam[0][t] = pow(10,0.1*(MI_map_4Qam[0][t]));
printf("MIESM 4QAM Table: %lf %lf %1f\n ",MI_map_4qam[0][t],MI_map_4qam[1][t], MI_map_4qam[2][t]);
LOG_D(OCM, "MIESM 4QAM Table: %lf %lf %1f\n ",MI_map_4qam[0][t],MI_map_4qam[1][t], MI_map_4qam[2][t]);
// printf("MIESM 4QAM Table: %lf %lf %1f\n ",MI_map_4qam[0][t],MI_map_4qam[1][t], MI_map_4qam[2][t]);
}
break;
case 16:
......@@ -621,7 +622,8 @@ void get_MIESM_param() {
fclose(fp);
for (t = 0; t < 197; t++){
// MI_map_16Qam[0][t] = pow(10,0.1*(MI_map_16Qam[0][t]));
printf("MIESM 16 QAM Table: %lf %lf %1f\n ",MI_map_16qam[0][t],MI_map_16qam[1][t], MI_map_16qam[2][t]);
LOG_D(OCM, "MIESM 16 QAM Table: %lf %lf %1f\n ",MI_map_16qam[0][t],MI_map_16qam[1][t], MI_map_16qam[2][t]);
// printf("MIESM 16 QAM Table: %lf %lf %1f\n ",MI_map_16qam[0][t],MI_map_16qam[1][t], MI_map_16qam[2][t]);
}
break;
case 64:
......@@ -641,7 +643,8 @@ void get_MIESM_param() {
fclose(fp);
for (t = 0; t < 227; t++){
//MI_map_64Qam[0][t] = pow(10,0.1*(MI_map_64Qam[0][t]));
printf("MIESM 64QAM Table: %lf %lf %1f\n ",MI_map_64qam[0][t],MI_map_64qam[1][t], MI_map_64qam[2][t]);
LOG_D(OCM, "MIESM 64QAM Table: %lf %lf %1f\n ",MI_map_64qam[0][t],MI_map_64qam[1][t], MI_map_64qam[2][t]);
// printf("MIESM 64QAM Table: %lf %lf %1f\n ",MI_map_64qam[0][t],MI_map_64qam[1][t], MI_map_64qam[2][t]);
}
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment