NR SA thread and sockets have been added.

This commit also removed MAX_NUM_NEIGH_CELLs and
replaced it with MAX_GNB_CELLS. This was a minor change
OAI added. The standalone sockets for the NR UE correctly
connect to the proxy. We are currently receiving dl_tti
messages from the proxy.
This commit is contained in:
Melissa Elkadi
2021-05-01 15:05:04 -07:00
parent 6cace48013
commit 34eeae0874
9 changed files with 225 additions and 19 deletions
+15
View File
@@ -124,6 +124,21 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
init_N_TA_offset(ue);
}
void init_nrUE_standalone_thread(int ue_idx)
{
const char *standalone_addr = "127.0.0.1";
int standalone_tx_port = 3211 + (1+ue_idx)*2;
int standalone_rx_port = 3212 + (1+ue_idx)*2;
nrue_init_standalone_socket(standalone_addr, standalone_tx_port, standalone_rx_port);
pthread_t thread;
if (pthread_create(&thread, NULL, nrue_standalone_pnf_task, NULL) != 0) {
LOG_E(NR_MAC, "pthread_create failed for calling nrue_standalone_pnf_task");
}
pthread_setname_np(thread, "oai:nrue-stand");
}
/*!
* It performs band scanning and synchonization.
* \param arg is a pointer to a \ref PHY_VARS_NR_UE structure.
+16 -2
View File
@@ -150,8 +150,6 @@ int usrp_tx_thread = 0;
int oaisim_flag = 0;
int emulate_rf = 0;
uint16_t ue_idx_standalone = 0xFFFF;
char uecap_xer[1024],uecap_xer_in=0;
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
@@ -159,6 +157,9 @@ char uecap_xer[1024],uecap_xer_in=0;
*/
uint8_t abstraction_flag=0;
uint16_t ue_id_g;
uint16_t ue_idx_standalone = 0xFFFF;
/*---------------------BMC: timespec helpers -----------------------------*/
struct timespec min_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
@@ -586,6 +587,19 @@ int main( int argc, char **argv ) {
printf("UE threads created by %ld\n", gettid());
}
if (NFAPI_MODE == NFAPI_MODE_STANDALONE_PNF) {
init_queue(&dl_itti_config_req_tx_data_req_queue);
init_queue(&ul_dci_config_req_queue);
config_sync_var=0;
if (sem_init(&sfn_slot_semaphore, 0, 0) != 0)
{
LOG_E(MAC, "sem_init() error\n");
abort();
}
init_nrUE_standalone_thread(ue_id_g);
//init_NR_UE_threads(NB_UE_INST);
}
// wait for end of program
printf("TYPE <CTRL-C> TO TERMINATE\n");
-1
View File
@@ -86,6 +86,5 @@ extern void print_opp_meas(void);
void *UE_thread(void *arg);
void init_nr_ue_vars(PHY_VARS_NR_UE *ue, uint8_t UE_id, uint8_t abstraction_flag);
void init_nrUE_standalone_thread(int ue_idx);
extern void init_nrUE_single_thread_stub(int nb_inst);
#endif
+3
View File
@@ -115,6 +115,7 @@ extern "C"
#define USE_256QAM_TABLE softmodem_params.use_256qam_table
#define NFAPI softmodem_params.nfapi
#define NSA softmodem_params.nsa
#define NODE_NUMBER softmodem_params.node_number
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
@@ -147,6 +148,7 @@ extern "C"
{"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
{"nsa", CONFIG_HLP_NSA, PARAMFLAG_BOOL, iptr:&NSA, defintval:0, TYPE_INT, 0}, \
{"node-number", NULL, 0, u16ptr:&NODE_NUMBER, defuintval:2, TYPE_UINT16, 0}, \
}
#define CONFIG_HLP_NSA "Enable NSA mode \n"
@@ -236,6 +238,7 @@ typedef struct {
int use_256qam_table;
uint8_t nfapi;
int nsa;
uint16_t node_number;
} softmodem_params_t;
extern uint64_t get_softmodem_optmask(void);