Commit f93413e1 authored by rmagueta's avatar rmagueta

Define trigger_RA_List

parent 9c71e941
......@@ -404,6 +404,7 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
// fill UE-NR-Capability @ UE-CapabilityRAT-Container here.
NR_UE_rrc_inst[nr_ue].selected_plmn_identity = 1;
// TODO: Put the appropriate list of SIBs
NR_UE_rrc_inst[nr_ue].requested_SI_List.buf = CALLOC(1,4);
NR_UE_rrc_inst[nr_ue].requested_SI_List.buf[0] = SIB2 | SIB3 | SIB5; // SIB2 - SIB9
NR_UE_rrc_inst[nr_ue].requested_SI_List.buf[1] = 0; // SIB10 - SIB17
......@@ -412,6 +413,8 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
NR_UE_rrc_inst[nr_ue].requested_SI_List.size= 4;
NR_UE_rrc_inst[nr_ue].requested_SI_List.bits_unused= 0;
NR_UE_rrc_inst[nr_ue].do_ra = RA_NOT_RUNNING;
// init RRC lists
RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].RLC_Bearer_Config_list, NR_maxLC_ID);
RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].SchedulingRequest_list, NR_maxNrofSR_ConfigPerCellGroup);
......@@ -1486,12 +1489,9 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
return rval;
}
int8_t check_requested_SI_List(BIT_STRING_t requested_SI_List, NR_SIB1_t sib1) {
printf("\n\n");
int8_t check_requested_SI_List(module_id_t module_id, BIT_STRING_t requested_SI_List, NR_SIB1_t sib1) {
if(sib1.si_SchedulingInfo) {
if(sib1.si_SchedulingInfo->schedulingInfoList.list.array) {
bool SIB_to_request[32] = {};
......@@ -1531,22 +1531,19 @@ int8_t check_requested_SI_List(BIT_STRING_t requested_SI_List, NR_SIB1_t sib1) {
if(do_ra) {
if(sib1.si_SchedulingInfo->si_RequestConfig) {
LOG_I(RRC, "Starting contention-free RA procedure\n");
} else {
LOG_I(RRC, "Starting contention-based RA procedure\n");
NR_UE_rrc_inst[module_id].do_ra = REQUEST_FOR_OTHER_SI;
get_softmodem_params()->do_ra = 1;
}
if(sib1.si_SchedulingInfo->si_RequestConfig) {
LOG_I(RRC, "Trigger contention-free RA procedure (do_ra = %i)\n", NR_UE_rrc_inst[module_id].do_ra);
} else {
LOG_I(RRC, "Trigger contention-based RA procedure (do_ra = %i)\n", NR_UE_rrc_inst[module_id].do_ra);
}
}
}
printf("\n\n");
return 0;
}
......@@ -1578,7 +1575,7 @@ int8_t nr_rrc_ue_decode_NR_SIB1_Message(module_id_t module_id, uint8_t gNB_index
if( g_log->log_component[RRC].level >= OAILOG_DEBUG )
xer_fprint(stdout, &asn_DEF_NR_SIB1, (const void*)sib1);
check_requested_SI_List(NR_UE_rrc_inst[module_id].requested_SI_List, *sib1);
check_requested_SI_List(module_id, NR_UE_rrc_inst[module_id].requested_SI_List, *sib1);
}
else
LOG_E(PHY, "sib1 is starting by 8 times 0\n");
......
......@@ -84,9 +84,23 @@ typedef enum requested_SI_List_e {
SIB4 = 0x4,
SIB5 = 0x8,
SIB6 = 0x16,
SIB7 = 0x32
SIB7 = 0x32,
SIB8 = 0x64,
SIB9 = 0x128
} requested_SI_List_t;
typedef enum trigger_RA_List_e {
RA_NOT_RUNNING,
INITIAL_ACCESS_FROM_RRC_IDLE,
RRC_CONNECTION_REESTABLISHMENT,
DURING_HANDOVER,
NON_SYNCHRONISED,
TRANSITION_FROM_RRC_INACTIVE,
TO_ESTABLISH_TA,
REQUEST_FOR_OTHER_SI,
BEAM_FAILURE_RECOVERY,
} trigger_RA_List_t;
typedef struct NR_UE_RRC_INST_s {
NR_MeasConfig_t *meas_config;
......@@ -113,6 +127,7 @@ typedef struct NR_UE_RRC_INST_s {
uint8_t *UECapability;
uint8_t UECapability_size;
trigger_RA_List_t do_ra;
BIT_STRING_t requested_SI_List;
NR_SystemInformation_t *si[NB_CNX_UE];
......
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