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
promise
OpenXG-RAN
Commits
9a541e0d
Commit
9a541e0d
authored
9 years ago
by
alexandr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handover changes before X2 functions compilation
parent
5baf88a9
Changes
19
Show 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
...
@@ -922,6 +922,7 @@ set(L2_SRC
${
RRC_DIR
}
/rrc_eNB.c
${
RRC_DIR
}
/rrc_eNB.c
${
RRC_DIR
}
/rrc_eNB_S1AP.c
${
RRC_DIR
}
/rrc_eNB_S1AP.c
${
RRC_DIR
}
/rrc_eNB_UE_context.c
${
RRC_DIR
}
/rrc_eNB_UE_context.c
${
RRC_DIR
}
/rrc_eNB_primitives.c
${
RRC_DIR
}
/rrc_common.c
${
RRC_DIR
}
/rrc_common.c
${
RRC_DIR
}
/L2_interface.c
${
RRC_DIR
}
/L2_interface.c
)
)
...
...
This diff is collapsed.
Click to expand it.
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
)
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/config.c
View file @
9a541e0d
...
@@ -519,6 +519,10 @@ rrc_mac_config_req(
...
@@ -519,6 +519,10 @@ rrc_mac_config_req(
return
(
0
);
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
#ifdef LOCALIZATION
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
double
double
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/defs.h
View file @
9a541e0d
...
@@ -824,6 +824,11 @@ typedef struct {
...
@@ -824,6 +824,11 @@ typedef struct {
boolean_t
active
[
NUMBER_OF_UE_MAX
];
boolean_t
active
[
NUMBER_OF_UE_MAX
];
}
UE_list_t
;
}
UE_list_t
;
typedef
struct
{
long
hys
;
long
ttt_ms
;
}
Handover_eNB_info
;
/*! \brief eNB common channels */
/*! \brief eNB common channels */
typedef
struct
{
typedef
struct
{
/// Outgoing DCI for PHY generated by eNB scheduler
/// Outgoing DCI for PHY generated by eNB scheduler
...
@@ -909,7 +914,7 @@ typedef struct {
...
@@ -909,7 +914,7 @@ typedef struct {
time_stats_t
schedule_mch
;
time_stats_t
schedule_mch
;
/// processing time of eNB ULSCH reception
/// processing time of eNB ULSCH reception
time_stats_t
rx_ulsch_sdu
;
// include rlc_data_ind
time_stats_t
rx_ulsch_sdu
;
// include rlc_data_ind
Handover_eNB_info
ho_info
;
}
eNB_MAC_INST
;
}
eNB_MAC_INST
;
/*
/*
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/proto.h
View file @
9a541e0d
...
@@ -754,6 +754,9 @@ int rrc_mac_config_req(module_id_t module_idP,
...
@@ -754,6 +754,9 @@ int rrc_mac_config_req(module_id_t module_idP,
#endif
#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.
/** \brief get the estimated UE distance from the PHY->MAC layer.
@param Mod_id Instance ID of eNB
@param Mod_id Instance ID of eNB
@param UE_id Index of UE if this is an eNB configuration
@param UE_id Index of UE if this is an eNB configuration
...
...
This diff is collapsed.
Click to expand it.
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,
...
@@ -394,7 +394,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
1
);
//post_padding
1
);
//post_padding
return
(
&
UE_mac_inst
[
module_idP
].
RA_prach_resources
);
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)
// 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
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
,
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
UE_mac_inst
[
module_idP
].
crnti
,
eNB_indexP
,
frameP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
...
...
This diff is collapsed.
Click to expand it.
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_
...
@@ -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
);
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
,
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
buffer
,
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/defs.h
View file @
9a541e0d
...
@@ -239,8 +239,8 @@ typedef struct HANDOVER_INFO_s {
...
@@ -239,8 +239,8 @@ typedef struct HANDOVER_INFO_s {
uint8_t
ho_complete
;
uint8_t
ho_complete
;
uint8_t
modid_s
;
//module_idP of serving cell
uint8_t
modid_s
;
//module_idP of serving cell
uint8_t
modid_t
;
//module_idP of target cell
uint8_t
modid_t
;
//module_idP of target cell
uint
8
_t
ueid_s
;
//UE index in serving cell
uint
16
_t
ueid_s
;
//UE index in serving cell
uint
8
_t
ueid_t
;
//UE index in target 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_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 */
AS_Context_t
as_context
;
/* They are mandatory for HO */
uint8_t
buf
[
RRC_BUF_SIZE
];
/* ASN.1 encoded handoverCommandMessage */
uint8_t
buf
[
RRC_BUF_SIZE
];
/* ASN.1 encoded handoverCommandMessage */
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/proto.h
View file @
9a541e0d
...
@@ -279,6 +279,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
...
@@ -279,6 +279,10 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
const
uint32_t
nas_length
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
//L2_interface.c
int8_t
int8_t
mac_rrc_lite_data_req
(
mac_rrc_lite_data_req
(
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_UE.c
View file @
9a541e0d
...
@@ -463,7 +463,7 @@ static void rrc_ue_generate_RRCConnectionReconfigurationComplete( const protocol
...
@@ -463,7 +463,7 @@ static void rrc_ue_generate_RRCConnectionReconfigurationComplete( const protocol
size
=
do_RRCConnectionReconfigurationComplete
(
ctxt_pP
,
buffer
,
Transaction_id
);
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
"
,
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
);
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
"
,
"[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
,
ctxt_pP
->
frame
,
UE_MODULE_ID_TO_INSTANCE
(
ctxt_pP
->
module_id
),
UE_MODULE_ID_TO_INSTANCE
(
ctxt_pP
->
module_id
),
...
@@ -1695,13 +1695,13 @@ rrc_ue_process_mobilityControlInfo(
...
@@ -1695,13 +1695,13 @@ rrc_ue_process_mobilityControlInfo(
}
}
*/
*/
//Removing SRB1 and SRB2 and DRB0
//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
);
//
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_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_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_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_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_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_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,
rrc_pdcp_config_asn1_req(NB_eNB_INST+ue_mod_idP,frameP, 0,eNB_index,
NULL, // SRB_ToAddModList
NULL, // SRB_ToAddModList
...
@@ -1795,6 +1795,7 @@ rrc_ue_process_mobilityControlInfo(
...
@@ -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+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+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_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
;
UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
eNB_index
].
State
=
RRC_SI_RECEIVED
;
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_common.c
View file @
9a541e0d
...
@@ -509,6 +509,7 @@ rrc_rx_tx(
...
@@ -509,6 +509,7 @@ rrc_rx_tx(
if
((
UE_rrc_inst
[
ctxt_pP
->
module_id
].
Info
[
enb_indexP
].
State
==
RRC_HO_EXECUTION
)
&&
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
].
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
;
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
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX
,
VCD_FUNCTION_OUT
);
return
(
RRC_HO_STARTED
);
return
(
RRC_HO_STARTED
);
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_eNB.c
View file @
9a541e0d
...
@@ -1116,6 +1116,11 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
...
@@ -1116,6 +1116,11 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
DedicatedInfoNAS_t
*
dedicatedInfoNas
=
NULL
;
DedicatedInfoNAS_t
*
dedicatedInfoNas
=
NULL
;
C_RNTI_t
*
cba_RNTI
=
NULL
;
C_RNTI_t
*
cba_RNTI
=
NULL
;
// HO parameters
Hysteresis_t
hys
;
TimeToTrigger_t
ttt_ms
;
#ifdef CBA
#ifdef CBA
//struct PUSCH_CBAConfigDedicated_vlola *pusch_CBAConfigDedicated_vlola;
//struct PUSCH_CBAConfigDedicated_vlola *pusch_CBAConfigDedicated_vlola;
uint8_t
*
cba_RNTI_buf
;
uint8_t
*
cba_RNTI_buf
;
...
@@ -1460,9 +1465,23 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
...
@@ -1460,9 +1465,23 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
reportInterval
=
ReportInterval_ms120
;
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
reportInterval
=
ReportInterval_ms120
;
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
reportAmount
=
ReportConfigEUTRA__reportAmount_infinity
;
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
reportAmount
=
ReportConfigEUTRA__reportAmount_infinity
;
if
((
hys
=
get_hys
(
ctxt_pP
->
module_id
))
>=
0
){
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
hysteresis
=
hys
;
LOG_D
(
RRC
,
"Hysteresis for eNB %d is set to %ld
\n
"
,
ctxt_pP
->
module_id
,
hys
);
}
else
{
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
hysteresis
=
0
.
5
;
// FIXME ...hysteresis is of type long!
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
hysteresis
=
0
.
5
;
// FIXME ...hysteresis is of type long!
//LOG_D(RRC,"Hysteresis for eNB %d is set to %d\n",ctxt_pP->module_id,0);
}
if
((
ttt_ms
=
get_ttt_ms
(
ctxt_pP
->
module_id
))
>=
0
){
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
timeToTrigger
=
ttt_ms
;
LOG_D
(
RRC
,
"Time to trigger for eNB %d is set to %d
\n
"
,
ctxt_pP
->
module_id
,
ttt_ms
);
}
else
{
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
timeToTrigger
=
ReportConfig_A3
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
timeToTrigger
=
TimeToTrigger_ms40
;
TimeToTrigger_ms40
;
//LOG_D(RRC,"Time to trigger for eNB %d is set to %d\n",ctxt_pP->module_id,TimeToTrigger_ms40);
}
ASN_SEQUENCE_ADD
(
&
ReportConfig_list
->
list
,
ReportConfig_A3
);
ASN_SEQUENCE_ADD
(
&
ReportConfig_list
->
list
,
ReportConfig_A3
);
ReportConfig_A4
->
reportConfigId
=
5
;
ReportConfig_A4
->
reportConfigId
=
5
;
...
@@ -1822,7 +1841,6 @@ rrc_eNB_generate_HandoverPreparationInformation(
...
@@ -1822,7 +1841,6 @@ rrc_eNB_generate_HandoverPreparationInformation(
)
)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
struct
rrc_eNB_ue_context_s
*
ue_context_target_p
=
NULL
;
//uint8_t UE_id_target = -1;
//uint8_t UE_id_target = -1;
uint8_t
mod_id_target
=
get_adjacent_cell_mod_id
(
targetPhyId
);
uint8_t
mod_id_target
=
get_adjacent_cell_mod_id
(
targetPhyId
);
HANDOVER_INFO
*
handoverInfo
=
CALLOC
(
1
,
sizeof
(
*
handoverInfo
));
HANDOVER_INFO
*
handoverInfo
=
CALLOC
(
1
,
sizeof
(
*
handoverInfo
));
...
@@ -1862,53 +1880,13 @@ rrc_eNB_generate_HandoverPreparationInformation(
...
@@ -1862,53 +1880,13 @@ rrc_eNB_generate_HandoverPreparationInformation(
ue_context_pP
->
ue_context
.
handover_info
->
as_context
.
reestablishmentInfo
->
targetCellShortMAC_I
.
bits_unused
=
0
;
ue_context_pP
->
ue_context
.
handover_info
->
as_context
.
reestablishmentInfo
->
targetCellShortMAC_I
.
bits_unused
=
0
;
ue_context_pP
->
ue_context
.
handover_info
->
as_context
.
reestablishmentInfo
->
additionalReestabInfoList
=
NULL
;
ue_context_pP
->
ue_context
.
handover_info
->
as_context
.
reestablishmentInfo
->
additionalReestabInfoList
=
NULL
;
ue_context_pP
->
ue_context
.
handover_info
->
ho_prepare
=
0xFF
;
ue_context_pP
->
ue_context
.
handover_info
->
ho_prepare
=
0xFF
;
ue_context_pP
->
ue_context
.
handover_info
->
ho_complete
=
0
;
ue_context_pP
->
ue_context
.
handover_info
->
ho_complete
=
0
x00
;
if
(
mod_id_target
!=
0xFF
)
{
if
(
mod_id_target
!=
0xFF
)
{
//UE_id_target = rrc_find_free_ue_index(modid_target);
ue_context_target_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id_target
],
ue_context_pP
->
ue_context
.
rnti
);
/*UE_id_target = rrc_eNB_get_next_free_UE_index(
mod_id_target,
eNB_rrc_inst[ctxt_pP->module_id].Info.UE_list[ue_mod_idP]); //this should return a new index*/
if
(
ue_context_target_p
==
NULL
)
{
// if not already in target cell
ue_context_target_p
=
rrc_eNB_allocate_new_UE_context
(
&
eNB_rrc_inst
[
ctxt_pP
->
module_id
]);
ue_context_target_p
->
ue_id_rnti
=
ue_context_pP
->
ue_context
.
rnti
;
// LG: should not be the same
ue_context_target_p
->
ue_context
.
rnti
=
ue_context_target_p
->
ue_id_rnti
;
// idem
LOG_N
(
RRC
,
"[eNB %d] Frame %d : Emulate sending HandoverPreparationInformation msg from eNB source %d to eNB target %d: source UE_id %x target UE_id %x source_modId: %d target_modId: %d
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
eNB_rrc_inst
[
ctxt_pP
->
module_id
].
carrier
[
0
]
/* CROUX TBC */
.
physCellId
,
targetPhyId
,
ue_context_pP
->
ue_context
.
rnti
,
ue_context_target_p
->
ue_id_rnti
,
ctxt_pP
->
module_id
,
mod_id_target
);
ue_context_target_p
->
ue_context
.
handover_info
=
CALLOC
(
1
,
sizeof
(
*
(
ue_context_target_p
->
ue_context
.
handover_info
)));
memcpy
((
void
*
)
&
ue_context_target_p
->
ue_context
.
handover_info
->
as_context
,
(
void
*
)
&
ue_context_pP
->
ue_context
.
handover_info
->
as_context
,
sizeof
(
AS_Context_t
));
memcpy
((
void
*
)
&
ue_context_target_p
->
ue_context
.
handover_info
->
as_config
,
(
void
*
)
&
ue_context_pP
->
ue_context
.
handover_info
->
as_config
,
sizeof
(
AS_Config_t
));
ue_context_target_p
->
ue_context
.
handover_info
->
ho_prepare
=
0x00
;
// 0xFF;
ue_context_target_p
->
ue_context
.
handover_info
->
ho_complete
=
0
;
ue_context_pP
->
ue_context
.
handover_info
->
modid_t
=
mod_id_target
;
ue_context_pP
->
ue_context
.
handover_info
->
modid_t
=
mod_id_target
;
ue_context_pP
->
ue_context
.
handover_info
->
ueid_s
=
ue_context_pP
->
ue_context
.
rnti
;
ue_context_pP
->
ue_context
.
handover_info
->
ueid_s
=
ue_context_pP
->
ue_context
.
rnti
;
ue_context_pP
->
ue_context
.
handover_info
->
modid_s
=
ctxt_pP
->
module_id
;
ue_context_pP
->
ue_context
.
handover_info
->
modid_s
=
ctxt_pP
->
module_id
;
ue_context_target_p
->
ue_context
.
handover_info
->
modid_t
=
mod_id_target
;
ue_context_target_p
->
ue_context
.
handover_info
->
modid_s
=
ctxt_pP
->
module_id
;
ue_context_target_p
->
ue_context
.
handover_info
->
ueid_t
=
ue_context_target_p
->
ue_context
.
rnti
;
}
else
{
LOG_E
(
RRC
,
"
\n
Error in obtaining free UE id in target eNB %l for handover
\n
"
,
targetPhyId
);
}
}
else
{
}
else
{
LOG_E
(
RRC
,
"
\n
Error in obtaining Module ID of target eNB for handover
\n
"
);
LOG_E
(
RRC
,
"
\n
Error in obtaining Module ID of target eNB for handover
\n
"
);
...
@@ -1924,16 +1902,80 @@ rrc_eNB_process_handoverPreparationInformation(
...
@@ -1924,16 +1902,80 @@ rrc_eNB_process_handoverPreparationInformation(
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
{
{
struct
rrc_eNB_ue_context_s
*
ue_context_target_p
=
NULL
;
uint8_t
mod_id_target
=
ue_context_pP
->
ue_context
.
handover_info
->
modid_t
;
LOG_I
(
RRC
,
LOG_I
(
RRC
,
"[eNB %d] Frame %d : Logical Channel UL-DCCH, processing RRCHandoverPreparationInformation, sending RRCConnectionReconfiguration to UE %d
\n
"
,
"[eNB %d] Frame %d : Logical Channel UL-DCCH, processing RRCHandoverPreparationInformation, sending RRCConnectionReconfiguration to UE %d
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
ue_context_pP
->
ue_context
.
rnti
);
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
ue_context_pP
->
ue_context
.
rnti
);
rrc_eNB_generate_RRCConnectionReconfiguration_handover
(
rrc_eNB_generate_RRCConnectionReconfiguration_handover
(
ctxt_pP
,
ctxt_pP
,
ue_context_pP
,
ue_context_pP
,
NULL
,
NULL
,
0
);
0
);
}
//UE_id_target = rrc_find_free_ue_index(mod_id_target);
ue_context_target_p
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
mod_id_target
],
ue_context_pP
->
ue_context
.
handover_info
->
ueid_t
);
/*UE_id_target = rrc_eNB_get_next_free_UE_index(
mod_id_target,
eNB_rrc_inst[ctxt_pP->module_id].Info.UE_list[ue_mod_idP]); //this should return a new index*/
if
(
ue_context_target_p
==
NULL
)
{
ue_context_target_p
=
rrc_eNB_allocate_new_UE_context
(
&
eNB_rrc_inst
[
mod_id_target
]);
if
(
ue_context_target_p
==
NULL
)
{
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Cannot create new UE context, no memory
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
//return;
}
ue_context_target_p
->
ue_id_rnti
=
ue_context_pP
->
ue_context
.
handover_info
->
ueid_t
;
// here ue_id_rnti is just a key, may be something else
ue_context_target_p
->
ue_context
.
rnti
=
ue_context_pP
->
ue_context
.
handover_info
->
ueid_t
;
// yes duplicate, 1 may be removed
// ue_context_target_p->ue_context.random_ue_identity = ue_identityP;
RB_INSERT
(
rrc_ue_tree_s
,
&
eNB_rrc_inst
[
mod_id_target
].
rrc_ue_head
,
ue_context_target_p
);
LOG_D
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Created new UE context uid %u
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ue_context_pP
->
local_uid
);
LOG_D
(
RRC
,
"[eNB %d] Frame %d : Emulate sending HandoverPreparationInformation msg from eNB source/eNB target: source UE_id %x target UE_id %x source_modId: %d target_modId: %d
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
ue_context_pP
->
ue_context
.
rnti
,
ue_context_target_p
->
ue_id_rnti
,
ctxt_pP
->
module_id
,
mod_id_target
);
ue_context_target_p
->
ue_context
.
handover_info
=
CALLOC
(
1
,
sizeof
(
*
(
ue_context_target_p
->
ue_context
.
handover_info
)));
// memcpy((void*)&ue_context_target_p->ue_context.handover_info->as_context,
//(void*)&ue_context_pP->ue_context.handover_info->as_context,
//sizeof(AS_Context_t));
// memcpy((void*)&ue_context_target_p->ue_context.handover_info->as_config,
// (void*)&ue_context_pP->ue_context.handover_info->as_config,
// sizeof(AS_Config_t));
ue_context_target_p
->
ue_context
.
handover_info
->
ho_prepare
=
0xF2
;
// 0xFF;
ue_context_target_p
->
ue_context
.
handover_info
->
ho_complete
=
0x00
;
ue_context_target_p
->
ue_context
.
handover_info
->
modid_t
=
mod_id_target
;
ue_context_target_p
->
ue_context
.
handover_info
->
modid_s
=
ctxt_pP
->
module_id
;
ue_context_target_p
->
ue_context
.
handover_info
->
ueid_s
=
ue_context_pP
->
ue_context
.
rnti
;
}
else
{
LOG_E
(
RRC
,
"
\n
Error in obtaining free UE id in target eNB for handover
\n
"
);
}
//rrc_create_new_crnti(ctxt_pP,ue_context_target_p->ue_context.handover_info->modid_t,0, ue_context_target_p->ue_id_rnti);
//rrc_create_old_crnti(ctxt_pP,ue_context_target_p->ue_context.handover_info->modid_s,0, ue_context_pP->ue_id_rnti);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void
void
...
@@ -1944,6 +1986,8 @@ check_handovers(
...
@@ -1944,6 +1986,8 @@ check_handovers(
{
{
int
result
;
int
result
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
;
struct
rrc_eNB_ue_context_s
*
ue_context_p
;
RB_FOREACH
(
ue_context_p
,
rrc_ue_tree_s
,
&
eNB_rrc_inst
[
ctxt_pP
->
module_id
].
rrc_ue_head
)
{
RB_FOREACH
(
ue_context_p
,
rrc_ue_tree_s
,
&
eNB_rrc_inst
[
ctxt_pP
->
module_id
].
rrc_ue_head
)
{
ctxt_pP
->
rnti
=
ue_context_p
->
ue_id_rnti
;
ctxt_pP
->
rnti
=
ue_context_p
->
ue_id_rnti
;
...
@@ -1963,28 +2007,147 @@ check_handovers(
...
@@ -1963,28 +2007,147 @@ check_handovers(
ue_context_p
->
ue_context
.
handover_info
->
ho_prepare
=
0xF0
;
ue_context_p
->
ue_context
.
handover_info
->
ho_prepare
=
0xF0
;
}
}
//if (ue_context_p->ue_context.handover_info->ho_complete == 0xF1) {
if
(
ue_context_p
->
ue_context
.
handover_info
->
ho_prepare
==
0xF2
)
{
//LOG_D(RRC,
// Configure target
// "[eNB %d] Frame %d: handover Command received for new UE_id %x current eNB %d target eNB: %d \n",
rrc_eNB_configure_rbs_handover
(
ue_context_p
,
ctxt_pP
);
//ctxt_pP->module_id,
ue_context_p
->
ue_context
.
handover_info
->
ho_prepare
=
0x00
;
//ctxt_pP->frame,
}
//ctxt_pP->rnti,
//ctxt_pP->module_id,
//ue_context_p->ue_context.handover_info->modid_t);
if
(
ue_context_p
->
ue_context
.
handover_info
->
ho_complete
==
0xF1
)
{
LOG_D
(
RRC
,
"[eNB %d] Frame %d: handover Command received for new UE_id %x current eNB %d target eNB: %d
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
ctxt_pP
->
rnti
,
ctxt_pP
->
module_id
,
ue_context_p
->
ue_context
.
handover_info
->
modid_t
);
//rrc_eNB_process_handoverPreparationInformation(enb_mod_idP,frameP,i);
//rrc_eNB_process_handoverPreparationInformation(enb_mod_idP,frameP,i);
//result = pdcp_data_req(ctxt_pP,
result
=
pdcp_data_req
(
ctxt_pP
,
//SRB_FLAG_YES,
SRB_FLAG_YES
,
//DCCH,
DCCH
,
//rrc_eNB_mui++,
rrc_eNB_mui
++
,
//SDU_CONFIRM_NO,
SDU_CONFIRM_NO
,
//ue_context_p->ue_context.handover_info->size,
ue_context_p
->
ue_context
.
handover_info
->
size
,
//ue_context_p->ue_context.handover_info->buf,
ue_context_p
->
ue_context
.
handover_info
->
buf
,
//PDCP_TRANSMISSION_MODE_CONTROL);
PDCP_TRANSMISSION_MODE_CONTROL
);
//AssertFatal(result == TRUE, "PDCP data request failed!\n");
AssertFatal
(
result
==
TRUE
,
"PDCP data request failed!
\n
"
);
//ue_context_p->ue_context.handover_info->ho_complete = 0xF2;
ue_context_p
->
ue_context
.
handover_info
->
ho_complete
=
0xF2
;
//}
}
}
}
}
}
}
void
rrc_eNB_configure_rbs_handover
(
struct
rrc_eNB_ue_context_s
*
ue_context_p
,
protocol_ctxt_t
*
const
ctxt_pP
){
struct
rrc_eNB_ue_context_s
*
ue_source_context
;
uint16_t
Idx
;
ue_source_context
=
rrc_eNB_get_ue_context
(
&
eNB_rrc_inst
[
ue_context_p
->
ue_context
.
handover_info
->
modid_s
],
ue_context_p
->
ue_context
.
handover_info
->
ueid_s
);
if
(
ue_source_context
!=
NULL
){
LOG_D
(
RRC
,
"Frame: %d-Entering target: C-RNTI %x-eNB: %d-MOD_ID: %d
\n
"
,
ctxt_pP
->
frame
,
ctxt_pP
->
rnti
,
ctxt_pP
->
eNB_index
,
ctxt_pP
->
module_id
);
// E-RABS
// Emulating transmission/reception (just a memory copy)
ue_context_p
->
ue_context
.
SRB_configList
=
CALLOC
(
1
,
sizeof
(
*
(
ue_context_p
->
ue_context
.
SRB_configList
)));
memcpy
(
ue_context_p
->
ue_context
.
SRB_configList
,
(
void
*
)
ue_source_context
->
ue_context
.
handover_info
->
as_config
.
sourceRadioResourceConfig
.
srb_ToAddModList
,
sizeof
(
SRB_ToAddModList_t
));
ue_context_p
->
ue_context
.
DRB_configList
=
CALLOC
(
1
,
sizeof
(
*
(
ue_context_p
->
ue_context
.
DRB_configList
)));
memcpy
((
void
*
)
ue_context_p
->
ue_context
.
DRB_configList
,
(
void
*
)
ue_source_context
->
ue_context
.
handover_info
->
as_config
.
sourceRadioResourceConfig
.
drb_ToAddModList
,
sizeof
(
DRB_ToAddModList_t
));
//ue_context_pP->ue_context.handover_info->as_config.sourceRadioResourceConfig.drb_ToReleaseList = NULL;
ue_context_p
->
ue_context
.
mac_MainConfig
=
CALLOC
(
1
,
sizeof
(
*
(
ue_context_p
->
ue_context
.
mac_MainConfig
)));
memcpy
((
void
*
)
ue_context_p
->
ue_context
.
mac_MainConfig
,
(
void
*
)
ue_source_context
->
ue_context
.
handover_info
->
as_config
.
sourceRadioResourceConfig
.
mac_MainConfig
,
sizeof
(
MAC_MainConfig_t
));
ue_context_p
->
ue_context
.
physicalConfigDedicated
=
CALLOC
(
1
,
sizeof
(
*
(
ue_context_p
->
ue_context
.
physicalConfigDedicated
)));
memcpy
((
void
*
)
ue_context_p
->
ue_context
.
physicalConfigDedicated
,
(
void
*
)
ue_source_context
->
ue_context
.
handover_info
->
as_config
.
sourceRadioResourceConfig
.
physicalConfigDedicated
,
sizeof
(
PhysicalConfigDedicated_t
));
Idx
=
DCCH
;
// Activate the radio bearers
// SRB1
ue_context_p
->
ue_context
.
Srb1
.
Active
=
1
;
ue_context_p
->
ue_context
.
Srb1
.
Srb_info
.
Srb_id
=
Idx
;
memcpy
(
&
ue_context_p
->
ue_context
.
Srb1
.
Srb_info
.
Lchan_desc
[
0
],
&
DCCH_LCHAN_DESC
,
LCHAN_DESC_SIZE
);
memcpy
(
&
ue_context_p
->
ue_context
.
Srb1
.
Srb_info
.
Lchan_desc
[
1
],
&
DCCH_LCHAN_DESC
,
LCHAN_DESC_SIZE
);
// SRB2
ue_context_p
->
ue_context
.
Srb2
.
Active
=
1
;
ue_context_p
->
ue_context
.
Srb2
.
Srb_info
.
Srb_id
=
Idx
;
memcpy
(
&
ue_context_p
->
ue_context
.
Srb2
.
Srb_info
.
Lchan_desc
[
0
],
&
DCCH_LCHAN_DESC
,
LCHAN_DESC_SIZE
);
memcpy
(
&
ue_context_p
->
ue_context
.
Srb2
.
Srb_info
.
Lchan_desc
[
1
],
&
DCCH_LCHAN_DESC
,
LCHAN_DESC_SIZE
);
LOG_I
(
RRC
,
"[eNB %d] CALLING RLC CONFIG SRB1 (rbid %d) for UE %x
\n
"
,
ctxt_pP
->
module_id
,
Idx
,
ue_context_p
->
ue_context
.
rnti
);
// Configure PDCP/RLC for the target
rrc_pdcp_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
(
DRB_ToAddModList_t
*
)
NULL
,
(
DRB_ToReleaseList_t
*
)
NULL
,
0xff
,
NULL
,
NULL
,
NULL
#ifdef Rel10
,
(
PMCH_InfoList_r9_t
*
)
NULL
#endif
);
rrc_rlc_config_asn1_req
(
ctxt_pP
,
ue_context_p
->
ue_context
.
SRB_configList
,
(
DRB_ToAddModList_t
*
)
NULL
,
(
DRB_ToReleaseList_t
*
)
NULL
#ifdef Rel10
,
(
PMCH_InfoList_r9_t
*
)
NULL
#endif
);
rrc_eNB_target_add_ue_handover
(
ctxt_pP
);
// Configure MAC for the target
rrc_mac_config_req
(
ctxt_pP
->
module_id
,
ue_context_p
->
ue_context
.
primaryCC_id
,
ENB_FLAG_YES
,
ue_context_p
->
ue_context
.
rnti
,
0
,
(
RadioResourceConfigCommonSIB_t
*
)
NULL
,
ue_context_p
->
ue_context
.
physicalConfigDedicated
,
#ifdef Rel10
(
SCellToAddMod_r10_t
*
)
NULL
,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif
(
MeasObjectToAddMod_t
**
)
NULL
,
ue_context_p
->
ue_context
.
mac_MainConfig
,
1
,
NULL
,
ue_context_p
->
ue_context
.
measGapConfig
,
(
TDD_Config_t
*
)
NULL
,
(
MobilityControlInfo_t
*
)
NULL
,
(
uint8_t
*
)
NULL
,
(
uint16_t
*
)
NULL
,
NULL
,
NULL
,
NULL
,
(
MBSFN_SubframeConfigList_t
*
)
NULL
#ifdef Rel10
,
0
,
(
MBSFN_AreaInfoList_r9_t
*
)
NULL
,
(
PMCH_InfoList_r9_t
*
)
NULL
#endif
#ifdef CBA
,
0
,
0
#endif
);
}
}
void
rrc_eNB_target_add_ue_handover
(
protocol_ctxt_t
*
const
ctxt_pP
){
// Add a new user (called during the HO procedure)
//add_new_ue(ctxt_pP->module_id, 0, ctxt_pP->rnti, -1); // UE allocation MAC
//add_ue(ctxt_pP->rnti,get_phy_vars(ctxt_pP->module_id,0));
}
}
// 5.3.5.4 RRCConnectionReconfiguration including the mobilityControlInfo to prepare the UE handover
// 5.3.5.4 RRCConnectionReconfiguration including the mobilityControlInfo to prepare the UE handover
...
@@ -2005,7 +2168,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
...
@@ -2005,7 +2168,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
uint8_t
rv
[
2
];
uint8_t
rv
[
2
];
uint16_t
Idx
;
uint16_t
Idx
;
// configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE
// configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE
eNB_RRC_INST
*
rrc_inst
=
&
eNB_rrc_inst
[
ctxt_pP
->
module_id
];
eNB_RRC_INST
*
rrc_inst
=
&
eNB_rrc_inst
[
ue_context_pP
->
ue_context
.
handover_info
->
modid_t
];
struct
PhysicalConfigDedicated
**
physicalConfigDedicated
=
&
ue_context_pP
->
ue_context
.
physicalConfigDedicated
;
struct
PhysicalConfigDedicated
**
physicalConfigDedicated
=
&
ue_context_pP
->
ue_context
.
physicalConfigDedicated
;
struct
SRB_ToAddMod
*
SRB2_config
;
struct
SRB_ToAddMod
*
SRB2_config
;
...
@@ -2317,7 +2480,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
...
@@ -2317,7 +2480,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
SRB_configList2
=
CALLOC
(
1
,
sizeof
(
*
SRB_configList2
));
SRB_configList2
=
CALLOC
(
1
,
sizeof
(
*
SRB_configList2
));
memset
(
SRB_configList2
,
0
,
sizeof
(
*
SRB_configList2
));
memset
(
SRB_configList2
,
0
,
sizeof
(
*
SRB_configList2
));
SRB2_config
->
srb_Identity
=
2
;
SRB2_config
->
srb_Identity
=
1
;
SRB2_rlc_config
=
CALLOC
(
1
,
sizeof
(
*
SRB2_rlc_config
));
SRB2_rlc_config
=
CALLOC
(
1
,
sizeof
(
*
SRB2_rlc_config
));
SRB2_config
->
rlc_Config
=
SRB2_rlc_config
;
SRB2_config
->
rlc_Config
=
SRB2_rlc_config
;
...
@@ -2742,6 +2905,9 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
...
@@ -2742,6 +2905,9 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
mobilityInfo
->
carrierBandwidth
->
ul_Bandwidth
=
NULL
;
mobilityInfo
->
carrierBandwidth
->
ul_Bandwidth
=
NULL
;
mobilityInfo
->
rach_ConfigDedicated
=
NULL
;
mobilityInfo
->
rach_ConfigDedicated
=
NULL
;
// Update target with the new c-rnti
ue_context_pP
->
ue_context
.
handover_info
->
ueid_t
=
((
mobilityInfo
->
newUE_Identity
.
buf
[
0
])
|
(
mobilityInfo
->
newUE_Identity
.
buf
[
1
]
<<
8
));
// store the srb and drb list for ho management, mainly in case of failure
// store the srb and drb list for ho management, mainly in case of failure
memcpy
(
ue_context_pP
->
ue_context
.
handover_info
->
as_config
.
sourceRadioResourceConfig
.
srb_ToAddModList
,
memcpy
(
ue_context_pP
->
ue_context
.
handover_info
->
as_config
.
sourceRadioResourceConfig
.
srb_ToAddModList
,
...
...
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
;
}
This diff is collapsed.
Click to expand it.
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
);
This diff is collapsed.
Click to expand it.
openair2/UTIL/OCG/OCG.h
View file @
9a541e0d
...
@@ -735,6 +735,11 @@ typedef struct {
...
@@ -735,6 +735,11 @@ typedef struct {
}
Info
;
}
Info
;
/* @}*/
/* @}*/
typedef
struct
{
long
hys
;
long
ttt_ms
;
}
Handover_info
;
/** @defgroup _OSD_basic Basic OpenAirInterface Scenario Descriptor
/** @defgroup _OSD_basic Basic OpenAirInterface Scenario Descriptor
* @ingroup _OCG
* @ingroup _OCG
* @brief OAI Emulation struct for OSD_basic
* @brief OAI Emulation struct for OSD_basic
...
@@ -747,6 +752,7 @@ typedef struct {
...
@@ -747,6 +752,7 @@ typedef struct {
Emulation_Config
emulation_config
;
/*!< \brief Emulation configuration */
Emulation_Config
emulation_config
;
/*!< \brief Emulation configuration */
Protocol_Config
protocol_config
;
/* specific protocol configuration*/
Protocol_Config
protocol_config
;
/* specific protocol configuration*/
Info
info
;
/*!< \brief Some important information which should be able to be reached by OAISIM */
Info
info
;
/*!< \brief Some important information which should be able to be reached by OAISIM */
Handover_info
ho_info
;
// Information for handover
char
*
profile
;
char
*
profile
;
}
OAI_Emulation
;
}
OAI_Emulation
;
/* @}*/
/* @}*/
...
...
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim.c
View file @
9a541e0d
...
@@ -94,6 +94,7 @@ char smbv_ip[16];
...
@@ -94,6 +94,7 @@ char smbv_ip[16];
#include "oaisim.h"
#include "oaisim.h"
#include "oaisim_config.h"
#include "oaisim_config.h"
#include "RRC/LITE/rrc_eNB_primitives.h"
#include "UTIL/OCG/OCG_extern.h"
#include "UTIL/OCG/OCG_extern.h"
#include "cor_SF_sim.h"
#include "cor_SF_sim.h"
#include "UTIL/OMG/omg_constants.h"
#include "UTIL/OMG/omg_constants.h"
...
@@ -1326,6 +1327,8 @@ main (int argc, char **argv)
...
@@ -1326,6 +1327,8 @@ main (int argc, char **argv)
init_ocm
();
init_ocm
();
init_HO
(
&
oai_emulation
.
ho_info
);
#ifdef SMBV
#ifdef SMBV
// Rohde&Schwarz SMBV100A vector signal generator
// Rohde&Schwarz SMBV100A vector signal generator
smbv_init_config
(
smbv_fname
,
smbv_nframes
);
smbv_init_config
(
smbv_fname
,
smbv_nframes
);
...
...
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim_functions.c
View file @
9a541e0d
...
@@ -206,6 +206,10 @@ void get_simulation_options(int argc, char *argv[])
...
@@ -206,6 +206,10 @@ void get_simulation_options(int argc, char *argv[])
LONG_OPTION_MALLOC_TRACE_ENABLED
,
LONG_OPTION_MALLOC_TRACE_ENABLED
,
LONG_OPTION_CBA_BACKOFF_TIMER
,
LONG_OPTION_CBA_BACKOFF_TIMER
,
LONG_OPTION_HYS
,
LONG_OPTION_TTT_MS
,
};
};
static
struct
option
long_options
[]
=
{
static
struct
option
long_options
[]
=
{
...
@@ -237,11 +241,42 @@ void get_simulation_options(int argc, char *argv[])
...
@@ -237,11 +241,42 @@ void get_simulation_options(int argc, char *argv[])
{
"cba-backoff"
,
required_argument
,
0
,
LONG_OPTION_CBA_BACKOFF_TIMER
},
{
"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
}
{
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
)
{
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
)
{
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
:
case
LONG_OPTION_ENB_CONF
:
if
(
optarg
)
{
if
(
optarg
)
{
free
(
conf_config_file_name
);
// prevent memory leak if option is used multiple times
free
(
conf_config_file_name
);
// prevent memory leak if option is used multiple times
...
@@ -1537,3 +1572,7 @@ void init_time()
...
@@ -1537,3 +1572,7 @@ void init_time()
td_avg
=
TARGET_SF_TIME_NS
;
td_avg
=
TARGET_SF_TIME_NS
;
}
}
void
oai_emu_ho_init
(
Handover_info
*
ho_info
){
ho_info
->
hys
=-
1
;
ho_info
->
ttt_ms
=-
1
;
}
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim_functions.h
View file @
9a541e0d
...
@@ -67,6 +67,8 @@ void exit_fun(const char* s);
...
@@ -67,6 +67,8 @@ void exit_fun(const char* s);
void
init_time
(
void
);
void
init_time
(
void
);
void
oai_emu_ho_init
(
Handover_info
*
ho_info
);
void
init_pad
(
void
);
void
init_pad
(
void
);
void
help
(
void
);
void
help
(
void
);
...
...
This diff is collapsed.
Click to expand it.
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