Commit bf5bf8ba authored by Cedric Roux's avatar Cedric Roux

Merge branch 'feature-68-enb-agent' into 'develop'

Feature 68 enb agent



See merge request !47
parents 9a0f32aa 8def47c4
This diff is collapsed.
......@@ -35,6 +35,7 @@ source $THIS_SCRIPT_PATH/tools/build_helper
MSC_GEN="False"
XFORMS="True"
FLEXRAN_AGENT_SB_IF="True"
PRINT_STATS="False"
VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="False"
......@@ -83,6 +84,8 @@ Options
Makes the UE specific parts (ue_ip, usim, nvram)
--RRH
Makes the RRH
-a | --agent
Enables agent for software-defined control of the eNB
-r | --3gpp-release
default is Rel10,
Rel8 limits the implementation to 3GPP Release 8 version
......@@ -169,6 +172,10 @@ function main() {
eNB=1
echo_info "Will compile eNB"
shift;;
-a | --agent)
FLEXRAN_AGENT=1
echo_info "Will compile eNB with agent support"
shift;;
--UE)
UE=1
echo_info "Will compile UE"
......@@ -439,6 +446,9 @@ function main() {
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
......@@ -581,6 +591,9 @@ function main() {
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
......@@ -649,6 +662,9 @@ function main() {
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
if [ "$FLEXRAN_AGENT" = "1" ] ; then
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
fi
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
......
......@@ -48,7 +48,7 @@ set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
......
......@@ -163,6 +163,42 @@ compilations() {
# External packages installers
############################################
install_protobuf_from_source(){
protobuf_install_log=$OPENAIR_DIR/cmake_targets/log/protobuf_install_log.txt
echo_info "\nInstalling Google Protobuf from sources. The log file for Protobuf installation is here: $protobuf_install_log "
(
cd /tmp
echo "Downloading protobuf"
rm -rf /tmp/protobuf-2.6.1.tar.gz* /tmp/protobuf-2.6.1
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar -xzvf protobuf-2.6.1.tar.gz
cd protobuf-2.6.1/
./configure
echo "Compiling protobuf"
make -j`nproc`
$SUDO make install
$SUDO ldconfig
) >& $protobuf_install_log
}
install_protobuf_c_from_source(){
protobuf_c_install_log=$OPENAIR_DIR/cmake_targets/log/protobuf_c_install_log.txt
echo_info "\nInstalling Google Protobuf_C from sources. The log file for Protobuf_C installation is here: $protobuf_c_install_log "
(
cd /tmp
echo "Downloading protobuf-c"
rm -rf /tmp/protobuf-c
git clone https://github.com/protobuf-c/protobuf-c.git
cd protobuf-c
./autogen.sh
./configure
echo "Compiling protobuf-c"
make -j`nproc`
$SUDO make install
$SUDO ldconfig
) >& $protobuf_c_install_log
}
check_install_usrp_uhd_driver(){
#first we remove old installation
$SUDO apt-get remove -y uhd || true
......@@ -324,6 +360,7 @@ check_install_oai_software() {
xmlstarlet \
python-pip \
pydb \
libyaml-dev \
wget
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
......@@ -337,6 +374,10 @@ check_install_oai_software() {
$SUDO apt-get install -y libgnutls-dev
install_asn1c_from_source
$SUDO rm -fr /opt/ssh
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh
install_protobuf_from_source
install_protobuf_c_from_source
}
### Remove Nettle installation which was done from sources
......@@ -361,6 +402,7 @@ remove_nettle_from_source() {
cd nettle-2.5/
./configure --disable-openssl --enable-shared --prefix=/usr
$SUDO make uninstall || true
$SUDO ldconfig
) >& $nettle_uninstall_log
}
......@@ -384,6 +426,7 @@ remove_gnutls_from_source(){
cd gnutls-3.1.23/
./configure --prefix=/usr
$SUDO make uninstall || true
$SUDO ldconfig
)>& $gnutls_uninstall_log
}
......@@ -398,6 +441,7 @@ install_asn1c_from_source(){
make -j`nproc`
$SUDO make install
cd -
$SUDO ldconfig
) > $asn1_install_log 2>&1
}
......
#!/bin/bash
function main()
{
mkdir -p $1
#echo generate protobuf messages inside $1 $2
c_out=$1
shift
proto_path=$1
shift
protoc-c --c_out=$c_out --proto_path=$proto_path $*
#protoc --cpp_out=$c_out --proto_path=$proto_path $*
}
main "$@"
#!/usr/bin/env bash
CACHE_DIR=/mnt/oai_agent_cache
if [ ! -d $CACHE_DIR ]; then
echo "Creating cache dir in $CACHE_DIR"
sudo mkdir $CACHE_DIR
fi
if grep -qs "$CACHE_DIR" /proc/mounts; then
echo "Agent cache is already mounted"
else
echo "Agent cache was not mounted"
echo "Mounting..."
sudo mount -o size=100m -t tmpfs none "$CACHE_DIR"
if [ $? -eq 0 ]; then
echo "Mount success"
else
echo "Something went wrong with the mount"
fi
fi
This diff is collapsed.
......@@ -86,8 +86,8 @@ int timer_handle_signal(siginfo_t *info)
timer_p = (struct timer_elm_s *)info->si_ptr;
// LG: To many traces for msc timer:
// TMR_DEBUG("Timer with id 0x%lx has expired\n", (long)timer_p->timer);
TMR_DEBUG("Timer with id 0x%lx has expired\n", (long)timer_p->timer);
task_id = timer_p->task_id;
instance = timer_p->instance;
message_p = itti_alloc_new_message(TASK_TIMER, TIMER_HAS_EXPIRED);
......@@ -120,6 +120,10 @@ int timer_handle_signal(siginfo_t *info)
return -1;
}
#if defined(ENB_AGENT_SB_IF)
#endif
return 0;
}
......
#!/bin/sh
echo "building ctags for openair1 and openair2 ..."
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 openair3 targets cmake_targets common
......@@ -69,6 +69,11 @@ enum openair_SYNCH_STATUS {
openair_SCHED_EXIT
};
enum openair_HARQ_TYPE {
openair_harq_DL = 0,
openair_harq_UL,
openair_harq_RA
};
#define DAQ_AGC_ON 1
#define DAQ_AGC_OFF 0
......
......@@ -21,11 +21,11 @@
/*! \file phy_procedures_lte_eNB.c
* \brief Implementation of eNB procedures from 36.213 LTE specifications
* \author R. Knopp, F. Kaltenberger, N. Nikaein
* \author R. Knopp, F. Kaltenberger, N. Nikaein, X. Foukas
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,navid.nikaein@eurecom.fr
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,navid.nikaein@eurecom.fr, x.foukas@sms.ed.ac.uk
* \note
* \warning
*/
......@@ -61,6 +61,14 @@
# include "intertask_interface.h"
#endif
#if defined(FLEXRAN_AGENT_SB_IF)
//Agent-related headers
#include "ENB_APP/flexran_agent_extern.h"
#include "ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h"
#include "LAYER2/MAC/flexran_agent_mac_proto.h"
#endif
//#define DIAG_PHY
#define NS_PER_SLOT 500000
......@@ -221,7 +229,7 @@ int8_t find_next_ue_index(PHY_VARS_eNB *eNB)
return(-1);
}
int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16_t rnti, const int frame, const uint8_t subframe,uint8_t *harq_pid,uint8_t *round,const uint8_t ul_flag)
int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16_t rnti, const int frame, const uint8_t subframe,uint8_t *harq_pid,uint8_t *round,const uint8_t harq_flag)
{
LTE_eNB_DLSCH_t *DLSCH_ptr;
LTE_eNB_ULSCH_t *ULSCH_ptr;
......@@ -235,9 +243,20 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16
return(-1);
}
if (ul_flag == 0) {// this is a DL request
if ((harq_flag == openair_harq_DL) || (harq_flag == openair_harq_RA)) {// this is a DL request
DLSCH_ptr = PHY_vars_eNB_g[Mod_id][CC_id]->dlsch[(uint32_t)UE_id][0];
if (harq_flag == openair_harq_RA) {
if (DLSCH_ptr->harq_processes[0] != NULL) {
*harq_pid = 0;
*round = DLSCH_ptr->harq_processes[0]->round;
return 0;
} else {
return -1;
}
}
/* let's go synchronous for the moment - maybe we can change at some point */
i = (frame * 10 + subframe) % 8;
......@@ -1405,7 +1424,16 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
eNB->dlsch_ra->active = 0;
}
#if defined(FLEXRAN_AGENT_SB_IF)
#ifndef DISABLE_SF_TRIGGER
//Send subframe trigger to the controller
if (mac_agent_registered[eNB->Mod_id]) {
agent_mac_xface[eNB->Mod_id]->flexran_agent_send_sf_trigger(eNB->Mod_id);
}
#endif
#endif
// Now scan UE specific DLSCH
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++)
{
......
......@@ -55,6 +55,8 @@ TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200)
/// eNB APP task
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200)
/// eNB Agent task
TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200)
// UE tasks and sub-tasks:
//// Layer 2 and Layer 1 sub-tasks
......
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file flexran_agent_mac.h
* \brief FlexRAN agent message handler APIs for MAC layer
* \author Xenofon Foukas, Mohamed Kassem and Navid Nikaein
* \date 2016
* \version 0.1
*/
#ifndef FLEXRAN_AGENT_MAC_H_
#define FLEXRAN_AGENT_MAC_H_
#include "header.pb-c.h"
#include "flexran.pb-c.h"
#include "stats_messages.pb-c.h"
#include "stats_common.pb-c.h"
#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);
/* Subframe trigger protocol msssage constructor and destructor */
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);
/* 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);
int flexran_agent_mac_handle_dl_mac_config(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg);
/**********************************
* FlexRAN agent - technology mac API
**********************************/
/*Inform controller about received scheduling requests during a subframe*/
void flexran_agent_send_sr_info(mid_t mod_id);
/*Inform the controller about the current UL/DL subframe*/
void flexran_agent_send_sf_trigger(mid_t mod_id);
/// Send to the controller all the mac stat updates that occured during this subframe
/// based on the stats request configuration
void flexran_agent_send_update_mac_stats(mid_t mod_id);
/// Provide to the scheduler a pending dl_mac_config message
void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMessage **msg);
/*Register technology specific interface callbacks*/
int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface);
/*Unregister technology specific callbacks*/
int flexran_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface*xface);
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file flexran_agent_mac_defs.h
* \brief FlexRAN agent - mac interface primitives
* \author Xenofon Foukas
* \date 2016
* \version 0.1
* \mail x.foukas@sms.ed.ac.uk
*/
#ifndef __FLEXRAN_AGENT_MAC_PRIMITIVES_H__
#define __FLEXRAN_AGENT_MAC_PRIMITIVES_H__
#include "flexran_agent_defs.h"
#include "flexran.pb-c.h"
#include "header.pb-c.h"
#define RINGBUFFER_SIZE 100
/* FLEXRAN AGENT-MAC Interface */
typedef struct {
//msg_context_t *agent_ctxt;
/// Inform the controller about the scheduling requests received during the subframe
void (*flexran_agent_send_sr_info)(mid_t mod_id);
/// Inform the controller about the current UL/DL subframe
void (*flexran_agent_send_sf_trigger)(mid_t mod_id);
/// Send to the controller all the mac stat updates that occured during this subframe
/// based on the stats request configuration
void (*flexran_agent_send_update_mac_stats)(mid_t mod_id);
/// Provide to the scheduler a pending dl_mac_config message
void (*flexran_agent_get_pending_dl_mac_config)(mid_t mod_id,
Protocol__FlexranMessage **msg);
/// Run the UE DL scheduler and fill the Protocol__FlexranMessage. Assumes that
/// dl_info is already initialized as flex_dl_mac_config and fills the
/// flex_dl_data part of it
void (*flexran_agent_schedule_ue_spec)(mid_t mod_id, uint32_t frame, uint32_t subframe,
int *mbsfn_flag, Protocol__FlexranMessage **dl_info);
/// 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 *dl_scheduler_loaded_lib;
/*TODO: Fill in with the rest of the MAC layer technology specific callbacks (UL/DL scheduling, RACH info etc)*/
} AGENT_MAC_xface;
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file flexran_agent_mac_internal.h
* \brief Implementation specific definitions for the FlexRAN MAC agent
* \author Xenofon Foukas
* \date 2016
* \version 0.1
*/
#ifndef FLEXRAN_AGENT_MAC_INTERNAL_H_
#define FLEXRAN_AGENT_MAC_INTERNAL_H_
#include <pthread.h>
#include <yaml.h>
#include "flexran_agent_mac.h"
#include "flexran_agent_common.h"
#include "flexran_agent_defs.h"
/*This will be used for producing continuous status updates for the MAC
*Needs to be thread-safe
*/
typedef struct {
/*Flag showing if continuous mac stats update is enabled*/
uint8_t is_initialized;
volatile uint8_t cont_update;
xid_t xid;
Protocol__FlexranMessage *stats_req;
Protocol__FlexranMessage *prev_stats_reply;
pthread_mutex_t *mutex;
} mac_stats_updates_context_t;
/*Array holding the last stats reports for each eNB. Used for continuous reporting*/
mac_stats_updates_context_t mac_stats_context[NUM_MAX_ENB];
/*Functions to initialize and destroy the struct required for the
*continuous stats update report*/
err_code_t flexran_agent_init_cont_mac_stats_update(mid_t mod_id);
err_code_t flexran_agent_destroy_cont_mac_stats_update(mid_t mod_id);
/*Enable/Disable the continuous stats update service for the MAC*/
err_code_t flexran_agent_enable_cont_mac_stats_update(mid_t mod_id, xid_t xid,
stats_request_config_t *stats_req);
err_code_t flexran_agent_disable_cont_mac_stats_update(mid_t mod_id);
Protocol__FlexranMessage * flexran_agent_generate_diff_mac_stats_report(Protocol__FlexranMessage *new_report,
Protocol__FlexranMessage *old_report);
Protocol__FlexUeStatsReport * copy_ue_stats_report(Protocol__FlexUeStatsReport * original);
Protocol__FlexCellStatsReport * copy_cell_stats_report(Protocol__FlexCellStatsReport *original);
Protocol__FlexRlcBsr * copy_rlc_report(Protocol__FlexRlcBsr * original);
Protocol__FlexUlCqiReport * copy_ul_cqi_report(Protocol__FlexUlCqiReport * original);
Protocol__FlexDlCqiReport * copy_dl_cqi_report(Protocol__FlexDlCqiReport * original);
Protocol__FlexPagingBufferReport * copy_paging_buffer_report(Protocol__FlexPagingBufferReport *original);
Protocol__FlexDlCsi * copy_csi_report(Protocol__FlexDlCsi * original);
Protocol__FlexNoiseInterferenceReport * copy_noise_inter_report(Protocol__FlexNoiseInterferenceReport *original);
int compare_ue_stats_reports(Protocol__FlexUeStatsReport *rep1,
Protocol__FlexUeStatsReport *rep2);
int compare_cell_stats_reports(Protocol__FlexCellStatsReport *rep1,
Protocol__FlexCellStatsReport *rep2);
/* Functions for parsing the MAC agent policy reconfiguration command */
int parse_mac_config(mid_t mod_id, yaml_parser_t *parser);
int parse_dl_scheduler_config(mid_t mod_id, yaml_parser_t *parser);
int parse_dl_scheduler_parameters(mid_t mod_id, yaml_parser_t *parser);
int load_dl_scheduler_function(mid_t mod_id, const char *function_name);
#endif /*FLEXRAN_AGENT_MAC_INTERNAL_H_*/
//'syntax = "proto2";'
package protocol;
//
// Cell config related structures and enums
//
message flex_si_config {
optional uint32 sfn = 1;
optional uint32 sib1_length = 2; // The length of SIB1 in bytes
optional uint32 si_window_length = 3; // The scheduling window for all SIs in SF
repeated flex_si_message si_message = 4; // List of SI messages to be sent.
// The index identifies the type of an SI message
// 0 - SIB1
// 1..31 - SIx
// 32..63 - PCCH
}
message flex_si_message {
optional uint32 periodicity = 1; // Periodicity of SI msg in radio frames
optional uint32 length = 2; // The length of the SI message in bytes
}
enum flex_hopping_mode {
FLHM_INTER = 0;
FLHM_INTERINTRA = 1;
}
enum flex_phich_resource {
FLPR_ONE_SIXTH = 0;
FLPR_HALF = 1;
FLPR_ONE = 2;
FLPR_TWO = 3;
}
enum flex_phich_duration {
FLPD_NORMAL = 0;
FLPD_EXTENDED = 1;
}
enum flex_ul_cyclic_prefix_length {
FLUCPL_NORMAL = 0;
FLUCPL_EXTENDED = 1;
}
enum flex_dl_cyclic_prefix_length {
FLDCPL_NORMAL = 0;
FLDCPL_EXTENDED = 1;
}
enum flex_duplex_mode {
FLDM_TDD = 0;
FLDM_FDD = 1;
}
enum flex_qam {
FLEQ_MOD_16QAM = 0;
FLEQ_MOD_64QAM = 1;
}
//
// UE config related structures and enums
//
message flex_drx_config {
optional uint32 on_duration_timer = 1; // Timer in SF. See TS 36.321
optional uint32 drx_inactivity_timer = 2; // Timer in SF. See TS 36.321
optional uint32 drx_retransmission_timer = 3; // Timer in SF. See TS 36.321
optional uint32 long_drx_cycle = 4; // In SF. See TS 36.321
optional uint32 long_drx_cycle_start_offset = 5;// See TS 36.321
optional uint32 short_drx_cycle = 6; // In SF
optional uint32 drx_short_cycle_timer = 7; // Timer in subframes. See TS 36.321
}
message flex_sps_config {
optional uint32 semi_persistent_sched_interval_UL = 1; // SPS UL scheduling interval in SF
optional uint32 semi_persistent_sched_interval_DL = 2; // SPS DL scheduling interval in SF
optional uint32 num_of_conf_sps_proc = 3; // Number of SPS HARQ processes. See TS 36.321
repeated uint32 n1_PUCCH_AN_persistent_element = 4;// See TS36.213. Ignored when config is used
// as part of FLPT_SET_UE_CONFIG
optional uint32 implicit_release_after = 5; // number of empty transmissions before release of SPS
}
message flex_sr_config {
optional uint32 sr_action = 1; // Indicates if SR config should be changed or released
// One of the FLSRA_* enum values
optional uint32 sched_interval = 2; // SR scheduling interval in SF
optional uint32 dsr_trans_max = 3; // See TS 36.213
}
message flex_cqi_config {
optional uint32 cqi_action = 1; // Indicats if CQI changed or released.
// One of the FLSRA_* enum values
optional uint32 cqi_sched_interval = 2; // CQI scheduling interval in SF
optional uint32 ri_sched_interval = 3; // RI scheduling interval in SF
}
message flex_ue_capabilities {
optional uint32 half_duplex = 1; // Boolean value. Only half duplex support. FDD operation
optional uint32 intra_SF_hopping = 2; // Support for intra-subframe hopping. Boolean value
optional uint32 type2_sb_1 = 3; // Support for type 2 hopping with n_sb > 1
optional uint32 ue_category = 4;
optional uint32 res_alloc_type1 = 5; // Boolean value. UE support for resource allocation type 1
}
message flex_scell_config {
optional uint32 carrier_index = 1; // Id of the carrier component
optional uint32 scell_index = 2; // Index of this Scell (RRC SCellIndex)
optional uint32 use_ccs = 3; // Boolean value. Indicates if cross-carrier scheduling
// is used by this SCell
optional uint32 sched_cell_index = 4; // Index of the cell responsible for scheduling
// this SCell if cross-carrier scheduling is enabled
optional uint32 pdsch_start = 5; // Starting OFDM symbol of PDSCH data region for this SCell
}
enum flex_meas_gap_config_pattern {
FLMGCP_GP1 = 0;
FLMGCP_GP2 = 1;
FLMGCP_OFF = 2;
}
enum flex_setup_release_action {
FLSRA_SETUP = 0;
FLSRA_RELEASE = 1;
}
enum flex_ue_transmission_antenna {
FLUTA_NONE = 0;
FLUTA_OPEN_LOOP = 1;
FLUTA_CLOSED_LOOP = 2;
}
enum flex_aperiodic_cqi_report_mode {
FLACRM_RM12 = 0;
FLACRM_RM20 = 1;
FLACRM_RM22 = 2;
FLACRM_RM30 = 3;
FLACRM_RM31 = 4;
FLACRM_NONE = 5;
}
enum flex_tdd_ack_nack_feedback_mode {
FLTANFM_BUNDLING = 0;
FLTANFM_MULTIPLEXING = 1;
}
//
// Logical channel config related structures and enums
//
message flex_lc_config {
optional uint32 lcid = 1; // The logical channel id
optional uint32 lcg = 2; // The logical channel group (0..3) the LC is mapped to
optional uint32 direction = 3; // The LC direction. One of the FLLCD_* enum values
optional uint32 qos_bearer_type = 4;// GBR or NGBR bearer. One of the FLQBT_* enum values
optional uint32 qci = 5; // The QCI defined in TS 23.203, coded as defined in TS 36.413
// One less than the actual QCI value
optional uint64 e_RAB_max_bitrate_UL = 6; // In bps (GBR only)
optional uint64 e_RAB_max_bitrate_DL = 7; // In bps (GBR only)
optional uint64 e_RAB_guaranteed_bitrate_UL = 8; // In bps (GBR only)
optional uint64 e_RAB_guaranteed_bitrate_DL = 9; // In bps (GBR only)
}
enum flex_lc_direction {
FLLCD_UL = 0;
FLLCD_DL = 1;
FLLCD_BOTH = 2;
}
enum flex_qos_bearer_type {
FLQBT_NON_GBR = 0;
FLQBT_GBR = 1;
}
enum flex_ue_state_change_type {
FLUESC_UPDATED = 0;
FLUESC_ACTIVATED = 1;
FLUESC_DEACTIVATED = 2;
FLUESC_MOVED = 3;
}
\ No newline at end of file
//'syntax = "proto2";'
package protocol;
import "config_common.proto";
message flex_cell_config {
optional uint32 phy_cell_id = 1; // The PCI of this cell
optional uint32 cell_id = 2; // The PLMN cell id of this cell
optional uint32 pusch_hopping_offset = 3; // PUSCH resources in RBs for hopping
optional uint32 hopping_mode = 4; // One of the FLHM_* enum values
optional uint32 n_sb = 5; // The number of subbands
optional uint32 phich_resource = 6; // The number of REGs used for PHICH
// One of the FLPR_* enum values
optional uint32 phich_duration = 7; // One of the FLPD_* enum values
optional uint32 init_nr_PDCCH_OFDM_sym = 8; // See TS 36.211, section 6.9
optional flex_si_config si_config = 9; // The SI configuration
optional uint32 dl_bandwidth = 10; // The DL transmission bandwidth in RBs
optional uint32 ul_bandwidth = 11; // The UL transmission bandwidth in RBs
optional uint32 ul_cyclic_prefix_length = 13; // One of the FLUCPL_* enum values
optional uint32 dl_cyclic_prefix_length = 14; // One of the FLDCPL_* enum values
optional uint32 antenna_ports_count = 15; // Number of cell specific antenna ports
optional uint32 duplex_mode = 16; // One of the FLDM_* enum values
optional uint32 subframe_assignment = 17; // DL/UL subframe assignment. TDD only
optional uint32 special_subframe_patterns = 18; // TDD only. See TS 36.211, table 4.2.1
repeated uint32 mbsfn_subframe_config_rfperiod = 19; // The MBSFN radio frame period (Optional)
repeated uint32 mbsfn_subframe_config_rfoffset = 20; // The radio frame offset (Optional)
repeated uint32 mbsfn_subframe_config_sfalloc = 21; // Bitmap indicating the MBSFN subframes (Optional)
optional uint32 prach_config_index = 22; // See TS 36.211, section 5.7.1
optional uint32 prach_freq_offset = 23; // See TS 36.211, section 5.7.1
optional uint32 ra_response_window_size = 24; // The duration of the RA response window in SF
optional uint32 mac_contention_resolution_timer = 25; // Timer for RA
optional uint32 max_HARQ_Msg3Tx = 26; // See TS 36.321
optional uint32 n1PUCCH_AN = 27; // See TS 36.213, section 10.1
optional uint32 deltaPUCCH_shift = 28; // See TS 36.211, section 5.4
optional uint32 nRB_cqi = 29; // See TS 36.211, section 5.4
optional uint32 srs_subframe_config = 30; // See TS 36.211, table 5.5.3.3-1 and 2
optional uint32 srs_bw_config = 31; // See TS 36.211, section 5.5.3.2
optional uint32 srs_mac_up_pts = 32; // Boolean value. See TS 36.211, section 5.5.3.2. TDD only
optional uint32 enable_64QAM = 33; // One of the FLEQ_* enum values
optional uint32 carrier_index = 34; // Carrier component index
}
message flex_ue_config {
optional uint32 rnti = 1;
optional flex_drx_config drx_config = 2; // The DRX configuration (Optional)
optional uint32 time_alignment_timer = 3; // Timer in SF. Control the synchronization
// status of the UE, not the actual advance procedure
// See TS 36.321
optional uint32 meas_gap_config_pattern = 4; // Measurement gap configuration.
// One of the FLMGCP_* enum values
// See TS 36.133
optional uint32 meas_gap_config_sf_offset = 5; // Measurement gap offset if applicable
optional flex_sps_config sps_config = 6; // The SPS configuration (Optional)
optional flex_sr_config sr_config = 7; // The SR configuration (Optional)
optional flex_cqi_config cqi_config = 8; // The CQI configuration (Optional)
optional uint32 transmission_mode = 9; // The UE transmission mode
optional uint64 ue_aggregated_max_bitrate_UL = 10; // Aggregated bit-rate of non-gbr bearer
// per UE. See TS 36.413
optional uint64 ue_aggregated_max_bitrate_DL = 11; // Aggregated bit-rate of non-gbr bearer
// per UE. See TS 36.413
optional flex_ue_capabilities capabilities = 12;
optional uint32 ue_transmission_antenna = 13; // One of the FLUTA_* enum values
optional uint32 tti_bundling = 14; // Boolean value. See TS 36.321
optional uint32 max_HARQ_tx = 15; // The max HARQ retransmission for UL
optional uint32 beta_offset_ACK_index = 16; // See TS 36.213
optional uint32 beta_offset_RI_index = 17; // See TS 36.213
optional uint32 beta_offset_CQI_index = 18; // See TS 36.213
optional uint32 ack_nack_simultaneous_trans = 19;// Boolean. See TS 36.213
optional uint32 simultaneous_ack_nack_cqi = 20; // Boolean. See TS 36.213
optional uint32 aperiodic_cqi_rep_mode = 21; // One of the FLACRM_* enum values
optional uint32 tdd_ack_nack_feedback = 22; // One of the FLTANFM_* enum values
optional uint32 ack_nack_repetition_factor = 23;// See TS 36.213, section 10.1
optional uint32 extended_bsr_size = 24; // Boolean for extended BSR size
optional uint32 ca_support = 25; // Boolean. Support for carrier aggregation
optional uint32 cross_carrier_sched_support = 26; // Boolean value
optional uint32 pcell_carrier_index = 27; // Index of primary cell
repeated flex_scell_config scell_config = 28; // Secondary cells configuration
optional uint32 scell_deactivation_timer = 29;// Deactivation timer for secondary cell
}
message flex_lc_ue_config {
optional uint32 rnti = 1;
repeated flex_lc_config lc_config = 2; // A list of LC configurations for the given UE
}
//'syntax = "proto2";'
package protocol;
enum flex_control_delegation_type {
FLCDT_MAC_DL_UE_SCHEDULER = 1; // DL UE scheduler delegation
}
\ No newline at end of file
package protocol;
import "mac_primitives.proto";
//
// Body of UE DL MAC scheduling configuration info
//
message flex_dl_data {
optional uint32 rnti = 1;
optional flex_dl_dci dl_dci = 2;
repeated uint32 ce_bitmap = 3; // list of 2 MAC CEs, one for each TB
repeated flex_rlc_pdu rlc_pdu = 4; // list of parameters for the creation of RLC PDUs. One for each lcid
optional uint32 serv_cell_index = 5;
optional uint32 act_deact_ce = 6; //Hex content of MAC CE for Activation/Deactivation in CA
}
//
// Body of the RAR scheduler configuration
//
message flex_dl_rar {
optional uint32 rnti = 1;
optional uint32 grant = 2; // The 20-bit UL grant. TS 36.213, sec 6.2
optional flex_dl_dci rar_dci = 3;
optional uint32 carrier_index = 4; // The carrier index for the RAR
}
//
// Body of the paging/broadcast configuration message
//
message flex_dl_broadcast {
optional uint32 type = 1; // The FLBT_* values
optional uint32 index = 2; // Index of the broadcast message:
// 0 - SIB1,
// 1..31 - Six,
// 32..63 - PCCH (PCCH index obtained from flex_paging_info)
optional flex_dl_dci broad_dci = 3;
optional uint32 carrier_index = 4; // Index of the carrier for broadcast
}
//
// Body of the OFDM symbol count message
//
message flex_pdcch_ofdm_sym_count {
optional uint32 carrier_index = 1;
optional uint32 num_pdcch_ofdm_symbols = 2;
}
//
// Types of commands related enums
//
enum flex_broadcast_type {
FLBT_BCCH = 0;
FLBT_PCCH = 1;
}
\ No newline at end of file
//'syntax = "proto2";'
package protocol;
import "stats_messages.proto";
import "header.proto";
import "time_common.proto";
import "config_messages.proto";
import "controller_commands.proto";
import "control_delegation.proto";
message flexran_message {
optional flexran_direction msg_dir = 100;
oneof msg {
flex_hello hello_msg = 1;
flex_echo_request echo_request_msg = 2;
flex_echo_reply echo_reply_msg = 3;
flex_stats_request stats_request_msg = 4;
flex_stats_reply stats_reply_msg = 5;
flex_sf_trigger sf_trigger_msg = 6;
flex_ul_sr_info ul_sr_info_msg = 7;
flex_enb_config_request enb_config_request_msg = 8;
flex_enb_config_reply enb_config_reply_msg = 9;
flex_ue_config_request ue_config_request_msg = 10;
flex_ue_config_reply ue_config_reply_msg = 11;
flex_lc_config_request lc_config_request_msg = 12;
flex_lc_config_reply lc_config_reply_msg = 13;
flex_dl_mac_config dl_mac_config_msg = 14;
flex_ue_state_change ue_state_change_msg = 15;
flex_control_delegation control_delegation_msg = 16;
flex_agent_reconfiguration agent_reconfiguration_msg = 17;
}
}
enum flexran_direction {
//option allow_alias = true;
NOT_SET = 0;
INITIATING_MESSAGE = 1;
SUCCESSFUL_OUTCOME=2;
UNSUCCESSFUL_OUTCOME=3;
}
enum flexran_err {
option allow_alias = true;
// message errors
NO_ERR = 0;
MSG_DEQUEUING = -1;
MSG_ENQUEUING = -2;
MSG_DECODING = -3;
MSG_ENCODING = -4;
MSG_BUILD = -5;
MSG_NOT_SUPPORTED = -6;
MSG_NOT_HANDLED = -7;
MSG_NOT_VALIDATED = -8;
MSG_OUT_DATED = -9;
// other erros
UNEXPECTED = -100;
}
//
// Maintenance and discovery messages
//
message flex_hello {
optional flex_header header = 1;
}
message flex_echo_request {
optional flex_header header = 1;
extensions 100 to 199;
}
message flex_echo_reply {
optional flex_header header = 1;
extensions 100 to 199;
}
//
// Statistics request and reply message
//
message flex_stats_request {
optional flex_header header = 1;
optional flex_stats_type type = 2;
oneof body {
flex_complete_stats_request complete_stats_request = 3;
flex_cell_stats_request cell_stats_request = 4;
flex_ue_stats_request ue_stats_request = 5;
}
}
message flex_stats_reply {
optional flex_header header = 1;
repeated flex_ue_stats_report ue_report = 2;
repeated flex_cell_stats_report cell_report = 3;
}
//
// Time indication messages
//
message flex_sf_trigger {
optional flex_header header = 1;
optional uint32 sfn_sf = 2;
repeated flex_dl_info dl_info = 3;
repeated flex_ul_info ul_info = 4;
}
//
// Asynchronous messages
//
message flex_ul_sr_info {
optional flex_header header = 1;
optional uint32 sfn_sf = 2;
repeated uint32 rnti = 3;
}
//
// eNB configuration messages
//
message flex_enb_config_request {
optional flex_header header = 1;
}
message flex_enb_config_reply {
optional flex_header header = 1;
optional uint32 eNB_id = 2; // Unique id to distinguish the eNB
repeated flex_cell_config cell_config = 3;
}
message flex_ue_config_request {
optional flex_header header = 1;
}
message flex_ue_config_reply {
optional flex_header header = 1;
repeated flex_ue_config ue_config = 2;
}
message flex_lc_config_request {
optional flex_header header = 1;
}
message flex_lc_config_reply {
optional flex_header header = 1;
repeated flex_lc_ue_config lc_ue_config = 2;
}
//
// Controller command messages
//
message flex_dl_mac_config {
optional flex_header header = 1;
optional uint32 sfn_sf = 2;
repeated flex_dl_data dl_ue_data = 3;
repeated flex_dl_rar dl_rar = 4;
repeated flex_dl_broadcast dl_broadcast = 5;
repeated flex_pdcch_ofdm_sym_count ofdm_sym = 6; // OFDM symbol count for each CC
}
//
// UE state change message
//
message flex_ue_state_change {
optional flex_header header = 1;
optional uint32 type = 2; // One of the FLUESC_* values
optional flex_ue_config config = 3; // Body of the message (based on type)
}
//
// Control delegation message
//
message flex_control_delegation {
optional flex_header header = 1;
optional uint32 delegation_type = 2; // Bitmap of FLCDT_* flags
optional bytes payload = 3; // Byte array of shared lib containing the delegated functions
optional string name = 4; // The delegated functions names ordered based on bitmap flags
}
//
// Agent reconfiguration message
//
message flex_agent_reconfiguration {
optional flex_header header = 1;
optional string policy = 2; // The policy changes using YAML syntax in string format
}
// Extensions of the echo request and reply
// messages for carrying a latency value in ms
message flex_echo_request_latency {
extend flex_echo_request {
optional uint32 latency = 100;
}
}
message flex_echo_reply_latency {
extend flex_echo_reply {
optional uint32 latency = 100;
}
}
package protocol;
message flex_header {
optional uint32 version = 1;
optional uint32 type = 2;
optional uint32 xid = 4;
}
enum flex_type {
// Discovery and maintenance messages
FLPT_HELLO = 0;
FLPT_ECHO_REQUEST = 1;
FLPT_ECHO_REPLY = 2;
// Statistics and measurement messages
FLPT_STATS_REQUEST = 3;
FLPT_STATS_REPLY = 4;
// Time indication messages
FLPT_SF_TRIGGER = 5;
// Asynchronous messages
FLPT_UL_SR_INFO = 6;
// eNB configuration messages
FLPT_GET_ENB_CONFIG_REQUEST = 7;
FLPT_GET_ENB_CONFIG_REPLY = 8;
FLPT_GET_UE_CONFIG_REQUEST = 9;
FLPT_GET_UE_CONFIG_REPLY = 10;
FLPT_GET_LC_CONFIG_REQUEST = 11;
FLPT_GET_LC_CONFIG_REPLY = 12;
//Controller command messages
FLPT_DL_MAC_CONFIG = 13;
// UE state change messages
FLPT_UE_STATE_CHANGE = 14;
// Control delegation messages
FLPT_DELEGATE_CONTROL = 15;
FLPT_RECONFIGURE_AGENT = 16;
}
package protocol;
//
// Message containing the DL DCI info
//
message flex_dl_dci {
optional uint32 rnti = 1;
optional uint32 res_alloc = 2; // Type of resource allocation
optional uint32 rb_bitmap = 3; // Bitmap for RB allocation
optional uint32 rb_shift = 4; // See TS 36.214, section 7.1.6.2
repeated uint32 tbs_size = 5; // The size of each TBS
repeated uint32 mcs = 6; // The MCS of each TB
repeated uint32 ndi = 7; // New data indicator of each TB
repeated uint32 rv = 8; // Redundancy version of each TB
optional uint32 cce_index = 9; // CCE index used to send the DCI
optional uint32 aggr_level = 10;
optional uint32 precoding_info = 11; // 2 antenna ports:0..6,
// 4 antenna ports:0..50
optional uint32 format = 12; // DCI format. A FLDCIF_* value
optional uint32 tpc = 13; // TS 36.213, sec 5.1.1.1
optional uint32 harq_process = 14; // HARQ process ID
optional uint32 dai = 15; // TDD only
optional uint32 vrb_format = 16; // One of the FLVRBF_* values
optional uint32 tb_swap = 17; // Boolean. TB to codeword swap flag
optional uint32 sps_release = 18; // Flag value
optional uint32 pdcch_order = 19;
optional uint32 preamble_index = 20; // Only valid if pdcch_order = 1
optional uint32 prach_mask_index = 21; // Only valid if pdcch_order = 1
optional uint32 n_gap = 22; // One of the FLNGV_* values
optional uint32 tbs_idx = 23; // The TBS index for Format 1A
optional uint32 dl_power_offset = 24; // For format 1D
optional uint32 pdcch_power_offset = 25; // DL PDCCH power boosting in dB
optional uint32 cif_present = 26; // Boolean. Indication of CIF field
optional uint32 cif = 27; // CIF for cross-carrier scheduling
}
//
// Messages related to the creation of RLC PDUs
//
message flex_rlc_pdu {
repeated flex_rlc_pdu_tb rlc_pdu_tb = 1; // list of parameters for the creation of RLC PDUs. One for each TB
}
message flex_rlc_pdu_tb {
optional uint32 logical_channel_id = 1;
optional uint32 size = 2; // Maximum RLC PDU to be created in bytes
}
//
// MAC content types related enums
//
enum flex_dci_format {
FLDCIF_1 = 0;
FLDCIF_1A = 1;
FLDCIF_1B = 2;
FLDCIF_1C = 3;
FLDCIF_1D = 4;
FLDCIF_2 = 5;
FLDCIF_2A = 6;
FLDCIF_2B = 7;
FLDCIF_3 = 8;
FLDCIF_3A = 9;
}
enum flex_vrb_format {
FLVRBF_LOCALIZED = 0;
FLVRBF_DISTRIBUTED = 1;
}
enum flex_ngap_val {
FLNGV_1 = 0;
FLNGV_2 = 1;
}
\ No newline at end of file
package protocol;
//
// UE related statistics
//
// RLC buffer status for a specific logical channel of a UE
message flex_rlc_bsr {
optional uint32 lc_id = 1;
optional uint32 tx_queue_size = 2;
optional uint32 tx_queue_hol_delay = 3;
optional uint32 retransmission_queue_size = 4;
optional uint32 retransmission_queue_hol_delay = 5;
optional uint32 status_pdu_size = 6;
}
// Flags for MAC Control Elements
enum flex_ce_type {
FLPCET_TA = 1;
FLPCET_DRX = 2;
FLPCET_CR = 4;
FLPCET_CA = 8;
}
// Types of DL CSI reports
enum flex_csi_type {
FLCSIT_P10 = 0;
FLCSIT_P11 = 1;
FLCSIT_P20 = 2;
FLCSIT_P21 = 3;
FLCSIT_A12 = 4;
FLCSIT_A22 = 5;
FLCSIT_A20 = 6;
FLCSIT_A30 = 7;
FLCSIT_A31 = 8;
}
// CSI type P10
message flex_csi_p10 {
optional uint32 wb_cqi = 1;
}
// CSI type P11
message flex_csi_p11 {
repeated uint32 wb_cqi = 1;
optional uint32 wb_pmi = 2;
}
// CSI type P20
message flex_csi_p20 {
optional uint32 wb_cqi = 1;
optional uint32 sb_cqi = 2;
optional uint32 bandwidth_part_index = 3;
optional uint32 sb_index = 4;
}
// CSI type P21
message flex_csi_p21 {
repeated uint32 wb_cqi = 1;
optional uint32 wb_pmi = 2;
repeated uint32 sb_cqi = 3;
optional uint32 badwidth_part_index = 4;
optional uint32 sb_index = 5;
}
// CSI type A12
message flex_csi_a12 {
repeated uint32 wb_cqi = 1;
repeated uint32 sb_pmi = 2;
}
// CSI type A22
message flex_csi_a22 {
repeated uint32 wb_cqi = 1;
repeated uint32 sb_cqi = 2;
optional uint32 wb_pmi = 3;
optional uint32 sb_pmi = 4;
repeated uint32 sb_list = 5;
}
// CSI type A20
message flex_csi_a20 {
optional uint32 wb_cqi = 1;
optional uint32 sb_cqi = 2;
repeated uint32 sb_list = 3;
}
// CSI type A30
message flex_csi_a30 {
optional uint32 wb_cqi = 1;
repeated uint32 sb_cqi = 2;
}
// CSI type A31
message flex_csi_a31 {
repeated uint32 wb_cqi = 1;
repeated flex_msb_cqi sb_cqi = 2;
optional uint32 wb_pmi = 3;
}
// The CQI for the M-preffered subband
message flex_msb_cqi {
repeated uint32 sb_cqi = 1;
}
// The CSI report of the UE for a specific servCellIndex
message flex_dl_csi {
optional uint32 serv_cell_index = 1;
optional uint32 ri = 2;
optional flex_csi_type type = 3;
oneof report {
flex_csi_p10 p10csi = 4;
flex_csi_p11 p11csi = 5;
flex_csi_p20 p20csi = 6;
flex_csi_p21 p21csi = 7;
flex_csi_a12 a12csi = 8;
flex_csi_a22 a22csi = 9;
flex_csi_a20 a20csi = 10;
flex_csi_a30 a30csi = 11;
flex_csi_a31 a31csi = 12;
}
}
// The full DL CQI report for all CC of a UE
message flex_dl_cqi_report {
optional uint32 sfn_sn = 1;
repeated flex_dl_csi csi_report = 2;
}
// Paging message info
message flex_paging_info {
optional uint32 paging_index = 1;
optional uint32 paging_message_size = 2;
optional uint32 paging_subframe = 3;
optional uint32 carrier_index = 4;
}
// Report for the paging buffer status
message flex_paging_buffer_report {
repeated flex_paging_info paging_info = 1;
}
// The type of UL CQI
enum flex_ul_cqi_type {
FLUCT_SRS = 0;
FLUCT_PUSCH = 1;
FLUCT_PUCCH_1 = 2;
FLUCT_PUCCH_2 = 3;
FLUCT_PRACH = 4;
}
// UL CQI report for a specific UE for a given report type
message flex_ul_cqi {
optional flex_ul_cqi_type type = 1;
repeated uint32 sinr = 2;
optional uint32 serv_cell_index = 3;
}
// Full UL CQI report for a specific UE
message flex_ul_cqi_report {
optional uint32 sfn_sn = 1;
repeated flex_ul_cqi cqi_meas = 2;
repeated flex_pucch_dbm pucch_dbm = 3;
}
message flex_pucch_dbm {
optional int32 p0_pucch_dbm = 1;
optional uint32 serv_cell_index = 2;
}
//
// Cell related statistics
//
// The UL noise and interference report for a UE
message flex_noise_interference_report {
optional uint32 sfn_sf = 1;
optional uint32 rip = 2;
optional uint32 tnp = 3;
optional int32 p0_nominal_pucch = 4;
}
package protocol;
//import "header.proto";
import "stats_common.proto";
//
// Bodies of statistics report requests
//
message flex_complete_stats_request {
optional flex_stats_report_freq report_frequency = 1;
optional uint32 sf = 2;
optional uint32 cell_report_flags = 3;
optional uint32 ue_report_flags = 4;
}
message flex_cell_stats_request {
repeated uint32 cell = 1;
optional uint32 flags = 2;
}
message flex_ue_stats_request {
repeated uint32 rnti = 1;
optional uint32 flags = 2;
}
//
// Bodies of statistics reports
//
// The full statistics report for a specific cell
message flex_cell_stats_report {
optional uint32 carrier_index = 1;
optional uint32 flags = 2;
optional flex_noise_interference_report noise_inter_report = 3;
}
// Statistics report for a specific UE
message flex_ue_stats_report {
optional uint32 rnti = 1;
optional uint32 flags = 2;
repeated uint32 bsr = 3;
optional uint32 phr = 4;
repeated flex_rlc_bsr rlc_report = 5;
optional uint32 pending_mac_ces = 6;
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;
}
//
// Types of statistics related enums
//
//Types of statistics requested by the controller
enum flex_stats_type {
FLST_COMPLETE_STATS = 0;
FLST_CELL_STATS = 1;
FLST_UE_STATS = 2;
}
// Report frequency for the requested statistics
enum flex_stats_report_freq {
FLSRF_ONCE = 0;
FLSRF_PERIODICAL = 1;
FLSRF_CONTINUOUS = 2;
FLSRF_OFF = 3;
}
// Flags for cell statistics
enum flex_cell_stats_type {
FLCST_NOISE_INTERFERENCE = 1;
}
// Flags for UE-related statistics
enum flex_ue_stats_type {
FLUST_BSR = 1;
FLUST_PRH = 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
package protocol;
enum flex_harq_status {
FLHS_ACK = 0;
FLHS_NACK = 1;
FLHS_DTX = 2;
}
enum flex_reception_status {
FLRS_OK = 0;
FLRS_NOT_OK = 1;
FLRS_NOT_VALID = 2;
}
message flex_dl_info {
optional uint32 rnti = 1;
optional uint32 harq_process_id = 2;
repeated uint32 harq_status = 3;
optional uint32 serv_cell_index = 4;
}
message flex_ul_info {
optional uint32 rnti = 1;
repeated uint32 ul_reception = 2;
optional uint32 reception_status = 3;
optional uint32 tpc = 4;
optional uint32 serv_cell_index = 5;
}
......@@ -49,6 +49,10 @@
# include "gtpv1u_eNB_task.h"
# endif
#if defined(FLEXRAN_AGENT_SB_IF)
# include "flexran_agent.h"
#endif
extern unsigned char NB_eNB_INST;
#endif
......@@ -287,7 +291,7 @@ void *eNB_app_task(void *args_p)
itti_mark_task_ready (TASK_ENB_APP);
# if defined(ENABLE_USE_MME)
# if defined(ENABLE_ITTI)
# if defined(OAI_EMU)
enb_nb = oai_emulation.info.nb_enb_local;
enb_id_start = oai_emulation.info.first_enb_local;
......@@ -297,7 +301,7 @@ void *eNB_app_task(void *args_p)
"Last eNB index is greater or equal to maximum eNB index (%d/%d)!",
enb_id_end, NUMBER_OF_eNB_MAX);
# endif
# endif
# endif
enb_properties_p = enb_config_get();
......@@ -310,6 +314,14 @@ void *eNB_app_task(void *args_p)
configure_rrc(enb_id, enb_properties_p);
}
#if defined (FLEXRAN_AGENT_SB_IF)
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
printf("\n start enb agent %d\n", enb_id);
flexran_agent_start(enb_id, enb_properties_p);
}
#endif
# if defined(ENABLE_USE_MME)
/* Try to register each eNB */
registered_enb = 0;
......
......@@ -190,6 +190,12 @@
#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U "ENB_IPV4_ADDRESS_FOR_S1U"
#define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U "ENB_PORT_FOR_S1U"
#define ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG "NETWORK_CONTROLLER"
#define ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME "FLEXRAN_AGENT_INTERFACE_NAME"
#define ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS "FLEXRAN_AGENT_IPV4_ADDRESS"
#define ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT "FLEXRAN_AGENT_PORT"
#define ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE "FLEXRAN_AGENT_CACHE"
#define ENB_CONFIG_STRING_RRH_GW_CONFIG "rrh_gw_config"
#define ENB_CONFIG_STRING_RRH_GW_LOCAL_IF_NAME "local_if_name"
#define ENB_CONFIG_STRING_RRH_GW_LOCAL_ADDRESS "local_address"
......@@ -335,6 +341,15 @@ void enb_config_display(void)
}
}
#if defined(FLEXRAN_AGENT_SB_IF)
printf( "\nFLEXRAN AGENT CONFIG : \n\n");
printf( "\tInterface name: \t%s:\n",enb_properties.properties[i]->flexran_agent_interface_name);
printf( "\tInterface IP Address: \t%s:\n",enb_properties.properties[i]->flexran_agent_ipv4_address);
printf( "\tInterface PORT: \t%d:\n\n",enb_properties.properties[i]->flexran_agent_port);
printf( "\tCache directory: \t%s:\n",enb_properties.properties[i]->flexran_agent_cache);
#endif
for (j=0; j< enb_properties.properties[i]->nb_cc; j++) {
// CC_ID node function/timing
printf( "\n\tnode_function for CC %d: \t%s:\n",j,eNB_functions[enb_properties.properties[i]->cc_node_function[j]]);
......@@ -659,6 +674,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
char *address = NULL;
char *cidr = NULL;
char *astring = NULL;
char* flexran_agent_interface_name = NULL;
char* flexran_agent_ipv4_address = NULL;
libconfig_int flexran_agent_port = 0;
char* flexran_agent_cache = NULL;
libconfig_int otg_ue_id = 0;
char* otg_app_type = NULL;
char* otg_bg_traffic = NULL;
......@@ -2456,6 +2475,35 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
}
}
}
// Network Controller
subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG);
if (subsetting != NULL) {
if ( (
config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME,
(const char **)&flexran_agent_interface_name)
&& config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS,
(const char **)&flexran_agent_ipv4_address)
&& config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT,
&flexran_agent_port)
&& config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE,
(const char **)&flexran_agent_cache)
)
) {
enb_properties.properties[enb_properties_index]->flexran_agent_interface_name = strdup(flexran_agent_interface_name);
cidr = flexran_agent_ipv4_address;
address = strtok(cidr, "/");
enb_properties.properties[enb_properties_index]->flexran_agent_ipv4_address = strdup(address);
/* if (address) {
IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties.properties[enb_properties_index]->flexran_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" );
}*/
enb_properties.properties[enb_properties_index]->flexran_agent_port = flexran_agent_port;
enb_properties.properties[enb_properties_index]->flexran_agent_cache = strdup(flexran_agent_cache);
}
}
// OTG _CONFIG
setting_otg = config_setting_get_member (setting_enb, ENB_CONF_STRING_OTG_CONFIG);
......
......@@ -228,6 +228,10 @@ typedef struct Enb_properties_s {
char *enb_interface_name_for_S1_MME;
in_addr_t enb_ipv4_address_for_S1_MME;
char *flexran_agent_interface_name;
in_addr_t flexran_agent_ipv4_address;
tcp_udp_port_t flexran_agent_port;
char *flexran_agent_cache;
/* Nb of RRH to connect to */
uint8_t nb_rrh_gw;
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file flexran_agent.h
* \brief top level flexran agent receive thread and itti task
* \author Xenofon Foukas and Navid Nikaein
* \date 2016
* \version 0.1
*/
#include "flexran_agent_common.h"
#include "log.h"
#include "flexran_agent.h"
#include "flexran_agent_mac_defs.h"
#include "flexran_agent_extern.h"
#include "assertions.h"
#include "flexran_agent_net_comm.h"
#include "flexran_agent_async.h"
//#define TEST_TIMER
flexran_agent_instance_t flexran_agent[NUM_MAX_ENB];
char in_ip[40];
static uint16_t in_port;
char local_cache[40];
void *send_thread(void *args);
void *receive_thread(void *args);
pthread_t new_thread(void *(*f)(void *), void *b);
Protocol__FlexranMessage *flexran_agent_timeout(void* args);
int agent_task_created = 0;
/*
* enb agent task mainly wakes up the tx thread for periodic and oneshot messages to the controller
* and can interact with other itti tasks
*/
void *flexran_agent_task(void *args){
//flexran_agent_instance_t *d = (flexran_agent_instance_t *) args;
Protocol__FlexranMessage *msg;
void *data;
int size;
err_code_t err_code;
int priority;
MessageDef *msg_p = NULL;
const char *msg_name = NULL;
instance_t instance;
int result;
struct flexran_agent_timer_element_s * elem = NULL;
itti_mark_task_ready(TASK_FLEXRAN_AGENT);
do {
// Wait for a message
itti_receive_msg (TASK_FLEXRAN_AGENT, &msg_p);
DevAssert(msg_p != NULL);
msg_name = ITTI_MSG_NAME (msg_p);
instance = ITTI_MSG_INSTANCE (msg_p);
switch (ITTI_MSG_ID(msg_p)) {
case TERMINATE_MESSAGE:
itti_exit_task ();
break;
case MESSAGE_TEST:
LOG_I(FLEXRAN_AGENT, "Received %s\n", ITTI_MSG_NAME(msg_p));
break;
case TIMER_HAS_EXPIRED:
msg = flexran_agent_process_timeout(msg_p->ittiMsg.timer_has_expired.timer_id, msg_p->ittiMsg.timer_has_expired.arg);
if (msg != NULL){
data=flexran_agent_pack_message(msg,&size);
elem = get_timer_entry(msg_p->ittiMsg.timer_has_expired.timer_id);
if (flexran_agent_msg_send(elem->agent_id, FLEXRAN_AGENT_DEFAULT, data, size, priority)) {
err_code = PROTOCOL__FLEXRAN_ERR__MSG_ENQUEUING;
goto error;
}
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
}
break;
default:
LOG_E(FLEXRAN_AGENT, "Received unexpected message %s\n", msg_name);
break;
}
result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
continue;
error:
LOG_E(FLEXRAN_AGENT,"flexran_agent_task: error %d occured\n",err_code);
} while (1);
return NULL;
}
void *receive_thread(void *args) {
flexran_agent_instance_t *d = args;
void *data;
int size;
int priority;
err_code_t err_code;
Protocol__FlexranMessage *msg;
while (1) {
while (flexran_agent_msg_recv(d->enb_id, FLEXRAN_AGENT_DEFAULT, &data, &size, &priority) == 0) {
LOG_D(FLEXRAN_AGENT,"received message with size %d\n", size);
// Invoke the message handler
msg=flexran_agent_handle_message(d->enb_id, data, size);
free(data);
// check if there is something to send back to the controller
if (msg != NULL){
data=flexran_agent_pack_message(msg,&size);
if (flexran_agent_msg_send(d->enb_id, FLEXRAN_AGENT_DEFAULT, data, size, priority)) {
err_code = PROTOCOL__FLEXRAN_ERR__MSG_ENQUEUING;
goto error;
}
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
}
}
}
return NULL;
error:
LOG_E(FLEXRAN_AGENT,"receive_thread: error %d occured\n",err_code);
return NULL;
}
/* utility function to create a thread */
pthread_t new_thread(void *(*f)(void *), void *b) {
pthread_t t;
pthread_attr_t att;
if (pthread_attr_init(&att)){
fprintf(stderr, "pthread_attr_init err\n");
exit(1);
}
struct sched_param sched_param_recv_thread;
sched_param_recv_thread.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1;
pthread_attr_setschedparam(&att, &sched_param_recv_thread);
pthread_attr_setschedpolicy(&att, SCHED_FIFO);
if (pthread_attr_setdetachstate(&att, PTHREAD_CREATE_DETACHED)) {
fprintf(stderr, "pthread_attr_setdetachstate err\n");
exit(1);
}
if (pthread_create(&t, &att, f, b)) {
fprintf(stderr, "pthread_create err\n");
exit(1);
}
if (pthread_attr_destroy(&att)) {
fprintf(stderr, "pthread_attr_destroy err\n");
exit(1);
}
return t;
}
int channel_container_init = 0;
int flexran_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properties){
int channel_id;
flexran_set_enb_vars(mod_id, RAN_LTE_OAI);
flexran_agent[mod_id].enb_id = mod_id;
/*
* check the configuration
*/
if (enb_properties->properties[mod_id]->flexran_agent_cache != NULL) {
strncpy(local_cache, enb_properties->properties[mod_id]->flexran_agent_cache, sizeof(local_cache));
local_cache[sizeof(local_cache) - 1] = 0;
} else {
strcpy(local_cache, DEFAULT_FLEXRAN_AGENT_CACHE);
}
if (enb_properties->properties[mod_id]->flexran_agent_ipv4_address != NULL) {
strncpy(in_ip, enb_properties->properties[mod_id]->flexran_agent_ipv4_address, sizeof(in_ip) );
in_ip[sizeof(in_ip) - 1] = 0; // terminate string
} else {
strcpy(in_ip, DEFAULT_FLEXRAN_AGENT_IPv4_ADDRESS );
}
if (enb_properties->properties[mod_id]->flexran_agent_port != 0 ) {
in_port = enb_properties->properties[mod_id]->flexran_agent_port;
} else {
in_port = DEFAULT_FLEXRAN_AGENT_PORT ;
}
LOG_I(FLEXRAN_AGENT,"starting enb agent client for module id %d on ipv4 %s, port %d\n",
flexran_agent[mod_id].enb_id,
in_ip,
in_port);
/*
* Initialize the channel container
*/
if (!channel_container_init) {
flexran_agent_init_channel_container();
channel_container_init = 1;
}
/*Create the async channel info*/
flexran_agent_instance_t *channel_info = flexran_agent_async_channel_info(mod_id, in_ip, in_port);
/*Create a channel using the async channel info*/
channel_id = flexran_agent_create_channel((void *) channel_info,
flexran_agent_async_msg_send,
flexran_agent_async_msg_recv,
flexran_agent_async_release);
if (channel_id <= 0) {
goto error;
}
flexran_agent_channel_t *channel = get_channel(channel_id);
if (channel == NULL) {
goto error;
}
/*Register the channel for all underlying agents (use FLEXRAN_AGENT_MAX)*/
flexran_agent_register_channel(mod_id, channel, FLEXRAN_AGENT_MAX);
/*Example of registration for a specific agent(MAC):
*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);
new_thread(receive_thread, &flexran_agent[mod_id]);
/*Initialize and register the mac xface. Must be modified later
*for more flexibility in agent management */
AGENT_MAC_xface *mac_agent_xface = (AGENT_MAC_xface *) malloc(sizeof(AGENT_MAC_xface));
flexran_agent_register_mac_xface(mod_id, mac_agent_xface);
/*
* initilize a timer
*/
flexran_agent_init_timer();
/*
* Initialize the mac agent
*/
flexran_agent_init_mac_agent(mod_id);
/*
* start the enb agent task for tx and interaction with the underlying network function
*/
if (!agent_task_created) {
if (itti_create_task (TASK_FLEXRAN_AGENT, flexran_agent_task, (void *) &flexran_agent[mod_id]) < 0) {
LOG_E(FLEXRAN_AGENT, "Create task for FlexRAN Agent failed\n");
return -1;
}
agent_task_created = 1;
}
LOG_I(FLEXRAN_AGENT,"client ends\n");
return 0;
error:
LOG_I(FLEXRAN_AGENT,"there was an error\n");
return 1;
}
Protocol__FlexranMessage *flexran_agent_timeout(void* args){
// flexran_agent_timer_args_t *timer_args = calloc(1, sizeof(*timer_args));
//memcpy (timer_args, args, sizeof(*timer_args));
flexran_agent_timer_args_t *timer_args = (flexran_agent_timer_args_t *) args;
LOG_I(FLEXRAN_AGENT, "flexran_agent %d timeout\n", timer_args->mod_id);
//LOG_I(FLEXRAN_AGENT, "eNB action %d ENB flags %d \n", timer_args->cc_actions,timer_args->cc_report_flags);
//LOG_I(FLEXRAN_AGENT, "UE action %d UE flags %d \n", timer_args->ue_actions,timer_args->ue_report_flags);
return NULL;
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file flexran_agent.h
* \brief top level flexran agent
* \author Navid Nikaein and Xenofon Foukas
* \date 2016
* \version 0.1
*/
#ifndef FLEXRAN_AGENT_H_
#define FLEXRAN_AGENT_H_
#include "enb_config.h" // for enb properties
#include "flexran_agent_common.h"
/* Initiation and termination of the eNodeB agent */
int flexran_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properties);
int flexran_agent_stop(mid_t mod_id);
/*
* enb agent task mainly wakes up the tx thread for periodic and oneshot messages to the controller
* and can interact with other itti tasks
*/
void *flexran_agent_task(void *args);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -462,6 +462,13 @@ typedef struct {
//
uint32_t total_ulsch_pdus_rx;
/// MAC agent-related stats
/// total number of scheduling decisions
int sched_decisions;
/// missed deadlines
int missed_deadlines;
} eNB_STATS;
/*! \brief eNB statistics for the connected UEs*/
typedef struct {
......@@ -602,6 +609,12 @@ typedef struct {
/// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
boolean_t configured;
/// MCS from last scheduling
uint8_t mcs[8];
/// TPC from last scheduling
uint8_t oldTPC[8];
// PHY interface info
/// DCI format for DLSCH
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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