Add FlexRAN PHY CM
This commit is contained in:
@@ -825,6 +825,7 @@ include_directories("${OPENAIR_DIR}/targets/COMMON")
|
||||
include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON")
|
||||
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/")
|
||||
include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/DEFS")
|
||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PHY")
|
||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/MAC")
|
||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/RRC")
|
||||
include_directories("${OPENAIR2_DIR}/ENB_APP/CONTROL_MODULES/PDCP")
|
||||
@@ -916,6 +917,7 @@ add_library(FLEXRAN_AGENT
|
||||
${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/PHY/flexran_agent_phy.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/CONTROL_MODULES/PDCP/flexran_agent_pdcp.c
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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.1 (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_phy.c
|
||||
* \brief FlexRAN agent Control Module PHY
|
||||
* \author Robert Schmidt
|
||||
* \date Oct 2018
|
||||
*/
|
||||
|
||||
#include "flexran_agent_phy.h"
|
||||
|
||||
/* Array containing the Agent-PHY interfaces */
|
||||
AGENT_PHY_xface *agent_phy_xface[NUM_MAX_ENB];
|
||||
|
||||
int flexran_agent_register_phy_xface(mid_t mod_id)
|
||||
{
|
||||
if (agent_phy_xface[mod_id]) {
|
||||
LOG_E(PHY, "PHY agent for eNB %d is already registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
AGENT_PHY_xface *xface = malloc(sizeof(AGENT_PHY_xface));
|
||||
if (!xface) {
|
||||
LOG_E(FLEXRAN_AGENT, "could not allocate memory for PHY agent xface %d\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
agent_phy_xface[mod_id] = xface;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int flexran_agent_unregister_phy_xface(mid_t mod_id)
|
||||
{
|
||||
if (!agent_phy_xface[mod_id]) {
|
||||
LOG_E(FLEXRAN_AGENT, "PHY agent for eNB %d is not registered\n", mod_id);
|
||||
return -1;
|
||||
}
|
||||
free(agent_phy_xface[mod_id]);
|
||||
agent_phy_xface[mod_id] = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id)
|
||||
{
|
||||
return agent_phy_xface[mod_id];
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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.1 (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_phy.h
|
||||
* \brief FlexRAN agent Control Module PHY header
|
||||
* \author Robert Schmidt
|
||||
* \date Oct 2018
|
||||
*/
|
||||
|
||||
#ifndef FLEXRAN_AGENT_PHY_H_
|
||||
#define FLEXRAN_AGENT_PHY_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_defs.h"
|
||||
#include "flexran_agent_phy_defs.h"
|
||||
#include "flexran_agent_ran_api.h"
|
||||
// for flexran_agent_get_phy_xface()
|
||||
#include "flexran_agent_extern.h"
|
||||
|
||||
/**********************************
|
||||
* FlexRAN agent - technology PHY API
|
||||
**********************************/
|
||||
|
||||
/* Register technology specific interface callbacks */
|
||||
int flexran_agent_register_phy_xface(mid_t mod_id);
|
||||
|
||||
/* Unregister technology specific callbacks */
|
||||
int flexran_agent_unregister_phy_xface(mid_t mod_id);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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.1 (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
|
||||
*/
|
||||
#ifndef __FLEXRAN_AGENT_PHY_PRIMITIVES_H__
|
||||
#define __FLEXRAN_AGENT_PHY_PRIMITIVES_H__
|
||||
|
||||
#include "flexran_agent_defs.h"
|
||||
#include "flexran.pb-c.h"
|
||||
#include "header.pb-c.h"
|
||||
|
||||
/* FLEXRAN AGENT-PHY Interface */
|
||||
typedef struct {
|
||||
|
||||
/* currently empty, will be used to control RU */
|
||||
|
||||
} AGENT_PHY_xface;
|
||||
|
||||
#endif /* __FLEXRAN_AGENT_PHY_PRIMITIVES_H__ */
|
||||
@@ -231,6 +231,8 @@ int flexran_agent_start(mid_t mod_id)
|
||||
new_thread(receive_thread, flexran);
|
||||
|
||||
/* Register and initialize the control modules */
|
||||
flexran_agent_register_phy_xface(mod_id);
|
||||
|
||||
flexran_agent_register_mac_xface(mod_id);
|
||||
flexran_agent_init_mac_agent(mod_id);
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "flexran_agent_defs.h"
|
||||
#include "flexran_agent_net_comm.h"
|
||||
#include "flexran_agent_ran_api.h"
|
||||
#include "flexran_agent_phy.h"
|
||||
#include "flexran_agent_mac.h"
|
||||
#include "flexran_agent_rrc.h"
|
||||
#include "flexran_agent_pdcp.h"
|
||||
|
||||
@@ -31,10 +31,14 @@
|
||||
#define __FLEXRAN_AGENT_EXTERN_H__
|
||||
|
||||
#include "flexran_agent_defs.h"
|
||||
#include "flexran_agent_phy_defs.h"
|
||||
#include "flexran_agent_mac_defs.h"
|
||||
#include "flexran_agent_rrc_defs.h"
|
||||
#include "flexran_agent_pdcp_defs.h"
|
||||
|
||||
/* Control module interface for the communication of the PHY control module with the agent */
|
||||
AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id);
|
||||
|
||||
/* Control module interface for the communication of the MAC Control Module with the agent */
|
||||
AGENT_MAC_xface *flexran_agent_get_mac_xface(mid_t mod_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user