Commit ccba895b authored by Rohit Gupta's avatar Rohit Gupta

Merge branch 'develop' into feature-34-test_framework

parents ebf8975c 39df998e
......@@ -34,6 +34,4 @@ job1:
- cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml
- exce_log=`egrep -i 'warning|error|critical|exception' $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log |cat `
- if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest.log. Please check the logs\e[0m" ; fi
- exce_log=`egrep -i 'warning|error|critical|exception' $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log |cat `
- if [ -n "$exce_log" ]; then echo -e "\e[31mThere are errors in $NFS_TEST_RESULTS_DIR/log/python_autotest_cleanup.log. Please check the logs\e[0m" ; fi
......@@ -239,7 +239,7 @@ Obj.# Case# Test# Description
02 Functional test case
03 Non-Functional test case
03 Autotests specific to OAI UE
04 Failure test case
......@@ -250,5 +250,3 @@ Obj.# Case# Test# Description
#TODO: Add test cases for TDD/FDD
#TODO: Test and compile seperately for Rel8/Rel10
#TODO: Case03.py eMBMS test case
\ No newline at end of file
......@@ -139,7 +139,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database)
logger_add_view(input_signal_log, input_signal_view);
/* UE 0 PUSCH IQ data */
w = new_xy_plot(g, 55, 55, "PUSCH IQ", 50);
w = new_xy_plot(g, 55, 55, "PUSCH IQ [UE 0]", 50);
widget_add_child(g, line, w, -1);
xy_plot_set_range(g, w, -1000, 1000, -1000, 1000);
l = new_iqlog(h, database, "ENB_PHY_PUSCH_IQ", "nb_rb",
......@@ -149,11 +149,10 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database)
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_PUSCH_IQ", "UE_ID"),
filter_int(0)
));
filter_int(0)));
/* UE 0 estimated UL channel */
w = new_xy_plot(g, 256*2, 55, "UL estimated channel", 50);
w = new_xy_plot(g, 280, 55, "UL estimated channel [UE 0]", 50);
widget_add_child(g, line, w, -1);
xy_plot_set_range(g, w, 0, 512*10, -10, 80);
l = new_framelog(h, database,
......@@ -165,12 +164,44 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database)
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_UL_CHANNEL_ESTIMATE", "UE_ID"),
filter_int(0)
));
filter_int(0)));
/* UE 0 PUCCH energy */
w = new_xy_plot(g, 128, 55, "PUCCH1 energy (SR) [UE 0]", 50);
widget_add_child(g, line, w, -1);
xy_plot_set_range(g, w, 0, 1024*10, -10, 80);
l = new_ttilog(h, database,
"ENB_PHY_PUCCH_1_ENERGY", "frame", "subframe", "threshold", 0);
v = new_view_tti(10, g, w, new_color(g, "#ff0000"));
logger_add_view(l, v);
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_PUCCH_1_ENERGY", "UE_ID"),
filter_int(0)));
l = new_ttilog(h, database,
"ENB_PHY_PUCCH_1_ENERGY", "frame", "subframe", "energy", 1);
v = new_view_tti(10, g, w, new_color(g, "#0c0c72"));
logger_add_view(l, v);
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_PUCCH_1_ENERGY", "UE_ID"),
filter_int(0)));
/* UE 0 PUCCH IQ data */
w = new_xy_plot(g, 55, 55, "PUCCH IQ [UE 0]", 50);
widget_add_child(g, line, w, -1);
xy_plot_set_range(g, w, -100, 100, -100, 100);
l = new_iqdotlog(h, database, "ENB_PHY_PUCCH_1AB_IQ", "I", "Q");
v = new_view_xy(500, 10, g, w, new_color(g,"#000"), XY_LOOP_MODE);
logger_add_view(l, v);
logger_set_filter(l,
filter_eq(
filter_evarg(database, "ENB_PHY_PUCCH_1AB_IQ", "UE_ID"),
filter_int(0)));
/* downlink/uplink UE DCIs */
widget_add_child(g, top_container,
new_label(g,"DL/UL TICK/DCI/ACK/NACK "), -1);
new_label(g,"DL/UL TICK/DCI/ACK/NACK [all UEs]"), -1);
line = new_container(g, HORIZONTAL);
widget_add_child(g, top_container, line, -1);
timeline_plot = new_timeline(g, 512, 8, 5);
......@@ -220,7 +251,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database)
/* harq processes' ticktime view */
widget_add_child(g, top_container,
new_label(g,"DL/UL HARQ (x8) "), -1);
new_label(g,"DL/UL HARQ (x8) [UE 0]"), -1);
line = new_container(g, HORIZONTAL);
widget_add_child(g, top_container, line, -1);
timeline_plot = new_timeline(g, 512, 2*8+2, 3);
......@@ -491,6 +522,8 @@ int main(int n, char **v)
on_off(database, "ENB_PHY_ULSCH_UE_NACK", is_on, 1);
on_off(database, "ENB_MASTER_TICK", is_on, 1);
on_off(database, "ENB_PHY_PUSCH_IQ", is_on, 1);
on_off(database, "ENB_PHY_PUCCH_1_ENERGY", is_on, 1);
on_off(database, "ENB_PHY_PUCCH_1AB_IQ", is_on, 1);
on_off(database, "LEGACY_RRC_INFO", is_on, 1);
on_off(database, "LEGACY_RRC_ERROR", is_on, 1);
......
CC=gcc
CFLAGS=-Wall -g -pthread -I..
OBJS=logger.o textlog.o framelog.o ttilog.o timelog.o ticklog.o iqlog.o
OBJS=logger.o textlog.o framelog.o ttilog.o timelog.o ticklog.o iqlog.o \
iqdotlog.o
logger.a: $(OBJS)
ar cr logger.a $(OBJS)
......
#include "logger.h"
#include "logger_defs.h"
#include "handler.h"
#include "database.h"
#include "filter/filter.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
struct iqdotlog {
struct logger common;
void *database;
int i_arg;
int q_arg;
};
static void _event(void *p, event e)
{
struct iqdotlog *l = p;
int i;
float I, Q;
if (l->common.filter != NULL && filter_eval(l->common.filter, e) == 0)
return;
I = e.e[l->i_arg].i;
Q = e.e[l->q_arg].i;
for (i = 0; i < l->common.vsize; i++)
l->common.v[i]->append(l->common.v[i], &I, &Q, 1);
}
logger *new_iqdotlog(event_handler *h, void *database,
char *event_name, char *I, char *Q)
{
struct iqdotlog *ret;
int event_id;
database_event_format f;
int i;
ret = calloc(1, sizeof(struct iqdotlog)); if (ret == NULL) abort();
ret->common.event_name = strdup(event_name);
if (ret->common.event_name == NULL) abort();
ret->database = database;
event_id = event_id_from_name(database, event_name);
ret->common.handler_id = register_handler_function(h,event_id,_event,ret);
f = get_format(database, event_id);
/* look for args */
ret->i_arg = -1;
ret->q_arg = -1;
for (i = 0; i < f.count; i++) {
if (!strcmp(f.name[i], I)) ret->i_arg = i;
if (!strcmp(f.name[i], Q)) ret->q_arg = i;
}
if (ret->i_arg == -1) {
printf("%s:%d: argument '%s' not found in event '%s'\n",
__FILE__, __LINE__, I, event_name);
abort();
}
if (ret->q_arg == -1) {
printf("%s:%d: argument '%s' not found in event '%s'\n",
__FILE__, __LINE__, Q, event_name);
abort();
}
if (strcmp(f.type[ret->i_arg], "int") != 0) {
printf("%s:%d: argument '%s' has wrong type (should be 'int')\n",
__FILE__, __LINE__, I);
abort();
}
if (strcmp(f.type[ret->q_arg], "int") != 0) {
printf("%s:%d: argument '%s' has wrong type (should be 'int')\n",
__FILE__, __LINE__, Q);
abort();
}
return ret;
}
......@@ -169,7 +169,7 @@ logger *new_iqlog(event_handler *h, void *database,
}
if (strcmp(f.type[ret->N_RB_UL_arg], "int") != 0) {
printf("%s:%d: argument '%s' has wrong type (should be 'int')\n",
__FILE__, __LINE__, nb_rb);
__FILE__, __LINE__, N_RB_UL);
abort();
}
if (strcmp(f.type[ret->symbols_per_tti_arg], "int") != 0) {
......
......@@ -16,6 +16,8 @@ logger *new_ticklog(void *event_handler, void *database,
logger *new_iqlog(void *event_handler, void *database,
char *event_name, char *nb_rb, char *N_RB_UL, char *symbols_per_tti,
char *buffer_varname);
logger *new_iqdotlog(void *event_handler, void *database,
char *event_name, char *I, char *Q);
void framelog_set_skip(logger *_this, int skip_delay);
void framelog_set_update_only_at_sf9(logger *_this, int update_only_at_sf9);
......
This diff is collapsed.
common/utils/T/tracer/openair_logo.png

4.55 KB | W: | H:

common/utils/T/tracer/openair_logo.png

6.86 KB | W: | H:

common/utils/T/tracer/openair_logo.png
common/utils/T/tracer/openair_logo.png
common/utils/T/tracer/openair_logo.png
common/utils/T/tracer/openair_logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include "database.h"
#include "utils.h"
#include "../T_defs.h"
......
......@@ -6389,6 +6389,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
if (ulsch->harq_processes[harq_pid]->first_tx==1) {
// ulsch->harq_processes[harq_pid]->Ndi = 1;
ulsch->harq_processes[harq_pid]->first_tx=0;
ulsch->harq_processes[harq_pid]->DCINdi= ndi;
ulsch->harq_processes[harq_pid]->round = 0;
} else {
if (ulsch->harq_processes[harq_pid]->DCINdi!=ndi) { // new SDU opportunity
......
......@@ -298,6 +298,12 @@ int rrc_mac_remove_ue(module_id_t mod_idP,rnti_t rntiP)
int UE_id = find_UE_id(mod_idP,rntiP);
int pCC_id = UE_PCCID(mod_idP,UE_id);
if (UE_id == -1) {
LOG_W(MAC,"rrc_mac_remove_ue: UE %x not found\n", rntiP);
mac_phy_remove_ue(mod_idP,rntiP);
return 0;
}
LOG_I(MAC,"Removing UE %d from Primary CC_id %d (rnti %x)\n",UE_id,pCC_id, rntiP);
dump_ue_list(UE_list,0);
......
......@@ -103,7 +103,7 @@ rlc_am_get_buffer_occupancy_in_bytes (
}
#endif
return rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
return rlc_pP->status_buffer_occupancy + rlc_pP->retrans_num_bytes_to_retransmit + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
}
//-----------------------------------------------------------------------------
void
......
......@@ -723,8 +723,8 @@ void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
const int CC_idP,
const frame_t frameP,
const sub_frame_t subframeP,
const rnti_t rntiP) {
const rnti_t rntiP)
{
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
ue_context_p = rrc_eNB_get_ue_context(
&eNB_rrc_inst[Mod_instP],
......@@ -735,10 +735,9 @@ void mac_eNB_rrc_ul_failure(const module_id_t Mod_instP,
ue_context_p->ue_context.ul_failure_timer=1;
}
else {
LOG_W(RRC,"Frame %d, Subframe %d: UE %x unknown \n",frameP,subframeP,rntiP);
rrc_mac_remove_ue(Mod_instP,rntiP);
LOG_W(RRC,"Frame %d, Subframe %d: UL failure: UE %x unknown \n",frameP,subframeP,rntiP);
}
rrc_mac_remove_ue(Mod_instP,rntiP);
}
void mac_eNB_rrc_ul_in_sync(const module_id_t Mod_instP,
......
......@@ -3790,14 +3790,29 @@ rrc_eNB_decode_ccch(
//#warning "TODO: stmsi_exist: remove UE from MAC/PHY (how?)"
LOG_I(RRC," S-TMSI exists, ue_context_p %p\n",ue_context_p);
stmsi_received=1;
/* replace rnti in the context */
/* for that, remove the context from the RB tree */
RB_REMOVE(rrc_ue_tree_s, &eNB_rrc_inst[ctxt_pP->module_id].rrc_ue_head, ue_context_p);
/* and insert again, after changing rnti everywhere it has to be changed */
ue_context_p->ue_id_rnti = ctxt_pP->rnti;
ue_context_p->ue_context.rnti = ctxt_pP->rnti;
RB_INSERT(rrc_ue_tree_s, &eNB_rrc_inst[ctxt_pP->module_id].rrc_ue_head, ue_context_p);
/* reset timers */
ue_context_p->ue_context.ul_failure_timer = 0;
ue_context_p->ue_context.ue_release_timer = 0;
// AssertFatal(0 == 1, "TODO: remove UE from MAC/PHY (how?)");
// ue_context_p = NULL;
} else {
ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, NOT_A_RANDOM_UE_IDENTITY);
if (ue_context_p == NULL)
LOG_E(RRC, "%s:%d:%s: rrc_eNB_get_next_free_ue_context returned NULL\n", __FILE__, __LINE__, __FUNCTION__);
if (ue_context_p != NULL) {
ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = TRUE;
ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code = mme_code;
ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi = m_tmsi;
} else {
break;
}
}
MSC_LOG_RX_MESSAGE(
......
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