Merge branch 'develop' into dlsch_scheduler_opti
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/*
|
||||
* intertask_interface_conf.h
|
||||
*
|
||||
* Created on: Oct 21, 2013
|
||||
* Author: winckel
|
||||
*/
|
||||
|
||||
#ifndef INTERTASK_INTERFACE_CONF_H_
|
||||
#define INTERTASK_INTERFACE_CONF_H_
|
||||
|
||||
/*******************************************************************************
|
||||
* Intertask Interface Constants
|
||||
******************************************************************************/
|
||||
|
||||
#define ITTI_PORT (10006)
|
||||
|
||||
/* This is the queue size for signal dumper */
|
||||
#define ITTI_QUEUE_MAX_ELEMENTS (10 * 1000)
|
||||
#define ITTI_DUMP_MAX_CON (5) /* Max connections in parallel */
|
||||
|
||||
#endif /* INTERTASK_INTERFACE_CONF_H_ */
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/*
|
||||
* messages_types.h
|
||||
*
|
||||
* Created on: Oct 14, 2013
|
||||
* Author: winckel
|
||||
*/
|
||||
|
||||
#ifndef MESSAGES_TYPES_H_
|
||||
#define MESSAGES_TYPES_H_
|
||||
|
||||
#include "intertask_messages_types.h"
|
||||
#include "timer_messages_types.h"
|
||||
|
||||
#include "phy_messages_types.h"
|
||||
#include "mac_messages_types.h"
|
||||
#include "rlc_messages_types.h"
|
||||
#include "pdcp_messages_types.h"
|
||||
#include "rrc_messages_types.h"
|
||||
#include "nas_messages_types.h"
|
||||
#if ENABLE_RAL
|
||||
#include "ral_messages_types.h"
|
||||
#endif
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "x2ap_messages_types.h"
|
||||
#include "sctp_messages_types.h"
|
||||
#include "udp_messages_types.h"
|
||||
#include "gtpv1_u_messages_types.h"
|
||||
|
||||
#endif /* MESSAGES_TYPES_H_ */
|
||||
@@ -28,11 +28,7 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef CMAKER
|
||||
#include "LTE_asn_constant.h"
|
||||
#else
|
||||
#include "RRC/LTE/MESSAGES/asn1_constants.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLATFORM_CONSTANTS_H__
|
||||
# define __PLATFORM_CONSTANTS_H__
|
||||
|
||||
@@ -32,11 +32,7 @@
|
||||
#include "as_message.h"
|
||||
#include "rrc_types.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
#ifdef CMAKER
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
#else
|
||||
#include "RRC/LTE/MESSAGES/LTE_SystemInformationBlockType2.h"
|
||||
#endif
|
||||
#include "LTE_SL-OffsetIndicator-r12.h"
|
||||
#include "LTE_SubframeBitmapSL-r12.h"
|
||||
#include "LTE_SL-CP-Len-r12.h"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
ENB_APP_DIR = $(OPENAIR2_TOP)/ENB_APP
|
||||
|
||||
ENB_APP_OBJS = $(ENB_APP_DIR)/enb_app.o \
|
||||
$(ENB_APP_DIR)/enb_config.o
|
||||
ENB_APP_incl = \
|
||||
-I$(ENB_APP_DIR) -I$(OPENAIR2_TOP)
|
||||
|
||||
@@ -40,12 +40,8 @@
|
||||
#include "PHY/impl_defs_lte.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
#ifdef CMAKER
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
#include "rrc_messages_types.h"
|
||||
#else
|
||||
#include "RRC/LTE/MESSAGES/LTE_SystemInformationBlockType2.h"
|
||||
#endif
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include <intertask_interface.h>
|
||||
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#define UL_RB_ALLOC mac_xface->computeRIV(mac_xface->frame_parms->N_RB_UL,0,24)
|
||||
#define BCCH_RB_ALLOC mac_xface->computeRIV(mac_xface->frame_parms->N_RB_UL,0,4)
|
||||
#define RA_RB_ALLOC mac_xface->computeRIV(mac_xface->frame_parms->N_RB_UL,0,4)
|
||||
#define DLSCH_RB_ALLOC 0x1fff
|
||||
#include "extern.h"
|
||||
|
||||
|
||||
void init_transport_channels(unsigned char transmission_mode)
|
||||
{
|
||||
|
||||
// init DCI structures for testing
|
||||
|
||||
UL_alloc_pdu.type = 0;
|
||||
UL_alloc_pdu.hopping = 0;
|
||||
UL_alloc_pdu.rballoc = UL_RB_ALLOC;
|
||||
UL_alloc_pdu.mcs = 2;
|
||||
UL_alloc_pdu.ndi = 1;
|
||||
UL_alloc_pdu.TPC = 0;
|
||||
UL_alloc_pdu.cqi_req = 1;
|
||||
|
||||
/*
|
||||
BCCH_alloc_pdu.type = 1;
|
||||
BCCH_alloc_pdu.vrb_type = 0;
|
||||
BCCH_alloc_pdu.rballoc = BCCH_RB_ALLOC;
|
||||
BCCH_alloc_pdu.ndi = 1;
|
||||
BCCH_alloc_pdu.rv = 1;
|
||||
BCCH_alloc_pdu.mcs = 1;
|
||||
BCCH_alloc_pdu.harq_pid = 0;
|
||||
BCCH_alloc_pdu.TPC = 1; // set to 3 PRB
|
||||
|
||||
// for FDD mode
|
||||
BCCH_alloc_pdu_fdd.type = 1;
|
||||
BCCH_alloc_pdu_fdd.vrb_type = 0;
|
||||
BCCH_alloc_pdu_fdd.rballoc = BCCH_RB_ALLOC;
|
||||
BCCH_alloc_pdu_fdd.ndi = 1;
|
||||
BCCH_alloc_pdu_fdd.rv = 1;
|
||||
BCCH_alloc_pdu_fdd.mcs = 1;
|
||||
BCCH_alloc_pdu_fdd.harq_pid = 0;
|
||||
BCCH_alloc_pdu_fdd.TPC = 1; // set to 3 PRB
|
||||
*/
|
||||
|
||||
DLSCH_alloc_pdu1A.type = 1;
|
||||
DLSCH_alloc_pdu1A.vrb_type = 0;
|
||||
DLSCH_alloc_pdu1A.rballoc = BCCH_RB_ALLOC;
|
||||
DLSCH_alloc_pdu1A.ndi = 1;
|
||||
DLSCH_alloc_pdu1A.rv = 1;
|
||||
DLSCH_alloc_pdu1A.mcs = 2;
|
||||
DLSCH_alloc_pdu1A.harq_pid = 0;
|
||||
DLSCH_alloc_pdu1A.TPC = 1; // set to 3 PRB
|
||||
|
||||
DLSCH_alloc_pdu1A_fdd.type = 1;
|
||||
DLSCH_alloc_pdu1A_fdd.vrb_type = 0;
|
||||
DLSCH_alloc_pdu1A_fdd.rballoc = BCCH_RB_ALLOC;
|
||||
DLSCH_alloc_pdu1A_fdd.ndi = 1;
|
||||
DLSCH_alloc_pdu1A_fdd.rv = 1;
|
||||
DLSCH_alloc_pdu1A_fdd.mcs = 2;
|
||||
DLSCH_alloc_pdu1A_fdd.harq_pid = 0;
|
||||
DLSCH_alloc_pdu1A_fdd.TPC = 1; // set to 3 PRB
|
||||
|
||||
RA_alloc_pdu.type = 1;
|
||||
RA_alloc_pdu.vrb_type = 0;
|
||||
RA_alloc_pdu.rballoc = RA_RB_ALLOC;
|
||||
RA_alloc_pdu.ndi = 1;
|
||||
RA_alloc_pdu.rv = 0;
|
||||
RA_alloc_pdu.mcs = 0;
|
||||
RA_alloc_pdu.harq_pid = 0;
|
||||
RA_alloc_pdu.TPC = 1;
|
||||
|
||||
RA_alloc_pdu_fdd.type = 1;
|
||||
RA_alloc_pdu_fdd.vrb_type = 0;
|
||||
RA_alloc_pdu_fdd.rballoc = RA_RB_ALLOC;
|
||||
RA_alloc_pdu_fdd.ndi = 1;
|
||||
RA_alloc_pdu_fdd.rv = 1;
|
||||
RA_alloc_pdu_fdd.mcs = 1;
|
||||
RA_alloc_pdu_fdd.harq_pid = 0;
|
||||
RA_alloc_pdu_fdd.TPC = 1;
|
||||
|
||||
|
||||
DLSCH_alloc_pdu1.rballoc = 0xf;
|
||||
DLSCH_alloc_pdu1.TPC = 0;
|
||||
DLSCH_alloc_pdu1.dai = 0;
|
||||
DLSCH_alloc_pdu1.harq_pid = 0;
|
||||
DLSCH_alloc_pdu1.tb_swap = 0;
|
||||
DLSCH_alloc_pdu1.mcs1 = 4;
|
||||
DLSCH_alloc_pdu1.ndi1 = 1;
|
||||
DLSCH_alloc_pdu1.rv1 = 0;
|
||||
|
||||
// Forget second codeword
|
||||
if (transmission_mode == 6) {
|
||||
DLSCH_alloc_pdu1.tpmi = 5; // PUSCH_PRECODING0
|
||||
} else {
|
||||
DLSCH_alloc_pdu1.tpmi = 0;
|
||||
}
|
||||
|
||||
DLSCH_alloc_pdu2.rah = 0;
|
||||
DLSCH_alloc_pdu2.rballoc = DLSCH_RB_ALLOC;
|
||||
DLSCH_alloc_pdu2.TPC = 0;
|
||||
DLSCH_alloc_pdu2.dai = 0;
|
||||
DLSCH_alloc_pdu2.harq_pid = 0;
|
||||
DLSCH_alloc_pdu2.tb_swap = 0;
|
||||
DLSCH_alloc_pdu2.mcs1 = 4;
|
||||
DLSCH_alloc_pdu2.ndi1 = 1;
|
||||
DLSCH_alloc_pdu2.rv1 = 0;
|
||||
|
||||
// Forget second codeword
|
||||
if (transmission_mode == 6) {
|
||||
DLSCH_alloc_pdu2.tpmi = 5; // PUSCH_PRECODING0
|
||||
} else {
|
||||
DLSCH_alloc_pdu2.tpmi = 0;
|
||||
}
|
||||
}
|
||||
@@ -2070,7 +2070,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
if (sdu_lengths[num_sdus]) {
|
||||
sdu_length_total += sdu_lengths[num_sdus];
|
||||
sdu_lcids[num_sdus] = lcid;
|
||||
LOG_D(MAC,
|
||||
LOG_I(MAC,
|
||||
"[UE %d] TX Multiplex RLC PDU TX Got %d bytes for LcId%d\n",
|
||||
module_idP, sdu_lengths[num_sdus], lcid);
|
||||
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
ifeq ($(OPENAIR2),1)
|
||||
EXTRA_CFLAGS += -DOPENAIR2
|
||||
endif
|
||||
EXTRA_CFLAGS += -DASSERT
|
||||
EXTRA_CFLAGS += -DNO_RRM
|
||||
|
||||
COMMON_DIR = $(OPENAIR2_TOP)/COMMON
|
||||
L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE
|
||||
RLC_UM_DIR = $(OPENAIR2_TOP)/LAYER2/RLC/UM_v9.3.0
|
||||
RLC_AM_DIR = $(OPENAIR2_TOP)/LAYER2/RLC/AM_v9.3.0
|
||||
RLC_TM_DIR = $(OPENAIR2_TOP)/LAYER2/RLC/TM_v9.3.0
|
||||
RLC_DIR = $(OPENAIR2_TOP)/LAYER2/RLC
|
||||
PDCP_DIR = $(OPENAIR2_TOP)/LAYER2/PDCP_v10.1.0
|
||||
PHY_INTERFACE_DIR = $(OPENAIR2_TOP)/PHY_INTERFACE
|
||||
RRC_DIR = $(OPENAIR2_TOP)/RRC/LITE
|
||||
L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE
|
||||
MAC_DIR = $(OPENAIR2_TOP)/LAYER2/MAC
|
||||
RRC_CELL_DIR = $(OPENAIR2_TOP)/RRC/CELLULAR
|
||||
|
||||
SOURCES_L2 += $(OPENAIR2_TOP)/LAYER2/openair2_proc.c
|
||||
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_fifo.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_sequence_manager.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_primitives.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_util.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_security.c
|
||||
SOURCES_L2 += $(PDCP_DIR)/pdcp_netlink.c
|
||||
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_init.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_timer_poll_retransmit.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_timer_reordering.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_timer_status_prohibit.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_segment.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_segments_holes.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_in_sdu.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_receiver.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_retransmit.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_windows.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_rx_list.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_reassembly.c
|
||||
SOURCES_L2 += $(RLC_AM_DIR)/rlc_am_status_report.c
|
||||
|
||||
|
||||
SOURCES_L2 += $(RLC_TM_DIR)/rlc_tm.c
|
||||
SOURCES_L2 += $(RLC_TM_DIR)/rlc_tm_init.c
|
||||
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_fsm.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_control_primitives.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_segment.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_reassembly.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_receiver.c
|
||||
SOURCES_L2 += $(RLC_UM_DIR)/rlc_um_dar.c
|
||||
|
||||
SOURCES_L2 += $(RLC_DIR)/rlc_mac.c
|
||||
SOURCES_L2 += $(RLC_DIR)/rlc.c
|
||||
SOURCES_L2 += $(RLC_DIR)/rlc_rrc.c
|
||||
SOURCES_L2 += $(RLC_DIR)/rlc_mpls.c
|
||||
|
||||
RRC_OBJS = $(RRC_DIR)/rrc_UE.o
|
||||
ifeq ($(ENABLE_RAL),1)
|
||||
RRC_OBJS += $(RRC_DIR)/rrc_UE_ral.o
|
||||
RRC_OBJS += $(RRC_DIR)/rrc_eNB_ral.o
|
||||
endif
|
||||
|
||||
RRC_OBJS += $(RRC_DIR)/rrc_eNB.o
|
||||
RRC_OBJS += $(RRC_DIR)/rrc_eNB_UE_context.o
|
||||
RRC_OBJS += $(RRC_DIR)/rrc_eNB_S1AP.o
|
||||
ifdef USE_MME
|
||||
RRC_OBJS += $(RRC_DIR)/rrc_eNB_GTPV1U.o
|
||||
endif
|
||||
RRC_OBJS += $(RRC_DIR)/rrc_common.o
|
||||
RRC_OBJS += $(RRC_DIR)/L2_interface.o
|
||||
|
||||
MAC_OBJS = $(MAC_DIR)/lte_transport_init.o
|
||||
MAC_OBJS += $(MAC_DIR)/main.o
|
||||
MAC_OBJS += $(MAC_DIR)/ue_procedures.o
|
||||
MAC_OBJS += $(MAC_DIR)/ra_procedures.o
|
||||
MAC_OBJS += $(MAC_DIR)/l1_helpers.o
|
||||
MAC_OBJS += $(MAC_DIR)/rar_tools.o
|
||||
MAC_OBJS += $(MAC_DIR)/eNB_scheduler.o
|
||||
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_dlsch.o
|
||||
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_ulsch.o
|
||||
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_mch.o
|
||||
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_bch.o
|
||||
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_primitives.o
|
||||
MAC_OBJS += $(MAC_DIR)/eNB_scheduler_RA.o
|
||||
MAC_OBJS += $(MAC_DIR)/pre_processor.o
|
||||
MAC_OBJS += $(MAC_DIR)/config.o
|
||||
|
||||
L2_INTERFACE_OBJS = $(L2_INTERFACE_DIR)/openair_rrc_L2_interface.o
|
||||
|
||||
L2_OBJS=$(addsuffix .o,$(basename $(SOURCES_L2))) $(PHY_INTERFACE_OBJS) $(MAC_OBJS) $(L2_INTERFACE_OBJS)
|
||||
|
||||
L2_incl = -I$(OPENAIR2_TOP)
|
||||
L2_incl = -I$(OPENAIR_DIR)/common/utils/msc
|
||||
L2_incl += -I$(COMMON_DIR)
|
||||
L2_incl += -I$(RLC_DIR)
|
||||
L2_incl += -I$(RLC_AM_DIR)
|
||||
L2_incl += -I$(RLC_UM_DIR)
|
||||
L2_incl += -I$(RLC_TM_DIR)
|
||||
L2_incl += -I$(PDCP_DIR)
|
||||
L2_incl += -I$(OPENAIR3)/MESH
|
||||
L2_incl += -I$(OPENAIR2_TOP)/RRC/LITE/MESSAGES
|
||||
L2_incl += -I$(OPENAIR3)/MESH/RRM
|
||||
|
||||
ifeq ($(rrc_cellular),1)
|
||||
include $(RRC_CELL_DIR)/Makefile.inc
|
||||
L2_OBJS += $(RRC_CELLULAR_OBJS)
|
||||
L2_incl += -I$(OPENAIR2_TOP)/RRC/CELLULAR
|
||||
EXTRA_CFLAGS += -DRRC_CELLULAR -DCELLULAR
|
||||
else
|
||||
L2_OBJS += $(RRC_OBJS)
|
||||
L2_incl += -I$(OPENAIR2_TOP)/RRC/LITE
|
||||
endif
|
||||
|
||||
@@ -182,6 +182,7 @@ boolean_t pdcp_data_req(
|
||||
(unsigned char*)&pdcp_pdu_p->data[0],
|
||||
sdu_buffer_sizeP);
|
||||
#endif
|
||||
LOG_D(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %d \n", srb_flagP, rb_idP);
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL, NULL
|
||||
@@ -366,6 +367,7 @@ boolean_t pdcp_data_req(
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)pdcp_pdu_p->data,pdcp_pdu_size,
|
||||
"[MSG] PDCP DL %s PDU on rb_id %d\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
|
||||
LOG_D(PDCP, "Before rlc_data_req 2, srb_flagP: %d, rb_idP: %d \n", srb_flagP, rb_idP);
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,sourceL2Id
|
||||
@@ -471,6 +473,7 @@ pdcp_data_ind(
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)sdu_buffer_pP->data,sdu_buffer_sizeP,
|
||||
"[MSG] PDCP UL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
|
||||
|
||||
#if T_TRACER
|
||||
if (ctxt_pP->enb_flag != ENB_FLAG_NO)
|
||||
T(T_ENB_PDCP_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_buffer_sizeP));
|
||||
@@ -800,13 +803,16 @@ pdcp_data_ind(
|
||||
} else {
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * LTE_maxDRB);
|
||||
}
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
|
||||
|
||||
//Panos: Commented this out because it cancels the assignment in #if defined(ENABLE_USE_MME) case
|
||||
//((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
|
||||
|
||||
#ifdef DEBUG_PDCP_FIFO_FLUSH_SDU
|
||||
static uint32_t pdcp_inst = 0;
|
||||
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = pdcp_inst++;
|
||||
LOG_D(PDCP, "inst=%d size=%d\n", ((pdcp_data_ind_header_t*) new_sdu_p->data)->inst, ((pdcp_data_ind_header_t *) new_sdu_p->data)->data_size);
|
||||
#endif
|
||||
//((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 1; //pdcp_inst++;
|
||||
|
||||
memcpy(&new_sdu_p->data[sizeof (pdcp_data_ind_header_t)], \
|
||||
&sdu_buffer_pP->data[payload_offset], \
|
||||
@@ -962,7 +968,7 @@ pdcp_run (
|
||||
RRC_DCCH_DATA_REQ (msg_p).frame,
|
||||
0,
|
||||
RRC_DCCH_DATA_REQ (msg_p).eNB_index);
|
||||
LOG_I(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
|
||||
LOG_D(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
|
||||
PROTOCOL_CTXT_ARGS(&ctxt),
|
||||
ITTI_MSG_NAME (msg_p),
|
||||
ITTI_MSG_ORIGIN_NAME(msg_p),
|
||||
@@ -972,6 +978,7 @@ pdcp_run (
|
||||
RRC_DCCH_DATA_REQ (msg_p).confirmp,
|
||||
RRC_DCCH_DATA_REQ (msg_p).mode);
|
||||
|
||||
LOG_D(PDCP, "Before calling pdcp_data_req from pdcp_run! RRC_DCCH_DATA_REQ (msg_p).rb_id: %d \n", RRC_DCCH_DATA_REQ (msg_p).rb_id);
|
||||
result = pdcp_data_req (&ctxt,
|
||||
SRB_FLAG_YES,
|
||||
RRC_DCCH_DATA_REQ (msg_p).rb_id,
|
||||
|
||||
@@ -168,7 +168,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
|
||||
((pdcp_data_ind_header_t*) sdu_p->data)->inst,
|
||||
((pdcp_data_ind_header_t *) sdu_p->data)->data_size);
|
||||
#else
|
||||
((pdcp_data_ind_header_t *)(sdu_p->data))->inst = 0;
|
||||
//((pdcp_data_ind_header_t *)(sdu_p->data))->inst = 0;
|
||||
#endif
|
||||
|
||||
#if defined(LINK_ENB_PDCP_TO_GTPV1U)
|
||||
@@ -195,7 +195,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
|
||||
|
||||
#endif /* defined(ENABLE_USE_MME) */
|
||||
#ifdef PDCP_DEBUG
|
||||
LOG_D(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
|
||||
LOG_I(PDCP, "PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh\n",
|
||||
ctxt_pP->frame, ((pdcp_data_ind_header_t *)(sdu_p->data))->inst,
|
||||
((pdcp_data_ind_header_t *)(sdu_p->data))->data_size, ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id);
|
||||
#endif //PDCP_DEBUG
|
||||
@@ -719,11 +719,11 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
if (!ctxt.enb_flag) {
|
||||
if (rab_id != 0) {
|
||||
if (rab_id == UE_IP_DEFAULT_RAB_ID) {
|
||||
LOG_I(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
||||
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
|
||||
LOG_I(PDCP,"request key %x : (%d,%x,%d,%d)\n",
|
||||
LOG_D(PDCP,"request key %x : (%d,%x,%d,%d)\n",
|
||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
||||
} else {
|
||||
rab_id = rab_id % LTE_maxDRB;
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
CFLAGS += -I$(RLC_DIR)
|
||||
CFLAGS += -I$(RLC_UM_DIR)
|
||||
CFLAGS += -I$(RLC_AM_DIR)
|
||||
CFLAGS += -I$(COMMON_DIR)
|
||||
CFLAGS += -I$(TRACE_DIR)
|
||||
CFLAGS += -I$(LISTS_DIR)
|
||||
CFLAGS += -I$(MEM_DIR)
|
||||
|
||||
DEBUG_FLAGS += -O2
|
||||
|
||||
OBJ = rlc_um.o rlc_um_segment.o
|
||||
|
||||
|
||||
############################################################
|
||||
#
|
||||
# The following should be identical in all Makefiles
|
||||
#
|
||||
#define the target object files
|
||||
|
||||
ifdef TARGETDIR
|
||||
TARGETOBJ = $(addprefix ${TARGETDIR}/, ${OBJ})
|
||||
TARGETLIB = ${TARGETDIR}/Lib.a
|
||||
endif
|
||||
|
||||
include $(TARGETOBJ:.o=.d)
|
||||
|
||||
# Look for source files in the parent directory
|
||||
%.o: ../%.c %.d
|
||||
$(CCC) -c ${DEBUG_FLAGS} ${CFLAGS} ${INCLUDE} -o $@ $<
|
||||
|
||||
# Rule to remake and keep the .d dependency Makefiles
|
||||
# Note that the sed command includes adding the TARGETDIR
|
||||
# and that ! is used for s delimiter
|
||||
%.d: ../%.c
|
||||
$(SHELL) -ec '$(CCC) -MM $(CFLAGS) $< \
|
||||
| sed '\''s!\($(*F)\)\.o[ :]*!$(TARGETDIR)/\1.o $@ : !g'\'' > $@ ;\
|
||||
[ -s $@ ] || rm -f $@'
|
||||
.PRECIOUS: %.d
|
||||
|
||||
all: ${TARGETLIB}
|
||||
|
||||
${TARGETLIB}: ${TARGETOBJ}
|
||||
ar -rv ${TARGETLIB} ${TARGETOBJ}
|
||||
|
||||
clean:
|
||||
rm -f ${TARGETDIR}/*.o ${TARGETDIR}/*.a
|
||||
|
||||
clean_dep:
|
||||
rm -f ${TARGETDIR}/*.d
|
||||
@@ -403,11 +403,18 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
||||
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
|
||||
}
|
||||
if (sourceL2Id && destinationL2Id){
|
||||
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
|
||||
LOG_I (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
|
||||
//Thinh's line originally uncommented
|
||||
//key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
|
||||
|
||||
|
||||
//key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
LOG_I (RLC, "RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d \n \n", ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||
}
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ void mac_rlc_data_ind (
|
||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||
protocol_ctxt_t ctxt;
|
||||
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, enb_flagP, rntiP, frameP, 0, eNB_index);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_IN);
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/*________________________rrc_register.h________________________
|
||||
|
||||
Authors : Hicham Anouar, Raymond Knopp
|
||||
Company : EURECOM
|
||||
Emails : anouar@eurecom.fr, knopp@eurecom.fr
|
||||
________________________________________________________________*/
|
||||
|
||||
#ifndef __MAC_RRC_REGISTER_H__
|
||||
# define __MAC_RRC_REGISTER_H__
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
/** @defgroup _mac_impl_register RRC Registration interface
|
||||
* @ingroup _mac_impl_
|
||||
*@{
|
||||
*/
|
||||
MAC_RLC_XFACE* mac_rrc_register(RRC_XFACE* RRC_xface);
|
||||
int mac_rrc_unregister(RRC_XFACE *RRC_xface);
|
||||
#endif
|
||||
@@ -1,91 +0,0 @@
|
||||
|
||||
current_release_asn1_module=$(strip $(notdir $(wildcard $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-*)))
|
||||
|
||||
ifdef CBA
|
||||
COMMON_CFLAGS += -DRel10
|
||||
COMMON_CFLAGS += -DCBA
|
||||
ifneq ($(current_release_asn1_module), .lock-rel10-cba)
|
||||
tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
|
||||
rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ;\
|
||||
cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ;\
|
||||
rm EUTRA-RRC-Definitions.asn ;\
|
||||
ln -s EUTRA-RRC-Definitions-a20-lola.asn EUTRA-RRC-Definitions.asn ; \
|
||||
cd $(OPENAIR_TARGETS)/SIMU/USER/ ;\
|
||||
rm -f $(ASN1_MSG_OBJS1) ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ;\
|
||||
rm -f $(L2_OBJS) ;\
|
||||
rm -f *.o ;\
|
||||
rm -f oaisim ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-* ;\
|
||||
touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10-cba ;\
|
||||
/bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\
|
||||
cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
|
||||
awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated )
|
||||
endif
|
||||
|
||||
else ifdef Rel10
|
||||
COMMON_CFLAGS += -DRel10
|
||||
ifneq ($(current_release_asn1_module), .lock-rel10)
|
||||
tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
|
||||
rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ;\
|
||||
cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ;\
|
||||
rm EUTRA-RRC-Definitions.asn ;\
|
||||
ln -s EUTRA-RRC-Definitions-a20.asn EUTRA-RRC-Definitions.asn ;\
|
||||
cd $(OPENAIR_TARGETS)/SIMU/USER/ ;\
|
||||
rm -f $(ASN1_MSG_OBJS1) ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ;\
|
||||
rm -f $(L2_OBJS) ;\
|
||||
rm -f *.o ;\
|
||||
rm -f oaisim ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-* ;\
|
||||
touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel10 ;\
|
||||
/bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\
|
||||
cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
|
||||
awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated )
|
||||
endif
|
||||
|
||||
else # default is rel 8
|
||||
COMMON_CFLAGS += -DRel8
|
||||
ifneq ($(current_release_asn1_module), .lock-rel8)
|
||||
tmp3:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
|
||||
rm -f ${ASN_MODULE_SOURCES} $(ASN_MODULE_HEADERS) *.o *.d ;\
|
||||
cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/ ;\
|
||||
rm EUTRA-RRC-Definitions.asn ;\
|
||||
ln -s EUTRA-RRC-Definitions-86.asn EUTRA-RRC-Definitions.asn ;\
|
||||
cd $(OPENAIR_TARGETS)/SIMU/USER/ ;\
|
||||
rm -f $(ASN1_MSG_OBJS1) ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample ;\
|
||||
rm -f $(L2_OBJS);\
|
||||
rm -f *.o ;\
|
||||
rm -f oaisim ;\
|
||||
rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-* ;\
|
||||
touch $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel8 ;\
|
||||
/bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\
|
||||
cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
|
||||
awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated )
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
tmp:=$(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ;\
|
||||
if [ ! -s Makefile.am.sample ] ; then \
|
||||
/bin/bash $(OPENAIR_TARGETS)/SCRIPTS/asn1_generate_rrc_messaging_c_code.bash ;\
|
||||
fi ;\
|
||||
if [ ! -s Makefile.inc.generated ] ; then \
|
||||
awk '/converter-sample.c/ {exit} // {print}' Makefile.am.sample > Makefile.inc.generated ;\
|
||||
fi )
|
||||
|
||||
include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated
|
||||
|
||||
ASN_CONVERTER_SOURCES+=asn1_msg.c
|
||||
|
||||
#COMMON_CFLAGS += -DEMIT_ASN_DEBUG=1
|
||||
|
||||
EXTRA_CFLAGS += -I. -I$(OPENAIR2_DIR)/RRC/LITE/MESSAGES
|
||||
|
||||
ASN1_MODULE_OBJS=${ASN_MODULE_SOURCES:.c=.o}
|
||||
ASN1_CONVERTER_OBJS=${ASN_CONVERTER_SOURCES:.c=.o}
|
||||
ASN1_MSG_OBJS=$(ASN1_MODULE_OBJS) $(ASN1_CONVERTER_OBJS)
|
||||
@@ -1,439 +0,0 @@
|
||||
/*
|
||||
* 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 rrc_2_rrm_msg.c
|
||||
|
||||
\brief data formating for sending message over socket between RRC and RRM
|
||||
|
||||
\author BURLOT Pascal
|
||||
|
||||
\date 16/07/08
|
||||
|
||||
\par Historique:
|
||||
P.BURLOT 2009-01-20
|
||||
bug fix (memeory leak)
|
||||
Macro changed :
|
||||
RRM_CALLOC() by RRM_CALLOC2() in msg_rrc_sensing_meas_ind()
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#ifdef RRC_EMUL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include "L3_rrc_defs.h"
|
||||
#include "rrm_sock.h"
|
||||
#include "L3_rrc_interface.h"
|
||||
#include "rrc_rrm_msg.h"
|
||||
#include "rrm_util.h"
|
||||
|
||||
#else
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef TRACE
|
||||
//! Macro creant la chaine a partir du nom de la variable
|
||||
#define STRINGIZER(x) #x
|
||||
//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
|
||||
const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] = {
|
||||
STRINGIZER(RRM_RB_ESTABLISH_REQ ),
|
||||
STRINGIZER(RRC_RB_ESTABLISH_RESP ),
|
||||
STRINGIZER(RRC_RB_ESTABLISH_CFM ),
|
||||
STRINGIZER(RRM_RB_MODIFY_REQ ),
|
||||
STRINGIZER(RRC_RB_MODIFY_RESP ),
|
||||
STRINGIZER(RRC_RB_MODIFY_CFM ),
|
||||
STRINGIZER(RRM_RB_RELEASE_REQ ),
|
||||
STRINGIZER(RRC_RB_RELEASE_RESP ),
|
||||
STRINGIZER(RRC_MR_ATTACH_IND ),
|
||||
STRINGIZER(RRM_SENSING_MEAS_REQ ),
|
||||
STRINGIZER(RRC_SENSING_MEAS_RESP ),
|
||||
STRINGIZER(RRC_CX_ESTABLISH_IND ),
|
||||
STRINGIZER(RRC_PHY_SYNCH_TO_MR_IND ),
|
||||
STRINGIZER(RRC_PHY_SYNCH_TO_CH_IND ),
|
||||
STRINGIZER(RRCI_CX_ESTABLISH_RESP ),
|
||||
STRINGIZER(RRC_SENSING_MEAS_IND ),
|
||||
STRINGIZER(RRM_SENSING_MEAS_RESP ),
|
||||
STRINGIZER(RRC_RB_MEAS_IND ),
|
||||
STRINGIZER(RRM_RB_MEAS_RESP ),
|
||||
STRINGIZER(RRM_INIT_CH_REQ ),
|
||||
STRINGIZER(RRCI_INIT_MR_REQ )
|
||||
} ;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief This function initialize the message header
|
||||
\return any return value
|
||||
*/
|
||||
static void init_rrc_msg_head(
|
||||
msg_head_t *msg_head , //!< message header to initialize
|
||||
Instance_t inst , //!< Instance ID
|
||||
MSG_RRC_RRM_T msg_type , //!< type of message to initialize
|
||||
unsigned int size , //!< size of message
|
||||
Transaction_t Trans_id //!< transaction id associated to this message
|
||||
)
|
||||
{
|
||||
if ( msg_head != NULL ) {
|
||||
msg_head->start = START_MSG ;
|
||||
msg_head->msg_type = 0xFF & msg_type ;
|
||||
msg_head->inst = inst ;
|
||||
msg_head->Trans_id = Trans_id ;
|
||||
msg_head->size = size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message generique de reponse pour les
|
||||
fonctions :
|
||||
- rrc_rb_establish_resp(),rrc_rb_modify_resp(),rrc_rb_modify_resp(),
|
||||
- rrc_rb_release_resp() et rrc_sensing_meas_resp() .
|
||||
\return message formate
|
||||
*/
|
||||
msg_t mesg;
|
||||
msg_t *msg_rrc_generic_resp(
|
||||
Instance_t inst , //!< Instance ID
|
||||
MSG_RRC_RRM_T msg_type , //!< type of message
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
init_rrc_msg_head(&(mesg.head),inst, msg_type, 0 , Trans_id);
|
||||
mesg.data = NULL ;
|
||||
|
||||
return &mesg ;
|
||||
}
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_rb_establish_resp().
|
||||
\return message formate
|
||||
*/
|
||||
msg_t *msg_rrc_rb_establish_resp(
|
||||
Instance_t inst , //!< Instance ID
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
return msg_rrc_generic_resp( inst, RRC_RB_ESTABLISH_RESP, Trans_id) ;
|
||||
}
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_rb_establish_cfm().
|
||||
\return message formate
|
||||
*/
|
||||
rrc_rb_establish_cfm_t P_rb_est_cfm ;//= RRM_CALLOC(rrc_rb_establish_cfm_t , 1 ) ;
|
||||
msg_t *msg_rrc_rb_establish_cfm(
|
||||
Instance_t inst , //!< Instance ID
|
||||
RB_ID Rb_id , //!< Radio Bearer ID used by RRC
|
||||
RB_TYPE RB_type , //!< Radio Bearer Type
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
// msg_t mesg;
|
||||
|
||||
init_rrc_msg_head(&(mesg.head),inst,RRC_RB_ESTABLISH_CFM, sizeof( rrc_rb_establish_cfm_t ) ,Trans_id);
|
||||
P_rb_est_cfm.Rb_id = Rb_id ;
|
||||
P_rb_est_cfm.RB_type = RB_type ;
|
||||
mesg.data = (char *) &P_rb_est_cfm ;
|
||||
return &mesg ;
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_rb_modify_resp().
|
||||
\return message formate
|
||||
*/
|
||||
msg_t *msg_rrc_rb_modify_resp(
|
||||
Instance_t inst , //!< Instance ID
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
return msg_rrc_generic_resp( inst,RRC_RB_MODIFY_RESP, Trans_id) ;
|
||||
}
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_rb_modify_cfm().
|
||||
\return message formate
|
||||
*/
|
||||
rrc_rb_modify_cfm_t P_rb_md_cfm;
|
||||
msg_t *msg_rrc_rb_modify_cfm(
|
||||
Instance_t inst , //!< Instance ID
|
||||
RB_ID Rb_id , //!< Radio Bearer ID used by RRC
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
// msg_t mesg;
|
||||
init_rrc_msg_head(&(mesg.head),inst,RRC_RB_MODIFY_CFM, sizeof( rrc_rb_modify_cfm_t ) ,Trans_id);
|
||||
P_rb_md_cfm.Rb_id = Rb_id ;
|
||||
mesg.data = (char *) &P_rb_md_cfm ;
|
||||
return &mesg ;
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_rb_release_resp().
|
||||
\return message formate
|
||||
*/
|
||||
msg_t *msg_rrc_rb_release_resp(
|
||||
Instance_t inst , //!< Instance ID
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
return msg_rrc_generic_resp( inst,RRC_RB_RELEASE_RESP, Trans_id) ;
|
||||
}
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_MR_attach_ind().
|
||||
\return message formate
|
||||
*/
|
||||
rrc_MR_attach_ind_t P_att_ind;
|
||||
msg_t * msg_rrc_MR_attach_ind(
|
||||
Instance_t inst , //!< Instance ID
|
||||
L2_ID L2_id
|
||||
)
|
||||
{
|
||||
// msg_t mesg;
|
||||
init_rrc_msg_head(&(mesg.head),inst,RRC_MR_ATTACH_IND, sizeof( rrc_MR_attach_ind_t ) ,0);
|
||||
memcpy( P_att_ind.L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
||||
mesg.data = (char *) &P_att_ind ;
|
||||
return &mesg ;
|
||||
}
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_sensing_meas_resp().
|
||||
\return message formate
|
||||
*/
|
||||
msg_t *msg_rrc_sensing_meas_resp(
|
||||
Instance_t inst , //!< Instance ID
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
return msg_rrc_generic_resp( inst,RRC_SENSING_MEAS_RESP, Trans_id) ;
|
||||
}
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_cx_establish_ind().
|
||||
\return message formate
|
||||
*/
|
||||
rrc_cx_establish_ind_t P_cx_est_ind;
|
||||
msg_t * msg_rrc_cx_establish_ind(
|
||||
Instance_t inst , //!< Instance ID
|
||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
||||
Transaction_t Trans_id , //!< Transaction ID
|
||||
unsigned char *L3_info , //!< Optional L3 Information
|
||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
||||
RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only)
|
||||
RB_ID DTCH_id //!< RBID of default IP service (MR only)
|
||||
)
|
||||
{
|
||||
//msg_t mesg;
|
||||
init_rrc_msg_head(&(mesg.head),inst,RRC_CX_ESTABLISH_IND, sizeof( rrc_cx_establish_ind_t ) ,Trans_id);
|
||||
memcpy( P_cx_est_ind.L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
||||
P_cx_est_ind.DTCH_B_id = DTCH_B_id ;
|
||||
P_cx_est_ind.DTCH_id = DTCH_id ;
|
||||
P_cx_est_ind.L3_info_t = L3_info_t ;
|
||||
|
||||
if ( L3_info_t == IPv4_ADDR ) {
|
||||
memcpy( P_cx_est_ind.L3_info, L3_info, 4 );
|
||||
} else if ( L3_info_t == IPv6_ADDR ) {
|
||||
memcpy( P_cx_est_ind.L3_info, L3_info, 16 );
|
||||
}
|
||||
|
||||
mesg.data = (char *) &P_cx_est_ind ;
|
||||
return &mesg ;
|
||||
}
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_phy_synch_to_MR_ind().
|
||||
\return message formate
|
||||
*/
|
||||
rrc_phy_synch_to_MR_ind_t P_snc_mr;
|
||||
msg_t * msg_rrc_phy_synch_to_MR_ind(
|
||||
Instance_t inst , //!< Instance ID
|
||||
L2_ID L2_id
|
||||
)
|
||||
{
|
||||
//msg_t smsg;
|
||||
init_rrc_msg_head(&(mesg.head),inst,RRC_PHY_SYNCH_TO_MR_IND, sizeof( rrc_phy_synch_to_MR_ind_t ) ,0);
|
||||
memcpy(&P_snc_mr.L2_id,(L2_ID*)&L2_id,sizeof(L2_ID));
|
||||
mesg.data = (char *)&P_snc_mr ;
|
||||
msg("[msg_rrc_phy_synch_to_MR_ind] from Inst :%d\n",mesg.head.inst);
|
||||
return &mesg ;
|
||||
}
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_phy_synch_to_CH_ind().
|
||||
\return message formate
|
||||
*/
|
||||
rrc_phy_synch_to_CH_ind_t P_snc_ch;
|
||||
msg_t * msg_rrc_phy_synch_to_CH_ind(
|
||||
Instance_t inst , //!< Instance ID
|
||||
unsigned int Ch_index , //!< Clusterhead index
|
||||
L2_ID L2_id
|
||||
)
|
||||
{
|
||||
// msg_t smsg;
|
||||
init_rrc_msg_head(&(mesg.head),inst, RRC_PHY_SYNCH_TO_CH_IND, sizeof( rrc_phy_synch_to_CH_ind_t ) ,0);
|
||||
P_snc_ch.Ch_index = Ch_index ;
|
||||
memcpy(&P_snc_ch.L2_id,(L2_ID*)&L2_id,sizeof(L2_ID));
|
||||
mesg.data = (char *) &P_snc_ch;
|
||||
msg("[msg_rrc_phy_synch_to_CH_ind] from Inst :%d\n",mesg.head.inst);
|
||||
return &mesg ;
|
||||
}
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_sensing_meas_ind().
|
||||
\return message formate
|
||||
*/
|
||||
rrc_sensing_meas_ind_t P_sens_ind;
|
||||
msg_t * msg_rrc_sensing_meas_ind(
|
||||
Instance_t inst , //!< Instance ID
|
||||
L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node
|
||||
unsigned int NB_meas , //!< Layer 2 ID (MAC) of sensing node
|
||||
SENSING_MEAS_T *Sensing_meas , //!< Sensing Information
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
|
||||
// msg_t mesg;
|
||||
unsigned int size = sizeof( rrc_sensing_meas_ind_t ) + (NB_meas-1) * sizeof(SENSING_MEAS_T) ;
|
||||
// Note : (NB_meas-1) car la première est incorporé dans rrc_sensing_meas_ind_t
|
||||
init_rrc_msg_head(&(mesg.head),inst, RRC_SENSING_MEAS_IND, size ,Trans_id);
|
||||
memcpy( P_sens_ind.L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
||||
|
||||
if ( NB_meas > 0 ) {
|
||||
memcpy( P_sens_ind.Sensing_meas , Sensing_meas, NB_meas * sizeof(SENSING_MEAS_T) ) ;
|
||||
}
|
||||
|
||||
P_sens_ind.NB_meas = NB_meas ;
|
||||
mesg.data = (char *) &P_sens_ind ;
|
||||
return &mesg ;
|
||||
}
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
\brief La fonction formate en un message les parametres de la fonction
|
||||
rrc_rb_meas_ind().
|
||||
\return message formate
|
||||
*/
|
||||
rrc_rb_meas_ind_t P_rb_meas;
|
||||
msg_t * msg_rrc_rb_meas_ind(
|
||||
Instance_t inst , //!< Instance ID
|
||||
RB_ID Rb_id , //!< Radio Bearer ID
|
||||
L2_ID L2_id , //!< Layer 2 (MAC) IDs for link
|
||||
MEAS_MODE Meas_mode , //!< Measurement mode (periodic or event-driven)
|
||||
MAC_RLC_MEAS_T *Mac_rlc_meas , //!< MAC/RLC measurements
|
||||
Transaction_t Trans_id //!< Transaction ID
|
||||
)
|
||||
{
|
||||
//msg_t mesg;
|
||||
init_rrc_msg_head(&(mesg.head),inst, RRC_RB_MEAS_IND, sizeof( rrc_rb_meas_ind_t ) ,Trans_id);
|
||||
memcpy( P_rb_meas.L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
||||
memcpy( &(P_rb_meas.Mac_rlc_meas), Mac_rlc_meas, sizeof(L2_ID) ) ;
|
||||
P_rb_meas.Rb_id = Rb_id ;
|
||||
P_rb_meas.Meas_mode = Meas_mode ;
|
||||
mesg.data = (char *) &P_rb_meas;
|
||||
return &mesg ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
rrc_init_scan_req_t P_init_scan;
|
||||
msg_t * msg_rrc_init_scan_req(
|
||||
Instance_t inst , //!< Instance ID
|
||||
L2_ID L2_id , //!< Layer 2 (MAC) IDs for link
|
||||
unsigned int Interv
|
||||
)
|
||||
{
|
||||
//msg_t mesg;
|
||||
msg("RRCI: inst %d sendind rrc_init_scan_req from FC %d %d\n",inst,L2_id.L2_id[0],L2_id.L2_id[7]);
|
||||
init_rrc_msg_head(&(mesg.head),inst, RRC_INIT_SCAN_REQ, sizeof( rrc_init_scan_req_t ) ,0);
|
||||
memcpy( &P_init_scan.L2_id.L2_id[0], &L2_id.L2_id[0], sizeof(L2_ID) ) ;
|
||||
P_init_scan.interv=Interv;
|
||||
|
||||
return &mesg ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
rrc_update_sens_t P_update_sens;
|
||||
msg_t * msg_rrc_update_sens(
|
||||
Instance_t inst , //!< Instance ID
|
||||
Sens_ch_t *Sens,
|
||||
L2_ID L2_id,
|
||||
unsigned char NB_info
|
||||
)
|
||||
{
|
||||
//msg_t mesg;
|
||||
init_rrc_msg_head(&(mesg.head),inst, RRC_UPDATE_SENS, sizeof( rrc_update_sens_t ) ,0);
|
||||
memcpy( &P_update_sens.L2_id.L2_id[0], &L2_id.L2_id[0], sizeof(L2_ID) ) ;
|
||||
memcpy( &P_update_sens.Sens_meas[0], (rrc_update_sens_t *)Sens, NB_info*sizeof(Sens_ch_t) ) ;
|
||||
P_update_sens.NB_info=NB_info;
|
||||
return &mesg ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
rrc_end_scan_req_t P_end_scan;
|
||||
msg_t * msg_rrc_end_scan_req(
|
||||
Instance_t inst , //!< Instance ID
|
||||
unsigned char CH_index
|
||||
)
|
||||
{
|
||||
|
||||
//msg_t mesg;
|
||||
msg("RRC: send END_SCAN_REQ, INST %d\n",inst);
|
||||
init_rrc_msg_head(&(mesg.head),inst, RRC_END_SCAN_REQ, sizeof( rrc_end_scan_req_t ) ,0);
|
||||
P_update_sens.L2_id.L2_id[0]=CH_index;
|
||||
return &mesg ;
|
||||
|
||||
}
|
||||
|
||||
@@ -3301,6 +3301,7 @@ int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
|
||||
msg_p = itti_alloc_new_message(TASK_RRC_UE, PHY_FIND_NEXT_CELL_REQ);
|
||||
|
||||
itti_send_msg_to_task(TASK_PHY_UE, ctxt_pP->instance, msg_p);
|
||||
LOG_E(RRC, "Synched with a cell, but PLMN doesn't match our SIM, the message PHY_FIND_NEXT_CELL_REQ is sent but lost in current UE implementation! \n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -4718,7 +4719,6 @@ void *rrc_ue_task( void *args_p )
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST:
|
||||
LOG_D(RRC, "[UE %d] Received %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p));
|
||||
break;
|
||||
|
||||
/* MAC messages */
|
||||
@@ -5113,6 +5113,7 @@ void *rrc_ue_task( void *args_p )
|
||||
break; // PHY_FIND_CELL_IND
|
||||
|
||||
case PHY_MEAS_REPORT_IND: {
|
||||
LOG_D(RRC, "[UE %d] Received %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p));
|
||||
MessageDef *message_p;
|
||||
message_p = itti_alloc_new_message(TASK_RRC_UE, RRC_RAL_MEASUREMENT_REPORT_IND);
|
||||
|
||||
@@ -5130,6 +5131,7 @@ void *rrc_ue_task( void *args_p )
|
||||
}
|
||||
|
||||
case RRC_RAL_CONFIGURE_THRESHOLD_REQ:
|
||||
LOG_D(RRC, "[UE %d] Received %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p));
|
||||
rrc_ue_ral_handle_configure_threshold_request(ue_mod_id, msg_p);
|
||||
break;
|
||||
|
||||
|
||||
@@ -115,9 +115,6 @@ extern RAN_CONTEXT_t RC;
|
||||
#endif
|
||||
extern eNB_MAC_INST *eNB_mac_inst;
|
||||
extern UE_MAC_INST *UE_mac_inst;
|
||||
#ifdef BIGPHYSAREA
|
||||
extern void *bigphys_malloc(int);
|
||||
#endif
|
||||
|
||||
extern uint16_t two_tier_hexagonal_cellIds[7];
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ extern unsigned char NB_INST;
|
||||
extern unsigned char NB_eNB_INST;
|
||||
extern unsigned char NB_UE_INST;
|
||||
extern unsigned short NODE_ID[1];
|
||||
extern void* bigphys_malloc(int);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifeq ($(NAS_FLAG),1)
|
||||
NAS_OBJS = $(OPENAIR2_TOP)/RRC/NAS/nas_config.o
|
||||
NAS_OBJS += $(OPENAIR2_TOP)/RRC/NAS/rb_config.o
|
||||
#endif
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "linux/module.h"
|
||||
|
||||
#ifdef BIGPHYSAREA
|
||||
#ifdef ARCH_64
|
||||
char *bigphys_ptr,*bigphys_current;
|
||||
#else //ARCH_64
|
||||
unsigned int bigphys_ptr,bigphys_current;
|
||||
#endif //ARCH_64
|
||||
|
||||
// return pointer to memory in big physical area aligned to 16 bytes
|
||||
|
||||
void* bigphys_malloc(int n)
|
||||
{
|
||||
|
||||
|
||||
|
||||
int n2 = n + ((16-(n%16))%16);
|
||||
#ifdef ARCH_64
|
||||
char *bigphys_old;
|
||||
#else
|
||||
unsigned int bigphys_old;
|
||||
#endif
|
||||
|
||||
printk("[BIGPHYSAREA] Calling bigphys_malloc for %d (%d) bytes\n",n,n2);
|
||||
|
||||
#ifdef ARCH_64
|
||||
printk("[BIGPHYSAREA] Allocated Memory @ %p\n",bigphys_current);
|
||||
#endif
|
||||
bigphys_old = bigphys_current;
|
||||
bigphys_current += n2;
|
||||
|
||||
#ifdef ARCH_64
|
||||
printk("[BIGPHYSAREA] Allocated Memory top now @ %p\n",bigphys_current);
|
||||
return ((void *)(bigphys_old));
|
||||
#else //ARCH_64
|
||||
//printk("[BIGPHYSAREA] Allocated Memory %d\n",bigphys_current-bigphys_ptr);
|
||||
return ((void *)(bigphys_old));
|
||||
#endif //ARCH_64
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(bigphys_malloc);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
void* bigphys_malloc(int);
|
||||
@@ -1,108 +0,0 @@
|
||||
MEM_DIR = $(OPENAIR2_TOP)/UTIL/MEM
|
||||
LIST_DIR = $(OPENAIR2_TOP)/UTIL/LISTS
|
||||
FIFO_DIR = $(OPENAIR2_TOP)/UTIL/FIFO
|
||||
MATH_DIR = $(OPENAIR2_TOP)/UTIL/MATH
|
||||
TIMER_DIR = $(OPENAIR2_TOP)/UTIL/TIMER
|
||||
LOG_DIR=$(OPENAIR2_TOP)/UTIL/LOG
|
||||
OCG_DIR=$(OPENAIR2_TOP)/UTIL/OCG
|
||||
OPT_DIR=$(OPENAIR2_TOP)/UTIL/OPT
|
||||
OMG_DIR=$(OPENAIR2_TOP)/UTIL/OMG
|
||||
OTG_DIR=$(OPENAIR2_TOP)/UTIL/OTG
|
||||
CLI_DIR=$(OPENAIR2_TOP)/UTIL/CLI
|
||||
OMV_DIR=$(OPENAIR2_TOP)/UTIL/OMV
|
||||
LFDS_DIR=$(OPENAIR2_TOP)/UTIL/LFDS/liblfds6.1.1/liblfds611
|
||||
OSA_DIR=$(OPENAIR2_TOP)/UTIL/OSA
|
||||
|
||||
LIST_OBJ = $(LIST_DIR)/list.o
|
||||
|
||||
FIFO_OBJ = $(FIFO_DIR)/pad_list.o
|
||||
|
||||
LIST_OBJ += $(LIST_DIR)/list2.o
|
||||
|
||||
TIMER_OBJ += $(TIMER_DIR)/umts_timer.o
|
||||
|
||||
MEM_OBJ += $(MEM_DIR)/mem_block.o
|
||||
|
||||
LOG_OBJS = $(LOG_DIR)/log.o
|
||||
LOG_OBJS += $(LOG_DIR)/vcd_signal_dumper.o
|
||||
|
||||
OCG_OBJS = $(OCG_DIR)/OCG.o
|
||||
OCG_OBJS += $(OCG_DIR)/OCG_create_dir.o
|
||||
OCG_OBJS += $(OCG_DIR)/OCG_detect_file.o
|
||||
OCG_OBJS += $(OCG_DIR)/OCG_generate_report.o
|
||||
OCG_OBJS += $(OCG_DIR)/OCG_parse_filename.o
|
||||
OCG_OBJS += $(OCG_DIR)/OCG_parse_XML.o
|
||||
OCG_OBJS += $(OCG_DIR)/OCG_save_XML.o
|
||||
|
||||
ifdef SECU
|
||||
OSA_OBJS = $(OSA_DIR)/osa_key_deriver.o
|
||||
OSA_OBJS += $(OSA_DIR)/osa_stream_eia.o
|
||||
OSA_OBJS += $(OSA_DIR)/osa_stream_eea.o
|
||||
OSA_OBJS += $(OSA_DIR)/osa_snow3g.o
|
||||
OSA_OBJS += $(OSA_DIR)/osa_rijndael.o
|
||||
endif
|
||||
|
||||
OPT_OBJS = $(OPT_DIR)/probe.o
|
||||
|
||||
OMG_OBJS = $(OMG_DIR)/omg.o
|
||||
OMG_OBJS += $(OMG_DIR)/common.o
|
||||
OMG_OBJS += $(OMG_DIR)/job.o
|
||||
OMG_OBJS += $(OMG_DIR)/static.o
|
||||
OMG_OBJS += $(OMG_DIR)/rwp.o
|
||||
OMG_OBJS += $(OMG_DIR)/rwalk.o
|
||||
#OMG_OBJS += $(OMG_DIR)/omg_hashtable.o
|
||||
OMG_OBJS += $(OMG_DIR)/mobility_parser.o
|
||||
OMG_OBJS += $(OMG_DIR)/trace.o
|
||||
OMG_OBJS += $(OMG_DIR)/sumo.o
|
||||
OMG_OBJS += $(OMG_DIR)/id_manager.o
|
||||
OMG_OBJS += $(OMG_DIR)/client_traci_OMG.o
|
||||
OMG_OBJS += $(OMG_DIR)/storage_traci_OMG.o
|
||||
OMG_OBJS += $(OMG_DIR)/socket_traci_OMG.o
|
||||
OMG_OBJS += $(OMG_DIR)/steadystaterwp.o
|
||||
OMG_OBJS += $(OMG_DIR)/grid.o
|
||||
OMG_OBJS += $(OMG_DIR)/trace_hashtable.o
|
||||
|
||||
|
||||
OTG_OBJS = $(OTG_DIR)/otg_tx.o
|
||||
OTG_OBJS += $(OTG_DIR)/otg.o
|
||||
OTG_OBJS += $(OTG_DIR)/otg_rx.o
|
||||
OTG_OBJS += $(OTG_DIR)/otg_kpi.o
|
||||
OTG_OBJS += $(OTG_DIR)/otg_form.o
|
||||
OTG_OBJS += $(OTG_DIR)/otg_models.o
|
||||
|
||||
MATH_OBJS = $(MATH_DIR)/oml.o
|
||||
|
||||
CLI_OBJ = $(CLI_DIR)/cli_server.o
|
||||
CLI_OBJ += $(CLI_DIR)/cli.o
|
||||
CLI_OBJ += $(CLI_DIR)/cli_cmd.o
|
||||
|
||||
UTIL_OBJ = \
|
||||
$(OSA_OBJS) \
|
||||
$(FIFO_OBJ) \
|
||||
$(LIST_OBJ) \
|
||||
$(TIMER_OBJ) \
|
||||
$(MEM_OBJ) \
|
||||
$(LOG_OBJS) \
|
||||
$(OCG_OBJS) \
|
||||
$(MATH_OBJS) \
|
||||
$(OTG_OBJS) \
|
||||
$(CLI_OBJ) \
|
||||
$(OMG_OBJS) \
|
||||
$(OPT_OBJS)
|
||||
|
||||
UTIL_incl = \
|
||||
-I$(OPENAIR2_TOP)/UTIL \
|
||||
-I$(OSA_DIR) \
|
||||
-I$(LFDS_DIR)/inc \
|
||||
-I$(MEM_DIR) \
|
||||
-I$(LIST_DIR) \
|
||||
-I$(FIFO_DIR) \
|
||||
-I$(OCG_DIR) \
|
||||
-I$(LOG_DIR) \
|
||||
-I$(MATH_DIR) \
|
||||
-I$(TIMER_DIR) \
|
||||
-I$(OMG_DIR) \
|
||||
-I$(OTG_DIR) \
|
||||
-I$(CLI_DIR) \
|
||||
-I$(OPT_DIR) \
|
||||
-I$(OMV_DIR)
|
||||
@@ -1,175 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/***************************************************************************
|
||||
umts_timer.c - description
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
//#include "rtos_header.h"
|
||||
#include "platform_types.h"
|
||||
|
||||
#include "list.h"
|
||||
#include "umts_timer_struct.h"
|
||||
#include "mem_block.h"
|
||||
#include "openair_defs.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
umts_timer_check_time_out (list2_t * atimer_listP, uint32_t current_frame_tick_millisecondsP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
struct timer_unit *timer;
|
||||
mem_block_t *mem_unit;
|
||||
uint8_t time_out = 255;
|
||||
mem_unit = atimer_listP->head;
|
||||
|
||||
// do it simple now.
|
||||
while ((mem_unit) && (time_out)) {
|
||||
timer = (struct timer_unit *) (mem_unit->data);
|
||||
|
||||
if ((current_frame_tick_millisecondsP - timer->frame_tick_start) >= timer->frame_time_out) {
|
||||
|
||||
mem_unit = list2_remove_head (atimer_listP);
|
||||
(*(timer->proc)) (timer->protocol, timer->timer_id);
|
||||
free_mem_block (mem_unit, __func__);
|
||||
|
||||
mem_unit = atimer_listP->head;
|
||||
} else {
|
||||
time_out = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
umts_timer_delete_timer (list2_t * atimer_listP, void *timer_idP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
mem_block_t *mem_unit;
|
||||
mem_unit = atimer_listP->head;
|
||||
|
||||
while ((mem_unit)) {
|
||||
if (((struct timer_unit *) (mem_unit->data))->timer_id == timer_idP) {
|
||||
list2_remove_element (mem_unit, atimer_listP);
|
||||
free_mem_block (mem_unit, __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
mem_unit = mem_unit->next;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
mem_block_t *
|
||||
umts_add_timer_list_up (list2_t * atimer_listP, void (*procP) (void *, void *), void *protocolP, void *timer_idP, uint32_t frame_time_outP, uint32_t current_frame_tick_millisecondsP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
struct mem_block_t *mb;
|
||||
struct timer_unit *timer;
|
||||
mem_block_t *mem_unit;
|
||||
int32_t remaining_time;
|
||||
uint8_t inserted = 0;
|
||||
|
||||
mb = get_free_mem_block (sizeof (struct timer_unit), __func__);
|
||||
if(mb==NULL) return NULL;
|
||||
((struct timer_unit *) (mb->data))->proc = procP;
|
||||
((struct timer_unit *) (mb->data))->protocol = protocolP;
|
||||
((struct timer_unit *) (mb->data))->timer_id = timer_idP;
|
||||
((struct timer_unit *) (mb->data))->frame_time_out = frame_time_outP;
|
||||
((struct timer_unit *) (mb->data))->frame_tick_start = current_frame_tick_millisecondsP;
|
||||
|
||||
// insert the timer in list in ascending order
|
||||
mem_unit = atimer_listP->head;
|
||||
|
||||
while ((mem_unit) && (!inserted)) {
|
||||
timer = (struct timer_unit *) (mem_unit->data);
|
||||
|
||||
remaining_time = timer->frame_time_out - current_frame_tick_millisecondsP + timer->frame_tick_start;
|
||||
|
||||
// not timed out
|
||||
if ((remaining_time > 0) && (frame_time_outP < remaining_time)) {
|
||||
inserted = 255;
|
||||
|
||||
if (mem_unit == atimer_listP->head) {
|
||||
#ifdef DEBUG_TIMER
|
||||
msg ("[TIMER][CREATION] added timer_id %p at head time out %d current time %d proc %p \n", timer_idP, frame_time_outP, current_frame_tick_millisecondsP, *procP);
|
||||
#endif
|
||||
list2_add_head (mb, atimer_listP);
|
||||
} else {
|
||||
#ifdef DEBUG_TIMER
|
||||
msg ("[TIMER][CREATION] inserted timer_id %p time out %d current time %d proc %p \n", timer_idP, frame_time_outP, current_frame_tick_millisecondsP, *procP);
|
||||
#endif
|
||||
mb->previous = mem_unit->previous;
|
||||
mb->next = mem_unit;
|
||||
mem_unit->previous->next = mb;
|
||||
mem_unit->previous = mb;
|
||||
}
|
||||
} else {
|
||||
mem_unit = mem_unit->next;
|
||||
}
|
||||
}
|
||||
|
||||
if (!inserted) {
|
||||
#ifdef DEBUG_TIMER
|
||||
msg ("[TIMER][CREATION] added timer_id %p at tail time out %d current time %d proc %p \n", timer_idP, frame_time_outP, current_frame_tick_millisecondsP, *procP);
|
||||
#endif
|
||||
list2_add_tail (mb, atimer_listP);
|
||||
}
|
||||
|
||||
return mb;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
umts_stop_all_timers (list2_t * atimer_listP)
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
list2_free (atimer_listP);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
umts_stop_all_timers_except (list2_t * atimer_listP, void (*procP) (void *, void *))
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
struct timer_unit *timer;
|
||||
mem_block_t *mem_unit;
|
||||
mem_block_t *mem_unit_to_delete;
|
||||
mem_unit = atimer_listP->head;
|
||||
|
||||
while ((mem_unit)) {
|
||||
timer = (struct timer_unit *) (mem_unit->data);
|
||||
|
||||
if (timer->proc != procP) {
|
||||
mem_unit_to_delete = mem_unit;
|
||||
mem_unit = mem_unit->next;
|
||||
list2_remove_element (mem_unit_to_delete, atimer_listP);
|
||||
free_mem_block (mem_unit_to_delete, __func__);
|
||||
} else {
|
||||
mem_unit = mem_unit->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/***************************************************************************
|
||||
umts_timer.h - description
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __UMTS_TIMER_H__
|
||||
# define __UMTS_TIMER_H__
|
||||
|
||||
|
||||
# include "platform_types.h"
|
||||
# include "lists_proto_extern.h"
|
||||
# include "mem_mngt_proto_extern.h"
|
||||
|
||||
# define UMTS_TIMER_NOT_STARTED 0x00
|
||||
# define UMTS_TIMER_STARTED 0x01
|
||||
# define UMTS_TIMER_TIMED_OUT 0x02
|
||||
|
||||
|
||||
void umts_timer_check_time_out (list2_t * atimer_listP, uint32_t current_frame_tick_millisecondsP);
|
||||
mem_block *umts_add_timer_list_up (list2_t * atimer_listP, void (*procP) (void *, void *), void *protocolP, void *timer_idP, uint32_t frame_time_outP, uint32_t current_frame_tick_millisecondsP);
|
||||
|
||||
struct timer_unit {
|
||||
|
||||
void (*proc) (void *, void *); // proc executed when time_out
|
||||
void *protocol; // arg should be a pointer on a allocated protocol entity private struct including its variables
|
||||
void *timer_id; // arg should be a value or a pointer identifying the timer
|
||||
// Example: rlc_am_sdu_discard_time_out(rlc_am, sdu)
|
||||
uint32_t frame_time_out;
|
||||
uint32_t frame_tick_start;
|
||||
};
|
||||
#endif
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/***************************************************************************
|
||||
umts_timer_proto_extern.h - description
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __UMTS_TIMER_PROTO_EXTERN_H__
|
||||
# define __UMTS_TIMER_PROTO_EXTERN_H__
|
||||
|
||||
# include "platform_types.h"
|
||||
# include "list.h"
|
||||
# include "mem_block.h"
|
||||
|
||||
extern void umts_timer_check_time_out (list2_t * atimer_listP, uint32_t current_frame_tick_millisecondsP);
|
||||
extern void umts_timer_delete_timer (list2_t * atimer_listP, void *timer_idP);
|
||||
extern mem_block_t *umts_add_timer_list_up (list2_t * atimer_listP, void (*procP) (void *, void *), void *protocolP, void *timer_idP, uint32_t frame_time_outP,
|
||||
uint32_t current_frame_tick_millisecondsP);
|
||||
extern void umts_stop_all_timers (list2_t * atimer_listP);
|
||||
extern void umts_stop_all_timers_except (list2_t * atimer_listP, void (*procP) (void *, void *));
|
||||
#endif
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/***************************************************************************
|
||||
umts_timer_struct.h - description
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef __UMTS_TIMER_STRUCT_H__
|
||||
# define __UMTS_TIMER_STRUCT_H__
|
||||
|
||||
# include "platform_types.h"
|
||||
|
||||
struct timer_unit {
|
||||
|
||||
void (*proc) (void *, void *); // proc executed when time_out
|
||||
void *protocol; // arg should be a pointer on a allocated protocol entity private struct including its variables
|
||||
void *timer_id; // arg should be a value or a pointer identifying the timer
|
||||
// Example: rlc_am_sdu_discard_time_out(rlc_am, sdu)
|
||||
uint32_t frame_time_out;
|
||||
uint32_t frame_tick_start;
|
||||
};
|
||||
#endif
|
||||
@@ -1,107 +0,0 @@
|
||||
|
||||
ASN1MESSAGESDIR=$(X2AP_DIR)/MESSAGES
|
||||
ASN1DIR=$(ASN1MESSAGESDIR)/ASN1
|
||||
|
||||
#//ifeq ($(USE_MME), R10)
|
||||
#// ASN1RELDIR=R10.7
|
||||
#//else
|
||||
#//ASN1RELDIR=R11.2
|
||||
#//endif
|
||||
|
||||
# TEMP
|
||||
ASN1RELDIR=R11.2
|
||||
|
||||
|
||||
include $(ASN1DIR)/$(ASN1RELDIR)/Makefile.inc
|
||||
|
||||
libx2ap_OBJECTS = \
|
||||
x2ap.o \
|
||||
x2ap_common.o \
|
||||
$(addprefix MESSAGES/ASN1/$(ASN1RELDIR)/, $(X2AP_ASN_MODULE_SOURCES))
|
||||
|
||||
|
||||
|
||||
# pull in dependency info for *existing* .o files
|
||||
-include $(OUTDIR)/*.d
|
||||
|
||||
CFLAGS = \
|
||||
-Wall \
|
||||
-DENB_MODE \
|
||||
-DENABLE_USE_MME \
|
||||
-I. \
|
||||
-I$(ASN1MESSAGESDIR)/ASN1/$(ASN1RELDIR) \
|
||||
-I$(ASN1MESSAGESDIR) \
|
||||
-I$(OUTDIR) \
|
||||
-I../UTILS \
|
||||
$(ADD_CFLAGS) \
|
||||
$(X2AP_CFLAGS) \
|
||||
-Wuninitialized \
|
||||
-Werror=implicit-function-declaration
|
||||
|
||||
X2AP_GENERATED = \
|
||||
$(OUTDIR)/x2ap_encoder.o \
|
||||
$(OUTDIR)/x2ap_decoder.o \
|
||||
$(OUTDIR)/x2ap_xer_print.o
|
||||
|
||||
$(OUTDIR)/%.o : %.c
|
||||
@echo "Compiling $<"
|
||||
@echo "Compiling $< with CFLAGS= $(CFLAGS)"
|
||||
@if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi;
|
||||
@$(CC) -c $(CFLAGS) -o $@ $<
|
||||
@$(CC) -MM $(CFLAGS) $< > $(basename $@).d
|
||||
@mv -f $(basename $@).d $(basename $@).d.tmp
|
||||
@sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d
|
||||
@sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \
|
||||
sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d
|
||||
@rm -f $(basename $@).d.tmp
|
||||
|
||||
$(X2AP_GENERATED): %.o : %.c
|
||||
@echo "Compiling $<"
|
||||
@echo "Compiling $< with CFLAGS= $(CFLAGS)"
|
||||
@if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi;
|
||||
@$(CC) -c $(CFLAGS) -o $@ $<
|
||||
@$(CC) -MM $(CFLAGS) $< > $(basename $@).d
|
||||
@mv -f $(basename $@).d $(basename $@).d.tmp
|
||||
@sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d
|
||||
@sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \
|
||||
sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d
|
||||
@rm -f $(basename $@).d.tmp
|
||||
|
||||
|
||||
$(OUTDIR)/x2ap_ieregen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/X2AP-PDU-Contents.asn $(ASN1DIR)/asn1tostruct.py
|
||||
@if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi;
|
||||
@python $(ASN1DIR)/asn1tostruct.py -f$< -o$(OUTDIR)
|
||||
@echo Timestamp > $@
|
||||
|
||||
#ProtocolExtensionContainer
|
||||
#$(ASN1DIR)/$(ASN1RELDIR)/X2AP-PDU.asn
|
||||
|
||||
$(OUTDIR)/x2ap_asn1regen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/X2AP-CommonDataTypes.asn $(ASN1DIR)/$(ASN1RELDIR)/X2AP-Constants.asn $(ASN1DIR)/$(ASN1RELDIR)/X2AP-IEs.asn $(ASN1DIR)/$(ASN1RELDIR)/X2AP-PDU.asn
|
||||
@echo "Timestamp DIR " $(ASN1DIR) " DIRREL " $(ASN1RELDIR)
|
||||
# (cd $(ASN1DIR)/$(ASN1RELDIR) && asn1c -fhave_native64 -gen-PER -fcompound-names $^)
|
||||
(cd $(ASN1MESSAGESDIR) && asn1c -fhave_native64 -gen-PER -fcompound-names -fskeletons-copy $^)
|
||||
@echo "Timestamp X2AP_CFLAGS: " $(X2AP_CFLAGS)
|
||||
@echo Timestamp > $@
|
||||
|
||||
$(OUTDIR)/libx2ap.a: $(OUTDIR)/x2ap_ieregen.stamp $(OUTDIR)/x2ap_asn1regen.stamp $(X2AP_GENERATED) $(addprefix $(OUTDIR)/,$(libx2ap_OBJECTS))
|
||||
@echo Creating X2AP archive
|
||||
@echo libx2ap_OBJECTS $(libx2ap_OBJECTS)
|
||||
@$(AR) rcs $@ $(X2AP_GENERATED) $(addprefix $(OUTDIR)/,$(libx2ap_OBJECTS))
|
||||
|
||||
clean:
|
||||
@$(RM_F_V) $(OUTDIR)/*.o
|
||||
@$(RM_F_V) $(OUTDIR)/*.d
|
||||
@$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/ASN1/$(ASN1RELDIR), $(X2AP_ASN_MODULE_SOURCES))
|
||||
@$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/ASN1/$(ASN1RELDIR), $(X2AP_ASN_MODULE_SOURCES:.o=.d))
|
||||
@$(RM_F_V) $(OUTDIR)/libx2ap.a
|
||||
@$(RM_F_V) $(OUTDIR)/x2ap_asn1regen.stamp
|
||||
@$(RM_F_V) $(OUTDIR)/x2ap_ieregen.stamp
|
||||
@$(RM_F_V) $(OUTDIR)/x2ap_decoder.c $(OUTDIR)/x2ap_encoder.c
|
||||
@$(RM_F_V) $(OUTDIR)/x2ap_xer_print.c $(OUTDIR)/x2ap_ies_defs.h
|
||||
|
||||
cleanall: clean
|
||||
@$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/ASN1/$(ASN1RELDIR), $(X2AP_ASN_MODULE_SOURCES:.o=.c))
|
||||
@$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/ASN1/$(ASN1RELDIR), $(X2AP_ASN_MODULE_SOURCES:.o=.h))
|
||||
|
||||
showcflags:
|
||||
@echo x2ap cflags: $(CFLAGS)
|
||||
Reference in New Issue
Block a user