From 82f9501424ae2c371fb249e960f8360ee33a5cde Mon Sep 17 00:00:00 2001 From: francescomani Date: Sat, 11 Apr 2026 18:07:15 +0200 Subject: [PATCH] include NR_L2_UE in dlsim and ulsim and get rid of indication functions from nr_unitary_common --- CMakeLists.txt | 4 +- .../SIMULATION/NR_PHY/nr_unitary_common.c | 80 ------------------- .../tests/test_nr_ue_ra_procedures.cpp | 8 +- 3 files changed, 9 insertions(+), 83 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e8758cea3..bc429cacb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2020,7 +2020,7 @@ add_executable(nr_dlsim ) target_link_libraries(nr_dlsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group - m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common + m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common NR_L2_UE softmodem_common ) target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) @@ -2049,7 +2049,7 @@ add_executable(nr_ulsim target_link_libraries(nr_ulsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group - m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common + m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common NR_L2_UE ) target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_common.c b/openair1/SIMULATION/NR_PHY/nr_unitary_common.c index 9a595a9295..3c0e2ee87c 100644 --- a/openair1/SIMULATION/NR_PHY/nr_unitary_common.c +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_common.c @@ -136,83 +136,3 @@ int nfapi_p7_message_header_unpack(void *pMessageBuf, UNUSED(config); return 0; } - -void nr_mac_rrc_sync_ind(const module_id_t module_id, const frame_t frame, const bool in_sync) -{ - UNUSED(module_id); - UNUSED(frame); - UNUSED(in_sync); -} - -void nr_mac_rrc_msg3_ind(const module_id_t mod_id, int rnti, int gnb_id) -{ - UNUSED(mod_id); - UNUSED(gnb_id); - UNUSED(rnti); -} - -void nr_mac_rrc_ra_ind(const module_id_t mod_id, bool success) -{ - UNUSED(mod_id); - UNUSED(success); -} - -void nr_mac_rrc_inactivity_timer_ind(const module_id_t mod_id) -{ - UNUSED(mod_id); -} - -void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP, - const rb_id_t Srb_id, - const sdu_size_t sdu_sizeP, - const uint8_t *const buffer_pP) -{ - UNUSED(ctxt_pP); - UNUSED(Srb_id); - UNUSED(sdu_sizeP); - UNUSED(buffer_pP); -} - -typedef uint32_t channel_t; -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, - const uint8_t gNB_index, - const int hfn, - const frame_t frame, - const int slot, - const rnti_t rnti, - const uint32_t cellid, - const long arfcn, - const channel_t channel, - const uint8_t *pduP, - const sdu_size_t pdu_len) -{ - UNUSED(module_id); - UNUSED(CC_id); - UNUSED(gNB_index); - UNUSED(hfn); - UNUSED(frame); - UNUSED(slot); - UNUSED(rnti); - UNUSED(arfcn); - UNUSED(channel); - UNUSED(pduP); - UNUSED(pdu_len); - UNUSED(cellid); - return 0; -} - -void nr_mac_rrc_meas_ind_ue(module_id_t module_id, - uint32_t gNB_index, - uint16_t Nid_cell, - bool csi_meas, - bool is_neighboring_cell, - int rsrp_dBm) -{ - UNUSED(module_id); - UNUSED(Nid_cell); - UNUSED(gNB_index); - UNUSED(csi_meas); - UNUSED(is_neighboring_cell); - UNUSED(rsrp_dBm); -} diff --git a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp index ae79c87aee..0fb34a9a37 100644 --- a/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp +++ b/openair2/LAYER2/NR_MAC_UE/tests/test_nr_ue_ra_procedures.cpp @@ -42,7 +42,9 @@ void nr_mac_rlc_data_ind(const module_id_t module_idP, int num_data) { } - +void nr_mac_rrc_verification_failed(const module_id_t mod_id) +{ +} bool nr_rlc_activate_srb0(int ue_id, void *data, void (*send_initial_ul_rrc_message)(int ue_id, const uint8_t *sdu, sdu_size_t sdu_len, void *data)) @@ -77,6 +79,10 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, { return 0; } +bool check_csi_report_consistency(const NR_CSI_MeasConfig_t *meas) +{ + return true; +} void nr_mac_rrc_meas_ind_ue(module_id_t module_id, uint32_t gNB_index, uint16_t Nid_cell,