Commit 210170d1 authored by Robert Schmidt's avatar Robert Schmidt

Trigger L2sim UE connection through telnet

parent cb01996c
......@@ -868,7 +868,8 @@ typedef enum {
PRACH=1,
RA_RESPONSE=2,
PUSCH=3,
RESYNCH=4
RESYNCH=4,
INACTIVE=5
} UE_MODE_t;
#define FOREACH_PARALLEL(GEN) \
......
......@@ -158,7 +158,7 @@ void ue_init_mac(module_id_t module_idP) {
if(NFAPI_MODE==NFAPI_UE_STUB_PNF) {
pthread_mutex_init(&UE_mac_inst[module_idP].UL_INFO_mutex,NULL);
UE_mac_inst[module_idP].UE_mode[0] = NOT_SYNCHED; //PRACH;
UE_mac_inst[module_idP].UE_mode[0] = INACTIVE;
UE_mac_inst[module_idP].first_ULSCH_Tx =0;
UE_mac_inst[module_idP].SI_Decoded = 0;
next_ra_frame = 0;
......
......@@ -731,7 +731,7 @@ void dl_config_req_UE_MAC_dci(int sfn,
} else if (rnti_type == 2) {
if (rnti == 0xFFFF) { /* SI-RNTI */
for (int ue_id = 0; ue_id < num_ue; ue_id++) {
if (UE_mac_inst[ue_id].UE_mode[0] == NOT_SYNCHED)
if (UE_mac_inst[ue_id].UE_mode[0] == NOT_SYNCHED || UE_mac_inst[ue_id].UE_mode[0] == INACTIVE)
continue;
ue_decode_si(ue_id, 0, sfn, 0,
......
......@@ -65,6 +65,24 @@
extern double cpuf;
#include "common/utils/telnetsrv/telnetsrv.h"
#include "common/utils/load_module_shlib.h"
int ue_enable_cmd(char *s, int debug, telnet_printfunc_t prnt)
{
const int ue = atoi(s);
LOG_W(MAC, "set UE %d UE_mode NOT_SYNCHED\n", ue);
UE_mac_inst[ue].UE_mode[0] = NOT_SYNCHED;
return 0;
}
telnetshell_cmddef_t ue_status_cmdarray[] = {
{"ue", "any number >=0", ue_enable_cmd},
{"","",NULL},
};
telnetshell_vardef_t ue_status_vardef[] = {
{"", 0, NULL}
};
#define FRAME_PERIOD 100000000ULL
#define DAQ_PERIOD 66667ULL
......@@ -979,6 +997,10 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
exit_fun("nothing to add");
}
add_telnetcmd_func_t addcmd = (add_telnetcmd_func_t)get_shlibmodule_fptr("telnetsrv", TELNET_ADDCMD_FNAME);
if (addcmd)
addcmd("enable", ue_status_vardef, ue_status_cmdarray);
UE_rxtx_proc_t *proc = rtd->proc;
// settings for nfapi-L2-emulator mode
module_id_t ue_thread_id = rtd->ue_thread_id;
......
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