Commit cb8007bb authored by Xenofon Foukas's avatar Xenofon Foukas

Added support for enb agent MAC scheduler hot-plugging. Deactivated...

Added support for enb agent MAC scheduler hot-plugging. Deactivated schedule_ue_spec and added agent UE specific DL scheduler
parent 92f54765
......@@ -1007,6 +1007,7 @@ set (MAC_SRC
${MAC_DIR}/eNB_scheduler_RA.c
${MAC_DIR}/pre_processor.c
${MAC_DIR}/config.c
${MAC_DIR}/eNB_agent_scheduler_dlsch_ue.c
)
set (ENB_APP_SRC
......
......@@ -257,6 +257,12 @@ int enb_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properties){
new_thread(receive_thread, &enb_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));
enb_agent_register_mac_xface(mod_id, mac_agent_xface);
/*
* initilize a timer
*/
......
......@@ -44,7 +44,7 @@
//extern msg_context_t shared_ctxt[NUM_MAX_ENB][ENB_AGENT_MAX];
extern AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB][ENB_AGENT_MAX];
extern AGENT_MAC_xface *agent_mac_xface[NUM_MAX_ENB];
extern unsigned int mac_agent_registered[NUM_MAX_ENB];
......
......@@ -39,6 +39,8 @@
#include "enb_agent_common.h"
#include "enb_agent_mac_internal.h"
#include "LAYER2/MAC/proto.h"
#include "log.h"
......@@ -1158,6 +1160,7 @@ int enb_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
xface->enb_agent_send_sr_info = enb_agent_send_sr_info;
xface->enb_agent_send_sf_trigger = enb_agent_send_sf_trigger;
xface->enb_agent_send_update_mac_stats = enb_agent_send_update_mac_stats;
xface->enb_agent_schedule_ue_spec = schedule_ue_spec_default;
mac_agent_registered[mod_id] = 1;
......@@ -1172,6 +1175,7 @@ int enb_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
xface->enb_agent_send_sr_info = NULL;
xface->enb_agent_send_sf_trigger = NULL;
xface->enb_agent_send_update_mac_stats = NULL;
xface->enb_agent_schedule_ue_spec = NULL;
mac_agent_registered[mod_id] = 0;
agent_mac_xface[mod_id] = NULL;
......
......@@ -54,6 +54,13 @@ typedef struct {
/// based on the stats request configuration
void (*enb_agent_send_update_mac_stats)(mid_t mod_id);
/// Run the UE DL scheduler and fill the Protocol__ProgranMessage. Assumes that
/// dl_info is already initialized as prp_dl_mac_config and fills the
/// prp_dl_data part of it
void (*enb_agent_schedule_ue_spec)(mid_t mod_id, uint32_t frame, uint32_t subframe,
unsigned int *nb_rb_used, unsigned int *nCCE_used,
int *mbsfn_flag, Protocol__ProgranMessage *dl_info);
/*TODO: Fill in with the rest of the MAC layer technology specific callbacks (UL/DL scheduling, RACH info etc)*/
} AGENT_MAC_xface;
......
This diff is collapsed.
This diff is collapsed.
......@@ -35,6 +35,11 @@
*/
#ifndef __LAYER2_MAC_PROTO_H__
#define __LAYER2_MAC_PROTO_H__
#include "enb_agent_defs.h"
#include "header.pb-c.h"
#include "progran.pb-c.h"
/** \addtogroup _mac
* @{
*/
......@@ -139,6 +144,11 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,u
*/
void schedule_ue_spec(module_id_t module_idP,frame_t frameP,sub_frame_t subframe,unsigned int *nb_rb_used0,unsigned int *nCCE_used,int *mbsfn_flag);
//To be used by the agent
void schedule_ue_spec_default(mid_t mod_id, uint32_t frame, uint32_t subframe,
unsigned int *nb_rb_used, unsigned int *nCCE_used,
int *mbsfn_flag, Protocol__ProgranMessage *dl_info);
/** \brief Function for UE/PHY to compute PUSCH transmit power in power-control procedure.
@param Mod_id Module id of UE
@returns Po_NOMINAL_PUSCH (PREAMBLE_RECEIVED_TARGET_POWER+DELTA_PREAMBLE
......
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