RC: forward declarations and link physims better

The simulators have been changed: due to linker errors that would arise
otherwise, a lot of functions are defined in them to avoid such errors.
Some functions are also defined in header files; in this commit, we
define most functoins in nr_dummy_functions.c, which is compiled in, not
by including the C file, but by adding it to the target in
CMakeLists.txt

- nr_dlsim+nr_ulsim need NR_IF_Module_init(), so it cannot be in
  nr_dummy_functions, but the others need it
- Link correcr NR_IF_Module_init() into these simulators, and reduce
  overall link list
- Correctly link remaining simulators
This commit is contained in:
Robert Schmidt
2023-03-06 20:04:38 +01:00
parent f30185bc0e
commit 8a15fb7c63
49 changed files with 163 additions and 318 deletions
+1
View File
@@ -32,6 +32,7 @@
#include "common/utils/LOG/log.h"
#include "openair2/F1AP/f1ap_common.h"
#include "e1ap_default_values.h"
#include "gtp_itf.h"
#define E1AP_NUM_MSG_HANDLERS 14
typedef int (*e1ap_message_processing_t)(e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *message_p);
@@ -37,6 +37,7 @@
#include "f1ap_cu_rrc_message_transfer.h"
#include "common/ran_context.h"
#include "openair3/UTILS/conversions.h"
#include "pdcp.h"
/*
Initial UL RRC Message Transfer
@@ -43,6 +43,7 @@
#include "rrc_eNB_GTPV1U.h"
#include "openair2/RRC/NR/rrc_gNB_NGAP.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "pdcp.h"
static void setQos(F1AP_NonDynamic5QIDescriptor_t *toFill) {
asn1cCalloc(toFill, tmp);
+1
View File
@@ -54,6 +54,7 @@
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
#include "nfapi_vnf.h"
#include "nfapi_pnf.h"
#include "pdcp.h"
//#include "L1_paramdef.h"
#include "prs_nr_paramdef.h"
+1
View File
@@ -806,6 +806,7 @@ void rr_ul_unset(void **data) {
free(*data);
*data = NULL;
}
#define MAX(a, b) (((a)>(b))?(a):(b))
int rr_ul_run(module_id_t Mod_id,
int CC_id,
int frame,
+1
View File
@@ -37,6 +37,7 @@
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
#include "common/utils/nr/nr_common.h"
#include "executables/softmodem-common.h"
#include "SCHED_NR/phy_frame_config_nr.h"
void set_tdd_config_nr_ue(fapi_nr_config_request_t *cfg,
int mu,
+1
View File
@@ -61,6 +61,7 @@
#include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfig.h"
#include "NR_MeasConfig.h"
#include "NR_ServingCellConfigCommonSIB.h"
// ==========
+1
View File
@@ -38,6 +38,7 @@
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "executables/softmodem-common.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp.h"
#include "openair2/LAYER2/PDCP_v10.1.0/pdcp.h"
#include <pthread.h>
static NR_UE_MAC_INST_t *nr_ue_mac_inst;
@@ -35,6 +35,9 @@
/* exe */
#include <common/utils/nr/nr_common.h>
/* PHY */
#include "openair1/PHY/impl_defs_top.h"
/* MAC */
#include "NR_MAC_COMMON/nr_mac.h"
#include "NR_MAC_COMMON/nr_mac_common.h"
+2
View File
@@ -33,6 +33,8 @@
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "NR_TAG-Id.h"
#include "common/ngran_types.h"
#include "rrc_messages_types.h"
void set_cset_offset(uint16_t);
@@ -20,6 +20,7 @@
*/
#include "nr_mac_gNB.h"
#include "intertask_interface.h"
#include "mac_rrc_ul.h"
@@ -20,6 +20,7 @@
*/
#include "nr_mac_gNB.h"
#include "intertask_interface.h"
#include "mac_rrc_ul.h"
+1
View File
@@ -33,6 +33,7 @@
#include "NR_MAC_gNB/mac_proto.h"
#include "NR_MAC_COMMON/nr_mac_extern.h"
#include "assertions.h"
#include "pdcp.h"
#include "LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "RRC/NR/nr_rrc_defs.h"
+2
View File
@@ -51,6 +51,7 @@
/* RRC */
#include "NR_BCCH-BCH-Message.h"
#include "NR_CellGroupConfig.h"
#include "NR_BCCH-DL-SCH-Message.h"
/* PHY */
#include "time_meas.h"
@@ -63,6 +64,7 @@
/* MAC */
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
#include "LAYER2/MAC/mac.h"
#include "NR_TAG.h"
#include <openair3/UICC/usim_interface.h>
+1
View File
@@ -57,6 +57,7 @@
#include "intertask_interface.h"
#include "openair3/S1AP/s1ap_eNB.h"
#include <pthread.h>
#include "pdcp.h"
# include "openair3/ocp-gtpu/gtp_itf.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
+1
View File
@@ -33,6 +33,7 @@
#ifndef __NR_IF_MODULE__H__
#define __NR_IF_MODULE__H__
#include <pthread.h>
#include <stdint.h>
#include "nfapi_nr_interface.h"
#include "nfapi_nr_interface_scf.h"
+4
View File
@@ -63,6 +63,10 @@
#include "LTE_TDD-Config.h"
#include "LTE_UECapabilityEnquiry.h"
#include "LTE_UE-CapabilityRequest.h"
#include "NR_RAT-Type.h"
#include "NR_UE-CapabilityRAT-Container.h"
#include "RRC/NAS/nas_config.h"
#include "RRC/NAS/rb_config.h"
#if ENABLE_RAL
+6
View File
@@ -65,6 +65,12 @@
#include "LTE_SystemInformationBlockType1-MBMS-r14.h"
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
#include "NR_UE-CapabilityRAT-ContainerList.h"
#include "NR_UE-CapabilityRAT-Container.h"
#include "NR_CG-ConfigInfo.h"
#include "NR_CG-Config.h"
#include "NR_RadioBearerConfig.c"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "x2ap_eNB.h"
+1
View File
@@ -36,6 +36,7 @@
#include "oai_asn1.h"
#include "intertask_interface.h"
#include "pdcp.h"
# include "common/ran_context.h"
+1
View File
@@ -30,6 +30,7 @@
#ifndef RRC_ENB_GTPV1U_H_
#define RRC_ENB_GTPV1U_H_
#include "rrc_defs.h"
/*! \fn rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t* const ctxt_pP, const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP)
*\brief Process GTPV1U_ENB_CREATE_TUNNEL_RESP message received from GTPV1U, retrieve the enb teid created.
+1
View File
@@ -35,6 +35,7 @@
# include "oai_asn1.h"
# include "intertask_interface.h"
# include "common/ran_context.h"
#include "pdcp.h"
extern RAN_CONTEXT_t RC;
+1
View File
@@ -43,6 +43,7 @@
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "UTIL/OSA/osa_defs.h"
#include <openair2/RRC/NR/nr_rrc_proto.h>
#include "pdcp.h"
void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, NR_UE_CapabilityRAT_ContainerList_t *UE_CapabilityRAT_ContainerList, x2ap_ENDC_sgnb_addition_req_t *m, NR_CG_ConfigInfo_IEs_t *cg_config_info) {
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
+2
View File
@@ -32,6 +32,8 @@
#include "tree.h"
#include "sctp_eNB_defs.h"
#include "s1ap_messages_types.h"
#include "x2ap_messages_types.h"
#include "x2ap_ids.h"
#include "x2ap_timers.h"