Merge remote-tracking branch 'origin/develop' into feature-21-TM7-tmp

Conflicts:
	targets/RT/USER/lte-enb.c
This commit is contained in:
Florian Kaltenberger
2016-12-07 09:40:20 +01:00
279 changed files with 37998 additions and 279 deletions
+11 -2
View File
@@ -75,6 +75,11 @@ uint8_t config_smbv = 0;
char smbv_ip[16];
#endif
#if defined(FLEXRAN_AGENT_SB_IF)
# include "flexran_agent.h"
#endif
#include "oaisim_functions.h"
#include "oaisim.h"
@@ -495,7 +500,6 @@ l2l1_task (void *args_p)
xargv[0] = xname;
fl_initialize (&xargc, xargv, NULL, 0, 0);
eNB_inst = 0;
for (UE_inst = 0; UE_inst < NB_UE_INST; UE_inst++) {
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
// DL scope at UEs
@@ -875,6 +879,7 @@ l2l1_task (void *args_p)
update_otg_UE (UE_inst, oai_emulation.info.time_ms);
//Access layer
// PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE_inst, ENB_FLAG_NO, NOT_A_RNTI, frame, next_slot>>1, 0);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, UE_inst, 0, ENB_FLAG_NO, NOT_A_RNTI, frame % MAX_FRAME_NUMBER, next_slot);
pdcp_run (&ctxt);
#endif
@@ -883,7 +888,7 @@ l2l1_task (void *args_p)
CC_id++) {
phy_procedures_UE_lte (
PHY_vars_UE_g[UE_inst][CC_id],
0, abstraction_flag,
0, abstraction_flag,
normal_txrx, no_relay,
NULL);
}
@@ -1296,6 +1301,10 @@ main (int argc, char **argv)
smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0][0]->frame_parms);
#endif
/* #if defined (FLEXRAN_AGENT_SB_IF)
flexran_agent_start();
#endif */
// add events to future event list: Currently not used
//oai_emulation.info.oeh_enabled = 1;
if (oai_emulation.info.oeh_enabled == 1)
+28 -27
View File
@@ -1577,13 +1577,11 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
// generate traffic if the ue is rrc reconfigured state
//if ((rrc_state=mac_eNB_get_rrc_status(enb_module_idP, dst_id)) > 2 /*RRC_CONNECTED*/ ) {
if (mac_eNB_get_rrc_status(enb_module_idP, oai_emulation.info.eNB_ue_module_id_to_rnti[enb_module_idP][dst_id]) > 2 ){
if_times += 1;
for (app_id=0; app_id<MAX_NUM_APPLICATION; app_id++) {
otg_pkt = malloc (sizeof(Packet_otg_elt_t));
(otg_pkt->otg_pkt).sdu_buffer = (uint8_t*) packet_gen(enb_module_idP, dst_id + NB_eNB_INST, app_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
@@ -1710,6 +1708,7 @@ void update_otg_UE(module_id_t ue_mod_idP, unsigned int ctime)
{
#if defined(USER_MODE) && defined(OAI_EMU)
int app_id;
if (oai_emulation.info.otg_enabled ==1 ) {
module_id_t dst_id, src_id; //dst_id = eNB_index
module_id_t module_id = ue_mod_idP+NB_eNB_INST;
@@ -1719,31 +1718,33 @@ void update_otg_UE(module_id_t ue_mod_idP, unsigned int ctime)
for (dst_id=0; dst_id<NB_SIG_CNX_UE; dst_id++) {
// only consider the first attached eNB
if (mac_UE_get_rrc_status(ue_mod_idP, dst_id ) > 2 /*RRC_CONNECTED*/) {
Packet_otg_elt_t *otg_pkt = malloc (sizeof(Packet_otg_elt_t));
if (otg_pkt!=NULL)
memset(otg_pkt,0,sizeof(Packet_otg_elt_t));
else {
LOG_E(OTG,"not enough memory\n");
exit(-1);
}// Manage to add this packet to the tail of your list
(otg_pkt->otg_pkt).sdu_buffer = (uint8_t*) packet_gen(src_id, dst_id, 0, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
(otg_pkt->otg_pkt).rb_id = DTCH-2;
(otg_pkt->otg_pkt).module_id = module_id;
(otg_pkt->otg_pkt).dst_id = dst_id;
(otg_pkt->otg_pkt).is_ue = 1;
//Adding the packet to the OTG-PDCP buffer
(otg_pkt->otg_pkt).mode = PDCP_TRANSMISSION_MODE_DATA;
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[module_id]));
LOG_I(EMU, "[UE %d] ADD pkt to OTG buffer with size %d for dst %d on rb_id %d \n",
(otg_pkt->otg_pkt).module_id, otg_pkt->otg_pkt.sdu_buffer_size, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id);
} else {
free(otg_pkt);
otg_pkt=NULL;
}
for (app_id=0; app_id<MAX_NUM_APPLICATION; app_id++) {
Packet_otg_elt_t *otg_pkt = malloc (sizeof(Packet_otg_elt_t));
if (otg_pkt!=NULL)
memset(otg_pkt,0,sizeof(Packet_otg_elt_t));
else {
LOG_E(OTG,"not enough memory\n");
exit(-1);
}// Manage to add this packet to the tail of your list
(otg_pkt->otg_pkt).sdu_buffer = (uint8_t*) packet_gen(src_id, dst_id, app_id, ctime, &((otg_pkt->otg_pkt).sdu_buffer_size));
if ((otg_pkt->otg_pkt).sdu_buffer != NULL) {
(otg_pkt->otg_pkt).rb_id = DTCH-2;
(otg_pkt->otg_pkt).module_id = module_id;
(otg_pkt->otg_pkt).dst_id = dst_id;
(otg_pkt->otg_pkt).is_ue = 1;
//Adding the packet to the OTG-PDCP buffer
(otg_pkt->otg_pkt).mode = PDCP_TRANSMISSION_MODE_DATA;
pkt_list_add_tail_eurecom(otg_pkt, &(otg_pdcp_buffer[module_id]));
LOG_I(EMU, "[UE %d] ADD pkt to OTG buffer with size %d for dst %d on rb_id %d \n",
(otg_pkt->otg_pkt).module_id, otg_pkt->otg_pkt.sdu_buffer_size, (otg_pkt->otg_pkt).dst_id,(otg_pkt->otg_pkt).rb_id);
} else {
free(otg_pkt);
otg_pkt=NULL;
}
}
}
}
}