Commit 8b714302 authored by Navid Nikaein's avatar Navid Nikaein

* manage control elements in CCCH PDU through rx_sdu function

* add event handler for remote (online) configuration and status monitoring
* update openair config generator (OCG) and scneario descriptor (OSD) with new features contributed by A. Gomes (one source)
* fix the issue with netlink when benchmarking oaisim preformance 
* pre-ci passed except for eMBMS  



git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5299 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 5c0c1eb7
......@@ -332,7 +332,7 @@ uint8_t get_ack(LTE_DL_FRAME_PARMS *frame_parms,
subframe_dl = subframe - 4;
o_ACK[0] = harq_ack[subframe_dl].ack;
status = harq_ack[subframe_dl].send_harq_status;
printf("get_ack: Getting ACK/NAK for PDSCH (subframe %d) => %d\n",subframe_dl,o_ACK[0]);
//printf("get_ack: Getting ACK/NAK for PDSCH (subframe %d) => %d\n",subframe_dl,o_ACK[0]);
}
else {
switch (frame_parms->tdd_config) {
......
......@@ -3093,11 +3093,18 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,ui
phy_vars_eNB->Mod_id,
frame,harq_pid,i);
#endif
mac_xface->rx_sdu(phy_vars_eNB->Mod_id,
frame,
phy_vars_eNB->ulsch_eNB[i]->rnti,
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->b,
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3);
/*
mac_xface->terminate_ra_proc(phy_vars_eNB->Mod_id,
frame,
phy_vars_eNB->ulsch_eNB[i]->rnti,
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->b,
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->TBS>>3);
*/
#endif
phy_vars_eNB->eNB_UE_stats[i].mode = PUSCH;
......
......@@ -241,7 +241,7 @@ double pbch_bler(double sinr) {
}
bler = pow(10.0,log10_bler);
}
printf ("sinr %f bler %f\n",sinr,bler);
//printf ("sinr %f bler %f\n",sinr,bler);
return(bler);
}
......@@ -12,7 +12,11 @@
#ifndef __PLATFORM_CONSTANTS_H__
# define __PLATFORM_CONSTANTS_H__
#define NL_MAX_PAYLOAD 4096 /* this should cover the max mtu size*/
#ifdef JUMBO_FRAME
#define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/
#else
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
#endif
#ifdef USER_MODE
#ifdef LARGE_SCALE
......
......@@ -36,7 +36,7 @@ typedef uint32_t frame_t;
typedef int32_t sframe_t;
typedef uint32_t sub_frame_t;
typedef uint8_t module_id_t;
typedef int8_t smodule_id_t;
typedef int16_t smodule_id_t;
typedef uint16_t rb_id_t;
typedef uint16_t srb_id_t;
......
......@@ -1069,7 +1069,7 @@ can be scheduled.
@param subframe Index of current subframe
@param calibration_flag Flag to indicate that eNB scheduler should schedule TDD auto-calibration PUSCH.
*/
void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframe);//, int calibration_flag);
void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP);//, int calibration_flag);
/* \brief Function to retrieve result of scheduling (DCI) in current subframe. Can be called an arbitrary numeber of times after eNB_dlsch_ulsch_scheduler
in a given subframe.
......
This diff is collapsed.
......@@ -69,7 +69,7 @@ typedef struct
// eNB functions
/// Invoke dlsch/ulsch scheduling procedure for new subframe
void (*eNB_dlsch_ulsch_scheduler)(module_id_t Mod_id, uint8_t cooperation_flag, frame_t frameP, uint8_t subframe);//, int calibration_flag);
void (*eNB_dlsch_ulsch_scheduler)(module_id_t Mod_id, uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP);//, int calibration_flag);
/// Fill random access response sdu, passing timing advance
uint16_t (*fill_rar)(module_id_t Mod_id,frame_t frameP,uint8_t *dlsch_buffer,uint16_t N_RB_UL, uint8_t input_buffer_length);
......@@ -84,7 +84,7 @@ typedef struct
void (*cancel_ra_proc)(module_id_t Mod_id,frame_t frameP,uint16_t preamble);
/// Get DCI for current subframe from MAC
DCI_PDU* (*get_dci_sdu)(module_id_t Mod_id,frame_t frameP,uint8_t subframe);
DCI_PDU* (*get_dci_sdu)(module_id_t Mod_id,frame_t frameP,sub_frame_t subframe);
/// Get DLSCH sdu for particular RNTI and Transport block index
uint8_t* (*get_dlsch_sdu)(module_id_t Mod_id,frame_t frameP,rnti_t rnti,uint8_t TB_index);
......@@ -96,7 +96,7 @@ typedef struct
void (*mrbch_phy_sync_failure) (module_id_t Mod_id,frame_t frameP, uint8_t free_eNB_index);
/// Indicate Scheduling Request from UE
void (*SR_indication)(module_id_t Mod_id,frame_t frameP,rnti_t rnti,uint8_t subframe);
void (*SR_indication)(module_id_t Mod_id,frame_t frameP,rnti_t rnti,sub_frame_t subframe);
/// Configure Common PHY parameters from SIB1
void (*phy_config_sib1_eNB)(module_id_t Mod_id,
......@@ -124,7 +124,7 @@ typedef struct
#ifdef Rel10
/// Get MCH sdu and corresponding MCS for particular MBSFN subframe
MCH_PDU* (*get_mch_sdu)(module_id_t Mod_id,frame_t frameP,uint32_t subframe);
MCH_PDU* (*get_mch_sdu)(module_id_t Mod_id,frame_t frameP,sub_frame_t subframe);
#endif
// configure the cba rnti at the physical layer
void (*phy_config_cba_rnti)(module_id_t Mod_id,eNB_flag_t eNB_flag, uint8_t index, uint16_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups);
......@@ -149,26 +149,26 @@ typedef struct
/// Function to check if UE PHY needs to decode MCH for MAC
/// get the sync area id, and teturn MCS value if need to decode, otherwise -1
int (*ue_query_mch)(module_id_t Mod_id,frame_t frameP,uint32_t subframe,uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active);
int (*ue_query_mch)(module_id_t Mod_id,frame_t frameP,sub_frame_t subframe,uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active);
#endif
/// Retrieve ULSCH sdu from MAC
void (*ue_get_sdu)(module_id_t Mod_id,frame_t frameP,uint8_t subframe, uint8_t CH_index,uint8_t *ulsch_buffer,uint16_t buflen,uint8_t *access_mode);
void (*ue_get_sdu)(module_id_t Mod_id,frame_t frameP,sub_frame_t subframe, uint8_t CH_index,uint8_t *ulsch_buffer,uint16_t buflen,uint8_t *access_mode);
/// Retrieve RRCConnectionReq from MAC
PRACH_RESOURCES_t* (*ue_get_rach)(module_id_t Mod_id,frame_t frameP,uint8_t Msg3_flag,uint8_t subframe);
PRACH_RESOURCES_t* (*ue_get_rach)(module_id_t Mod_id,frame_t frameP,uint8_t Msg3_flag,sub_frame_t subframe);
/// Process Random-Access Response
uint16_t (*ue_process_rar)(module_id_t Mod_id,frame_t frameP,uint8_t *dlsch_buffer,uint16_t *t_crnti,uint8_t preamble_index);
/// Get SR payload (0,1) from UE MAC
uint32_t (*ue_get_SR)(module_id_t Mod_id,frame_t frameP,uint8_t eNB_id,rnti_t rnti,uint8_t subframe);
uint32_t (*ue_get_SR)(module_id_t Mod_id,frame_t frameP,uint8_t eNB_id,rnti_t rnti,sub_frame_t subframe);
/// Indicate synchronization with valid PBCH
void (*dl_phy_sync_success) (module_id_t Mod_id,frame_t frameP, uint8_t CH_index,uint8_t first_sync);
/// Only calls the PDCP for now
UE_L2_STATE_t (*ue_scheduler)(module_id_t Mod_id, frame_t frameP,uint8_t subframe, lte_subframe_t direction,uint8_t eNB_id);
UE_L2_STATE_t (*ue_scheduler)(module_id_t Mod_id, frame_t frameP,sub_frame_t subframe, lte_subframe_t direction,uint8_t eNB_id);
/// PHY-Config-Dedicated UE
void (*phy_config_dedicated_ue)(module_id_t Mod_id,uint8_t CH_index,
......
......@@ -65,6 +65,7 @@
#include "RRCConnectionSetup.h"
#include "RRCConnectionSetupComplete.h"
#include "RRCConnectionRequest.h"
#include "RRCConnectionReestablishmentRequest.h"
#include "BCCH-DL-SCH-Message.h"
#include "BCCH-BCH-Message.h"
#ifdef Rel10
......@@ -197,6 +198,11 @@ typedef struct eNB_RRC_UE_INFO_s {
UE_S_TMSI Initialue_identity_s_TMSI;
EstablishmentCause_t establishment_cause;
/* Information from UE RRC ConnectionReestablishmentRequest */
ReestablishmentCause_t reestablishment_cause;
/* UE id for initial connection to S1AP */
uint16_t ue_initial_id;
......
......@@ -357,8 +357,7 @@ RRC_status_t rrc_rx_tx(uint8_t Mod_id, const frame_t frameP, const eNB_flag_t eN
}
if ((UE_rrc_inst[Mod_id].Info[index].T310_cnt % 10) == 0)
LOG_D(RRC, "[UE %d] Frame %d T310 Count %d ms\n", Mod_id, frameP, UE_rrc_inst[Mod_id].Info[index].T310_cnt);
if (UE_rrc_inst[Mod_id].Info[index].T310_cnt
== T310[UE_rrc_inst[Mod_id].sib2[index]->ue_TimersAndConstants.t310]) {
if (UE_rrc_inst[Mod_id].Info[index].T310_cnt == T310[UE_rrc_inst[Mod_id].sib2[index]->ue_TimersAndConstants.t310]) {
UE_rrc_inst[Mod_id].Info[index].T310_active = 0;
rrc_t310_expiration (frameP, Mod_id, index);
return (RRC_PHY_RESYNCH);
......
......@@ -48,6 +48,8 @@
#include "COMMON/mac_rrc_primitives.h"
#include "RRC/LITE/MESSAGES/asn1_msg.h"
#include "RRCConnectionRequest.h"
#include "RRCConnectionReestablishmentRequest.h"
//#include "ReestablishmentCause.h"
#include "UL-CCCH-Message.h"
#include "DL-CCCH-Message.h"
#include "UL-DCCH-Message.h"
......@@ -461,6 +463,30 @@ uint8_t rrc_eNB_get_next_transaction_identifier(
/*------------------------------------------------------------------------------*/
/* Functions to handle UE index in eNB UE list */
static module_id_t rrc_eNB_get_UE_index(
module_id_t enb_mod_idP,
uint64_t UE_identity) {
boolean_t reg = FALSE;
module_id_t i;
AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB index invalid (%d/%d)!", enb_mod_idP, NB_eNB_INST);
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if (eNB_rrc_inst[enb_mod_idP].Info.UE_list[i] == UE_identity) {
// UE_identity already registered
reg = TRUE;
break;
}
}
if (reg == FALSE) {
return (UE_MODULE_INVALID);
} else
return (i);
}
static module_id_t rrc_eNB_get_next_free_UE_index(
module_id_t enb_mod_idP,
uint64_t UE_identity) {
......@@ -472,21 +498,20 @@ static module_id_t rrc_eNB_get_next_free_UE_index(
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if ((first_index == UE_MODULE_INVALID) && (eNB_rrc_inst[enb_mod_idP].Info.UE_list[i] == 0)) {
first_index = i; // save first free position
first_index = i; // save first free position
}
if (eNB_rrc_inst[enb_mod_idP].Info.UE_list[i] == UE_identity) {
// UE_identity already registered
reg = TRUE;
reg = TRUE;
}
}
if (reg == 0) {
LOG_I(RRC, "[eNB %d] Adding UE %d with identity " PRIu64 "\n", enb_mod_idP, first_index, UE_identity);
return (first_index);
} else {
return (UE_MODULE_INVALID);
}
LOG_I(RRC, "[eNB %d] Adding UE %d with identity " PRIu64 "\n", enb_mod_idP, first_index, UE_identity);
return (first_index);
} else
return (UE_MODULE_INVALID);
}
void rrc_eNB_free_UE_index(
......@@ -2613,6 +2638,7 @@ int rrc_eNB_decode_ccch(
asn_dec_rval_t dec_rval;
UL_CCCH_Message_t *ul_ccch_msg = NULL;
RRCConnectionRequest_r8_IEs_t *rrcConnectionRequest;
RRCConnectionReestablishmentRequest_r8_IEs_t *rrcConnectionReestablishmentRequest;
int i, rval;
//memset(ul_ccch_msg,0,sizeof(UL_CCCH_Message_t));
......@@ -2672,13 +2698,40 @@ int rrc_eNB_decode_ccch(
break;
case UL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentRequest:
#ifdef RRC_MSG_PRINT
LOG_F(RRC, "RRC Connection Reestablishement Request\n");
for (i = 0; i < Srb_info->Rx_buffer.payload_size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)Srb_info->Rx_buffer.Payload)[i]);
LOG_F(RRC,"\n");
#endif
LOG_D(RRC,
"[FRAME %05d][MAC_eNB][MOD %02d][][--- MAC_DATA_IND (rrcConnectionReestablishmentRequest on SRB0) -->][RRC_eNB][MOD %02d][]\n",
frameP, enb_mod_idP, enb_mod_idP);
LOG_I(RRC, "[eNB %d] Frame %d : RRCConnectionReestablishmentRequest not supported yet\n", enb_mod_idP,
frameP);
break;
rrcConnectionReestablishmentRequest = &ul_ccch_msg->message.choice.c1.choice.rrcConnectionReestablishmentRequest.criticalExtensions.choice.rrcConnectionReestablishmentRequest_r8;
LOG_I(RRC, "[eNB %d] Frame %d UE %d: RRCConnectionReestablishmentRequest cause %s\n", enb_mod_idP,
frameP,
((rrcConnectionReestablishmentRequest->reestablishmentCause == ReestablishmentCause_otherFailure) ? "Other Failure" :
(rrcConnectionReestablishmentRequest->reestablishmentCause == ReestablishmentCause_handoverFailure) ? "Handover Failure" :
"reconfigurationFailure"));
/*
{
uint64_t c_rnti = 0;
memcpy(((uint8_t *) & c_rnti) + 3, rrcConnectionReestablishmentRequest.UE_identity.c_RNTI.buf,
rrcConnectionReestablishmentRequest.UE_identity.c_RNTI.size);
ue_mod_id = rrc_eNB_get_UE_index(enb_mod_idP, c_rnti);
}
if ((eNB_rrc_inst[enb_mod_idP].phyCellId == rrcConnectionReestablishmentRequest.UE_identity.physCellId) &&
(ue_mod_id != UE_INDEX_INVALID)){
rrc_eNB_generate_RRCConnectionReestablishement(enb_mod_idP, frameP, ue_mod_id);
}else {
rrc_eNB_generate_RRCConnectionReestablishementReject(enb_mod_idP, frameP, ue_mod_id);
}
break;
*/
case UL_CCCH_MessageType__c1_PR_rrcConnectionRequest:
#ifdef RRC_MSG_PRINT
LOG_F(RRC, "RRC Connection Request\n");
......@@ -2690,9 +2743,7 @@ int rrc_eNB_decode_ccch(
"[FRAME %05d][MAC_eNB][MOD %02d][][--- MAC_DATA_IND (rrcConnectionRequest on SRB0) -->][RRC_eNB][MOD %02d][]\n",
frameP, enb_mod_idP, enb_mod_idP);
rrcConnectionRequest =
&ul_ccch_msg->message.choice.c1.choice.rrcConnectionRequest.criticalExtensions.
choice.rrcConnectionRequest_r8;
rrcConnectionRequest = &ul_ccch_msg->message.choice.c1.choice.rrcConnectionRequest.criticalExtensions.choice.rrcConnectionRequest_r8;
{
uint64_t random_value = 0;
......
......@@ -124,19 +124,20 @@ char g_sid[MAX_SID];
#define CLI_MAX_NODES 10
/* The names of functions that actually do the manipulation. */
int com_help (), com_exit ();
int com_help (char * arg);
int com_exit (char *arg);
int prompt(),prompt_usage(), info();
int prompt(char *arg),prompt_usage(void), info(char *arg);
int start(), set();
int start_usage(), set_usage();
int start(char *arg), set(char *arg);
int start_usage(void), set_usage(void);
/* Forward declarations. */
char *stripwhite ();
command *find_command ();
char *stripwhite (char *string);
command *find_command (char* name);
void abandon_input(int);
char *command_generator ();
char **fileman_completion ();
//char *command_generator (void);
//char **fileman_completion (void);
int cli_login(const char *, int, int );
int cli_loop(char* msg);
int cli_set_prompt_char(void);
......
/***************************************************************************
Job_list.c - description
-------------------
-------------------
AUTHOR : Mohamed Said MOSLI BOUKSIAA, Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : mosli@eurecom.fr, Lionel.Gauthier@eurecom.fr
***************************************************************************/
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2011 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 pad_list.c
* \brief list management primimtives
* \author Mohamed Said MOSLI BOUKSIAA, Lionel GAUTHIER, Navid Nikaein
* \date 2012
* \version 0.5
* @ingroup util
*/
//#define LIST_C
//#define NULL 0
......
/*
list.h
-------------------
AUTHOR : Lionel GAUTHIER
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
***************************************************************************/
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 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
*******************************************************************************/
#ifndef __list_H__
#define __list_H__
......
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 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
*******************************************************************************/
#ifndef __FIFO_TYPES_H__
#define __FIFO_TYPES_H__
#include "platform_types.h"
/* Types of events triggering the end of the simulation */
typedef enum End_Of_Sim_Event_Type_e {FRAME, TRAFFIC} End_Of_Sim_Event_Type_t;
/* Types regrouping both user-defined and regular events */
typedef enum Event_Type_e {ET_DL, ET_UL, ET_S, ET_OMG, ET_OTG} Event_Type_t;
typedef enum {
MIN_ET=0,
OAI_ET=MIN_ET, // config events
SYS_ET,
TOPO_ET,
APP_ET,
EMU_ET,
DL_ET, // frame events
UL_ET,
S_ET,
PHY_ET, // protocol events
MAC_ET,
RLC_ET,
PDCP_ET,
RRC_ET,
MAX_ET
} Event_Type_t;
/* decomposition of node functions into jobs for a given event */
typedef enum Job_type_e { JT_OTG, JT_PDCP, JT_PHY_MAC, JT_INIT_SYNC, JT_DL, JT_UL, RN_DL, RN_UL, JT_END} Job_Type_t;
......@@ -43,8 +85,8 @@ typedef struct Packet_otg_s {
pdcp_transmission_mode_t mode;
} Packet_otg_t;
typedef struct Event_s {
enum Event_Type_e type;
typedef struct {
Event_Type_t type;
char *key;
void *value;
frame_t frame;
......@@ -59,11 +101,6 @@ typedef struct Event_s {
double time_ms;
};*/
typedef struct End_Of_Sim_Event_s {
enum End_Of_Sim_Event_Type_e type;
int value;
} End_Of_Sim_Event_t;
typedef struct Packet_otg_elt_s {
struct Packet_otg_elt_s *next;
struct Packet_otg_elt_s *previous;
......
......@@ -29,7 +29,7 @@
/*! \file OCG.h
* \brief Data structure for OCG of OpenAir emulator
* \author Lusheng Wang and Navid Nikaein
* \author Lusheng Wang and Navid Nikaein and Andre Gomes(One source)
* \date 2011
* \version 1.0
* \company Eurecom
......@@ -404,6 +404,12 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
int grid;
} eNB_Initial_Distribution;
typedef struct
{
double pos_x;
double pos_y;
} Fixed_eNB_Distribution;
////// options of eNB_Initial_Distribution
typedef struct
{
......@@ -428,7 +434,8 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
eNB_Mobility_Type eNB_mobility_type;
eNB_Initial_Distribution eNB_initial_distribution;
// ! Note: the following three options are for eNB_Initial_Distribution, we put them here for the sake of simplicity of the XML file
// ! Note: the following four options are for eNB_Initial_Distribution, we put them here for the sake of simplicity of the XML file
Fixed_eNB_Distribution fixed_eNB_distribution;
Random_eNB_Distribution random_eNB_distribution;
Hexagonal_eNB_Distribution hexagonal_eNB_distribution;
Grid_eNB_Distribution grid_eNB_distribution;
......@@ -664,6 +671,7 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
unsigned char otg_enabled; // openair traffic generator
unsigned char omv_enabled; // openair mobility visulizer
unsigned char opp_enabled; // openair performance profiler
unsigned char oeh_enabled; // openair event handler, with CLI this could provide a remote event management
char *itti_dump_file;
unsigned char vcd_enabled;
char *vcd_file;
......@@ -701,7 +709,6 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
unsigned char extended_prefix_flag;
unsigned char N_RB_DL;
unsigned char transmission_mode;
int max_predefined_traffic_config_index;
int max_customized_traffic_config_index;
......
This diff is collapsed.
......@@ -158,14 +158,9 @@ Node_list remove_node_entry(NodePtr node, Node_list Node_Vector){
// display list of nodes
void display_node_list(Node_list Node_Vector){
Node_list tmp = Node_Vector;
if (tmp == NULL){
#ifdef STANDALONE
printf("Empty Node_list\n");
#else
LOG_I(OMG, "Empty Node_list\n");
#endif
}
while (tmp != NULL){
while ((tmp != NULL) &&
(tmp->node != NULL)){
LOG_I(OMG,"[%s][%s] Node of ID %d is %s. Now, it is at location (%.3f, %.3f)\n",
map_int_to_str(mob_type, tmp->node->generator),
map_int_to_str(nodes_type, tmp->node->type),
......
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2011 Eurecom
Copyright(c) 1999 - 2014 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,
......@@ -28,9 +28,16 @@
*******************************************************************************/
/**
* \file defs.h
* \brief Typedefs & Prototypes of OMG functions
*/
* \file defs.h
* \brief Typedefs & Prototypes of OMG functions
* \author Navid Nikaein and Andre Gomes (one source)
* \date 2014
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr
* \note
* \warning
*/
#ifndef __DEFS_H__
#define __DEFS_H__
......@@ -114,6 +121,9 @@ typedef struct omg_global_param{
double max_X; /*!< The maximum value that the X coordinate might take, i.e the maximum boundary of the simulation area according to the X axis*/
double min_Y; /*!< The minimum value that the Y coordinate might take, i.e the minimum boundary of the simulation area according to the Y axis */
double max_Y; /*!< The minimum value that the Y coordinate might take, i.e the maximum boundary of the simulation area according to the Y axis */
bool user_fixed; /*!< Sets if the coordinates are user defined*/
double fixed_X; /*!< The user defined x value*/
double fixed_Y; /*!< The user defined y value*/
double min_speed; /*!< The minimum speed. It should be different than 0.0 in order to avoid instability*/
double max_speed; /*!< The maximum allowed speed */
double min_journey_time; /*!< The minimum allowed trip duration. It should be different than 0.0 in order to avoid instability and properly reflect the mobility model behavior */
......
......@@ -29,11 +29,11 @@
/*! \file rwalk.c
* \brief static mobility generator
* \author M. Mahersi, J. Harri, N. Nikaein,
* \author M. Mahersi, J. Harri, N. Nikaein, Andre Gomes (One source)
* \date 2011
* \version 0.1
* \company Eurecom
* \email:
* \email: openair_tech@eurecom.fr
* \note
* \warning
*/
......@@ -84,13 +84,28 @@ void start_static_generator(omg_global_param omg_param_list) {
void place_static_node(NodePtr node) {
node->X_pos = (double) ((int) (randomGen(omg_param_list.min_X, omg_param_list.max_X)*100))/ 100;
node->mob->X_from = node->X_pos;
node->mob->X_to = node->X_pos;
node->Y_pos = (double) ((int) (randomGen(omg_param_list.min_Y,omg_param_list.max_Y)*100))/ 100;
node->mob->Y_from = node->Y_pos;
node->mob->Y_to = node->Y_pos;
if (omg_param_list.user_fixed && node->type == eNB) {
if (omg_param_list.fixed_X <= omg_param_list.max_X && omg_param_list.fixed_X >= omg_param_list.min_X)
node->X_pos = omg_param_list.fixed_X;
else
node->X_pos = (double) ((int) (randomGen(omg_param_list.min_X, omg_param_list.max_X)*100))/ 100;
node->mob->X_from = node->X_pos;
node->mob->X_to = node->X_pos;
if (omg_param_list.fixed_Y <= omg_param_list.max_Y && omg_param_list.fixed_Y >= omg_param_list.min_Y)
node->Y_pos = omg_param_list.fixed_Y;
else
node->Y_pos = (double) ((int) (randomGen(omg_param_list.min_Y,omg_param_list.max_Y)*100))/ 100;
node->mob->Y_from = node->Y_pos;
node->mob->Y_to = node->Y_pos;
}
else {
node->X_pos = (double) ((int) (randomGen(omg_param_list.min_X, omg_param_list.max_X)*100))/ 100;
node->mob->X_from = node->X_pos;
node->mob->X_to = node->X_pos;
node->Y_pos = (double) ((int) (randomGen(omg_param_list.min_Y,omg_param_list.max_Y)*100))/ 100;
node->mob->Y_from = node->Y_pos;
node->mob->Y_to = node->Y_pos;
}
node->mob->speed = 0.0;
node->mob->journey_time = 0.0;
......
......@@ -29,21 +29,29 @@
<input type="radio" name="smallscale" value="EVA">EVA<br>
<input type="radio" name="smallscale" value="ETU">ETU<br>
<input type="radio" name="smallscale" value="Rayleigh8">Rayleigh8<br>
<input type="radio" name="smallscale" value="Rayleigh1" checked>Rayleigh1<br>
<input type="radio" name="smallscale" value="Rayleigh1">Rayleigh1<br>
<input type="radio" name="smallscale" value="Rayleigh1_corr">Rayleigh1_corr<br>
<input type="radio" name="smallscale" value="Rayleigh1_anticorr">Rayleigh1_anticorr<br>
<input type="radio" name="smallscale" value="Rice8">Rice8<br>
<input type="radio" name="smallscale" value="Rice1">Rice1<br>
<input type="radio" name="smallscale" value="Rice1_corr">Rice1_corr<br>
<input type="radio" name="smallscale" value="Rice1_anticorr">Rice1_anticorr<br>
<input type="radio" name="smallscale" value="AWGN">AWGN<br>
<input type="radio" name="smallscale" value="AWGN" checked>AWGN<br>
</div>
<div class="span-7">
<h4><u>Other parameters</u></h4>
<label>Wall penetration loss</label><input name="wallpenetloss" id="wallpenetloss" size="3" maxlength="4" value="5" class="required"> dB<span class="message"></span><br>
<label>System Bandwidth : </label><input name="sysbw" id="sysbw" size="3" maxlength="4" value="7.68" class="required"> MHz<span class="message"></span><br>
<label>UE Frequency : </label><input name="uefreq" id="uefreq" size="3" maxlength="4" value="1.9" class="required"> GHz<span class="message"></span><br>
<label>System Bandwidth : </label><input name="sysbw" id="sysbw" size="3" maxlength="4" value="5" class="required"> MHz<span class="message"></span><br>
<label>UE Frequency : </label><input name="uefreq" id="uefreq" size="3" maxlength="4" value="1.9" class="required"> GHz<span class="message"></span><br>
<label>Number of RBs DL (6,15,25,50,75,100) : </label><input name="num_rbs_dl" id="num_rbs_dl" size="3" maxlength="4" value="25"><span class="message"></span><br>
<label>Target DL MCS : </label><input name="dl_mcs" id="dl_mcs" size="3" maxlength="4" value="20"><span class="message"></span><br>
<label>Target UL MCS : </label><input name="ul_mcs" id="ul_mcs" size="3" maxlength="4" value="16"><span class="message"></span><br>
<label>SNR : </label><input name="snr" id="snr" size="3" maxlength="4" value="15"><span class="message"></span><br>
<label>Transmission Mode (1,2,5,6) : </label><input name="transmission_mode" id="transmission_mode" size="3" maxlength="4" value="1"><span class="message"></span><br>
<br><label>Frame Type : </label><br>
<input type="radio" name="frame_type" value="1" checked>TDD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label>Frame Config (0-6) : </label><input name="tdd_config" id="tdd_config" size="3" maxlength="4" value="1"><span class="message"></span><br>
<input type="radio" name="frame_type" value="0">FDD<br>
</div>
<div class="span-10">
......@@ -161,10 +169,13 @@
<div class="span-7">
<label>eNB Initial Distribution : </label><br>
<input type="radio" name="eNB_initial_distribution" value="random" checked> Random <!--<span id="random" style="display">-> Number of cells :<input name="nbenbs" id="nbenbs" size="1" maxlength="4" value="1" class="required"><span class="message"></span></span>--><br>
<input type="radio" name="eNB_initial_distribution" value="grid" class="disabled"> Grid <!-- <span id="grid" style="display:none">-> Grid X value :<input name="gridx" id="gridx" size="1" maxlength="4" value="1" class="required"><span class="message"></span>Grid Y value :<input name="gridy" id="gridy" size="1" maxlength="4" value="1" class="required"><span class="message"></span></span>--><br>
<input type="radio" name="eNB_initial_distribution" value="hexagonal" class="disabled"> Hexagonal <!--<span id="hexagonal" style="display:none">-> Number of Cells :<input name="hexanbcells" id="hexabncells" size="1" maxlength="4" value="1" class="required"><span class="message"></span> Inter eNB distance :<input name="interenbdist" id="interenbdist" size="1" maxlength="4" value="1" class="required"> km<span class="message"></span></span>--><br>
<br>
<input type="radio" name="eNB_initial_distribution" value="fixed" checked> Fixed <br>
Pos X : <input name="pos_x" id="pos_x" size="4" maxlength="4" value="250" class="required"> m<span class="message"></span><br>
Pos Y : <input name="pos_y" id="pos_y" size="4" maxlength="4" value="250" class="required"> m<span class="message"></span><br>
<input type="radio" name="eNB_initial_distribution" value="random"> Random <!--<span id="random" style="display">-> Number of cells :<input name="nbenbs" id="nbenbs" size="1" maxlength="4" value="1" class="required"><span class="message"></span></span>--><br>
<input type="radio" name="eNB_initial_distribution" value="grid" class="disabled"> Grid <!-- <span id="grid" style="display:none">-> Grid X value :<input name="gridx" id="gridx" size="1" maxlength="4" value="1" class="required"><span class="message"></span>Grid Y value :<input name="gridy" id="gridy" size="1" maxlength="4" value="1" class="required"><span class="message"></span></span>--><br>
<input type="radio" name="eNB_initial_distribution" value="hexagonal" class="disabled"> Hexagonal <!--<span id="hexagonal" style="display:none">-> Number of Cells :<input name="hexanbcells" id="hexabncells" size="1" maxlength="4" value="1" class="required"><span class="message"></span> Inter eNB distance :<input name="interenbdist" id="interenbdist" size="1" maxlength="4" value="1" class="required"> km<span class="message"></span></span>--><br>
<br>
<label>Random eNB Distribution : </label><br>
Number of Cells : <input name="random_eNB_distr" id="random_eNB_distr" size="1" maxlength="4" value="1"><span class="message"></span><br><br>
......@@ -310,7 +321,15 @@
<input name="throughput" value="1" type="checkbox" class="required" > Throughput<span class="message"></span><br>
<input name="latency" value="1" type="checkbox" class="required" > Latency<span class="message"></span><br>
<input name="lossrate" value="1" type="checkbox" class="required"> Loss Rate<span class="message"></span><br>
<br>
<br>
<input name="phy_abstraction" value="1" type="checkbox" class="required"> PHY Abstraction<span class="message"></span><br>
<input name="profiling" value="1" type="checkbox" class="required" checked> Profiling Statistics<span class="message"></span><br>
<input name="pcap_trace" value="1" type="checkbox" class="required"> PCAP Trace<span class="message"></span><br>
<br>
<input name="cli_enabled" value="1" type="checkbox" class="required"> CLI Enabled<span class="message"></span><br>
<input name="cli_start_enb" value="1" type="checkbox" class="required"> CLI Start eNB<span class="message"></span><br>
<input name="cli_start_ue" value="1" type="checkbox" class="required"> CLI Start UE<span class="message"></span><br>
<br>
<input name="curves" value="1" type="checkbox" class="required"> Show Curves (not working)<span class="message"></span><br>
</div>
<div class="span-6">
......
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
?>
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="-1">
<meta http-equiv="pragma" content="no-cache">
<title>OpenAirEmulation Scenario Descriptor - Basic Scenario</title>
<link type="text/css" rel="stylesheet" media="screen,projection" href="/OSD/css/screen.css?8" />
......@@ -42,22 +50,31 @@ $(function(){
// PART 2 - BUTTON eNB TOPOLOGY
$(":radio[name='eNB_initial_distribution']").click(function(){
if ($(":radio[name='eNB_initial_distribution']:checked").val() == 'random') {
$("#grid").hide(1);
$("#hexagonal").hide(1);
$("#random").show(1);
}
if ($(":radio[name='eNB_initial_distribution']:checked").val() == 'grid') {
$("#grid").show(1);
$("#hexagonal").hide(1);
$("#random").hide(1);
}
if ($(":radio[name='eNB_initial_distribution']:checked").val() == 'hexagonal') {
$("#grid").hide(1);
$("#hexagonal").show(1);
$("#random").hide(1);
}
});
if ($(":radio[name='eNB_initial_distribution']:checked").val() == 'random') {
$("#grid").hide(1);
$("#hexagonal").hide(1);
$("#random").hide(1);
$("#fixed").show(1);
}
if ($(":radio[name='eNB_initial_distribution']:checked").val() == 'random') {
$("#grid").hide(1);
$("#hexagonal").hide(1);
$("#random").show(1);
$("#fixed").hide(1);
}
if ($(":radio[name='eNB_initial_distribution']:checked").val() == 'grid') {
$("#grid").show(1);
$("#hexagonal").hide(1);
$("#random").hide(1);
$("#fixed").hide(1);
}
if ($(":radio[name='eNB_initial_distribution']:checked").val() == 'hexagonal') {
$("#grid").hide(1);
$("#hexagonal").show(1);
$("#random").hide(1);
$("#fixed").hide(1);
}
});
// PART 2 - BUTTON UE DISTRIBUTION
$(":radio[name='uedistr']").click(function(){
......
This diff is collapsed.
......@@ -251,7 +251,7 @@ fc=fopen("/tmp/otg.log","w");;
rx_loss_rate_pkts(i,j,k);
average_pkt_jitter(i,j,k);
// LOG_I(OTG,"KPI: (src=%d, dst=%d, traffic=%d) NB packet TX= %d, NB packet RX= %d\n ", i, j, k,otg_info->tx_num_pkt[i][j][k], otg_info->rx_num_pkt[i][j][k]);
// LOG_I(OTG,"KPI: (src=%d, dst=%d, traffic=%d) NB packet TX= %d, NB packet RX= %d\n ",i, j, k,otg_info->tx_num_pkt[i][j][k], otg_info->rx_num_pkt[i][j][k]);
if (otg_multicast_info->tx_throughput[i][j]>0) {
//multicast
......
Active_eNBs = ( "eNB_Eurecom_0");
Active_eNBs = ( "eNB_Eurecom_1");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
......
......@@ -46,7 +46,7 @@
<EMULATION_CONFIG>
<EMULATION_TIME_ms>10000</EMULATION_TIME_ms> <!--if 0 set to infinity-->
<CURVE>disable</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
<CURVE>enabled</CURVE> <!-- option: enabled, disabled. If CURVE is enabled, graphes are ploted in real time (UL and DL) of WOD and throughput measurement for each packet -->
<BACKGROUND_STATS>enable</BACKGROUND_STATS> <!-- option: enable, disable. If enable, it allows to ptrint BACKGROUNS statistics: Nb packets, throughputs,etc-->
<PERFORMANCE_METRICS>
<THROUGHPUT>enable</THROUGHPUT> <!-- option: enable, disable. If enable, throughput measurements are plotted in real time-->
......
......@@ -228,6 +228,7 @@ OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_config.o
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/sinr_sim.o
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/cor_SF_sim.o
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_functions.o
OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/event_handler.o
OAISIM_OBJS = $(OPENAIR_TARGETS)/SIMU/USER/oaisim.o
......
#include "oaisim.h"
#include "UTIL/FIFO/pad_list.h"
void add_event(struct Event event);
void schedule(enum Event_Type type, int frame, char * key, void* value);
void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value);
int end_of_simulation();
void update_omg_model(char * key, void * value);
void update_otg_model(char * key, void * value);
#include "discrete_event_generator.h"
#include <stdio.h>
#include <stdlib.h>
/*******************************************************************************
extern frame_t frame;
End_Of_Sim_Event end_event; //Could later be a list of condition_events (if the end condition is more complicated)
Event_List event_list;
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
void add_event(struct Event event) {
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.
Event_elt * counter = event_list.head;
Event_elt * previous = counter;
Event_elt * elt = malloc(sizeof(Event_elt));
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.
while (counter != NULL) {
if ((counter->event).frame > event.frame) break;
//else if ((counter->event).next_slot > event.next_slot) break;
else {
previous = counter;
counter = counter->next;
}
}
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 event_handler.c
* \brief event handler primitives
* \author Navid Nikaein and Mohamed Said MOSLI BOUKSIAA,
* \date 2014
* \version 0.5
* @ingroup _oai
*/
#include <stdio.h>
#include <stdlib.h>
#include "event_handler.h"
//extern frame_t frame;
//End_Of_Sim_Event end_event; //Could later be a list of condition_events (if the end condition is more complicated)
elt->event = event;
Event_List_t event_list;
if (event_list.head != NULL)
event_list_add_element(elt, previous, &event_list);
else
event_list_add_head(elt, &event_list);
void add_event(Event_t event) {
Event_elt_t * counter = event_list.head;
Event_elt_t * previous = counter;
Event_elt_t * elt = malloc(sizeof(Event_elt_t));
while (counter != NULL) {
if ((counter->event).frame > event.frame) break;
//else if ((counter->event).next_slot > event.next_slot) break;
else {
previous = counter;
counter = counter->next;
}
}
elt->event = event;
if (event_list.head != NULL)
event_list_add_element(elt, previous, &event_list);
else
event_list_add_head(elt, &event_list);
}
void schedule(enum Event_Type type, int frame, char * key, void * value) {
Event event;
void schedule(Event_Type_t type, int frame, char * key, void * value) {
Event_t event;
event.frame = frame;
if (key == NULL) { //Global model update
event.key = NULL;
......@@ -44,25 +82,130 @@ void schedule(enum Event_Type type, int frame, char * key, void * value) {
add_event(event);
}
void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value) {
end_event.type = type;
end_event.value = value;
}
/*
* this function can reschedule events in the future to build a desired (more dynamic) scenario
* TODO: make sure that OCG OAI_Emulation is decoupled with the local vars
*/
void schedule_events(){
/*
* Step 1: vars needed for future changes
*/
// overall config associated with OAI_ET
// OAI_Emulation * oai_frame_1000;
// specific config
/*
* associated with SYS_ET
*/
//Environment_System_Config * system_frame_200;
/*
* associated with TOPO_ET
*/
//Topology_Config *topology_frame_10;
/*
* associated with APP_ET
*/
//Application_Config *application_frame_20;
/*
* associated with EMU_ET
*/
//Emulation_Config * emulation_frame_100;
/*
* Step 2: set the desired future changes in the vars
*/
// i.e. optionally provide an XML file and update OCG vars
//mob_frame_10 -> ...
//application_frame_30 -> ...
/*
* Step 3: schedule the execution of changes
*/
// general OAI dynamic configuration
//schedule(OAI_ET, 1000, NULL, oai_frame_1000);
//schedule(SYS_ET, 200, NULL, system_frame_200);
//schedule(TOPO_ET, 10, NULL, topology_frame_10);
//schedule(APP_ET, 20, NULL, application_frame_20);
//schedule(EMU_ET, 100, NULL,emulation_frame_100);
int end_of_simulation() {
switch (end_event.type) {
case FRAME:
if (frame == end_event.value)
return 1;
break;
// protocol dynamic configuration
//schedule(MAC_ET, 100, NULL,mac_frame_100);
/* default:
return 0;*/
//event_list_display(&event_list);
}
void execute_events(frame_t frame){
Event_elt_t *user_defined_event;
Event_t event;
while ((user_defined_event = event_list_get_head(&event_list)) != NULL) {
event = user_defined_event->event;
if (event.frame == frame) {
switch (event.type) {
case OAI_ET:
update_oai_model(event.key, event.value);
user_defined_event = event_list_remove_head(&event_list);
break;
case SYS_ET:
update_sys_model(event.key, event.value);
user_defined_event = event_list_remove_head(&event_list);
break;
case TOPO_ET:
update_topo_model(event.key, event.value); //implement it with assigning the new values to that of oai_emulation & second thing is to ensure mob model is always read from oai_emulation
user_defined_event = event_list_remove_head(&event_list);
break;
case APP_ET:
update_app_model(event.key, event.value);
user_defined_event = event_list_remove_head(&event_list);
break;
case EMU_ET:
update_emu_model(event.key, event.value);
user_defined_event = event_list_remove_head(&event_list);
break;
case MAC_ET:
update_mac(event.key, event.value);
user_defined_event = event_list_remove_head(&event_list);
break;
default :
break;
}
} else {
break;
}
return 0;
}
}
void update_omg_model(char * key, void * value) {
void update_mac(char * key, void * value) {
}
void update_oai_model(char * key, void * value) {
}
void update_sys_model(char * key, void * value) {
}
void update_topo_model(char * key, void * value) {
printf("\n\n\nA NEW MOB MODEL\n\n\n");
/*
if (key != NULL) { //Global model update
......@@ -127,7 +270,7 @@ void update_omg_model(char * key, void * value) {
*/
}
void update_otg_model(char * key, void * value) {
void update_app_model(char * key, void * value) {
printf("\n\n\nA NEW APP MODEL\n\n\n");
//int i;
/*
......@@ -329,3 +472,8 @@ void update_otg_model(char * key, void * value) {
}
*/
}
void update_emu_model(char * key, void * value) {
}
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 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 event_handler.h
* \brief primitives to handle event acting on oai
* \author Navid Nikaein and Mohamed Said MOSLI BOUKSIAA,
* \date 2014
* \version 0.5
* @ingroup _oai
*/
#include "oaisim.h"
#include "UTIL/FIFO/pad_list.h"
void add_event(Event_t event);
void schedule(Event_Type_t type, int frame, char * key, void* value);
void schedule_events(void);
void execute_events(frame_t frame);
void update_oai_model(char * key, void * value);
void update_sys_model(char * key, void * value);
void update_topo_model(char * key, void * value);
void update_app_model(char * key, void * value);
void update_emu_model(char * key, void * value);
void update_mac(char * key, void * value);
/*
void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value);
int end_of_simulation();
*/
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 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
*******************************************************************************/
#include <string.h>
#include <math.h>
#include <unistd.h>
......@@ -8,6 +37,7 @@
#include <cblas.h>
#include <execinfo.h>
#include "event_handler.h"
#include "SIMULATION/RF/defs.h"
#include "PHY/types.h"
#include "PHY/defs.h"
......@@ -556,7 +586,11 @@ void *l2l1_task(void *args_p) {
}
} while(message_p != NULL);
#endif
//Run the aperiodic user-defined events
if (oai_emulation.info.oeh_enabled == 1)
execute_events(frame);
/*
// Handling the cooperation Flag
if (cooperation_flag == 2)
......@@ -1075,6 +1109,10 @@ int main(int argc, char **argv) {
smbv_init_config(smbv_fname, smbv_nframes);
smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0]->lte_frame_parms);
#endif
// add events to future event list: Currently not used
if (oai_emulation.info.oeh_enabled == 1)
schedule_events();
// oai performance profiler is enabled
if (oai_emulation.info.opp_enabled == 1)
reset_opp_meas();
......
......@@ -26,7 +26,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_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 get_beta_map();//Abstraction changes
void get_beta_map(void);//Abstraction changes
void get_MIESM_param(void);
void init_snr(channel_desc_t *, node_desc_t *, node_desc_t *, double*, double*, uint8_t, uint16_t, uint8_t);//Abstraction changes
......@@ -42,13 +42,12 @@ void calc_path_loss(node_desc_t* node_tx, node_desc_t* node_rx, channel_desc_t *
void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, frame_t frame, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
#ifdef OPENAIR2
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 reset_opp_meas(void);
void print_opp_meas(void);
#ifdef OPENAIR2
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);
#endif
......
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 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 oaisim_config.c
* \brief Configuration of oaisim
* \author Navid Nikaein & Andre Gomes (One source)
* \date 2014
* \version 1.0
* \company Eurecom
* \email: openair_tech@eurecom.fr
* \note
* \warning
*/
#include <string.h>
#include <math.h>
#include <unistd.h>
......@@ -165,7 +205,7 @@ mapping packet_gen_names[] =
{NULL, -1}
};
void init_oai_emulation() {
void init_oai_emulation(void) {
int i;
......@@ -195,7 +235,6 @@ void init_oai_emulation() {
oai_emulation.environment_system_config.system_bandwidth_MB = 7.68;
oai_emulation.environment_system_config.system_frequency_GHz = 1.9;
oai_emulation.topology_config.area.x_m = 500;
oai_emulation.topology_config.area.y_m = 500;
oai_emulation.topology_config.network_type.selected_option = "homogeneous";
......@@ -218,6 +257,8 @@ void init_oai_emulation() {
oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms = 10.0;
oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option = "STATIC";
oai_emulation.topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option = "random";
oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_x = 1;
oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_y = 1;
oai_emulation.topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells = 1;
oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells = 1;
oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km = 1;
......@@ -338,6 +379,7 @@ void init_oai_emulation() {
oai_emulation.info.omv_enabled =0; // v flag
oai_emulation.info.vcd_enabled=0;
oai_emulation.info.opp_enabled=0;
oai_emulation.info.oeh_enabled=0;
oai_emulation.info.cba_group_active=0;
oai_emulation.info.eMBMS_active_state=0;
......@@ -392,7 +434,7 @@ void init_oai_emulation() {
}
void oaisim_config() {
void oaisim_config(void) {
// init log gen first
//initialize the log generator
......@@ -436,7 +478,7 @@ void oaisim_config() {
}
}
int olg_config() {
int olg_config(void) {
int comp;
int ocg_log_level = map_str_to_int(log_level_names, oai_emulation.emulation_config.log_emu.level);
int ocg_log_verbosity = map_str_to_int(log_verbosity_names, oai_emulation.emulation_config.log_emu.verbosity);
......@@ -510,7 +552,7 @@ int olg_config() {
return 1;
}
int ocg_config_env() {
int ocg_config_env(void) {
// int func related to channel desc from oaisim.c could be moved here
if (oai_emulation.info.ocg_enabled){
......@@ -531,7 +573,7 @@ int ocg_config_env() {
}
return 1;
}
int ocg_config_topo() {
int ocg_config_topo(void) {
// omg
init_omg_global_params();
......@@ -571,8 +613,13 @@ int ocg_config_topo() {
LOG_I(OMG,"TRACE file at %s\n", omg_param_list.mobility_file);
}
omg_param_list.mobility_type = oai_emulation.info.omg_model_enb;
omg_param_list.mobility_type = oai_emulation.info.omg_model_enb;
omg_param_list.nodes_type = eNB; //eNB or eNB + RN
if (strcmp(oai_emulation.topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option, "fixed") == 0) {
omg_param_list.user_fixed = true;
omg_param_list.fixed_X = (double)oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_x;
omg_param_list.fixed_Y = (double)oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_y;
}
omg_param_list.nodes = oai_emulation.info.nb_enb_local + oai_emulation.info.nb_rn_local;
omg_param_list.seed = oai_emulation.info.seed; // specific seed for enb and ue to avoid node overlapping
......@@ -1057,7 +1104,7 @@ g_otg->application_idx[source_id_index][destination_id_index]+=1;
int ocg_config_emu(){
int ocg_config_emu(void){
if (oai_emulation.emulation_config.emulation_time_ms != 0) {
oai_emulation.info.n_frames = (int) oai_emulation.emulation_config.emulation_time_ms / 10; // configure the number of frame
......@@ -1083,6 +1130,9 @@ int ocg_config_emu(){
oai_emulation.info.cli_start_ue[0]);
}
if (oai_emulation.info.opp_enabled)
opp_enabled = 1;
//bin/LOG_I(OCG, "OPT output file directory = %s\n", oai_emulation.info.output_path);
oai_emulation.info.opt_enabled = ( oai_emulation.emulation_config.packet_trace.enabled == 0) ? oai_emulation.info.opt_enabled : oai_emulation.emulation_config.packet_trace.enabled;
if (oai_emulation.info.opt_enabled == 1) {
......
......@@ -30,11 +30,11 @@
/*! \file oaisim_config.h
* \brief configure an emulation
* \author Lusheng Wang
* \author navid nikaein & Lusheng Wang
* \date 2006-2010
* \version 4.0
* \company Eurecom
* \email: wangl@eurecom.fr
* \email: openair_tech@eurecom.fr
* \note this a note
* \bug this is a bug
* \warning this is a warning
......@@ -59,19 +59,20 @@ The current sturcture of oaisim is shown by the figure.
#include "UTIL/OMG/omg.h"
#include "UTIL/CLI/cli_if.h"
#include "SIMULATION/ETH_TRANSPORT/defs.h"
#include "PHY/defs.h"
/** @defgroup _init_oai Initial oaisim
* @ingroup _fn
* @brief Initialize all the parameters before start an emulation
* @{*/
void init_oai_emulation();
void init_oai_emulation(void);
/* @}*/
/** @defgroup _config_oaisim All the configurations for an emulation
* @ingroup _fn
* @brief This is the function that calls all the other configuration functions
* @{*/
void oaisim_config();
void oaisim_config(void);
/* @}*/
......@@ -79,11 +80,11 @@ void oaisim_config();
* @ingroup _fn
* @brief There are the functions to configure different various modules in the emulator
* @{*/
int olg_config();
int ocg_config_env();
int ocg_config_omg();
int ocg_config_topo();
int ocg_config_app();
int ocg_config_emu();
int olg_config(void);
int ocg_config_env(void);
int ocg_config_omg(void);
int ocg_config_topo(void);
int ocg_config_app(void);
int ocg_config_emu(void);
/* @}*/
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2014 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
*******************************************************************************/
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
......@@ -137,6 +167,7 @@ void get_simulation_options(int argc, char *argv[]) {
LONG_OPTION_PDNC_PERIOD,
LONG_OPTION_OMG_PERIOD,
LONG_OPTION_OEH_ENABLED,
LONG_OPTION_ENB_RAL_LISTENING_PORT,
LONG_OPTION_ENB_RAL_IP_ADDRESS,
......@@ -160,8 +191,9 @@ void get_simulation_options(int argc, char *argv[]) {
static struct option long_options[] = {
{"enb-conf", required_argument, 0, LONG_OPTION_ENB_CONF},
{"pdcp_period", required_argument, 0, LONG_OPTION_PDNC_PERIOD},
{"omg_period", required_argument, 0, LONG_OPTION_OMG_PERIOD},
{"pdcp-period", required_argument, 0, LONG_OPTION_PDNC_PERIOD},
{"omg-period", required_argument, 0, LONG_OPTION_OMG_PERIOD},
{"oeh-enabled", no_argument, 0, LONG_OPTION_OEH_ENABLED},
{"enb-ral-listening-port", required_argument, 0, LONG_OPTION_ENB_RAL_LISTENING_PORT},
{"enb-ral-ip-address", required_argument, 0, LONG_OPTION_ENB_RAL_IP_ADDRESS},
......@@ -180,6 +212,7 @@ void get_simulation_options(int argc, char *argv[]) {
{"ue-mihf-remote-port", required_argument, 0, LONG_OPTION_UE_MIHF_REMOTE_PORT},
{"ue-mihf-ip-address", required_argument, 0, LONG_OPTION_UE_MIHF_IP_ADDRESS},
{"ue-mihf-id", required_argument, 0, LONG_OPTION_UE_MIHF_ID},
{NULL, 0, NULL, 0}
};
......@@ -205,7 +238,10 @@ void get_simulation_options(int argc, char *argv[]) {
printf("OMG period is %d\n", omg_period);
}
break;
case LONG_OPTION_OEH_ENABLED:
oai_emulation.info.oeh_enabled = 1;
break;
#if defined(ENABLE_RAL)
case LONG_OPTION_ENB_RAL_LISTENING_PORT:
if (optarg) {
......@@ -475,11 +511,11 @@ void get_simulation_options(int argc, char *argv[]) {
}
oai_emulation.info.opt_mode = opt_type;
break;
case 'q':
// openair performane profiler
oai_emulation.info.opp_enabled = 1; // this var is used for OCG
opp_enabled = 1; // this is the global var used by oaisim
break;
case 'q':
// openair performane profiler
oai_emulation.info.opp_enabled = 1; // this var is used for OCG
opp_enabled = 1; // this is the global var used by oaisim
break;
case 'Q':
//eMBMS_active=1;
// 0 : not used (default), 1: eMBMS and RRC enabled, 2: eMBMS relaying and RRC enabled, 3: eMBMS enabled, RRC disabled, 4: eMBMS relaying enabled, RRC disabled
......@@ -512,7 +548,7 @@ void get_simulation_options(int argc, char *argv[]) {
break;
case 't':
target_ul_mcs = atoi (optarg);
target_ul_mcs = atoi (optarg);
break;
case 'T':
......
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