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
e996f5d0
Commit
e996f5d0
authored
Nov 17, 2017
by
Navid Nikaein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new RAN APIs form SMA app based on the initial eNb config file
parent
c8c4b423
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
303 additions
and
32 deletions
+303
-32
openair2/ENB_APP/flexran_agent_common_internal.c
openair2/ENB_APP/flexran_agent_common_internal.c
+158
-5
openair2/ENB_APP/flexran_agent_common_internal.h
openair2/ENB_APP/flexran_agent_common_internal.h
+6
-2
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+118
-21
openair2/ENB_APP/flexran_agent_ran_api.h
openair2/ENB_APP/flexran_agent_ran_api.h
+21
-4
No files found.
openair2/ENB_APP/flexran_agent_common_internal.c
View file @
e996f5d0
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
/*! \file flexran_agent_common_internal.c
/*! \file flexran_agent_common_internal.c
* \brief internal functions for common message primitves and utilities
* \brief internal functions for common message primitves and utilities
* \author Xenofon Foukas
* \author Xenofon Foukas
and N. Nikaein
* \date 201
6
* \date 201
7
* \version 0.1
* \version 0.1
*/
*/
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "flexran_agent_common_internal.h"
#include "flexran_agent_common_internal.h"
#include "flexran_agent_mac_internal.h"
#include "flexran_agent_mac_internal.h"
extern
volatile
int
reconfigure_enb
;
int
apply_reconfiguration_policy
(
mid_t
mod_id
,
const
char
*
policy
,
size_t
policy_length
)
{
int
apply_reconfiguration_policy
(
mid_t
mod_id
,
const
char
*
policy
,
size_t
policy_length
)
{
...
@@ -64,7 +65,17 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
...
@@ -64,7 +65,17 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
break
;
break
;
case
YAML_SCALAR_EVENT
:
case
YAML_SCALAR_EVENT
:
// Check the system name and call the proper handler
// Check the system name and call the proper handler
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"mac"
)
==
0
)
{
// Check the system name and call the proper handler
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"enb"
)
==
0
)
{
LOG_I
(
ENB_APP
,
"This is intended for the enb system
\n
"
);
// Call the enb handler
if
(
parse_enb_id
(
mod_id
,
&
parser
)
==
-
1
)
{
goto
error
;
}
else
{
// succeful parse and setting
LOG_I
(
ENB_APP
,
"Successful parsed config for enb system
\n
"
);
//reconfigure_enb=RECONF_FREQ;
}
}
else
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"mac"
)
==
0
)
{
LOG_D
(
ENB_APP
,
"This is intended for the mac system
\n
"
);
LOG_D
(
ENB_APP
,
"This is intended for the mac system
\n
"
);
// Call the mac handler
// Call the mac handler
if
(
parse_mac_config
(
mod_id
,
&
parser
)
==
-
1
)
{
if
(
parse_mac_config
(
mod_id
,
&
parser
)
==
-
1
)
{
...
@@ -90,8 +101,8 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
...
@@ -90,8 +101,8 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
// TODO : Just skip it for now
// TODO : Just skip it for now
if
(
skip_system_section
(
&
parser
)
==
-
1
)
{
if
(
skip_system_section
(
&
parser
)
==
-
1
)
{
goto
error
;
goto
error
;
}
}
}
else
{
}
else
{
goto
error
;
goto
error
;
}
}
break
;
break
;
...
@@ -115,6 +126,148 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
...
@@ -115,6 +126,148 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
}
}
int
parse_enb_id
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
yaml_event_t
event
;
void
*
param
;
char
*
endptr
;
int
is_array
=
0
;
int
i
=
0
;
int
done
=
0
;
int
mapping_started
=
0
;
while
(
!
done
)
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
goto
error
;
switch
(
event
.
type
)
{
// We are expecting a mapping of parameters
case
YAML_SEQUENCE_START_EVENT
:
is_array
=
1
;
break
;
case
YAML_MAPPING_START_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the parameters started
\n
"
);
mapping_started
=
1
;
break
;
case
YAML_MAPPING_END_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the parameters ended
\n
"
);
mapping_started
=
0
;
break
;
case
YAML_SCALAR_EVENT
:
if
(
!
mapping_started
)
{
goto
error
;
}
// Check what key needs to be set
// use eNB egistered
if
(
mac_agent_registered
[
mod_id
])
{
LOG_I
(
ENB_APP
,
"Setting parameter for eNB %s
\n
"
,
event
.
data
.
scalar
.
value
);
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
tag
,
YAML_INT_TAG
)
==
0
)
{
// if int
if
((
strtol
((
char
*
)
event
.
data
.
scalar
.
value
,
&
endptr
,
10
))
==
mod_id
)
{
// enb_id == mod_id: right enb instance to be configured
if
(
parse_enb_config_parameters
(
mod_id
,
parser
)
==
-
1
)
{
goto
error
;
}
}
else
{
goto
error
;
// not the expected type
}
}
}
break
;
default:
goto
error
;
}
done
=
(
event
.
type
==
YAML_MAPPING_END_EVENT
);
yaml_event_delete
(
&
event
);
}
return
0
;
error:
yaml_event_delete
(
&
event
);
return
-
1
;
}
int
parse_enb_config_parameters
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
{
yaml_event_t
event
;
void
*
param
;
char
*
endptr
;
int
done
=
0
;
int
mapping_started
=
0
;
while
(
!
done
)
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
goto
error
;
switch
(
event
.
type
)
{
// We are expecting a mapping of parameters
case
YAML_MAPPING_START_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the parameters started
\n
"
);
mapping_started
=
1
;
break
;
case
YAML_MAPPING_END_EVENT
:
LOG_D
(
ENB_APP
,
"The mapping of the parameters ended
\n
"
);
mapping_started
=
0
;
break
;
case
YAML_SCALAR_EVENT
:
if
(
!
mapping_started
)
{
goto
error
;
}
// Check what key needs to be set
LOG_I
(
ENB_APP
,
"Setting parameter %s
\n
"
,
event
.
data
.
scalar
.
value
);
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"dl_freq"
)
==
0
)
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
goto
error
;
flexran_agent_set_operating_dl_freq
(
mod_id
,
0
,
strtol
((
char
*
)
event
.
data
.
scalar
.
value
,
&
endptr
,
10
));
LOG_I
(
ENB_APP
,
"Setting parameter value %s
\n
"
,
event
.
data
.
scalar
.
value
);
}
else
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"ul_freq_offset"
)
==
0
)
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
goto
error
;
flexran_agent_set_operating_ul_freq
(
mod_id
,
0
,
strtol
((
char
*
)
event
.
data
.
scalar
.
value
,
&
endptr
,
10
));
LOG_I
(
ENB_APP
,
"Setting parameter value %s
\n
"
,
event
.
data
.
scalar
.
value
);
}
else
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"bandwidth"
)
==
0
)
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
goto
error
;
flexran_agent_set_operating_bandwidth
(
mod_id
,
0
,
strtol
((
char
*
)
event
.
data
.
scalar
.
value
,
&
endptr
,
10
));
LOG_I
(
ENB_APP
,
"Setting parameter value %s
\n
"
,
event
.
data
.
scalar
.
value
);
}
else
if
(
strcmp
((
char
*
)
event
.
data
.
scalar
.
value
,
"frame_type"
)
==
0
)
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
goto
error
;
flexran_agent_set_operating_frame_type
(
mod_id
,
0
,
strtol
((
char
*
)
event
.
data
.
scalar
.
value
,
&
endptr
,
10
));
LOG_I
(
ENB_APP
,
"Setting parameter value %s
\n
"
,
event
.
data
.
scalar
.
value
);
}
else
{
// not supported tag
goto
error
;
}
break
;
default:
goto
error
;
}
done
=
(
event
.
type
==
YAML_MAPPING_END_EVENT
);
yaml_event_delete
(
&
event
);
}
return
0
;
error:
yaml_event_delete
(
&
event
);
return
-
1
;
}
int
skip_system_section
(
yaml_parser_t
*
parser
)
{
int
skip_system_section
(
yaml_parser_t
*
parser
)
{
yaml_event_t
event
;
yaml_event_t
event
;
...
...
openair2/ENB_APP/flexran_agent_common_internal.h
View file @
e996f5d0
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
/*! \file flexran_agent_common_internal.h
/*! \file flexran_agent_common_internal.h
* \brief internal agent functions for common message primitves and utilities
* \brief internal agent functions for common message primitves and utilities
* \author Xenofon Foukas
* \author Xenofon Foukas
and N. Nikaein
* \date 201
6
* \date 201
7
* \version 0.1
* \version 0.1
*/
*/
...
@@ -37,6 +37,10 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
...
@@ -37,6 +37,10 @@ int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy
int
apply_parameter_modification
(
void
*
parameter
,
yaml_parser_t
*
parser
);
int
apply_parameter_modification
(
void
*
parameter
,
yaml_parser_t
*
parser
);
int
parse_enb_id
(
mid_t
mod_id
,
yaml_parser_t
*
parser
);
int
parse_enb_config_parameters
(
mid_t
mod_id
,
yaml_parser_t
*
parser
)
;
// This can be used when parsing for a specific system that is not yet implmeneted
// This can be used when parsing for a specific system that is not yet implmeneted
// in order to skip its configuration, without affecting the rest
// in order to skip its configuration, without affecting the rest
int
skip_system_section
(
yaml_parser_t
*
parser
);
int
skip_system_section
(
yaml_parser_t
*
parser
);
...
...
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
e996f5d0
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
/*! \file flexran_agent_ran_api.c
/*! \file flexran_agent_ran_api.c
* \brief FlexRAN RAN API abstraction
* \brief FlexRAN RAN API abstraction
* \author
shahab
SHARIAT BAGHERI
* \author
N. Nikaein, X. Foukas and S.
SHARIAT BAGHERI
* \date 2017
* \date 2017
* \version 0.1
* \version 0.1
*/
*/
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
/*
/*
*
get
generic info from RAN
* generic info from RAN
*/
*/
...
@@ -43,9 +43,15 @@ void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
...
@@ -43,9 +43,15 @@ void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
switch
(
ran
){
switch
(
ran
){
case
RAN_LTE_OAI
:
case
RAN_LTE_OAI
:
enb
[
mod_id
]
=
(
void
*
)
&
eNB_mac_inst
[
mod_id
];
if
(
eNB_mac_inst
==
NULL
){
enb_ue
[
mod_id
]
=
(
void
*
)
&
eNB_mac_inst
[
mod_id
].
UE_list
;
enb
[
mod_id
]
=
NULL
;
enb_rrc
[
mod_id
]
=
(
void
*
)
&
eNB_rrc_inst
[
mod_id
];
enb_ue
[
mod_id
]
=
NULL
;
enb_rrc
[
mod_id
]
=
NULL
;
}
else
{
enb
[
mod_id
]
=
(
void
*
)
&
eNB_mac_inst
[
mod_id
];
enb_ue
[
mod_id
]
=
(
void
*
)
&
eNB_mac_inst
[
mod_id
].
UE_list
;
enb_rrc
[
mod_id
]
=
(
void
*
)
&
eNB_rrc_inst
[
mod_id
];
}
break
;
break
;
default
:
default
:
goto
error
;
goto
error
;
...
@@ -56,9 +62,20 @@ void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
...
@@ -56,9 +62,20 @@ void flexran_set_enb_vars(mid_t mod_id, ran_name_t ran){
error:
error:
LOG_E
(
FLEXRAN_AGENT
,
"unknown RAN name %d
\n
"
,
ran
);
LOG_E
(
FLEXRAN_AGENT
,
"unknown RAN name %d
\n
"
,
ran
);
}
}
static
int
mac_xface_not_ready
(
void
);
int
flexran_get_current_time_ms
(
mid_t
mod_id
,
int
subframe_flag
){
static
int
mac_xface_not_ready
(
void
){
if
(
mac_xface
==
NULL
)
return
1
;
else
{
//printf("max_xface %p %d \n", mac_xface, mac_xface->active);
return
0
;
// !mac_xface->active;
}
}
int
flexran_get_current_time_ms
(
mid_t
mod_id
,
int
subframe_flag
){
if
(
enb
[
mod_id
]
==
NULL
)
return
0
;
if
(
subframe_flag
==
1
){
if
(
subframe_flag
==
1
){
return
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
frame
*
10
+
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
subframe
;
return
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
frame
*
10
+
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
subframe
;
}
else
{
}
else
{
...
@@ -68,7 +85,7 @@ int flexran_get_current_time_ms (mid_t mod_id, int subframe_flag){
...
@@ -68,7 +85,7 @@ int flexran_get_current_time_ms (mid_t mod_id, int subframe_flag){
}
}
unsigned
int
flexran_get_current_frame
(
mid_t
mod_id
)
{
unsigned
int
flexran_get_current_frame
(
mid_t
mod_id
)
{
if
(
enb
[
mod_id
]
==
NULL
)
return
0
;
// #warning "SFN will not be in [0-1023] when oaisim is used"
// #warning "SFN will not be in [0-1023] when oaisim is used"
return
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
frame
;
return
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
frame
;
...
@@ -79,7 +96,7 @@ unsigned int flexran_get_current_system_frame_num(mid_t mod_id) {
...
@@ -79,7 +96,7 @@ unsigned int flexran_get_current_system_frame_num(mid_t mod_id) {
}
}
unsigned
int
flexran_get_current_subframe
(
mid_t
mod_id
)
{
unsigned
int
flexran_get_current_subframe
(
mid_t
mod_id
)
{
if
(
enb
[
mod_id
]
==
NULL
)
return
0
;
return
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
subframe
;
return
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
subframe
;
}
}
...
@@ -125,7 +142,7 @@ uint16_t flexran_get_future_sfn_sf (mid_t mod_id, int ahead_of_time) {
...
@@ -125,7 +142,7 @@ uint16_t flexran_get_future_sfn_sf (mid_t mod_id, int ahead_of_time) {
}
}
int
flexran_get_num_ues
(
mid_t
mod_id
){
int
flexran_get_num_ues
(
mid_t
mod_id
){
if
(
enb_ue
[
mod_id
]
==
NULL
)
return
0
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
num_UEs
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
num_UEs
;
}
}
...
@@ -135,17 +152,19 @@ int flexran_get_ue_crnti (mid_t mod_id, mid_t ue_id) {
...
@@ -135,17 +152,19 @@ int flexran_get_ue_crnti (mid_t mod_id, mid_t ue_id) {
}
}
int
flexran_get_ue_bsr
(
mid_t
mod_id
,
mid_t
ue_id
,
lcid_t
lcid
)
{
int
flexran_get_ue_bsr
(
mid_t
mod_id
,
mid_t
ue_id
,
lcid_t
lcid
)
{
if
(
enb_ue
[
mod_id
]
==
NULL
)
return
0
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_template
[
UE_PCCID
(
mod_id
,
ue_id
)][
ue_id
].
bsr_info
[
lcid
];
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_template
[
UE_PCCID
(
mod_id
,
ue_id
)][
ue_id
].
bsr_info
[
lcid
];
}
}
int
flexran_get_ue_phr
(
mid_t
mod_id
,
mid_t
ue_id
)
{
int
flexran_get_ue_phr
(
mid_t
mod_id
,
mid_t
ue_id
)
{
if
(
enb_ue
[
mod_id
]
==
NULL
)
return
0
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_template
[
UE_PCCID
(
mod_id
,
ue_id
)][
ue_id
].
phr_info
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_template
[
UE_PCCID
(
mod_id
,
ue_id
)][
ue_id
].
phr_info
;
}
}
int
flexran_get_ue_wcqi
(
mid_t
mod_id
,
mid_t
ue_id
)
{
int
flexran_get_ue_wcqi
(
mid_t
mod_id
,
mid_t
ue_id
)
{
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
if
(
mac_xface_not_ready
())
return
0
;
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
0
,
UE_RNTI
(
mod_id
,
ue_id
));
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
0
,
UE_RNTI
(
mod_id
,
ue_id
));
return
eNB_UE_stats
->
DL_cqi
[
0
];
return
eNB_UE_stats
->
DL_cqi
[
0
];
...
@@ -174,10 +193,11 @@ short flexran_get_TA(mid_t mod_id, mid_t ue_id, int CC_id) {
...
@@ -174,10 +193,11 @@ short flexran_get_TA(mid_t mod_id, mid_t ue_id, int CC_id) {
int
rnti
;
int
rnti
;
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
mac_xface_not_ready
())
return
0
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
CC_id
,
rnti
);
LTE_eNB_UE_stats
*
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
CC_id
,
rnti
);
//ue_sched_ctl->ta_timer = 20; // wait 20 subframes before taking TA measurement from PHY
//ue_sched_ctl->ta_timer = 20; // wait 20 subframes before taking TA measurement from PHY
switch
(
PHY_vars_eNB_g
[
mod_id
][
CC_id
]
->
frame_parms
.
N_RB_DL
)
{
switch
(
flexran_get_N_RB_DL
(
mod_id
,
CC_id
)
)
{
case
6
:
case
6
:
return
eNB_UE_stats
->
timing_advance_update
;
return
eNB_UE_stats
->
timing_advance_update
;
case
15
:
case
15
:
...
@@ -189,7 +209,7 @@ short flexran_get_TA(mid_t mod_id, mid_t ue_id, int CC_id) {
...
@@ -189,7 +209,7 @@ short flexran_get_TA(mid_t mod_id, mid_t ue_id, int CC_id) {
case
75
:
case
75
:
return
eNB_UE_stats
->
timing_advance_update
/
12
;
return
eNB_UE_stats
->
timing_advance_update
/
12
;
case
100
:
case
100
:
if
(
PHY_vars_eNB_g
[
mod_id
][
CC_id
]
->
frame_parms
.
threequarter_fs
==
0
)
{
if
(
flexran_get_threequarter_fs
(
mod_id
,
CC_id
)
==
0
)
{
return
eNB_UE_stats
->
timing_advance_update
/
16
;
return
eNB_UE_stats
->
timing_advance_update
/
16
;
}
else
{
}
else
{
return
eNB_UE_stats
->
timing_advance_update
/
12
;
return
eNB_UE_stats
->
timing_advance_update
/
12
;
...
@@ -232,6 +252,8 @@ int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id,int CC_id) {
...
@@ -232,6 +252,8 @@ int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id,int CC_id) {
// UE_list_t *UE_list = &eNB_mac_inst[mod_id].UE_list;
// UE_list_t *UE_list = &eNB_mac_inst[mod_id].UE_list;
rnti_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
rnti_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
mac_xface_not_ready
())
return
0
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
CC_id
,
rnti
);
LTE_eNB_UE_stats
*
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
CC_id
,
rnti
);
if
(
eNB_UE_stats
==
NULL
)
{
if
(
eNB_UE_stats
==
NULL
)
{
...
@@ -247,11 +269,13 @@ int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id,int CC_id) {
...
@@ -247,11 +269,13 @@ int flexran_get_MAC_CE_bitmap_TA(mid_t mod_id, mid_t ue_id,int CC_id) {
}
}
int
flexran_get_active_CC
(
mid_t
mod_id
,
mid_t
ue_id
)
{
int
flexran_get_active_CC
(
mid_t
mod_id
,
mid_t
ue_id
)
{
if
(
enb_ue
[
mod_id
]
==
NULL
)
return
0
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
numactiveCCs
[
ue_id
];
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
numactiveCCs
[
ue_id
];
}
}
int
flexran_get_current_RI
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
)
{
int
flexran_get_current_RI
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
)
{
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
if
(
mac_xface_not_ready
())
return
0
;
rnti_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
rnti_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
...
@@ -271,6 +295,7 @@ int flexran_get_tpc(mid_t mod_id, mid_t ue_id) {
...
@@ -271,6 +295,7 @@ int flexran_get_tpc(mid_t mod_id, mid_t ue_id) {
int
pCCid
=
UE_PCCID
(
mod_id
,
ue_id
);
int
pCCid
=
UE_PCCID
(
mod_id
,
ue_id
);
rnti_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
rnti_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
mac_xface_not_ready
())
return
0
;
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
pCCid
,
rnti
);
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
pCCid
,
rnti
);
...
@@ -309,6 +334,7 @@ int flexran_get_harq(const mid_t mod_id,
...
@@ -309,6 +334,7 @@ int flexran_get_harq(const mid_t mod_id,
uint8_t
harq_pid
;
uint8_t
harq_pid
;
uint8_t
harq_round
;
uint8_t
harq_round
;
if
(
mac_xface_not_ready
())
return
0
;
uint16_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
uint16_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
harq_flag
==
openair_harq_DL
){
if
(
harq_flag
==
openair_harq_DL
){
...
@@ -340,7 +366,8 @@ int flexran_get_harq(const mid_t mod_id,
...
@@ -340,7 +366,8 @@ int flexran_get_harq(const mid_t mod_id,
int
flexran_get_p0_pucch_dbm
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
)
{
int
flexran_get_p0_pucch_dbm
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
)
{
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
uint32_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
uint32_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
if
(
mac_xface_not_ready
())
return
0
;
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
CC_id
,
rnti
);
eNB_UE_stats
=
mac_xface
->
get_eNB_UE_stats
(
mod_id
,
CC_id
,
rnti
);
if
(
eNB_UE_stats
==
NULL
)
{
if
(
eNB_UE_stats
==
NULL
)
{
...
@@ -355,11 +382,15 @@ int flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, int CC_id) {
...
@@ -355,11 +382,15 @@ int flexran_get_p0_pucch_dbm(mid_t mod_id, mid_t ue_id, int CC_id) {
}
}
int
flexran_get_p0_nominal_pucch
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_p0_nominal_pucch
(
mid_t
mod_id
,
int
CC_id
)
{
if
(
mac_xface_not_ready
())
return
0
;
int32_t
pucch_rx_received
=
mac_xface
->
get_target_pucch_rx_power
(
mod_id
,
CC_id
);
int32_t
pucch_rx_received
=
mac_xface
->
get_target_pucch_rx_power
(
mod_id
,
CC_id
);
return
pucch_rx_received
;
return
pucch_rx_received
;
}
}
int
flexran_get_p0_pucch_status
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
)
{
int
flexran_get_p0_pucch_status
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
)
{
if
(
mac_xface_not_ready
())
return
0
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
uint32_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
uint32_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
...
@@ -368,6 +399,8 @@ int flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, int CC_id) {
...
@@ -368,6 +399,8 @@ int flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, int CC_id) {
}
}
int
flexran_update_p0_pucch
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
)
{
int
flexran_update_p0_pucch
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
)
{
if
(
mac_xface_not_ready
())
return
0
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
LTE_eNB_UE_stats
*
eNB_UE_stats
=
NULL
;
uint32_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
uint32_t
rnti
=
flexran_get_ue_crnti
(
mod_id
,
ue_id
);
...
@@ -383,9 +416,18 @@ int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, int CC_id) {
...
@@ -383,9 +416,18 @@ int flexran_update_p0_pucch(mid_t mod_id, mid_t ue_id, int CC_id) {
* Get Messages for eNB Configuration Reply
* Get Messages for eNB Configuration Reply
* ************************************
* ************************************
*/
*/
int
flexran_get_threequarter_fs
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
threequarter_fs
;
}
int
flexran_get_hopping_offset
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_hopping_offset
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
pusch_config_common
.
pusch_HoppingOffset
;
return
frame_parms
->
pusch_config_common
.
pusch_HoppingOffset
;
...
@@ -393,6 +435,7 @@ int flexran_get_hopping_offset(mid_t mod_id, int CC_id) {
...
@@ -393,6 +435,7 @@ int flexran_get_hopping_offset(mid_t mod_id, int CC_id) {
int
flexran_get_hopping_mode
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_hopping_mode
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
pusch_config_common
.
hoppingMode
;
return
frame_parms
->
pusch_config_common
.
hoppingMode
;
...
@@ -400,6 +443,7 @@ int flexran_get_hopping_mode(mid_t mod_id, int CC_id) {
...
@@ -400,6 +443,7 @@ int flexran_get_hopping_mode(mid_t mod_id, int CC_id) {
int
flexran_get_n_SB
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_n_SB
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
pusch_config_common
.
n_SB
;
return
frame_parms
->
pusch_config_common
.
n_SB
;
...
@@ -407,6 +451,7 @@ int flexran_get_n_SB(mid_t mod_id, int CC_id) {
...
@@ -407,6 +451,7 @@ int flexran_get_n_SB(mid_t mod_id, int CC_id) {
int
flexran_get_enable64QAM
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_enable64QAM
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
pusch_config_common
.
enable64QAM
;
return
frame_parms
->
pusch_config_common
.
enable64QAM
;
...
@@ -414,6 +459,7 @@ int flexran_get_enable64QAM(mid_t mod_id, int CC_id) {
...
@@ -414,6 +459,7 @@ int flexran_get_enable64QAM(mid_t mod_id, int CC_id) {
int
flexran_get_phich_duration
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_phich_duration
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
phich_config_common
.
phich_duration
;
return
frame_parms
->
phich_config_common
.
phich_duration
;
...
@@ -421,6 +467,7 @@ int flexran_get_phich_duration(mid_t mod_id, int CC_id) {
...
@@ -421,6 +467,7 @@ int flexran_get_phich_duration(mid_t mod_id, int CC_id) {
int
flexran_get_phich_resource
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_phich_resource
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
if
(
frame_parms
->
phich_config_common
.
phich_resource
==
oneSixth
)
if
(
frame_parms
->
phich_config_common
.
phich_resource
==
oneSixth
)
...
@@ -437,6 +484,7 @@ int flexran_get_phich_resource(mid_t mod_id, int CC_id) {
...
@@ -437,6 +484,7 @@ int flexran_get_phich_resource(mid_t mod_id, int CC_id) {
int
flexran_get_n1pucch_an
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_n1pucch_an
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
pucch_config_common
.
n1PUCCH_AN
;
return
frame_parms
->
pucch_config_common
.
n1PUCCH_AN
;
...
@@ -444,6 +492,7 @@ int flexran_get_n1pucch_an(mid_t mod_id, int CC_id) {
...
@@ -444,6 +492,7 @@ int flexran_get_n1pucch_an(mid_t mod_id, int CC_id) {
int
flexran_get_nRB_CQI
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_nRB_CQI
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
pucch_config_common
.
nRB_CQI
;
return
frame_parms
->
pucch_config_common
.
nRB_CQI
;
...
@@ -451,6 +500,7 @@ int flexran_get_nRB_CQI(mid_t mod_id, int CC_id) {
...
@@ -451,6 +500,7 @@ int flexran_get_nRB_CQI(mid_t mod_id, int CC_id) {
int
flexran_get_deltaPUCCH_Shift
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_deltaPUCCH_Shift
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
pucch_config_common
.
deltaPUCCH_Shift
;
return
frame_parms
->
pucch_config_common
.
deltaPUCCH_Shift
;
...
@@ -458,6 +508,7 @@ int flexran_get_deltaPUCCH_Shift(mid_t mod_id, int CC_id) {
...
@@ -458,6 +508,7 @@ int flexran_get_deltaPUCCH_Shift(mid_t mod_id, int CC_id) {
int
flexran_get_prach_ConfigIndex
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_prach_ConfigIndex
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
prach_config_common
.
prach_ConfigInfo
.
prach_ConfigIndex
;
return
frame_parms
->
prach_config_common
.
prach_ConfigInfo
.
prach_ConfigIndex
;
...
@@ -465,6 +516,7 @@ int flexran_get_prach_ConfigIndex(mid_t mod_id, int CC_id) {
...
@@ -465,6 +516,7 @@ int flexran_get_prach_ConfigIndex(mid_t mod_id, int CC_id) {
int
flexran_get_prach_FreqOffset
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_prach_FreqOffset
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
prach_config_common
.
prach_ConfigInfo
.
prach_FreqOffset
;
return
frame_parms
->
prach_config_common
.
prach_ConfigInfo
.
prach_FreqOffset
;
...
@@ -472,6 +524,7 @@ int flexran_get_prach_FreqOffset(mid_t mod_id, int CC_id) {
...
@@ -472,6 +524,7 @@ int flexran_get_prach_FreqOffset(mid_t mod_id, int CC_id) {
int
flexran_get_maxHARQ_Msg3Tx
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_maxHARQ_Msg3Tx
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
maxHARQ_Msg3Tx
;
return
frame_parms
->
maxHARQ_Msg3Tx
;
...
@@ -479,6 +532,7 @@ int flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, int CC_id) {
...
@@ -479,6 +532,7 @@ int flexran_get_maxHARQ_Msg3Tx(mid_t mod_id, int CC_id) {
int
flexran_get_ul_cyclic_prefix_length
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_ul_cyclic_prefix_length
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
Ncp_UL
;
return
frame_parms
->
Ncp_UL
;
...
@@ -486,7 +540,8 @@ int flexran_get_ul_cyclic_prefix_length(mid_t mod_id, int CC_id) {
...
@@ -486,7 +540,8 @@ int flexran_get_ul_cyclic_prefix_length(mid_t mod_id, int CC_id) {
int
flexran_get_dl_cyclic_prefix_length
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_dl_cyclic_prefix_length
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
Ncp
;
return
frame_parms
->
Ncp
;
}
}
...
@@ -494,19 +549,23 @@ int flexran_get_dl_cyclic_prefix_length(mid_t mod_id, int CC_id) {
...
@@ -494,19 +549,23 @@ int flexran_get_dl_cyclic_prefix_length(mid_t mod_id, int CC_id) {
int
flexran_get_cell_id
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_cell_id
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
Nid_cell
;
return
frame_parms
->
Nid_cell
;
}
}
int
flexran_get_srs_BandwidthConfig
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_srs_BandwidthConfig
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
soundingrs_ul_config_common
.
srs_BandwidthConfig
;
return
frame_parms
->
soundingrs_ul_config_common
.
srs_BandwidthConfig
;
}
}
int
flexran_get_srs_SubframeConfig
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_srs_SubframeConfig
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
soundingrs_ul_config_common
.
srs_SubframeConfig
;
return
frame_parms
->
soundingrs_ul_config_common
.
srs_SubframeConfig
;
...
@@ -514,6 +573,7 @@ int flexran_get_srs_SubframeConfig(mid_t mod_id, int CC_id) {
...
@@ -514,6 +573,7 @@ int flexran_get_srs_SubframeConfig(mid_t mod_id, int CC_id) {
int
flexran_get_srs_MaxUpPts
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_srs_MaxUpPts
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
soundingrs_ul_config_common
.
srs_MaxUpPts
;
return
frame_parms
->
soundingrs_ul_config_common
.
srs_MaxUpPts
;
...
@@ -521,6 +581,7 @@ int flexran_get_srs_MaxUpPts(mid_t mod_id, int CC_id) {
...
@@ -521,6 +581,7 @@ int flexran_get_srs_MaxUpPts(mid_t mod_id, int CC_id) {
int
flexran_get_N_RB_DL
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_N_RB_DL
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
N_RB_DL
;
return
frame_parms
->
N_RB_DL
;
...
@@ -528,6 +589,7 @@ int flexran_get_N_RB_DL(mid_t mod_id, int CC_id) {
...
@@ -528,6 +589,7 @@ int flexran_get_N_RB_DL(mid_t mod_id, int CC_id) {
int
flexran_get_N_RB_UL
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_N_RB_UL
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
N_RB_UL
;
return
frame_parms
->
N_RB_UL
;
...
@@ -535,6 +597,7 @@ int flexran_get_N_RB_UL(mid_t mod_id, int CC_id) {
...
@@ -535,6 +597,7 @@ int flexran_get_N_RB_UL(mid_t mod_id, int CC_id) {
int
flexran_get_N_RBG
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_N_RBG
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
N_RBG
;
return
frame_parms
->
N_RBG
;
...
@@ -542,6 +605,7 @@ int flexran_get_N_RBG(mid_t mod_id, int CC_id) {
...
@@ -542,6 +605,7 @@ int flexran_get_N_RBG(mid_t mod_id, int CC_id) {
int
flexran_get_subframe_assignment
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_subframe_assignment
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
tdd_config
;
return
frame_parms
->
tdd_config
;
...
@@ -549,9 +613,10 @@ int flexran_get_subframe_assignment(mid_t mod_id, int CC_id) {
...
@@ -549,9 +613,10 @@ int flexran_get_subframe_assignment(mid_t mod_id, int CC_id) {
int
flexran_get_special_subframe_assignment
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_special_subframe_assignment
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
tdd_config_S
;
return
(
frame_parms
==
NULL
)
?
0
:
frame_parms
->
tdd_config_S
;
}
}
int
flexran_get_ra_ResponseWindowSize
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_ra_ResponseWindowSize
(
mid_t
mod_id
,
int
CC_id
)
{
...
@@ -564,8 +629,10 @@ int flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, int CC_id) {
...
@@ -564,8 +629,10 @@ int flexran_get_mac_ContentionResolutionTimer(mid_t mod_id, int CC_id) {
int
flexran_get_duplex_mode
(
mid_t
mod_id
,
int
CC_id
)
{
int
flexran_get_duplex_mode
(
mid_t
mod_id
,
int
CC_id
)
{
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
if
(
mac_xface_not_ready
())
return
0
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
if
(
frame_parms
==
NULL
)
return
-
1
;
if
(
frame_parms
->
frame_type
==
TDD
)
if
(
frame_parms
->
frame_type
==
TDD
)
return
PROTOCOL__FLEX_DUPLEX_MODE__FLDM_TDD
;
return
PROTOCOL__FLEX_DUPLEX_MODE__FLDM_TDD
;
else
if
(
frame_parms
->
frame_type
==
FDD
)
else
if
(
frame_parms
->
frame_type
==
FDD
)
...
@@ -671,10 +738,12 @@ int flexran_get_rrc_status(const mid_t mod_id, const rnti_t rntiP){
...
@@ -671,10 +738,12 @@ int flexran_get_rrc_status(const mid_t mod_id, const rnti_t rntiP){
}
}
int
flexran_get_ue_aggregated_max_bitrate_dl
(
mid_t
mod_id
,
mid_t
ue_id
)
{
int
flexran_get_ue_aggregated_max_bitrate_dl
(
mid_t
mod_id
,
mid_t
ue_id
)
{
if
(
enb_ue
[
mod_id
]
==
NULL
)
return
0
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_sched_ctrl
[
ue_id
].
ue_AggregatedMaximumBitrateDL
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_sched_ctrl
[
ue_id
].
ue_AggregatedMaximumBitrateDL
;
}
}
int
flexran_get_ue_aggregated_max_bitrate_ul
(
mid_t
mod_id
,
mid_t
ue_id
)
{
int
flexran_get_ue_aggregated_max_bitrate_ul
(
mid_t
mod_id
,
mid_t
ue_id
)
{
if
(
enb_ue
[
mod_id
]
==
NULL
)
return
0
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_sched_ctrl
[
ue_id
].
ue_AggregatedMaximumBitrateUL
;
return
((
UE_list_t
*
)
enb_ue
[
mod_id
])
->
UE_sched_ctrl
[
ue_id
].
ue_AggregatedMaximumBitrateUL
;
}
}
...
@@ -953,19 +1022,19 @@ int flexran_get_antenna_ports(mid_t mod_id, int CC_id){
...
@@ -953,19 +1022,19 @@ int flexran_get_antenna_ports(mid_t mod_id, int CC_id){
LTE_DL_FRAME_PARMS
*
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
;
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
frame_parms
=
mac_xface
->
get_lte_frame_parms
(
mod_id
,
CC_id
);
return
frame_parms
->
nb_antenna_ports_eNB
;
return
(
frame_parms
==
NULL
)
?
0
:
frame_parms
->
nb_antenna_ports_eNB
;
}
}
floa
t
flexran_agent_get_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
)
{
uint32_
t
flexran_agent_get_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
)
{
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
return
(
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
/
1000000
);
return
(
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
/
1000000
);
}
}
floa
t
flexran_agent_get_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
)
{
uint32_
t
flexran_agent_get_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
)
{
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
const
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
return
((
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
+
enb_properties
->
properties
[
0
]
->
uplink_frequency_offset
[
cc_id
])
/
1000000
);
return
((
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
+
enb_properties
->
properties
[
0
]
->
uplink_frequency_offset
[
cc_id
])
/
1000000
);
}
}
int
flexran_agent_get_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
)
{
int
flexran_agent_get_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
)
{
...
@@ -981,5 +1050,33 @@ int flexran_agent_get_operating_pusch_p0 (mid_t mod_id, int cc_id) {
...
@@ -981,5 +1050,33 @@ int flexran_agent_get_operating_pusch_p0 (mid_t mod_id, int cc_id) {
return
enb_properties
->
properties
[
mod_id
]
->
pusch_p0_Nominal
[
cc_id
];
return
enb_properties
->
properties
[
mod_id
]
->
pusch_p0_Nominal
[
cc_id
];
}
}
void
flexran_agent_set_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
,
uint32_t
dl_freq_mhz
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
downlink_frequency
[
cc_id
]
=
dl_freq_mhz
*
1000000
;
/*printf("[ENB_APP] mod id %d ccid %d dl freq %d/%d\n", mod_id, cc_id, dl_freq_mhz, enb_properties->properties[mod_id]->downlink_frequency[cc_id]); */
}
void
flexran_agent_set_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
,
int32_t
ul_freq_offset_mhz
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
uplink_frequency_offset
[
cc_id
]
=
ul_freq_offset_mhz
*
1000000
;
}
//TBD
void
flexran_agent_set_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
eutra_band
[
cc_id
]
=
7
;
}
void
flexran_agent_set_operating_bandwidth
(
mid_t
mod_id
,
int
cc_id
,
int
bandwidth
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
N_RB_DL
[
cc_id
]
=
bandwidth
;
}
void
flexran_agent_set_operating_frame_type
(
mid_t
mod_id
,
int
cc_id
,
int
frame_type
)
{
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
enb_properties
->
properties
[
mod_id
]
->
frame_type
[
cc_id
]
=
frame_type
;
}
openair2/ENB_APP/flexran_agent_ran_api.h
View file @
e996f5d0
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
/*! \file flexran_agent_ran_api.h
/*! \file flexran_agent_ran_api.h
* \brief FlexRAN RAN API abstraction header
* \brief FlexRAN RAN API abstraction header
* \author
shahab
SHARIAT BAGHERI
* \author
N. Nikaein, X. Foukas and S.
SHARIAT BAGHERI
* \date 2017
* \date 2017
* \version 0.1
* \version 0.1
*/
*/
...
@@ -198,6 +198,8 @@ int flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, int CC_id);
...
@@ -198,6 +198,8 @@ int flexran_get_p0_pucch_status(mid_t mod_id, mid_t ue_id, int CC_id);
int
flexran_update_p0_pucch
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
);
int
flexran_update_p0_pucch
(
mid_t
mod_id
,
mid_t
ue_id
,
int
CC_id
);
int
flexran_get_threequarter_fs
(
mid_t
mod_id
,
int
CC_id
);
int
flexran_get_hopping_mode
(
mid_t
mod_id
,
int
CC_id
);
int
flexran_get_hopping_mode
(
mid_t
mod_id
,
int
CC_id
);
int
flexran_get_hopping_offset
(
mid_t
mod_id
,
int
CC_id
);
int
flexran_get_hopping_offset
(
mid_t
mod_id
,
int
CC_id
);
...
@@ -301,10 +303,10 @@ int flexran_get_lcg(mid_t ue_id, mid_t lc_id);
...
@@ -301,10 +303,10 @@ int flexran_get_lcg(mid_t ue_id, mid_t lc_id);
int
flexran_get_direction
(
mid_t
ue_id
,
mid_t
lc_id
);
int
flexran_get_direction
(
mid_t
ue_id
,
mid_t
lc_id
);
/*Get downlink frequency*/
/*Get downlink frequency*/
floa
t
flexran_agent_get_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
);
uint32_
t
flexran_agent_get_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
);
/*Get uplink frequency*/
/*Get uplink frequency*/
floa
t
flexran_agent_get_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
);
uint32_
t
flexran_agent_get_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
);
/*Get eutra band*/
/*Get eutra band*/
int
flexran_agent_get_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
);
int
flexran_agent_get_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
);
...
@@ -315,5 +317,20 @@ int flexran_agent_get_operating_pdsch_refpower (mid_t mod_id, int cc_id);
...
@@ -315,5 +317,20 @@ int flexran_agent_get_operating_pdsch_refpower (mid_t mod_id, int cc_id);
/*Get uplink power*/
/*Get uplink power*/
int
flexran_agent_get_operating_pusch_p0
(
mid_t
mod_id
,
int
cc_id
);
int
flexran_agent_get_operating_pusch_p0
(
mid_t
mod_id
,
int
cc_id
);
/*set the dl freq */
void
flexran_agent_set_operating_dl_freq
(
mid_t
mod_id
,
int
cc_id
,
uint32_t
dl_freq_mhz
);
/* set the ul freq */
void
flexran_agent_set_operating_ul_freq
(
mid_t
mod_id
,
int
cc_id
,
int32_t
ul_freq_offset_mhz
);
/*set the the band */
void
flexran_agent_set_operating_eutra_band
(
mid_t
mod_id
,
int
cc_id
);
/* set the bandwidth */
void
flexran_agent_set_operating_bandwidth
(
mid_t
mod_id
,
int
cc_id
,
int
bandwidth
);
/*set frame type*/
void
flexran_agent_set_operating_frame_type
(
mid_t
mod_id
,
int
cc_id
,
int
frame_type
);
/*RRC status flexRAN*/
/*RRC status flexRAN*/
int
flexran_get_rrc_status
(
const
mid_t
mod_id
,
const
rnti_t
rntiP
);
int
flexran_get_rrc_status
(
const
mid_t
mod_id
,
const
rnti_t
rntiP
);
\ No newline at end of file
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