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
常顺宇
OpenXG-RAN
Commits
240560a6
Commit
240560a6
authored
9 years ago
by
alexandr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CLI for HO parametirization (extra parameters added)
parent
c0dabdbf
No related merge requests found
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
278 additions
and
9 deletions
+278
-9
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+6
-0
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+19
-7
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+1
-0
openair2/RRC/LITE/rrc_eNB_primitives.c
openair2/RRC/LITE/rrc_eNB_primitives.c
+76
-0
openair2/RRC/LITE/rrc_eNB_primitives.h
openair2/RRC/LITE/rrc_eNB_primitives.h
+26
-0
openair2/UTIL/CLI/cli_cmd.c
openair2/UTIL/CLI/cli_cmd.c
+138
-2
openair2/UTIL/OCG/OCG.h
openair2/UTIL/OCG/OCG.h
+6
-0
targets/SIMU/USER/oaisim_config.c
targets/SIMU/USER/oaisim_config.c
+6
-0
No files found.
openair2/LAYER2/MAC/defs.h
View file @
240560a6
...
...
@@ -828,6 +828,12 @@ typedef struct {
long
hys
;
long
ttt_ms
;
long
ofn
;
long
ocn
;
long
ofs
;
long
ocs
;
long
off
;
float
rsrp_filter_coeff
;
float
rsrq_filter_coeff
;
}
Handover_eNB_info
;
/*! \brief eNB common channels */
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_UE.c
View file @
240560a6
...
...
@@ -44,6 +44,7 @@
#include "PHY/TOOLS/dB_routines.h"
#include "extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "RRC/LITE/rrc_eNB_primitives.h"
#include "LAYER2/RLC/rlc.h"
#include "COMMON/mac_rrc_primitives.h"
#include "UTIL/LOG/log.h"
...
...
@@ -3438,11 +3439,17 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
//-----------------------------------------------------------------------------
void
ue_meas_filtering
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
uint8_t
eNB_index
)
{
float
a
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
filter_coeff_rsrp
;
// 'a' in 36.331 Sec. 5.5.3.2
float
a1
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
filter_coeff_rsrq
;
float
a
;
float
a1
;
//float rsrp_db, rsrq_db;
uint8_t
eNB_offset
;
if
(
!
((
a
=
get_rsrp_filter_coeff
(
ctxt_pP
->
module_id
))
>=
0
))
a
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
filter_coeff_rsrp
;
// 'a' in 36.331 Sec. 5.5.3.2
if
(
!
((
a1
=
get_rsrq_filter_coeff
(
ctxt_pP
->
module_id
))
>=
0
))
a1
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
filter_coeff_rsrq
;
if
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
QuantityConfig
[
0
]
!=
NULL
)
{
// Only consider 1 serving cell (index: 0)
if
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
QuantityConfig
[
0
]
->
quantityConfigEUTRA
!=
NULL
)
{
if
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
QuantityConfig
[
0
]
->
quantityConfigEUTRA
->
filterCoefficientRSRP
!=
NULL
)
{
...
...
@@ -3602,8 +3609,8 @@ void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, con
TimeToTrigger_t
ttt_ms
;
Q_OffsetRange_t
ofn
;
Q_OffsetRange_t
ocn
;
Q_OffsetRange_t
ofs
=
0
;
Q_OffsetRange_t
ocs
=
0
;
Q_OffsetRange_t
ofs
;
Q_OffsetRange_t
ocs
;
long
a3_offset
;
MeasObjectId_t
measObjId
;
ReportConfigId_t
reportConfigId
;
...
...
@@ -3639,9 +3646,14 @@ void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, con
// *UE_rrc_inst[ctxt_pP->module_id].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq : 15); // /* 15 is the Default */
// cellIndividualOffset of neighbor cell - not defined yet
ocn
=
0
;
a3_offset
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ReportConfig
[
i
][
reportConfigId
-
1
]
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
eventId
.
choice
.
eventA3
.
a3_Offset
;
if
(
!
((
ocn
=
get_ocn
(
ctxt_pP
->
module_id
))
>=
0
))
ocn
=
0
;
if
(
!
((
ofs
=
get_ofs
(
ctxt_pP
->
module_id
))
>=
0
))
ofs
=
0
;
if
(
!
((
ocs
=
get_ocs
(
ctxt_pP
->
module_id
))
>=
0
))
ocs
=
0
;
if
(
!
((
a3_offset
=
get_off
(
ctxt_pP
->
module_id
))
>=
0
))
a3_offset
=
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ReportConfig
[
i
][
reportConfigId
-
1
]
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
eventId
.
choice
.
eventA3
.
a3_Offset
;
switch
(
UE_rrc_inst
[
ctxt_pP
->
module_id
].
ReportConfig
[
i
][
reportConfigId
-
1
]
->
reportConfig
.
choice
.
reportConfigEUTRA
.
triggerType
.
choice
.
event
.
eventId
.
present
)
{
case
ReportConfigEUTRA__triggerType__event__eventId_PR_eventA1
:
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_eNB.c
View file @
240560a6
...
...
@@ -48,6 +48,7 @@
#include "LAYER2/MAC/proto.h"
#include "UTIL/LOG/log.h"
#include "COMMON/mac_rrc_primitives.h"
#include "RRC/LITE/rrc_eNB_primitives.h"
#include "RRC/LITE/MESSAGES/asn1_msg.h"
#include "RRCConnectionRequest.h"
#include "RRCConnectionReestablishmentRequest.h"
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_eNB_primitives.c
View file @
240560a6
...
...
@@ -39,6 +39,7 @@
#include "rrc_eNB_primitives.h"
#include "UTIL/OCG/OCG.h"
// HO parameters initialization
void
init_HO
(
Handover_info
*
ho_info
)
{
int
enb_module_id
=
0
;
...
...
@@ -48,6 +49,12 @@ void init_HO(Handover_info* ho_info)
set_hys
(
enb_module_id
,
ho_info
->
hys
);
set_ttt_ms
(
enb_module_id
,
ho_info
->
ttt_ms
);
set_ofn
(
enb_module_id
,
ho_info
->
ofn
);
set_ocn
(
enb_module_id
,
ho_info
->
ocn
);
set_ofs
(
enb_module_id
,
ho_info
->
ofs
);
set_ocs
(
enb_module_id
,
ho_info
->
ocs
);
set_off
(
enb_module_id
,
ho_info
->
off
);
set_rsrp_filter_coeff
(
enb_module_id
,
ho_info
->
rsrp_filter_coeff
);
set_rsrq_filter_coeff
(
enb_module_id
,
ho_info
->
rsrq_filter_coeff
);
}
}
...
...
@@ -89,5 +96,74 @@ long get_ofn(int enb_module_id){
return
eNB_mac_inst
->
ho_info
.
ofn
;
}
// OCN
void
set_ocn
(
int
enb_module_id
,
long
ocn
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
eNB_mac_inst
->
ho_info
.
ocn
=
ocn
;
printf
(
"OCN for eNB %d is set to %ld
\n
"
,
enb_module_id
,
eNB_mac_inst
->
ho_info
.
ocn
);
}
long
get_ocn
(
int
enb_module_id
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
return
eNB_mac_inst
->
ho_info
.
ocn
;
}
// OFS
void
set_ofs
(
int
enb_module_id
,
long
ofs
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
eNB_mac_inst
->
ho_info
.
ofs
=
ofs
;
printf
(
"OFS for eNB %d is set to %ld
\n
"
,
enb_module_id
,
eNB_mac_inst
->
ho_info
.
ofs
);
}
long
get_ofs
(
int
enb_module_id
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
return
eNB_mac_inst
->
ho_info
.
ofs
;
}
// OCS
void
set_ocs
(
int
enb_module_id
,
long
ocs
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
eNB_mac_inst
->
ho_info
.
ocs
=
ocs
;
printf
(
"OCS for eNB %d is set to %ld
\n
"
,
enb_module_id
,
eNB_mac_inst
->
ho_info
.
ocs
);
}
long
get_ocs
(
int
enb_module_id
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
return
eNB_mac_inst
->
ho_info
.
ocs
;
}
// OFF (a3_offset)
void
set_off
(
int
enb_module_id
,
long
off
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
eNB_mac_inst
->
ho_info
.
off
=
off
;
printf
(
"OFF for eNB %d is set to %ld
\n
"
,
enb_module_id
,
eNB_mac_inst
->
ho_info
.
off
);
}
long
get_off
(
int
enb_module_id
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
return
eNB_mac_inst
->
ho_info
.
off
;
}
// L3 filtering coefficient RSRP
void
set_rsrp_filter_coeff
(
int
enb_module_id
,
float
rsrp_filter_coeff
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
eNB_mac_inst
->
ho_info
.
rsrp_filter_coeff
=
rsrp_filter_coeff
;
printf
(
"L3 RSRP filtering coefficient for eNB %d is set to %f
\n
"
,
enb_module_id
,
eNB_mac_inst
->
ho_info
.
rsrp_filter_coeff
);
}
float
get_rsrp_filter_coeff
(
int
enb_module_id
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
return
eNB_mac_inst
->
ho_info
.
rsrp_filter_coeff
;
}
// L3 filtering coefficient RSRP
void
set_rsrq_filter_coeff
(
int
enb_module_id
,
float
rsrq_filter_coeff
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
eNB_mac_inst
->
ho_info
.
rsrq_filter_coeff
=
rsrq_filter_coeff
;
printf
(
"L3 RSRQ filtering coefficient for eNB %d is set to %f
\n
"
,
enb_module_id
,
eNB_mac_inst
->
ho_info
.
rsrq_filter_coeff
);
}
float
get_rsrq_filter_coeff
(
int
enb_module_id
){
eNB_MAC_INST
*
eNB_mac_inst
=
get_eNB_mac_inst
(
enb_module_id
);
return
eNB_mac_inst
->
ho_info
.
rsrq_filter_coeff
;
}
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/rrc_eNB_primitives.h
View file @
240560a6
...
...
@@ -37,8 +37,10 @@
#include "UTIL/OCG/OCG.h"
// HO parameters initialization
void
init_HO
(
Handover_info
*
ho_info
);
// Getters/setters for HO parameters
void
set_hys
(
int
enb_module_id
,
long
hys
);
long
get_hys
(
int
enb_module_id
);
...
...
@@ -50,3 +52,27 @@ long get_ttt_ms(int enb_module_id);
void
set_ofn
(
int
enb_module_id
,
long
ofn
);
long
get_ofn
(
int
enb_module_id
);
void
set_ocn
(
int
enb_module_id
,
long
ocn
);
long
get_ocn
(
int
enb_module_id
);
void
set_ofs
(
int
enb_module_id
,
long
ofs
);
long
get_ofs
(
int
enb_module_id
);
void
set_ocs
(
int
enb_module_id
,
long
ocs
);
long
get_ocs
(
int
enb_module_id
);
void
set_off
(
int
enb_module_id
,
long
off
);
long
get_off
(
int
enb_module_id
);
void
set_rsrp_filter_coeff
(
int
enb_module_id
,
float
rsrp_filter_coeff
);
float
get_rsrp_filter_coeff
(
int
enb_module_id
);
void
set_rsrq_filter_coeff
(
int
enb_module_id
,
float
rsrq_filter_coeff
);
float
get_rsrq_filter_coeff
(
int
enb_module_id
);
This diff is collapsed.
Click to expand it.
openair2/UTIL/CLI/cli_cmd.c
View file @
240560a6
...
...
@@ -224,7 +224,8 @@ int process_argument(int optc, char* optv[])
int
index
;
int
state
;
int
value
;
long
value
;
float
value1
;
int
comp
=
0
,
level
=
0
,
flag
=
0x34
,
interval
=
0
;
while
(
optc
>
0
)
{
...
...
@@ -264,6 +265,40 @@ int process_argument(int optc, char* optv[])
// Handover CLI
// Set hysteresis value
if
((
strcmp
(
*
optv
,
"hys"
)
==
0
)
||
(
strcmp
(
*
optv
,
"HYS"
)
==
0
)
)
{
NEXT_OPT
;
CHECK_OPTC
;
index
=
atoi
(
*
optv
);
if
(
optc
>
0
)
{
NEXT_OPT
;
CHECK_OPTC
;
value
=
atoi
(
*
optv
);
printf
(
"[CLI] Hysteresis is set to %ld for eNB %d
\n
"
,
value
,
index
);
set_hys
(
index
,
value
);
}
else
return
ERR
;
}
// Set time to trigger value
if
((
strcmp
(
*
optv
,
"ttt_ms"
)
==
0
)
||
(
strcmp
(
*
optv
,
"TTT_ms"
)
==
0
)
)
{
NEXT_OPT
;
CHECK_OPTC
;
index
=
atoi
(
*
optv
);
if
(
optc
>
0
)
{
NEXT_OPT
;
CHECK_OPTC
;
value
=
atoi
(
*
optv
);
printf
(
"[CLI] Time to trigger is set to %ld for eNB %d
\n
"
,
value
,
index
);
set_ttt_ms
(
index
,
value
);
}
else
return
ERR
;
}
// Set ofn value
if
((
strcmp
(
*
optv
,
"ofn"
)
==
0
)
||
(
strcmp
(
*
optv
,
"OFN"
)
==
0
)
)
{
...
...
@@ -275,11 +310,112 @@ int process_argument(int optc, char* optv[])
NEXT_OPT
;
CHECK_OPTC
;
value
=
atoi
(
*
optv
);
printf
(
"[CLI] OFN is set to %d for eNB %d
\n
"
,
value
,
index
);
printf
(
"[CLI] OFN is set to %
l
d for eNB %d
\n
"
,
value
,
index
);
set_ofn
(
index
,
value
);
}
else
return
ERR
;
}
// Set ocn value
if
((
strcmp
(
*
optv
,
"ocn"
)
==
0
)
||
(
strcmp
(
*
optv
,
"OCN"
)
==
0
)
)
{
NEXT_OPT
;
CHECK_OPTC
;
index
=
atoi
(
*
optv
);
if
(
optc
>
0
)
{
NEXT_OPT
;
CHECK_OPTC
;
value
=
atoi
(
*
optv
);
printf
(
"[CLI] OCN is set to %ld for eNB %d
\n
"
,
value
,
index
);
set_ocn
(
index
,
value
);
}
else
return
ERR
;
}
// Set ofs value
if
((
strcmp
(
*
optv
,
"ofs"
)
==
0
)
||
(
strcmp
(
*
optv
,
"OFS"
)
==
0
)
)
{
NEXT_OPT
;
CHECK_OPTC
;
index
=
atoi
(
*
optv
);
if
(
optc
>
0
)
{
NEXT_OPT
;
CHECK_OPTC
;
value
=
atoi
(
*
optv
);
printf
(
"[CLI] OFS is set to %ld for eNB %d
\n
"
,
value
,
index
);
set_ofs
(
index
,
value
);
}
else
return
ERR
;
}
// Set ocs value
if
((
strcmp
(
*
optv
,
"ocs"
)
==
0
)
||
(
strcmp
(
*
optv
,
"OCS"
)
==
0
)
)
{
NEXT_OPT
;
CHECK_OPTC
;
index
=
atoi
(
*
optv
);
if
(
optc
>
0
)
{
NEXT_OPT
;
CHECK_OPTC
;
value
=
atoi
(
*
optv
);
printf
(
"[CLI] OCS is set to %ld for eNB %d
\n
"
,
value
,
index
);
set_ocs
(
index
,
value
);
}
else
return
ERR
;
}
// Set off value
if
((
strcmp
(
*
optv
,
"off"
)
==
0
)
||
(
strcmp
(
*
optv
,
"OFF"
)
==
0
)
)
{
NEXT_OPT
;
CHECK_OPTC
;
index
=
atoi
(
*
optv
);
if
(
optc
>
0
)
{
NEXT_OPT
;
CHECK_OPTC
;
value
=
atoi
(
*
optv
);
printf
(
"[CLI] OFF is set to %ld for eNB %d
\n
"
,
value
,
index
);
set_off
(
index
,
value
);
}
else
return
ERR
;
}
// Set L3 filtering coefficient RSRP value
if
((
strcmp
(
*
optv
,
"rsrp_filter_coeff"
)
==
0
)
||
(
strcmp
(
*
optv
,
"RSRP_FILTER_COEFF"
)
==
0
)
)
{
NEXT_OPT
;
CHECK_OPTC
;
index
=
atoi
(
*
optv
);
if
(
optc
>
0
)
{
NEXT_OPT
;
CHECK_OPTC
;
value1
=
atoi
(
*
optv
);
printf
(
"[CLI] L3 RSRP filtering coefficient is set to %f for eNB %d
\n
"
,
value1
,
index
);
set_rsrp_filter_coeff
(
index
,
value
);
}
else
return
ERR
;
}
// Set L3 filtering coefficient RSRQ value
if
((
strcmp
(
*
optv
,
"rsrq_filter_coeff"
)
==
0
)
||
(
strcmp
(
*
optv
,
"RSRQ_FILTER_COEFF"
)
==
0
)
)
{
NEXT_OPT
;
CHECK_OPTC
;
index
=
atoi
(
*
optv
);
if
(
optc
>
0
)
{
NEXT_OPT
;
CHECK_OPTC
;
value1
=
atoi
(
*
optv
);
printf
(
"[CLI] L3 RSRQ filtering coefficient is set to %f for eNB %d
\n
"
,
value1
,
index
);
set_rsrq_filter_coeff
(
index
,
value
);
}
else
return
ERR
;
}
// fixme
if
((
strcmp
(
*
optv
,
"log"
)
==
0
)
||
(
strcmp
(
*
optv
,
"LOG"
)
==
0
)
)
{
...
...
This diff is collapsed.
Click to expand it.
openair2/UTIL/OCG/OCG.h
View file @
240560a6
...
...
@@ -739,6 +739,12 @@ typedef struct {
long
hys
;
long
ttt_ms
;
long
ofn
;
long
ocn
;
long
ofs
;
long
ocs
;
long
off
;
float
rsrp_filter_coeff
;
float
rsrq_filter_coeff
;
}
Handover_info
;
/** @defgroup _OSD_basic Basic OpenAirInterface Scenario Descriptor
...
...
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim_config.c
View file @
240560a6
...
...
@@ -1362,4 +1362,10 @@ void oai_emu_ho_init(Handover_info* ho_info){
ho_info
->
hys
=-
1
;
ho_info
->
ttt_ms
=-
1
;
ho_info
->
ofn
=-
1
;
ho_info
->
ocn
=-
1
;
ho_info
->
ofs
=-
1
;
ho_info
->
ocs
=-
1
;
ho_info
->
off
=-
1
;
ho_info
->
rsrp_filter_coeff
=-
1
;
ho_info
->
rsrq_filter_coeff
=-
1
;
}
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