Commit aabb9dc4 authored by Navid Nikaein's avatar Navid Nikaein

* breakdown MAC into multiple files based on the transport channel

* update oaisim event handler to manage configuration event on runtime



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5577 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 1ca500d2
...@@ -44,7 +44,9 @@ ...@@ -44,7 +44,9 @@
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/extern.h" #include "SCHED/extern.h"
#ifdef OPENAIR2
#include "../openair2/LAYER2/MAC/proto.h"
#endif
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index); extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
......
...@@ -27,8 +27,8 @@ static inline unsigned long long rdtsc_oai(void) { ...@@ -27,8 +27,8 @@ static inline unsigned long long rdtsc_oai(void) {
return x; return x;
} }
#elif defined(__x86_64__) #elif defined(__x86_64__)
static inline unsigned long long rdtsc_oai() __attribute__((always_inline)); static inline unsigned long long rdtsc_oai(void) __attribute__((always_inline));
static inline unsigned long long rdtsc_oai() { static inline unsigned long long rdtsc_oai(void) {
unsigned long long a, d; unsigned long long a, d;
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d)); __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
return (d<<32) | a; return (d<<32) | a;
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
*******************************************************************************/ *******************************************************************************/
/*! \file config.c /*! \file config.c
* \brief UE and eNB configuration * \brief UE and eNB configuration
* \author Raymond Knopp, Navid Nikaein * \author Navid Nikaein and Raymond Knopp
* \date 2013 * \date 2010 - 2014
* \version 0.1 * \version 0.1
* \email: navid.nikaein@eurecom.fr * \email: navid.nikaein@eurecom.fr
* @ingroup _mac * @ingroup _mac
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "MeasObjectToAddModList.h" #include "MeasObjectToAddModList.h"
#include "TDD-Config.h" #include "TDD-Config.h"
#include "defs.h" #include "defs.h"
#include "proto.h"
#include "extern.h" #include "extern.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
......
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2010 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/
/*! \file eNB_scheduler.c
* \brief procedures related to UE on the BCH transport channel
* \author Navid Nikaein and Raymond Knopp
* \date 2011
* \email: navid.nikaein@eurecom.fr
* \version 0.5
* @ingroup _mac
*/
#include "assertions.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
#include "ARCH/CBMIMO1/DEVICE_DRIVER/defs.h"
#include "ARCH/CBMIMO1/DEVICE_DRIVER/from_grlib_softregs.h"
#include "RRC/LITE/extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
#endif
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
void schedule_SI(module_id_t module_idP,frame_t frameP, unsigned char *nprb,unsigned int *nCCE) {
start_meas(&eNB_mac_inst[module_idP].schedule_si);
unsigned char bcch_sdu_length;
int mcs = -1;
void *BCCH_alloc_pdu=(void*)&eNB_mac_inst[module_idP].BCCH_alloc_pdu;
bcch_sdu_length = mac_rrc_data_req(module_idP,
frameP,
BCCH,1,
&eNB_mac_inst[module_idP].BCCH_pdu.payload[0],
1,
module_idP,
0); // not used in this case
if (bcch_sdu_length > 0) {
LOG_D(MAC,"[eNB %d] Frame %d : BCCH->DLSCH, Received %d bytes \n",module_idP,frameP,bcch_sdu_length);
if (bcch_sdu_length <= (mac_xface->get_TBS_DL(0,3)))
mcs=0;
else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(1,3)))
mcs=1;
else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(2,3)))
mcs=2;
else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(3,3)))
mcs=3;
else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(4,3)))
mcs=4;
else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(5,3)))
mcs=5;
else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(6,3)))
mcs=6;
else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(7,3)))
mcs=7;
else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(8,3)))
mcs=8;
if (mac_xface->lte_frame_parms->frame_type == TDD) {
switch (mac_xface->lte_frame_parms->N_RB_DL) {
case 6:
((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->mcs = mcs;
break;
case 25:
((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->mcs = mcs;
break;
case 50:
((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->mcs = mcs;
break;
case 100:
((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->mcs = mcs;
break;
}
}
else {
switch (mac_xface->lte_frame_parms->N_RB_DL) {
case 6:
((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->mcs = mcs;
break;
case 25:
((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->mcs = mcs;
break;
case 50:
((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->mcs = mcs;
break;
case 100:
((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->mcs = mcs;
break;
}
}
#if defined(USER_MODE) && defined(OAI_EMU)
if (oai_emulation.info.opt_enabled) {
trace_pdu(1,
&eNB_mac_inst[module_idP].BCCH_pdu.payload[0],
bcch_sdu_length,
0xffff,
4,
0xffff,
eNB_mac_inst[module_idP].subframe,
0,
0);
}
LOG_D(OPT,"[eNB %d][BCH] Frame %d trace pdu for rnti %x with size %d\n",
module_idP, frameP, 0xffff, bcch_sdu_length);
#endif
if (mac_xface->lte_frame_parms->frame_type == TDD) {
LOG_D(MAC,"[eNB] Frame %d : Scheduling BCCH->DLSCH (TDD) for SI %d bytes (mcs %d, rb 3, TBS %d)\n",
frameP,
bcch_sdu_length,
mcs,
mac_xface->get_TBS_DL(mcs,3));
}
else {
LOG_D(MAC,"[eNB] Frame %d : Scheduling BCCH->DLSCH (FDD) for SI %d bytes (mcs %d, rb 3, TBS %d)\n",
frameP,
bcch_sdu_length,
mcs,
mac_xface->get_TBS_DL(mcs,3));
}
eNB_mac_inst[module_idP].bcch_active=1;
*nprb=3;
*nCCE=4;
}
else {
eNB_mac_inst[module_idP].bcch_active=0;
*nprb=0;
*nCCE=0;
//LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame);
}
// this might be misleading when bcch is inactive
stop_meas(&eNB_mac_inst[module_idP].schedule_si);
return;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
*******************************************************************************/ *******************************************************************************/
/*! \file extern.h /*! \file extern.h
* \brief mac externs * \brief mac externs
* \author Raymond Knopp, Navid Nikaein * \author Navid Nikaein and Raymond Knopp
* \date 2012 * \date 2010 - 2014
* \version 1.0 * \version 1.0
* \email navid.nikaein@eurecom.fr * \email navid.nikaein@eurecom.fr
* @ingroup _mac * @ingroup _mac
......
...@@ -28,9 +28,10 @@ ...@@ -28,9 +28,10 @@
*******************************************************************************/ *******************************************************************************/
/*! \file l1_helper.c /*! \file l1_helper.c
* \brief phy helper function * \brief phy helper function
* \author Raymond Knopp * \author Navid Nikaein, Raymond Knopp
* \date 2012 * \date 2012 - 2014
* \version 0.5 * \version 0.5
* \email navid.nikaein@eurecom.fr
* @ingroup _mac * @ingroup _mac
*/ */
...@@ -38,6 +39,7 @@ ...@@ -38,6 +39,7 @@
#include "defs.h" #include "defs.h"
#include "extern.h" #include "extern.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "proto.h"
int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP) { int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP) {
RACH_ConfigCommon_t *rach_ConfigCommon = NULL; RACH_ConfigCommon_t *rach_ConfigCommon = NULL;
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
*******************************************************************************/ *******************************************************************************/
/*! \file main.c /*! \file main.c
* \brief top init of Layer 2 * \brief top init of Layer 2
* \author Raymond Knopp and Navid Nikaein * \author Navid Nikaein and Raymond Knopp
* \date 2011 * \date 2010 - 2014
* \version 0.5 * \version 0.5
* \email: navid.nikaein@eurecom.fr * \email: navid.nikaein@eurecom.fr
* @ingroup _mac * @ingroup _mac
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#endif //USER_MODE #endif //USER_MODE
#include "defs.h" #include "defs.h"
#include "proto.h"
#include "extern.h" #include "extern.h"
#include "assertions.h" #include "assertions.h"
#include "PHY_INTERFACE/extern.h" #include "PHY_INTERFACE/extern.h"
...@@ -69,12 +70,10 @@ ...@@ -69,12 +70,10 @@
#include "SCHED/defs.h" #include "SCHED/defs.h"
/***********************************************************************/
void dl_phy_sync_success(module_id_t module_idP, void dl_phy_sync_success(module_id_t module_idP,
frame_t frameP, frame_t frameP,
unsigned char eNB_index, unsigned char eNB_index,
uint8_t first_sync){ //init as MR uint8_t first_sync){ //init as MR
/***********************************************************************/
LOG_D(MAC,"[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n", module_idP, frameP, eNB_index); LOG_D(MAC,"[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n", module_idP, frameP, eNB_index);
if (first_sync==1) { if (first_sync==1) {
layer2_init_UE(module_idP); layer2_init_UE(module_idP);
...@@ -86,9 +85,8 @@ void dl_phy_sync_success(module_id_t module_idP, ...@@ -86,9 +85,8 @@ void dl_phy_sync_success(module_id_t module_idP,
} }
/***********************************************************************/
void mrbch_phy_sync_failure(module_id_t module_idP, frame_t frameP, uint8_t free_eNB_index){//init as CH void mrbch_phy_sync_failure(module_id_t module_idP, frame_t frameP, uint8_t free_eNB_index){//init as CH
/***********************************************************************/
LOG_I(MAC,"[eNB %d] Frame %d: PHY Sync failure \n",module_idP,frameP); LOG_I(MAC,"[eNB %d] Frame %d: PHY Sync failure \n",module_idP,frameP);
layer2_init_eNB(module_idP, free_eNB_index); layer2_init_eNB(module_idP, free_eNB_index);
openair_rrc_eNB_init(module_idP); openair_rrc_eNB_init(module_idP);
...@@ -100,23 +98,19 @@ char layer2_init_eNB(module_id_t module_idP, unsigned char eNB_index){ ...@@ -100,23 +98,19 @@ char layer2_init_eNB(module_id_t module_idP, unsigned char eNB_index){
} }
/***********************************************************************/
char layer2_init_UE(module_id_t module_idP){ char layer2_init_UE(module_id_t module_idP){
return 0; return 0;
} }
/***********************************************************************/
void mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP, uint16_t eNB_index){ void mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP, uint16_t eNB_index){
/***********************************************************************/
// Mac_rlc_xface->mac_out_of_sync_ind(Mod_id, frameP, eNB_index); // Mac_rlc_xface->mac_out_of_sync_ind(Mod_id, frameP, eNB_index);
} }
/***********************************************************************/
int mac_top_init(int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active){ int mac_top_init(int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active){
/***********************************************************************/
module_id_t Mod_id,i,j; module_id_t Mod_id,i,j;
RA_TEMPLATE *RA_template; RA_TEMPLATE *RA_template;
UE_TEMPLATE *UE_template; UE_TEMPLATE *UE_template;
...@@ -311,9 +305,7 @@ int mac_top_init(int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active){ ...@@ -311,9 +305,7 @@ int mac_top_init(int eMBMS_active, uint8_t cba_group_active, uint8_t HO_active){
} }
/***********************************************************************/
int mac_init_global_param(void){ int mac_init_global_param(void){
/***********************************************************************/
Mac_rlc_xface = NULL; Mac_rlc_xface = NULL;
...@@ -374,9 +366,8 @@ int mac_init_global_param(void){ ...@@ -374,9 +366,8 @@ int mac_init_global_param(void){
} }
/***********************************************************************/
void mac_top_cleanup(void){ void mac_top_cleanup(void){
/***********************************************************************/
#ifndef USER_MODE #ifndef USER_MODE
pdcp_module_cleanup (); pdcp_module_cleanup ();
#endif #endif
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
//#include "RRC/LITE/extern.h" //#include "RRC/LITE/extern.h"
//#include "LAYER2/PDCP/pdcp.h" //#include "LAYER2/PDCP/pdcp.h"
#include "proto.h"
#ifndef USER_MODE #ifndef USER_MODE
static int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length) static int openair2_stats_read(char *buffer, char **my_buffer, off_t off, int length)
#else #else
......
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface Eurecom OpenAirInterface
...@@ -29,13 +28,15 @@ ...@@ -29,13 +28,15 @@
*******************************************************************************/ *******************************************************************************/
/*! \file pre_processor.c /*! \file pre_processor.c
* \brief procedures related to UE * \brief procedures related to UE
* \author Ankit Bhamri * \author Navid Nikaein and Ankit Bhamri
* \date 2013 * \date 2013
* \email navid.nikaein@eurecom.fr
* \version 0.1 * \version 0.1
* @ingroup _mac * @ingroup _mac
*/ */
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
...@@ -43,6 +44,7 @@ ...@@ -43,6 +44,7 @@
#include "SCHED/extern.h" #include "SCHED/extern.h"
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/OPT/opt.h" #include "UTIL/OPT/opt.h"
...@@ -325,10 +327,22 @@ void sort_UEs (module_id_t Mod_id, ...@@ -325,10 +327,22 @@ void sort_UEs (module_id_t Mod_id,
} }
else if((j == MAX_NUM_LCID-1)) else if((j == MAX_NUM_LCID-1))
{ {
if(eNB_UE_stats1->DL_cqi[0] < eNB_UE_stats2->DL_cqi[0]){ /* The goal is to sort by priority.
* We use the priority of DTCH logical
* channel.
*/
/*if(eNB_mac_inst[Mod_id].UE_sched_ctrl[next_ue1].priority[3]<eNB_mac_inst[Mod_id].UE_sched_ctrl[next_ue2].priority[3])
{
UE_id_sorted[i] = next_ue2;
UE_id_sorted[ii] = next_ue1;
} //if the priority is the same then sort by CQI
else if(eNB_mac_inst[Mod_id].UE_sched_ctrl[next_ue1].priority[3]==eNB_mac_inst[Mod_id].UE_sched_ctrl[next_ue2].priority[3]){*/
if(eNB_UE_stats1->DL_cqi[0] < eNB_UE_stats2->DL_cqi[0]){
UE_id_sorted[i] = next_ue2; UE_id_sorted[i] = next_ue2;
UE_id_sorted[ii] = next_ue1; UE_id_sorted[ii] = next_ue1;
} }
//}
} }
} }
} }
...@@ -423,6 +437,14 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, ...@@ -423,6 +437,14 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
total_ue_count = total_ue_count + 1; total_ue_count = total_ue_count + 1;
} }
// hypotetical assignement // hypotetical assignement
/*
* If schedule is enabled and if the priority of the UEs is modified
* The average rbs per logical channel per user will depend on the level of
* priority. Concerning the hypothetical assignement, we should assign more
* rbs to prioritized users. Maybe, we can do a mapping between the
* average rbs per user and the level of priority or multiply the average rbs
* per user by a coefficient which represents the degree of priority.
*/
if((total_ue_count > 0) && ( min_rb_unit * total_ue_count <= mac_xface->lte_frame_parms->N_RB_DL ) ) if((total_ue_count > 0) && ( min_rb_unit * total_ue_count <= mac_xface->lte_frame_parms->N_RB_DL ) )
average_rbs_per_user = (uint16_t) ceil(mac_xface->lte_frame_parms->N_RB_DL/total_ue_count); average_rbs_per_user = (uint16_t) ceil(mac_xface->lte_frame_parms->N_RB_DL/total_ue_count);
else else
......
This diff is collapsed.
This diff is collapsed.
...@@ -28,14 +28,15 @@ ...@@ -28,14 +28,15 @@
*******************************************************************************/ *******************************************************************************/
/*! \file rar_tools.c /*! \file rar_tools.c
* \brief random access tools * \brief random access tools
* \author Raymond Knopp * \author Raymond Knopp and navid nikaein
* \date 2011 * \date 2011 - 2014
* \version 0.5 * \version 0.5
* @ingroup _mac * @ingroup _mac
*/ */
#include "defs.h" #include "defs.h"
#include "proto.h"
#include "extern.h" #include "extern.h"
#include "MAC_INTERFACE/defs.h" #include "MAC_INTERFACE/defs.h"
#include "MAC_INTERFACE/extern.h" #include "MAC_INTERFACE/extern.h"
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
*******************************************************************************/ *******************************************************************************/
/*! \file ue_procedures.c /*! \file ue_procedures.c
* \brief procedures related to UE * \brief procedures related to UE
* \author Raymond Knopp, Navid Nikaein * \author Navid Nikaein and Raymond Knopp
* \date 2011 * \date 2010 - 2014
* \version 0.5 * \version 1
* \email: navid.nikaein@eurecom.fr * \email: navid.nikaein@eurecom.fr
* @ingroup _mac * @ingroup _mac
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "extern.h" #include "extern.h"
#include "defs.h" #include "defs.h"
#include "proto.h"
#ifdef PHY_EMUL #ifdef PHY_EMUL
# include "SIMULATION/PHY_EMULATION/impl_defs.h" # include "SIMULATION/PHY_EMULATION/impl_defs.h"
#else #else
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
*******************************************************************************/ *******************************************************************************/
/*! \file vars.h /*! \file vars.h
* \brief mac vars * \brief mac vars
* \author Raymond Knopp, Navid Nikaein * \author Navid Nikaein and Raymond Knopp
* \date 2012 * \date 2010 - 2014
* \version 1.0 * \version 1.0
* \email navid.nikaein@eurecom.fr * \email navid.nikaein@eurecom.fr
* @ingroup _mac * @ingroup _mac
......
...@@ -84,6 +84,11 @@ MAC_OBJS += $(MAC_DIR)/ra_procedures.o ...@@ -84,6 +84,11 @@ MAC_OBJS += $(MAC_DIR)/ra_procedures.o
MAC_OBJS += $(MAC_DIR)/l1_helpers.o MAC_OBJS += $(MAC_DIR)/l1_helpers.o
MAC_OBJS += $(MAC_DIR)/rar_tools.o MAC_OBJS += $(MAC_DIR)/rar_tools.o
MAC_OBJS += $(MAC_DIR)/eNB_scheduler.o MAC_OBJS += $(MAC_DIR)/eNB_scheduler.o
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_dlsch.o
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_ulsch.o
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_mch.o
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_bch.o
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_primitives.o
MAC_OBJS += $(MAC_DIR)/pre_processor.o MAC_OBJS += $(MAC_DIR)/pre_processor.o
MAC_OBJS += $(MAC_DIR)/config.o MAC_OBJS += $(MAC_DIR)/config.o
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "asn1_conversions.h" #include "asn1_conversions.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "LAYER2/RLC/rlc.h" #include "LAYER2/RLC/rlc.h"
#include "LAYER2/MAC/proto.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
#include "RRC/LITE/MESSAGES/asn1_msg.h" #include "RRC/LITE/MESSAGES/asn1_msg.h"
......
MME :
{
REALM = "eur";
# Define the limits of the system in terms of served eNB and served UE.
# When the limits will be reached, overload procedure will take place.
MAXENB = 10;
MAXUE = 100;
RELATIVE_CAPACITY = 10;
# Display statistics about whole system (expressed in seconds)
MME_STATISTIC_TIMER = 10;
EMERGENCY_ATTACH_SUPPORTED = "no";
UNAUTHENTICATED_IMSI_SUPPORTED = "no";
DEFAULT_APN = "www.eurecom.fr";
EMERGENCY_APN = "www.eurecom_sos.fr";
KASME = "CAFECAFECAFECAFECAFECAFECAFECAFE";
AUTH_RAND = ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04 );
AUTH_AUTN = ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x04, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 );
AUTH_XRES = ( 0x67, 0x70, 0x3a, 0x31, 0xf2, 0x2a, 0x2d, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 );
IP_CAPABILITY = "IPV4V6";
INTERTASK_INTERFACE :
{
# max queue size per task
ITTI_QUEUE_SIZE = 2000000;
};
S6A :
{
S6A_CONF = "../epc_nas/UTILS/CONF/s6a.conf";
};
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 32;
SCTP_OUTSTREAMS = 32;
};
# ------- S1AP definitions
S1AP :
{
# outcome drop timer value (seconds)
S1AP_OUTCOME_TIMER = 10;
};
# ------- MME served GUMMEI
GUMMEI :
{
# MME code DEFAULT = 0
# size = 8 bits
# maximum of 256 values, comma separated
MME_CODE = [ 30 , 56 , 1 , 8 ];
# MME GROUP ID DEFAULT = 0
# size = 16 bits
# maximum of 65535 values, comma separated
MME_GID = [ 3 , 4 , 5 , 30 , 8 , 9 , 50021 ];
# TA (mcc.mnc:tracking area code) DEFAULT = 208.34:0
# max values = 999.999:65535
# maximum of 32 values, comma separated
PLMN = (
{MCC="208" ; MNC="10"; TAC = "1"; },
{MCC="209" ; MNC="130"; TAC = "4"; },
{MCC="208" ; MNC="92"; TAC = "1"; }
);
};
NETWORK_INTERFACES :
{
MME_INTERFACE_NAME_FOR_S1_MME = "eth0";
MME_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.170/24";
MME_INTERFACE_NAME_FOR_S11_MME = "none";
MME_IPV4_ADDRESS_FOR_S11_MME = "192.168.33.170/24";
};
};
S-GW :
{
NETWORK_INTERFACES :
{
SGW_INTERFACE_NAME_FOR_S11 = "none";
SGW_IPV4_ADDRESS_FOR_S11 = "192.168.33.170/24";
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP = "eth0";
SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP = "192.168.12.170/24";
SGW_INTERFACE_NAME_FOR_S5_S8_UP = "none";
SGW_IPV4_ADDRESS_FOR_S5_S8_UP = "192.168.12.170/24";
};
};
P-GW =
{
NETWORK_INTERFACES :
{
PGW_INTERFACE_NAME_FOR_S5_S8 = "none";
PGW_IPV4_ADDRESS_FOR_S5_S8 = "192.168.12.170/24";
PGW_INTERFACE_NAME_FOR_SGI = "none";
PGW_IPV4_ADDR_FOR_SGI = "192.168.12.170/24";
};
IP_ADDRESS_POOL :
{
IPV4_LIST = (
"192.168.87.32",
"192.168.88.0<--->192.168.88.255",
"192.168.90.0<--->192.168.90.255"
);
IPV6_LIST = (
"2014:01:26::32",
"2014:02:26::0/120"
);
};
};
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<UE_MOBILITY> <UE_MOBILITY>
<UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION> <UE_INITIAL_DISTRIBUTION>random</UE_INITIAL_DISTRIBUTION>
<RANDOM_UE_DISTRIBUTION> <RANDOM_UE_DISTRIBUTION>
<NUMBER_OF_NODES>1</NUMBER_OF_NODES> <NUMBER_OF_NODES>2</NUMBER_OF_NODES>
</RANDOM_UE_DISTRIBUTION> </RANDOM_UE_DISTRIBUTION>
<UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE> <UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE>
</UE_MOBILITY> </UE_MOBILITY>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<eNB_MOBILITY> <eNB_MOBILITY>
<eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION> <eNB_INITIAL_DISTRIBUTION>random</eNB_INITIAL_DISTRIBUTION>
<RANDOM_eNB_DISTRIBUTION> <RANDOM_eNB_DISTRIBUTION>
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS> <NUMBER_OF_CELLS>2</NUMBER_OF_CELLS>
</RANDOM_eNB_DISTRIBUTION> </RANDOM_eNB_DISTRIBUTION>
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE> <eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
</eNB_MOBILITY> </eNB_MOBILITY>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
<NUMBER_OF_NODES>1</NUMBER_OF_NODES> <NUMBER_OF_NODES>1</NUMBER_OF_NODES>
</RANDOM_UE_DISTRIBUTION> </RANDOM_UE_DISTRIBUTION>
<UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE> <UE_MOBILITY_TYPE>RWP</UE_MOBILITY_TYPE>
<GRID_WALK>
<GRID_MAP>RESTRICTED</GRID_MAP>
</GRID_WALK>
<UE_MOVING_DYNAMICS> <UE_MOVING_DYNAMICS>
<MIN_SPEED_mps>0.01</MIN_SPEED_mps> <MIN_SPEED_mps>0.01</MIN_SPEED_mps>
<MAX_SPEED_mps>10</MAX_SPEED_mps> <MAX_SPEED_mps>10</MAX_SPEED_mps>
...@@ -30,7 +33,7 @@ ...@@ -30,7 +33,7 @@
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE> <eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
</eNB_MOBILITY> </eNB_MOBILITY>
</MOBILITY> </MOBILITY>
<OMV>1</OMV> <!--OMV>1</OMV-->
</TOPOLOGY_CONFIG> </TOPOLOGY_CONFIG>
<EMULATION_CONFIG> <EMULATION_CONFIG>
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
<RANDOM_eNB_DISTRIBUTION> <RANDOM_eNB_DISTRIBUTION>
<NUMBER_OF_CELLS>1</NUMBER_OF_CELLS> <NUMBER_OF_CELLS>1</NUMBER_OF_CELLS>
</RANDOM_eNB_DISTRIBUTION> </RANDOM_eNB_DISTRIBUTION>
<eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE> <eNB_MOBILITY_TYPE>STATIC</eNB_MOBILITY_TYPE>
<!-- <TRACE_MOBILITY_FILE>static_1enb.tr</TRACE_MOBILITY_FILE> --> <!-- file should be located at $(OPENAIR2)/UTIL/OMG/TRACE/, see README there--> <!--<TRACE_MOBILITY_FILE>static_1enb.tr</TRACE_MOBILITY_FILE>--> <!-- file should be located at $(OPENAIR2)/UTIL/OMG/TRACE/, see README there-->
</eNB_MOBILITY> </eNB_MOBILITY>
</MOBILITY> </MOBILITY>
</TOPOLOGY_CONFIG> </TOPOLOGY_CONFIG>
......
This diff is collapsed.
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
void add_event(Event_t event); void add_event(Event_t event);
void schedule(Event_Type_t type, int frame, char * key, void* value); void schedule(Operation_Type_t op, Event_Type_t type, int frame, char * key, void* value, int ue, int lcid);
void schedule_delayed(Operation_Type_t op, Event_Type_t type, char * key, void* value, char * time, int ue, int lcid);
void schedule_events(void); void schedule_events(void);
...@@ -50,15 +52,18 @@ void execute_events(frame_t frame); ...@@ -50,15 +52,18 @@ void execute_events(frame_t frame);
void update_oai_model(char * key, void * value); void update_oai_model(char * key, void * value);
void update_sys_model(char * key, void * value); void update_sys_model(Event_t event);
void update_topo_model(Event_t event);
void update_app_model(Event_t event);
void update_topo_model(char * key, void * value); void update_emu_model(Event_t event);
void update_app_model(char * key, void * value); void update_mac(Event_t event);
void update_emu_model(char * key, void * value); int validate_mac(Event_t event);
void update_mac(char * key, void * value);
/* /*
void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value); void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value);
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
//#ifdef OPENAIR2 //#ifdef OPENAIR2
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/vars.h" #include "LAYER2/MAC/vars.h"
#include "pdcp.h" #include "pdcp.h"
#ifndef CELLULAR #ifndef CELLULAR
...@@ -138,8 +139,8 @@ channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX]; ...@@ -138,8 +139,8 @@ channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
node_desc_t *enb_data[NUMBER_OF_eNB_MAX]; node_desc_t *enb_data[NUMBER_OF_eNB_MAX];
node_desc_t *ue_data[NUMBER_OF_UE_MAX]; node_desc_t *ue_data[NUMBER_OF_UE_MAX];
// Added for PHY abstraction // Added for PHY abstraction
extern Node_list ue_node_list; extern node_list* ue_node_list;
extern Node_list enb_node_list; extern node_list* enb_node_list;
extern int pdcp_period, omg_period; extern int pdcp_period, omg_period;
extern double **s_re, **s_im, **r_re, **r_im, **r_re0, **r_im0; extern double **s_re, **s_im, **r_re, **r_im, **r_re0, **r_im0;
...@@ -313,14 +314,14 @@ static void set_cli_start(module_id_t module_idP, uint8_t start) { ...@@ -313,14 +314,14 @@ static void set_cli_start(module_id_t module_idP, uint8_t start) {
#endif #endif
#ifdef OPENAIR2 #ifdef OPENAIR2
int omv_write(int pfd, Node_list enb_node_list, Node_list ue_node_list, Data_Flow_Unit omv_data) { int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_Flow_Unit omv_data) {
module_id_t i, j; module_id_t i, j;
omv_data.end = 0; omv_data.end = 0;
//omv_data.total_num_nodes = NB_UE_INST + NB_eNB_INST; //omv_data.total_num_nodes = NB_UE_INST + NB_eNB_INST;
for (i = 0; i < NB_eNB_INST; i++) { for (i = 0; i < NB_eNB_INST; i++) {
if (enb_node_list != NULL) { if (enb_node_list != NULL) {
omv_data.geo[i].x = (enb_node_list->node->X_pos < 0.0) ? 0.0 : enb_node_list->node->X_pos; omv_data.geo[i].x = (enb_node_list->node->x_pos < 0.0) ? 0.0 : enb_node_list->node->x_pos;
omv_data.geo[i].y = (enb_node_list->node->Y_pos < 0.0) ? 0.0 : enb_node_list->node->Y_pos; omv_data.geo[i].y = (enb_node_list->node->y_pos < 0.0) ? 0.0 : enb_node_list->node->y_pos;
omv_data.geo[i].z = 1.0; omv_data.geo[i].z = 1.0;
omv_data.geo[i].mobility_type = oai_emulation.info.omg_model_enb; omv_data.geo[i].mobility_type = oai_emulation.info.omg_model_enb;
omv_data.geo[i].node_type = 0; //eNB omv_data.geo[i].node_type = 0; //eNB
...@@ -339,8 +340,8 @@ int omv_write(int pfd, Node_list enb_node_list, Node_list ue_node_list, Data_Flo ...@@ -339,8 +340,8 @@ int omv_write(int pfd, Node_list enb_node_list, Node_list ue_node_list, Data_Flo
} }
for (i = NB_eNB_INST; i < NB_UE_INST + NB_eNB_INST; i++) { for (i = NB_eNB_INST; i < NB_UE_INST + NB_eNB_INST; i++) {
if (ue_node_list != NULL) { if (ue_node_list != NULL) {
omv_data.geo[i].x = (ue_node_list->node->X_pos < 0.0) ? 0.0 : ue_node_list->node->X_pos; omv_data.geo[i].x = (ue_node_list->node->x_pos < 0.0) ? 0.0 : ue_node_list->node->x_pos;
omv_data.geo[i].y = (ue_node_list->node->Y_pos < 0.0) ? 0.0 : ue_node_list->node->Y_pos; omv_data.geo[i].y = (ue_node_list->node->y_pos < 0.0) ? 0.0 : ue_node_list->node->y_pos;
omv_data.geo[i].z = 1.0; omv_data.geo[i].z = 1.0;
omv_data.geo[i].mobility_type = oai_emulation.info.omg_model_ue; omv_data.geo[i].mobility_type = oai_emulation.info.omg_model_ue;
omv_data.geo[i].node_type = 1; //UE omv_data.geo[i].node_type = 1; //UE
...@@ -645,11 +646,13 @@ void *l2l1_task(void *args_p) { ...@@ -645,11 +646,13 @@ void *l2l1_task(void *args_p) {
} }
#endif #endif
#ifdef DEBUG_OMG #ifdef DEBUG_OMG
/*
if ((((int) oai_emulation.info.time_s) % 100) == 0) { if ((((int) oai_emulation.info.time_s) % 100) == 0) {
for (UE_inst = oai_emulation.info.first_ue_local; UE_inst < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local); UE_inst++) { for (UE_inst = oai_emulation.info.first_ue_local; UE_inst < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local); UE_inst++) {
get_node_position (UE, UE_inst); get_node_position (UE, UE_inst);
} }
} }
*/
#endif #endif
update_ocm (); update_ocm ();
...@@ -1124,6 +1127,7 @@ int main(int argc, char **argv) { ...@@ -1124,6 +1127,7 @@ int main(int argc, char **argv) {
smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0]->lte_frame_parms); smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0]->lte_frame_parms);
#endif #endif
// add events to future event list: Currently not used // add events to future event list: Currently not used
//oai_emulation.info.oeh_enabled = 1;
if (oai_emulation.info.oeh_enabled == 1) if (oai_emulation.info.oeh_enabled == 1)
schedule_events(); schedule_events();
...@@ -1569,4 +1573,12 @@ void oai_shutdown(void) { ...@@ -1569,4 +1573,12 @@ void oai_shutdown(void) {
LOG_N(EMU, ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU shutdown <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n"); LOG_N(EMU, ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU shutdown <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
} }
eNB_MAC_INST* get_eNB_mac_inst()
{
return eNB_mac_inst;
}
OAI_Emulation* get_OAI_emulation()
{
return &oai_emulation;
}
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include "UTIL/OMV/structures.h" #include "UTIL/OMV/structures.h"
#endif #endif
eNB_MAC_INST* get_eNB_mac_inst(void);
OAI_Emulation* get_OAI_emulation(void);
void init_channel_vars(LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0); void init_channel_vars(LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0);
void do_UL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint16_t next_slot,uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms, uint32_t); void do_UL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint16_t next_slot,uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms, uint32_t);
...@@ -25,7 +27,7 @@ void do_DL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double ...@@ -25,7 +27,7 @@ void do_DL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double
void init_ue(node_desc_t *ue_data, UE_Antenna ue_ant);//Abstraction changes void init_ue(node_desc_t *ue_data, UE_Antenna ue_ant);//Abstraction changes
void init_enb(node_desc_t *enb_data, eNB_Antenna enb_ant);//Abstraction changes void init_enb(node_desc_t *enb_data, eNB_Antenna enb_ant);//Abstraction changes
void extract_position(Node_list input_node_list, node_desc_t**, int nb_nodes);//Abstraction changes void extract_position(node_list* input_node_list, node_desc_t**, int nb_nodes);//Abstraction changes
void get_beta_map(void);//Abstraction changes void get_beta_map(void);//Abstraction changes
void get_MIESM_param(void); void get_MIESM_param(void);
...@@ -46,7 +48,7 @@ void reset_opp_meas(void); ...@@ -46,7 +48,7 @@ void reset_opp_meas(void);
void print_opp_meas(void); void print_opp_meas(void);
#ifdef OPENAIR2 #ifdef OPENAIR2
int omv_write (int pfd, Node_list enb_node_list, Node_list ue_node_list, Data_Flow_Unit omv_data); int omv_write (int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_Flow_Unit omv_data);
void omv_end (int pfd, Data_Flow_Unit omv_data); void omv_end (int pfd, Data_Flow_Unit omv_data);
#endif #endif
......
This diff is collapsed.
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
#include "PHY/extern.h" #include "PHY/extern.h"
#include "MAC_INTERFACE/extern.h" #include "MAC_INTERFACE/extern.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
#ifdef OPENAIR2
#include "LAYER2/MAC/proto.h"
#endif
#include "LAYER2/PDCP_v10.1.0/pdcp.h" #include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "LAYER2/PDCP_v10.1.0/pdcp_primitives.h" #include "LAYER2/PDCP_v10.1.0/pdcp_primitives.h"
#include "RRC/LITE/extern.h" #include "RRC/LITE/extern.h"
...@@ -108,11 +111,10 @@ int map1,map2; ...@@ -108,11 +111,10 @@ int map1,map2;
double **ShaF = NULL; double **ShaF = NULL;
// pointers signal buffers (s = transmit, r,r0 = receive) // pointers signal buffers (s = transmit, r,r0 = receive)
double **s_re, **s_im, **r_re, **r_im, **r_re0, **r_im0; double **s_re, **s_im, **r_re, **r_im, **r_re0, **r_im0;
Node_list ue_node_list = NULL; node_list* ue_node_list = NULL;
Node_list enb_node_list = NULL; node_list* enb_node_list = NULL;
int pdcp_period = 0;
int omg_period = 0; int omg_period = 0;
int pdcp_period = 0;
// time calibration for soft realtime mode // time calibration for soft realtime mode
struct timespec time_spec; struct timespec time_spec;
...@@ -990,11 +992,11 @@ void update_omg (frame_t frameP) { ...@@ -990,11 +992,11 @@ void update_omg (frame_t frameP) {
if ((frameP % omg_period) == 0 ) { // call OMG every 10ms if ((frameP % omg_period) == 0 ) { // call OMG every 10ms
update_nodes(oai_emulation.info.time_s); update_nodes(oai_emulation.info.time_s);
display_node_list(enb_node_list); //display_node_list(enb_node_list);
display_node_list(ue_node_list); //display_node_list(ue_node_list);
if (oai_emulation.info.omg_model_ue >= MAX_NUM_MOB_TYPES){ // mix mobility model if (oai_emulation.info.omg_model_ue >= MAX_NUM_MOB_TYPES){ // mix mobility model
for(UE_id=oai_emulation.info.first_ue_local; UE_id<(oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local);UE_id++){ for(UE_id=oai_emulation.info.first_ue_local; UE_id<(oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local);UE_id++){
new_omg_model = randomGen(STATIC,RWALK); new_omg_model = randomgen(STATIC,RWALK);
LOG_D(OMG, "[UE] Node of ID %d is changing mobility generator ->%d \n", UE_id, new_omg_model); LOG_D(OMG, "[UE] Node of ID %d is changing mobility generator ->%d \n", UE_id, new_omg_model);
// reset the mobility model for a specific node // reset the mobility model for a specific node
set_new_mob_type (UE_id, UE, new_omg_model, oai_emulation.info.time_s); set_new_mob_type (UE_id, UE, new_omg_model, oai_emulation.info.time_s);
...@@ -1003,7 +1005,7 @@ void update_omg (frame_t frameP) { ...@@ -1003,7 +1005,7 @@ void update_omg (frame_t frameP) {
if (oai_emulation.info.omg_model_enb >= MAX_NUM_MOB_TYPES) { // mix mobility model if (oai_emulation.info.omg_model_enb >= MAX_NUM_MOB_TYPES) { // mix mobility model
for (eNB_id = oai_emulation.info.first_enb_local; eNB_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local); eNB_id++) { for (eNB_id = oai_emulation.info.first_enb_local; eNB_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local); eNB_id++) {
new_omg_model = randomGen (STATIC, RWALK); new_omg_model = randomgen (STATIC, RWALK);
LOG_D (OMG,"[eNB] Node of ID %d is changing mobility generator ->%d \n", eNB_id, new_omg_model); LOG_D (OMG,"[eNB] Node of ID %d is changing mobility generator ->%d \n", eNB_id, new_omg_model);
// reset the mobility model for a specific node // reset the mobility model for a specific node
set_new_mob_type (eNB_id, eNB, new_omg_model, oai_emulation.info.time_s); set_new_mob_type (eNB_id, eNB, new_omg_model, oai_emulation.info.time_s);
...@@ -1013,8 +1015,10 @@ void update_omg (frame_t frameP) { ...@@ -1013,8 +1015,10 @@ void update_omg (frame_t frameP) {
} }
void update_omg_ocm() { void update_omg_ocm() {
enb_node_list = get_current_positions(oai_emulation.info.omg_model_enb, eNB, oai_emulation.info.time_s);
ue_node_list = get_current_positions(oai_emulation.info.omg_model_ue, UE, oai_emulation.info.time_s); enb_node_list=get_current_positions(oai_emulation.info.omg_model_enb, eNB, oai_emulation.info.time_s);
ue_node_list=get_current_positions(oai_emulation.info.omg_model_ue, UE, oai_emulation.info.time_s);
} }
void update_ocm() { void update_ocm() {
...@@ -1027,6 +1031,8 @@ void update_ocm() { ...@@ -1027,6 +1031,8 @@ void update_ocm() {
/* check if the openair channel model is activated used for PHY abstraction : path loss*/ /* check if the openair channel model is activated used for PHY abstraction : path loss*/
if ((oai_emulation.info.ocm_enabled == 1)&& (ethernet_flag == 0 )) { if ((oai_emulation.info.ocm_enabled == 1)&& (ethernet_flag == 0 )) {
//LOG_D(OMG," extracting position of eNb...\n"); //LOG_D(OMG," extracting position of eNb...\n");
display_node_list(enb_node_list);
display_node_list(ue_node_list);
extract_position(enb_node_list, enb_data, NB_eNB_INST); extract_position(enb_node_list, enb_data, NB_eNB_INST);
//extract_position_fixed_enb(enb_data, NB_eNB_INST,frame); //extract_position_fixed_enb(enb_data, NB_eNB_INST,frame);
//LOG_D(OMG," extracting position of UE...\n"); //LOG_D(OMG," extracting position of UE...\n");
......
...@@ -48,19 +48,19 @@ extern double MI_map_64qam[3][227]; ...@@ -48,19 +48,19 @@ extern double MI_map_64qam[3][227];
*/ */
// Extract the positions of UE and ENB from the mobility model // Extract the positions of UE and ENB from the mobility model
void extract_position (Node_list input_node_list, node_desc_t **node_data, int nb_nodes) { void extract_position (node_list* input_node_list, node_desc_t **node_data, int nb_nodes) {
int i; int i;
for (i=0;i<nb_nodes;i++) { for (i=0;i<nb_nodes;i++) {
if ((input_node_list != NULL) && (node_data[i] != NULL)) { if ((input_node_list != NULL) && (node_data[i] != NULL)) {
node_data[i]->x = input_node_list->node->X_pos; node_data[i]->x = input_node_list->node->x_pos;
if (node_data[i]->x <0.0) if (node_data[i]->x <0.0)
node_data[i]->x = 0.0; node_data[i]->x = 0.0;
node_data[i]->y = input_node_list->node->Y_pos; node_data[i]->y = input_node_list->node->y_pos;
if (node_data[i]->y <0.0) if (node_data[i]->y <0.0)
node_data[i]->y = 0.0; node_data[i]->y = 0.0;
LOG_D(OCM, "extract_position: added node_data %d with position X: %f and Y: %f \n", i,input_node_list->node->X_pos, input_node_list->node->Y_pos ); LOG_D(OCM, "extract_position: added node_data %d with position X: %f and Y: %f \n", i,input_node_list->node->x_pos, input_node_list->node->y_pos );
input_node_list = input_node_list->next; input_node_list = input_node_list->next;
} }
else { else {
......
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