Commit 4cfa87b6 authored by shahab's avatar shahab

downlink throughput enhancement

parent a77082c1
......@@ -820,6 +820,7 @@ include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
include_directories("${OPENAIR2_DIR}/ENB_APP")
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
include_directories("${OPENAIR2_DIR}/UTIL/OSA")
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds6.1.1/liblfds611/inc")
include_directories("${OPENAIR2_DIR}/UTIL/LFDS/liblfds7.0.0/liblfds700/inc")
......@@ -905,8 +906,11 @@ if (FLEXRAN_AGENT_SB_IF)
add_library(FLEXRAN_AGENT
${OPENAIR2_DIR}/ENB_APP/flexran_agent_handler.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_ran_api.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_timer.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_common_internal.c
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC/flexran_agent_rrc.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_task_manager.c
${OPENAIR2_DIR}/ENB_APP/flexran_agent_net_comm.c
......
......@@ -37,50 +37,10 @@
#include "flexran_agent_common.h"
#include "flexran_agent_extern.h"
/* These types will be used to give
instructions for the type of stats reports
we need to create */
typedef struct {
uint16_t ue_rnti;
uint32_t ue_report_flags; /* Indicates the report elements
required for this UE id. See
FlexRAN specification 1.2.4.2 */
} ue_report_type_t;
typedef struct {
uint16_t cc_id;
uint32_t cc_report_flags; /* Indicates the report elements
required for this CC index. See
FlexRAN specification 1.2.4.3 */
} cc_report_type_t;
typedef struct {
int nr_ue;
ue_report_type_t *ue_report_type;
int nr_cc;
cc_report_type_t *cc_report_type;
} report_config_t;
typedef struct stats_request_config_s{
uint8_t report_type;
uint8_t report_frequency;
uint16_t period; /*In number of subframes*/
report_config_t *config;
} stats_request_config_t;
/* Initialization function for the agent structures etc */
void flexran_agent_init_mac_agent(mid_t mod_id);
int flexran_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg);
/* Statistics request protocol message constructor and destructor */
int flexran_agent_mac_stats_request(mid_t mod_id, xid_t xid, const stats_request_config_t *report_config, Protocol__FlexranMessage **msg);
int flexran_agent_mac_destroy_stats_request(Protocol__FlexranMessage *msg);
/* Statistics reply protocol message constructor and destructor */
int flexran_agent_mac_stats_reply(mid_t mod_id, xid_t xid, const report_config_t *report_config, Protocol__FlexranMessage **msg);
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg);
/* Scheduling request information protocol message constructor and estructor */
int flexran_agent_mac_sr_info(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg);
int flexran_agent_mac_destroy_sr_info(Protocol__FlexranMessage *msg);
......@@ -89,6 +49,10 @@ int flexran_agent_mac_destroy_sr_info(Protocol__FlexranMessage *msg);
int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg);
int flexran_agent_mac_destroy_sf_trigger(Protocol__FlexranMessage *msg);
/* Statistics reply protocol message constructor and destructor */
int flexran_agent_mac_stats_reply(mid_t mod_id, const report_config_t *report_config, Protocol__FlexUeStatsReport **ue_report, Protocol__FlexCellStatsReport **cell_report);
int flexran_agent_mac_destroy_stats_reply(Protocol__FlexranMessage *msg);
/* DL MAC scheduling decision protocol message constructor (empty command) and destructor */
int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMessage **msg);
int flexran_agent_mac_destroy_dl_config(Protocol__FlexranMessage *msg);
......
......@@ -180,10 +180,12 @@ Protocol__FlexUeStatsReport * copy_ue_stats_report(Protocol__FlexUeStatsReport *
}
}
if (copy->flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PRH) {
copy->has_phr = original->has_phr;
copy->phr = original->phr;
}
if (copy->flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR) {
copy->has_phr = original->has_phr;
copy->phr = original->phr;
}
if (copy->flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_RLC_BS) {
copy->n_rlc_report = original->n_rlc_report;
......
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file flexran_agent_rrc.h
* \brief FlexRAN agent Control Module RRC header
* \author shahab SHARIAT BAGHERI
* \date 2017
* \version 0.1
*/
#ifndef FLEXRAN_AGENT_RRC_H_
#define FLEXRAN_AGENT_RRC_H_
#include "header.pb-c.h"
#include "flexran.pb-c.h"
#include "stats_messages.pb-c.h"
#include "stats_common.pb-c.h"
#include "MeasResults.h"
#include "flexran_agent_common.h"
#include "flexran_agent_rrc_defs.h"
/* Initialization function for the agent structures etc */
void flexran_agent_init_rrc_agent(mid_t mod_id);
/* UE state change message constructor and destructor */
int flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change);
int flexran_agent_destroy_ue_state_change(Protocol__FlexranMessage *msg);
/**********************************
* FlexRAN agent - technology RRC API
**********************************/
/* Send to the controller all the rrc stat updates that occured during this subframe*/
// void flexran_agent_send_update_rrc_stats(mid_t mod_id);
/* this is called by RRC as a part of rrc xface . The controller previously requested this*/
int flexran_trigger_rrc_measurements (mid_t mod_id, MeasResults_t *);
/*Register technology specific interface callbacks*/
int flexran_agent_register_rrc_xface(mid_t mod_id, AGENT_RRC_xface *xface);
/*Unregister technology specific callbacks*/
int flexran_agent_unregister_rrc_xface(mid_t mod_id, AGENT_RRC_xface*xface);
#endif
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2016 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file flexran_agent_rrc_defs.h
* \brief FlexRAN agent - RRC interface primitives
* \author shahab SHARIAT BAGHERI
* \date 2017
* \version 0.1
* \mail
*/
#ifndef __FLEXRAN_AGENT_RRC_PRIMITIVES_H__
#define __FLEXRAN_AGENT_RRC_PRIMITIVES_H__
#include "flexran_agent_defs.h"
#include "flexran.pb-c.h"
#include "header.pb-c.h"
#define RINGBUFFER_SIZE 100
/* FLEXRAN AGENT-RRC Interface */
typedef struct {
/// Inform the controller about the scheduling requests received during the subframe
//void (*flexran_agent_send_update_rrc_stats)(mid_t mod_id);
/// Notify the controller for a state change of a particular UE, by sending the proper
/// UE state change message (ACTIVATION, DEACTIVATION, HANDOVER)
void (*flexran_agent_notify_ue_state_change)(mid_t mod_id, uint32_t rnti,
uint32_t state_change);
void (*flexran_trigger_rrc_measurements)(mid_t mod_id, MeasResults_t* measResults)
} AGENT_RRC_xface;
#endif
......@@ -28,6 +28,7 @@ message flexran_message {
flex_ue_state_change ue_state_change_msg = 15;
flex_control_delegation control_delegation_msg = 16;
flex_agent_reconfiguration agent_reconfiguration_msg = 17;
flex_rrc_triggering rrc_triggering = 18;
}
}
......@@ -163,6 +164,13 @@ message flex_dl_mac_config {
repeated flex_pdcch_ofdm_sym_count ofdm_sym = 6; // OFDM symbol count for each CC
}
message flex_rrc_triggering {
optional flex_header header = 1;
optional string rrc_trigger = 2;
}
//
// UE state change message
//
......
......@@ -39,5 +39,7 @@ enum flex_type {
// Control delegation messages
FLPT_DELEGATE_CONTROL = 15;
FLPT_RECONFIGURE_AGENT = 16;
FLPT_RRC_TRIGGERING = 17;
}
......@@ -181,3 +181,63 @@ message flex_noise_interference_report {
optional int32 p0_nominal_pucch = 4;
}
//
// RRC Primitives
//
message flex_rrc_measurements {
// Measurement identifier.
optional int32 measid = 1;
// Primary Cell Reference Signal Received Power (RSRP).
optional int32 pcell_rsrp = 2;
// Primary Cell Reference Signal Received Quality (RSRQ).
optional int32 pcell_rsrq = 3;
// Neighboring cells measurements performed by UE.
optional flex_neigh_cells_measurements neigh_meas = 4;
}
message flex_neigh_cells_measurements {
// Neighboring EUTRA cells measurements.
repeated flex_eutra_measurements eutra_meas = 1;
}
message flex_eutra_measurements {
// Physical Cell identifier.
optional int32 phys_cell_id = 1;
// EUTRA Cell Global Identity (CGI) measurement.
optional flex_eutra_cgi_measurements cgi_meas = 2;
// EUTRA nearby cell reference signal measurement.
optional flex_eutra_ref_signal_meas meas_result = 3;
}
message flex_eutra_cgi_measurements {
// EUTRA Cell Global Identity (CGI).
optional flex_cell_global_eutra_id cgi = 1;
// Tracking area code of the neighbor cell.
optional uint32 tracking_area_code = 2;
// Public land mobile network identifiers of neighbor cell.
repeated flex_plmn_identity plmn_id = 3;
}
message flex_cell_global_eutra_id {
// Public land mobile network identifier of neighbor cell.
optional flex_plmn_identity plmn_id = 1;
// Cell identifier of neighbor cell.
optional uint32 cell_id = 2;
}
message flex_plmn_identity {
// Mobile Network Code (MNC).
repeated uint32 mnc = 1;
// Mobile Country Code (MCC).
repeated uint32 mcc = 2;
// tracking area code
repeated uint32 tac = 3;
}
message flex_eutra_ref_signal_meas {
// Neighboring Cell Reference Signal Received Power (RSRP).
optional int32 rsrp = 1;
// Neighboring Cell Reference Signal Received Quality (RSRQ).
optional int32 rsrq = 2;
}
......@@ -46,6 +46,7 @@ message flex_ue_stats_report {
optional flex_dl_cqi_report dl_cqi_report = 7;
optional flex_paging_buffer_report pbr = 8;
optional flex_ul_cqi_report ul_cqi_report = 9;
optional flex_rrc_measurements rrc_measurements = 10;
}
//
......@@ -76,11 +77,12 @@ enum flex_cell_stats_type {
// Flags for UE-related statistics
enum flex_ue_stats_type {
FLUST_BSR = 1;
FLUST_PRH = 2;
FLUST_PHR = 2;
FLUST_RLC_BS = 4;
FLUST_MAC_CE_BS = 8;
FLUST_DL_CQI = 16;
FLUST_PBS = 32;
FLUST_UL_CQI = 64;
// To be extended with more types of stats
}
\ No newline at end of file
FLUST_RRC_MEASUREMENTS = 65536;
}
......@@ -98,6 +98,8 @@
#define ENB_CONFIG_STRING_EUTRA_BAND "eutra_band"
#define ENB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency"
#define ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset"
#define ENB_CONFIG_STRING_RRC_REPORT_CONFIG_AMOUNT "report_amount"
#define ENB_CONFIG_STRING_RRC_REPORT_CONFIG_INTERVAL "report_interval"
#define ENB_CONFIG_STRING_NID_CELL "Nid_cell"
#define ENB_CONFIG_STRING_N_RB_DL "N_RB_DL"
......@@ -165,7 +167,7 @@
#define ENB_CONFIG_STRING_UETIMERS_N310 "ue_TimersAndConstants_n310"
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
#define ENB_CONFIG_STRING_RRC_CONFIG "rrc_config"
#define ENB_CONFIG_STRING_SRB1 "srb1_parameters"
#define ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT "timer_poll_retransmit"
#define ENB_CONFIG_STRING_SRB1_TIMER_REORDERING "timer_reordering"
......@@ -456,6 +458,10 @@ void enb_config_display(void)
printf( "\tue_TransmissionMode for CC %d:\t%ld:\n",j,enb_properties.properties[i]->ue_TransmissionMode[j]);
printf( "\n\tRRC Report Config: \n");
printf( "\n\t Report interval \t%ld: ", enb_properties.properties[i]->rrc_report_interval);
printf( "\n\t Report amount \t%ld: \n", enb_properties.properties[i]->rrc_report_amount);
}
for (j=0; j < enb_properties.properties[i]->num_otg_elements; j++) {
......@@ -545,6 +551,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
config_setting_t *setting_enb = NULL;
config_setting_t *setting_otg = NULL;
config_setting_t *subsetting_otg = NULL;
config_setting_t *setting_rrc = NULL;
int parse_errors = 0;
int num_enb_properties = 0;
int enb_properties_index = 0;
......@@ -651,7 +658,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
libconfig_int srb1_max_retx_threshold = 0;
libconfig_int my_int;
const char* rrc_report_amount = NULL;
const char* rrc_report_interval = NULL;
char* if_name = NULL;
char* ipv4 = NULL;
......@@ -1968,6 +1976,75 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
}
}
setting_rrc = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_RRC_CONFIG);
if (setting_rrc != NULL) {
if (!(config_setting_lookup_string(setting_rrc, ENB_CONFIG_STRING_RRC_REPORT_CONFIG_AMOUNT, &rrc_report_amount)
&& config_setting_lookup_string(setting_rrc, ENB_CONFIG_STRING_RRC_REPORT_CONFIG_INTERVAL, &rrc_report_interval)))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d, rrc_report_amount and rrc_reporyt_interval !\n",
lib_config_file_name_pP, i);
if (strcmp(rrc_report_amount, "r1") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_r1;
} else if (strcmp(rrc_report_amount, "r2") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_r2;
}else if (strcmp(rrc_report_amount, "r4") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_r4;
}else if (strcmp(rrc_report_amount, "r8") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_r8;
}else if (strcmp(rrc_report_amount, "r16") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_r16;
}else if (strcmp(rrc_report_amount, "r32") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_r32;
}else if (strcmp(rrc_report_amount, "r64") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_r64;
}else if (strcmp(rrc_report_amount, "infinity") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_infinity;
}else{
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for report_amount choice: r1, r2, r4, r8, r16, r32, r64, infinity !\n",
lib_config_file_name_pP, i,rrc_report_amount);
}
if (strcmp(rrc_report_interval, "120ms") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms120;
} else if (strcmp(rrc_report_interval, "240ms") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms240;
}else if (strcmp(rrc_report_interval, "480ms") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms480;
}else if (strcmp(rrc_report_interval, "640ms") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms640;
}else if (strcmp(rrc_report_interval, "1024ms") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms1024;
}else if (strcmp(rrc_report_interval, "2048ms") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms2048;
}else if (strcmp(rrc_report_interval, "5120ms") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms5120;
}else if (strcmp(rrc_report_interval, "10240ms") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms10240;
}else if (strcmp(rrc_report_interval, "1min") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_min1;
}else if (strcmp(rrc_report_interval, "6min") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_min6;
}else if (strcmp(rrc_report_interval, "12min") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_min12;
}else if (strcmp(rrc_report_interval, "30min") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_min30;
} else if (strcmp(rrc_report_interval, "60min") == 0) {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_min60;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for report_interval choice: 120ms, 240ms, 480ms, 640ms, 1024ms, 2048ms, 5120ms, 10240ms, 1min, 6min, 12",
lib_config_file_name_pP, i,rrc_report_interval);
}
} else {
enb_properties.properties[enb_properties_index]->rrc_report_interval = ReportInterval_ms120;
enb_properties.properties[enb_properties_index]->rrc_report_amount = ReportConfigEUTRA__reportAmount_r1;
}
setting_srb1 = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_SRB1);
if (setting_srb1 != NULL) {
......
......@@ -214,6 +214,10 @@ typedef struct Enb_properties_s {
long srb1_poll_pdu;
long srb1_poll_byte;
long srb1_max_retx_threshold;
long rrc_report_amount;
long rrc_report_interval;
/* Nb of MME to connect to */
uint8_t nb_mme;
/* List of MME to connect to */
......
......@@ -21,27 +21,16 @@
/*! \file flexran_agent.h
* \brief top level flexran agent receive thread and itti task
* \author Xenofon Foukas and Navid Nikaein
* \date 2016
* \author Xenofon Foukas and Navid Nikaein and shahab SHARIAT BAGHERI
* \date 2017
* \version 0.1
*/
#include "flexran_agent_common.h"
#include "log.h"
#include "flexran_agent.h"
#include "flexran_agent_mac_defs.h"
#include "flexran_agent_mac.h"
#include "flexran_agent_mac_internal.h"
#include "flexran_agent_extern.h"
#include "assertions.h"
#include "flexran_agent_net_comm.h"
#include "flexran_agent_async.h"
#include <arpa/inet.h>
//#define TEST_TIMER
flexran_agent_instance_t flexran_agent[NUM_MAX_ENB];
......@@ -264,8 +253,8 @@ int flexran_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properti
*flexran_agent_register_channel(mod_id, channel, FLEXRAN_AGENT_MAC);
*/
/*Initialize the continuous MAC stats update mechanism*/
flexran_agent_init_cont_mac_stats_update(mod_id);
/*Initialize the continuous stats update mechanism*/
flexran_agent_init_cont_stats_update(mod_id);
new_thread(receive_thread, &flexran_agent[mod_id]);
......@@ -275,6 +264,9 @@ int flexran_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properti
AGENT_MAC_xface *mac_agent_xface = (AGENT_MAC_xface *) malloc(sizeof(AGENT_MAC_xface));
flexran_agent_register_mac_xface(mod_id, mac_agent_xface);
AGENT_RRC_xface *rrc_agent_xface = (AGENT_MAC_xface *) malloc(sizeof(AGENT_MAC_xface));
flexran_agent_register_rrc_xface(mod_id, rrc_agent_xface);
/*
* initilize a timer
*/
......
......@@ -22,15 +22,23 @@
/*! \file flexran_agent.h
* \brief top level flexran agent
* \author Navid Nikaein and Xenofon Foukas
* \date 2016
* \date 2017
* \version 0.1
*/
#ifndef FLEXRAN_AGENT_H_
#define FLEXRAN_AGENT_H_
#include "enb_config.h" // for enb properties
#include "flexran_agent_common.h"
#include "flexran_agent_async.h"
#include "flexran_agent_extern.h"
#include "flexran_agent_timer.h"
#include "flexran_agent_defs.h"
#include "log.h"
#include "assertions.h"
#include "enb_config.h" // for enb properties
/* Initiation and termination of the eNodeB agent */
......
This diff is collapsed.
This diff is collapsed.
......@@ -21,8 +21,8 @@
/*! \file flexran_agent_defs.h
* \brief FlexRAN agent common definitions
* \author Navid Nikaein and Xenofon Foukas
* \date 2016
* \author Navid Nikaein and Xenofon Foukas and shahab SHARIAT BAGHERI
* \date 2017
* \version 0.1
*/
#ifndef FLEXRAN_AGENT_DEFS_H_
......@@ -102,6 +102,38 @@ typedef uint8_t lcid_t;
typedef int32_t err_code_t;
/*---------Timer Enums --------- */
typedef enum {
/* oneshot timer: */
FLEXRAN_AGENT_TIMER_TYPE_ONESHOT = 0,
/* periodic timer */
FLEXRAN_AGENT_TIMER_TYPE_PERIODIC = 1,
/* Inactive state: initial state for any timer. */
FLEXRAN_AGENT_TIMER_TYPE_EVENT_DRIVEN = 2,
/* Max number of states available */
FLEXRAN_AGENT_TIMER_TYPE_MAX,
} flexran_agent_timer_type_t;
typedef enum {
/* Inactive state: initial state for any timer. */
FLEXRAN_AGENT_TIMER_STATE_INACTIVE = 0x0,
/* Inactive state: initial state for any timer. */
FLEXRAN_AGENT_TIMER_STATE_ACTIVE = 0x1,
/* Inactive state: initial state for any timer. */
FLEXRAN_AGENT_TIMER_STATE_STOPPED = 0x2,
/* Max number of states available */
FLEXRAN_AGENT_TIMER_STATE_MAX,
} flexran_agent_timer_state_t;
typedef struct {
/* general info */
......@@ -116,6 +148,53 @@ typedef struct {
} flexran_agent_info_t;
/*
rrc triggering
*/
typedef struct {
char * trigger_policy;
uint32_t report_interval;
uint32_t report_amount;
} agent_reconf_rrc;
/* These structs will be used to give
instructions for the type of stats reports
we need to create */
typedef struct {
uint16_t ue_rnti;
uint32_t ue_report_flags; /* Indicates the report elements
required for this UE id. See
FlexRAN specification 1.2.4.2 */
} ue_report_type_t;
typedef struct {
uint16_t cc_id;
uint32_t cc_report_flags; /* Indicates the report elements
required for this CC index. See
FlexRAN specification 1.2.4.3 */
} cc_report_type_t;
typedef struct {
int nr_ue;
ue_report_type_t *ue_report_type;
int nr_cc;
cc_report_type_t *cc_report_type;
} report_config_t;
typedef struct stats_request_config_s{
uint8_t report_type;
uint8_t report_frequency;
uint16_t period; /*In number of subframes*/
report_config_t *config;
} stats_request_config_t;
typedef struct {
mid_t enb_id;
flexran_agent_info_t agent_info;
......
......@@ -20,9 +20,9 @@
*/
/*! \file ENB_APP/extern.h
* \brief FlexRAN agent - mac interface primitives
* \author Xenofon Foukas
* \date 2016
* \brief FlexRAN agent - Extern VSF xfaces
* \author Xenofon Foukas and shahab SHARIAT BAGHERI
* \date 2017
* \version 0.1
* \mail x.foukas@sms.ed.ac.uk
*/
......@@ -30,9 +30,9 @@
#ifndef __FLEXRAN_AGENT_EXTERN_H__
#define __FLEXRAN_AGENT_EXTERN_H__
#include "flexran_agent_defs.h"
// #include "flexran_agent_defs.h"
#include "flexran_agent_mac_defs.h"
#include "flexran_agent_rrc_defs.h"
//extern msg_context_t shared_ctxt[NUM_MAX_ENB][FLEXRAN_AGENT_MAX];
......@@ -45,6 +45,12 @@ extern AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
/* Flag indicating whether the VSFs for the MAC control module have been registered */
extern unsigned int mac_agent_registered[NUM_MAX_ENB];
/* Control module interface for the communication of the RRC Control Module with the agent */
extern AGENT_RRC_xface *agent_rrc_xface[NUM_MAX_ENB];
/* Flag indicating whether the VSFs for the RRC control module have been registered */
extern unsigned int rrc_agent_registered[NUM_MAX_ENB];
/* Requried to know which UEs had a harq updated over some subframe */
extern int harq_pid_updated[NUMBER_OF_UE_MAX][8];
extern int harq_pid_round[NUMBER_OF_UE_MAX][8];
......
This diff is collapsed.
This diff is collapsed.