diff --git a/openair2/PHY_INTERFACE/phy_stub_UE.c b/openair2/PHY_INTERFACE/phy_stub_UE.c index c3e6764165..d08e1ae26e 100644 --- a/openair2/PHY_INTERFACE/phy_stub_UE.c +++ b/openair2/PHY_INTERFACE/phy_stub_UE.c @@ -1298,7 +1298,10 @@ void *ue_standalone_pnf_task(void *context) LOG_E(MAC, "reading from standalone pnf sctp socket failed \n"); continue; } - + /* First we'll check for possible messages from the proxy. We do this by checking + the length of the message. This works because sizeof(uint16_t) < sizeof(nfapi_p7_message_header_t) + and sizeof(phy_channel_params_t) < sizeof(nfapi_p7_message_header_t) and + sizeof(uint16_t) != sizeof(phy_channel_params_t). */ if (len == sizeof(uint16_t)) { uint16_t sfn_sf = 0; @@ -1311,6 +1314,23 @@ void *ue_standalone_pnf_task(void *context) abort(); } } + else if (len == sizeof(phy_channel_params_t)) + { + phy_channel_params_t ch_info; + memcpy(&ch_info, buffer, sizeof(phy_channel_params_t)); + current_sfn_sf = ch_info.sfn_sf; + if (sem_post(&sfn_semaphore) != 0) + { + LOG_E(MAC, "sem_post() error\n"); + abort(); + } + uint16_t sf = ch_info.sfn_sf & 15; + if (sf > 10 && sf < 0) + { + LOG_E(MAC, "sf out of bounds, sfn: %d\n", sf); + abort(); + } + } else { nfapi_p7_message_header_t header; diff --git a/openair2/PHY_INTERFACE/phy_stub_UE.h b/openair2/PHY_INTERFACE/phy_stub_UE.h index e6c74be3f5..5f52caf080 100644 --- a/openair2/PHY_INTERFACE/phy_stub_UE.h +++ b/openair2/PHY_INTERFACE/phy_stub_UE.h @@ -97,6 +97,13 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id, uint16_t frame,uint8_t subframe,uint8_t srs_present, int index, nfapi_ul_config_request_t *ul_config_req); +typedef struct phy_channel_params_t +{ + uint16_t sfn_sf; + float sinr; + // Incomplete, need all channel parameters +} phy_channel_params_t; + typedef struct nfapi_tx_req_pdu_list_t { int num_pdus; /* number .pdus[] objects */ diff --git a/targets/COMMON/openairinterface5g_limits.h b/targets/COMMON/openairinterface5g_limits.h index 3136e4b23d..fd2ad4b7a6 100644 --- a/targets/COMMON/openairinterface5g_limits.h +++ b/targets/COMMON/openairinterface5g_limits.h @@ -8,23 +8,11 @@ # define NUMBER_OF_NR_RU_MAX 2 # ifndef PHYSIM # ifndef UE_EXPANSION -// TODO:L2 FAPI simulator. -// UESIM_EXPANSION is used to be same value of NUMBER_OF_UE_MAX -// in eNB and UE. -// now , if we use --mu option in UE, compiling error will occur. -// This problem will be fixed in the future. -# ifndef UESIM_EXPANSION # define NUMBER_OF_UE_MAX 40 # define NUMBER_OF_NR_UE_MAX 4 # define NUMBER_OF_UCI_VARS_MAX 14 # define NUMBER_OF_CONNECTED_eNB_MAX 1 # define NUMBER_OF_CONNECTED_gNB_MAX 1 -# else -# define NUMBER_OF_UE_MAX 256 -# define NUMBER_OF_UCI_VARS_MAX 256 -# define NUMBER_OF_CONNECTED_eNB_MAX 1 -# define NUMBER_OF_CONNECTED_gNB_MAX 3 -# endif # else # define NUMBER_OF_UE_MAX 256 # define NUMBER_OF_UCI_VARS_MAX 256 @@ -49,17 +37,10 @@ eNB process will exit because unexpected access happens. Now some parts are using NUMBER_OF_UE_MAX and the other are using MAX_MOBILES_PER_ENB in for-loop. */ -# ifndef UESIM_EXPANSION # define NUMBER_OF_UE_MAX 16 # define NUMBER_OF_UCI_VARS_MAX 56 # define NUMBER_OF_CONNECTED_eNB_MAX 3 # define NUMBER_OF_CONNECTED_gNB_MAX 3 -# else -# define NUMBER_OF_UE_MAX 256 -# define NUMBER_OF_UCI_VARS_MAX 256 -# define NUMBER_OF_CONNECTED_eNB_MAX 1 -# define NUMBER_OF_CONNECTED_gNB_MAX 1 -# endif # else # define NUMBER_OF_UE_MAX 256 # define NUMBER_OF_UCI_VARS_MAX 256