Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
9a541e0d
Commit
9a541e0d
authored
Dec 11, 2015
by
alexandr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handover changes before X2 functions compilation
parent
5baf88a9
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
547 additions
and
87 deletions
+547
-87
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
cmake_targets/oaisim_mme_build_oai/CMakeLists.txt
cmake_targets/oaisim_mme_build_oai/CMakeLists.txt
+87
-0
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+4
-0
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+6
-1
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+3
-0
openair2/LAYER2/MAC/ra_procedures.c
openair2/LAYER2/MAC/ra_procedures.c
+1
-1
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+6
-0
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+2
-2
openair2/RRC/LITE/proto.h
openair2/RRC/LITE/proto.h
+4
-0
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+9
-8
openair2/RRC/LITE/rrc_common.c
openair2/RRC/LITE/rrc_common.c
+1
-0
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+239
-73
openair2/RRC/LITE/rrc_eNB_primitives.c
openair2/RRC/LITE/rrc_eNB_primitives.c
+83
-0
openair2/RRC/LITE/rrc_eNB_primitives.h
openair2/RRC/LITE/rrc_eNB_primitives.h
+48
-0
openair2/UTIL/OCG/OCG.h
openair2/UTIL/OCG/OCG.h
+6
-0
openair2/UTIL/OMG/TRACE/handover.tr
openair2/UTIL/OMG/TRACE/handover.tr
+3
-2
targets/SIMU/USER/oaisim.c
targets/SIMU/USER/oaisim.c
+3
-0
targets/SIMU/USER/oaisim_functions.c
targets/SIMU/USER/oaisim_functions.c
+39
-0
targets/SIMU/USER/oaisim_functions.h
targets/SIMU/USER/oaisim_functions.h
+2
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
9a541e0d
...
...
@@ -922,6 +922,7 @@ set(L2_SRC
${
RRC_DIR
}
/rrc_eNB.c
${
RRC_DIR
}
/rrc_eNB_S1AP.c
${
RRC_DIR
}
/rrc_eNB_UE_context.c
${
RRC_DIR
}
/rrc_eNB_primitives.c
${
RRC_DIR
}
/rrc_common.c
${
RRC_DIR
}
/L2_interface.c
)
...
...
cmake_targets/oaisim_mme_build_oai/CMakeLists.txt
0 → 100644
View file @
9a541e0d
cmake_minimum_required
(
VERSION 2.8
)
set
(
CMAKE_BUILD_TYPE
"RelWithDebInfo"
)
set
(
ADDR_CONF False
)
set
(
DEBUG_OMG False
)
set
(
DISABLE_XER_PRINT False
)
set
(
DRIVER2013 False
)
set
(
EMOS False
)
set
(
ENABLE_FXP False
)
set
(
ENABLE_ITTI True
)
set
(
ENABLE_NAS_UE_LOGGING False
)
set
(
ENABLE_NEW_MULTICAST False
)
set
(
ENABLE_PGM_TRANSPORT False
)
set
(
ENABLE_RAL False
)
set
(
ENABLE_SECURITY False
)
set
(
ENABLE_STANDALONE_EPC False
)
set
(
ENABLE_USE_CPU_EXECUTION_TIME False
)
set
(
ENABLE_USE_MME False
)
set
(
ENABLE_USE_RAW_SOCKET_FOR_SGI True
)
set
(
ENABLE_VCD_FIFO False
)
set
(
ENB_MODE False
)
set
(
EPC_BUILD True
)
set
(
EXMIMO_IOT False
)
set
(
HARD_RT False
)
set
(
JUMBO_FRAME False
)
set
(
LARGE_SCALE False
)
set
(
LINK_ENB_PDCP_TO_GTPV1U True
)
set
(
LINUX_LIST False
)
set
(
LINUX False
)
set
(
LOCALIZATION False
)
set
(
LOG_NO_THREAD False
)
set
(
LOWLATENCY False
)
set
(
MAC_CONTEXT 1
)
set
(
MAX_NUM_CCs 1
)
set
(
MIH_C_MEDIEVAL_EXTENSIONS False
)
set
(
MSG_PRINT False
)
set
(
MU_RECEIVER False
)
set
(
NAS_ADDRESS_FIX False
)
set
(
NAS_BUILT_IN_EPC True
)
set
(
NAS_MME True
)
set
(
NAS_NETLINK False
)
set
(
NAS_UE False
)
set
(
NB_ANTENNAS_RX
"2"
)
set
(
NB_ANTENNAS_TX
"2"
)
set
(
NB_ANTENNAS_TXRX
"2"
)
set
(
NEW_FFT False
)
set
(
NO_RRM False
)
set
(
OAI_EMU False
)
set
(
OAISIM False
)
set
(
OAI_NW_DRIVER_TYPE_ETHERNET False
)
set
(
OAI_NW_DRIVER_USE_NETLINK False
)
set
(
OPENAIR1 False
)
set
(
OPENAIR2 False
)
set
(
OPENAIR_EMU False
)
set
(
OPENAIR_LTE False
)
set
(
PACKAGE_NAME
"EPC"
)
set
(
PBS_SIM False
)
set
(
PC_DSP False
)
set
(
PC_TARGET False
)
set
(
PDCP_MSG_PRINT False
)
set
(
PERFECT_CE False
)
set
(
PHY_ABSTRACTION False
)
set
(
PHY_CONTEXT False
)
set
(
PHY_EMUL False
)
set
(
PHYSIM False
)
set
(
PUCCH False
)
set
(
RANDOM_BF False
)
set
(
RF_BOARD
"False"
)
set
(
RRC_ASN1_VERSION
"Rel10"
)
set
(
RLC_STOP_ON_LOST_PDU False
)
set
(
RRC_MSG_PRINT False
)
set
(
RTAI False
)
set
(
SECU False
)
set
(
SMBV False
)
set
(
SPECTRA False
)
set
(
TEST_OMG False
)
set
(
UPDATE_RELEASE_9 True
)
set
(
UPDATE_RELEASE_10 True
)
set
(
USE_3GPP_ADDR_AS_LINK_ADDR False
)
set
(
USE_MME
"R10"
)
set
(
USER_MODE True
)
set
(
XER_PRINT False
)
set
(
XFORMS False
)
set
(
XFORMS False
)
set
(
RRC_ASN1_VERSION
"Rel10"
)
set
(
ENABLE_VCD_FIFO False
)
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../CMakeLists.txt
)
openair2/LAYER2/MAC/config.c
View file @
9a541e0d
...
...
@@ -519,6 +519,10 @@ rrc_mac_config_req(
return
(
0
);
}
// Assign the new c-rnti in the UE context (during HO)
void
rrc_mac_get_new_crnti
(
protocol_ctxt_t
*
ctxt_pP
,
uint8_t
eNB_index
){
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
ctxt_pP
,
ctxt_pP
->
module_id
,
ENB_FLAG_NO
,
UE_mac_inst
[
ctxt_pP
->
module_id
].
crnti
,
ctxt_pP
->
frame
,
0
,
eNB_index
);
}
#ifdef LOCALIZATION
//------------------------------------------------------------------------------
double
...
...
openair2/LAYER2/MAC/defs.h
View file @
9a541e0d
...
...
@@ -824,6 +824,11 @@ typedef struct {
boolean_t
active
[
NUMBER_OF_UE_MAX
];
}
UE_list_t
;
typedef
struct
{
long
hys
;
long
ttt_ms
;
}
Handover_eNB_info
;
/*! \brief eNB common channels */
typedef
struct
{
/// Outgoing DCI for PHY generated by eNB scheduler
...
...
@@ -909,7 +914,7 @@ typedef struct {
time_stats_t
schedule_mch
;
/// processing time of eNB ULSCH reception
time_stats_t
rx_ulsch_sdu
;
// include rlc_data_ind
Handover_eNB_info
ho_info
;
}
eNB_MAC_INST
;
/*
...
...
openair2/LAYER2/MAC/proto.h
View file @
9a541e0d
...
...
@@ -754,6 +754,9 @@ int rrc_mac_config_req(module_id_t module_idP,
#endif
);
// Assign the new c-rnti in the UE context (during HO)
void
rrc_mac_get_new_crnti
(
protocol_ctxt_t
*
ctxt_pP
,
uint8_t
eNB_index
);
/** \brief get the estimated UE distance from the PHY->MAC layer.
@param Mod_id Instance ID of eNB
@param UE_id Index of UE if this is an eNB configuration
...
...
openair2/LAYER2/MAC/ra_procedures.c
View file @
9a541e0d
...
...
@@ -394,7 +394,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
1
);
//post_padding
return
(
&
UE_mac_inst
[
module_idP
].
RA_prach_resources
);
}
else
if
(
UE_mac_inst
[
module_idP
].
scheduling_info
.
BSR_bytes
[
DCCH
]
>
0
)
{
}
else
if
(
UE_mac_inst
[
module_idP
].
scheduling_info
.
BSR_bytes
[
UE_mac_inst
[
module_idP
].
scheduling_info
.
LCGID
[
DCCH
]
]
>
0
)
{
// This is for triggering a transmission on DCCH using PRACH (during handover, or sending SR for example)
dcch_header_len
=
2
+
2
;
/// SHORT Subheader + C-RNTI control element
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
UE_mac_inst
[
module_idP
].
crnti
,
eNB_indexP
,
frameP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
...
...
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
9a541e0d
...
...
@@ -2396,6 +2396,12 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
measurementReport
->
criticalExtensions
.
choice
.
c1
.
choice
.
measurementReport_r8
.
measResults
.
measResultNeighCells
->
choice
.
measResultListEUTRA
=*
(
measResultListEUTRA2
);
#ifdef Rel10
measurementReport
->
criticalExtensions
.
choice
.
c1
.
choice
.
measurementReport_r8
.
measResults
.
ext1
=
NULL
;
measurementReport
->
criticalExtensions
.
choice
.
c1
.
choice
.
measurementReport_r8
.
measResults
.
ext2
=
NULL
;
#endif
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
...
...
openair2/RRC/LITE/defs.h
View file @
9a541e0d
...
...
@@ -239,8 +239,8 @@ typedef struct HANDOVER_INFO_s {
uint8_t
ho_complete
;
uint8_t
modid_s
;
//module_idP of serving cell
uint8_t
modid_t
;
//module_idP of target cell
uint
8
_t
ueid_s
;
//UE index in serving cell
uint
8
_t
ueid_t
;
//UE index in target cell
uint
16
_t
ueid_s
;
//UE index in serving cell
uint
16
_t
ueid_t
;
//UE index in target cell
AS_Config_t
as_config
;
/* these two parameters are taken from 36.331 section 10.2.2: HandoverPreparationInformation-r8-IEs */
AS_Context_t
as_context
;
/* They are mandatory for HO */
uint8_t
buf
[
RRC_BUF_SIZE
];
/* ASN.1 encoded handoverCommandMessage */
...
...
openair2/RRC/LITE/proto.h
View file @
9a541e0d
...
...
@@ -279,6 +279,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
const
uint32_t
nas_length
);
void
rrc_eNB_configure_rbs_handover
(
struct
rrc_eNB_ue_context_s
*
ue_context_p
,
protocol_ctxt_t
*
const
ctxt_pP
);
void
rrc_eNB_target_add_ue_handover
(
protocol_ctxt_t
*
const
ctxt_pP
);
//L2_interface.c
int8_t
mac_rrc_lite_data_req
(
...
...
openair2/RRC/LITE/rrc_UE.c
View file @
9a541e0d
...
...
@@ -463,7 +463,7 @@ static void rrc_ue_generate_RRCConnectionReconfigurationComplete( const protocol
size
=
do_RRCConnectionReconfigurationComplete
(
ctxt_pP
,
buffer
,
Transaction_id
);
LOG_I
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Logical Channel UL-DCCH (SRB1), Generating RRCConnectionReconfigurationComplete (bytes %d, eNB_index %d)
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
size
,
eNB_index
);
LOG_D
(
R
L
C
,
LOG_D
(
R
R
C
,
"[FRAME %05d][RRC_UE][INST %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionReconfigurationComplete to eNB %d MUI %d) --->][PDCP][INST %02d][RB %02d]
\n
"
,
ctxt_pP
->
frame
,
UE_MODULE_ID_TO_INSTANCE
(
ctxt_pP
->
module_id
),
...
...
@@ -1695,13 +1695,13 @@ rrc_ue_process_mobilityControlInfo(
}
*/
//Removing SRB1 and SRB2 and DRB0
LOG_N
(
RRC
,
"[UE %d] : Update needed for rrc_pdcp_config_req (deprecated) and rrc_rlc_config_req commands(deprecated)
\n
"
,
ctxt_pP
->
module_id
);
rrc_pdcp_config_req
(
ctxt_pP
,
SRB_FLAG_YES
,
CONFIG_ACTION_REMOVE
,
DCCH
,
UNDEF_SECURITY_MODE
);
rrc_rlc_config_req
(
ctxt_pP
,
SRB_FLAG_YES
,
MBMS_FLAG_NO
,
CONFIG_ACTION_REMOVE
,
ctxt_pP
->
module_id
+
DCCH
,
Rlc_info_am_config
);
rrc_pdcp_config_req
(
ctxt_pP
,
SRB_FLAG_YES
,
CONFIG_ACTION_REMOVE
,
DCCH1
,
UNDEF_SECURITY_MODE
);
rrc_rlc_config_req
(
ctxt_pP
,
SRB_FLAG_YES
,
CONFIG_ACTION_REMOVE
,
MBMS_FLAG_NO
,
ctxt_pP
->
module_id
+
DCCH1
,
Rlc_info_am_config
);
rrc_pdcp_config_req
(
ctxt_pP
,
SRB_FLAG_NO
,
CONFIG_ACTION_REMOVE
,
DTCH
,
UNDEF_SECURITY_MODE
);
rrc_rlc_config_req
(
ctxt_pP
,
SRB_FLAG_NO
,
CONFIG_ACTION_REMOVE
,
MBMS_FLAG_NO
,
ctxt_pP
->
module_id
+
DTCH
,
Rlc_info_um
);
//
LOG_N(RRC,"[UE %d] : Update needed for rrc_pdcp_config_req (deprecated) and rrc_rlc_config_req commands(deprecated)\n", ctxt_pP->module_id);
//
rrc_pdcp_config_req (ctxt_pP, SRB_FLAG_YES, CONFIG_ACTION_REMOVE, DCCH,UNDEF_SECURITY_MODE);
//
rrc_rlc_config_req(ctxt_pP, SRB_FLAG_YES, MBMS_FLAG_NO, CONFIG_ACTION_REMOVE,ctxt_pP->module_id+DCCH,Rlc_info_am_config);
//
rrc_pdcp_config_req (ctxt_pP, SRB_FLAG_YES, CONFIG_ACTION_REMOVE, DCCH1,UNDEF_SECURITY_MODE);
//
rrc_rlc_config_req(ctxt_pP, SRB_FLAG_YES,CONFIG_ACTION_REMOVE, MBMS_FLAG_NO,ctxt_pP->module_id+DCCH1,Rlc_info_am_config);
//
rrc_pdcp_config_req (ctxt_pP, SRB_FLAG_NO, CONFIG_ACTION_REMOVE, DTCH,UNDEF_SECURITY_MODE);
//
rrc_rlc_config_req(ctxt_pP, SRB_FLAG_NO,CONFIG_ACTION_REMOVE, MBMS_FLAG_NO,ctxt_pP->module_id+DTCH,Rlc_info_um);
/*
rrc_pdcp_config_asn1_req(NB_eNB_INST+ue_mod_idP,frameP, 0,eNB_index,
NULL, // SRB_ToAddModList
...
...
@@ -1795,6 +1795,7 @@ rrc_ue_process_mobilityControlInfo(
// rrc_rlc_config_req(ue_mod_idP+NB_eNB_INST,frameP,0,CONFIG_ACTION_ADD,ue_mod_idP+DCCH,SIGNALLING_RADIO_BEARER,Rlc_info_am_config);
// rrc_rlc_config_req(ue_mod_idP+NB_eNB_INST,frameP,0,CONFIG_ACTION_ADD,ue_mod_idP+DCCH1,SIGNALLING_RADIO_BEARER,Rlc_info_am_config);
// rrc_rlc_config_req(ue_mod_idP+NB_eNB_INST,frameP,0,CONFIG_ACTION_ADD,ue_mod_idP+DTCH,RADIO_ACCESS_BEARER,Rlc_info_um);
rrc_mac_get_new_crnti
(
ctxt_pP
,
eNB_index
);
UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
eNB_index
].
State
=
RRC_SI_RECEIVED
;
}
...
...
openair2/RRC/LITE/rrc_common.c
View file @
9a541e0d
...
...
@@ -509,6 +509,7 @@ rrc_rx_tx(
if
((
UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
enb_indexP
].
State
==
RRC_HO_EXECUTION
)
&&
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
HandoverInfoUe
.
targetCellId
!=
0xFF
))
{
UE_rrc_inst
[
ctxt_pP
->
module_id
].
Srb0
[
enb_indexP
].
Tx_buffer
.
payload_size
=
0
;
UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
enb_indexP
].
State
=
RRC_IDLE
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX
,
VCD_FUNCTION_OUT
);
return
(
RRC_HO_STARTED
);
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
9a541e0d
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_eNB_primitives.c
0 → 100644
View file @
9a541e0d
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2015 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file event_handler.h
* \brief primitives to handle event acting on oai
* \author Konstantinos Alexandris,
* \date 2015
* \version 0.5
* @ingroup _oai
*/
#include "targets/SIMU/USER/oaisim.h"
#include "rrc_eNB_primitives.h"
#include "UTIL/OCG/OCG.h"
void
init_HO
(
Handover_info
*
ho_info
)
{
int
enb_module_id
=
0
;
for
(
enb_module_id
=
0
;
enb_module_id
<
NUMBER_OF_eNB_MAX
;
enb_module_id
++
)
{
// Set ofn parameter
set_hys
(
enb_module_id
,
ho_info
->
hys
);
printf
(
"Hysteresis for eNB %d is set to %ld
\n
"
,
enb_module_id
,
get_hys
(
enb_module_id
));
set_ttt_ms
(
enb_module_id
,
ho_info
->
ttt_ms
);
printf
(
"Time to trigger for eNB %d is set to %ld
\n
"
,
enb_module_id
,
get_ttt_ms
(
enb_module_id
));
}
}
// Getters/setters for HO parameters
// Hysteresis
void
set_hys
(
int
enb_module_id
,
long
hys
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
eNB_mac_inst
->
ho_info
.
hys
=
hys
;
}
long
get_hys
(
int
enb_module_id
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
return
eNB_mac_inst
->
ho_info
.
hys
;
}
// Time to trigger
void
set_ttt_ms
(
int
enb_module_id
,
long
ttt_ms
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
eNB_mac_inst
->
ho_info
.
ttt_ms
=
ttt_ms
;
}
long
get_ttt_ms
(
int
enb_module_id
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
return
eNB_mac_inst
->
ho_info
.
ttt_ms
;
}
openair2/RRC/LITE/rrc_eNB_primitives.h
0 → 100644
View file @
9a541e0d
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2015 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file event_handler.h
* \brief primitives to handle event acting on oai
* \author Konstantinos Alexandris,
* \date 2015
* \version 0.5
* @ingroup _oai
*/
#include "UTIL/OCG/OCG.h"
void
init_HO
(
Handover_info
*
ho_info
);
void
set_hys
(
int
enb_module_id
,
long
hys
);
long
get_hys
(
int
enb_module_id
);
void
set_ttt_ms
(
int
enb_module_id
,
long
ttt_ms
);
long
get_ttt_ms
(
int
enb_module_id
);
openair2/UTIL/OCG/OCG.h
View file @
9a541e0d
...
...
@@ -735,6 +735,11 @@ typedef struct {
}
Info
;
/* @}*/
typedef
struct
{
long
hys
;
long
ttt_ms
;
}
Handover_info
;
/** @defgroup _OSD_basic Basic OpenAirInterface Scenario Descriptor
* @ingroup _OCG
* @brief OAI Emulation struct for OSD_basic
...
...
@@ -747,6 +752,7 @@ typedef struct {
Emulation_Config
emulation_config
;
/*!< \brief Emulation configuration */
Protocol_Config
protocol_config
;
/* specific protocol configuration*/
Info
info
;
/*!< \brief Some important information which should be able to be reached by OAISIM */
Handover_info
ho_info
;
// Information for handover
char
*
profile
;
}
OAI_Emulation
;
/* @}*/
...
...
openair2/UTIL/OMG/TRACE/handover.tr
View file @
9a541e0d
0 0 1800 4700 200
0 0 1800 4800 1000
1 0 4700 4840 1000
2 0 6500 4880 1000
targets/SIMU/USER/oaisim.c
View file @
9a541e0d
...
...
@@ -94,6 +94,7 @@ char smbv_ip[16];
#include "oaisim.h"
#include "oaisim_config.h"
#include "RRC/LITE/rrc_eNB_primitives.h"
#include "UTIL/OCG/OCG_extern.h"
#include "cor_SF_sim.h"
#include "UTIL/OMG/omg_constants.h"
...
...
@@ -1326,6 +1327,8 @@ main (int argc, char **argv)
init_ocm
();
init_HO
(
&
oai_emulation
.
ho_info
);
#ifdef SMBV
// Rohde&Schwarz SMBV100A vector signal generator
smbv_init_config
(
smbv_fname
,
smbv_nframes
);
...
...
targets/SIMU/USER/oaisim_functions.c
View file @
9a541e0d
...
...
@@ -206,6 +206,10 @@ void get_simulation_options(int argc, char *argv[])
LONG_OPTION_MALLOC_TRACE_ENABLED
,
LONG_OPTION_CBA_BACKOFF_TIMER
,
LONG_OPTION_HYS
,
LONG_OPTION_TTT_MS
,
};
static
struct
option
long_options
[]
=
{
...
...
@@ -237,11 +241,42 @@ void get_simulation_options(int argc, char *argv[])
{
"cba-backoff"
,
required_argument
,
0
,
LONG_OPTION_CBA_BACKOFF_TIMER
},
{
"hys"
,
required_argument
,
0
,
LONG_OPTION_HYS
},
{
"ttt_ms"
,
required_argument
,
0
,
LONG_OPTION_TTT_MS
},
{
NULL
,
0
,
NULL
,
0
}
};
oai_emu_ho_init
(
&
oai_emulation
.
ho_info
);
while
((
option
=
getopt_long
(
argc
,
argv
,
"aA:b:B:c:C:D:d:eE:f:FGg:hHi:IJ:j:k:K:l:L:m:M:n:N:oO:p:P:qQ:rR:s:S:t:T:u:U:vV:w:W:x:X:y:Y:z:Z:"
,
long_options
,
NULL
))
!=
-
1
)
{
switch
(
option
)
{
case
LONG_OPTION_HYS
:
if
(
optarg
)
{
oai_emulation
.
ho_info
.
hys
=
atoi
(
optarg
);
//printf("Hysteresis is %ld \n",oai_emulation.ho_info.hys);
}
if
(
oai_emulation
.
ho_info
.
hys
<
0
){
printf
(
"Unsupported hysteresis value-Hysteresis should be non-negative
\n
"
);
exit
(
-
1
);
}
break
;
case
LONG_OPTION_TTT_MS
:
if
(
optarg
)
{
oai_emulation
.
ho_info
.
ttt_ms
=
atoi
(
optarg
);
//printf("Time to trigger is %ld \n",oai_emulation.ho_info.ttt_ms);
}
if
(
oai_emulation
.
ho_info
.
ttt_ms
<
0
){
printf
(
"Unsupported time to trigger value-Time to trigger should be non-negative
\n
"
);
exit
(
-
1
);
}
break
;
case
LONG_OPTION_ENB_CONF
:
if
(
optarg
)
{
free
(
conf_config_file_name
);
// prevent memory leak if option is used multiple times
...
...
@@ -1537,3 +1572,7 @@ void init_time()
td_avg
=
TARGET_SF_TIME_NS
;
}
void
oai_emu_ho_init
(
Handover_info
*
ho_info
){
ho_info
->
hys
=-
1
;
ho_info
->
ttt_ms
=-
1
;
}
targets/SIMU/USER/oaisim_functions.h
View file @
9a541e0d
...
...
@@ -67,6 +67,8 @@ void exit_fun(const char* s);
void
init_time
(
void
);
void
oai_emu_ho_init
(
Handover_info
*
ho_info
);
void
init_pad
(
void
);
void
help
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment