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
spbro
OpenXG-RAN
Commits
b2181288
Commit
b2181288
authored
Oct 20, 2016
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved agent and protocol to flexran naming convention
parent
9ed966cf
Changes
30
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
1227 additions
and
1017 deletions
+1227
-1017
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+44
-44
openair2/ENB_APP/MESSAGES/V2/config_common.proto
openair2/ENB_APP/MESSAGES/V2/config_common.proto
+71
-71
openair2/ENB_APP/MESSAGES/V2/config_messages.proto
openair2/ENB_APP/MESSAGES/V2/config_messages.proto
+22
-22
openair2/ENB_APP/MESSAGES/V2/control_delegation.proto
openair2/ENB_APP/MESSAGES/V2/control_delegation.proto
+2
-2
openair2/ENB_APP/MESSAGES/V2/controller_commands.proto
openair2/ENB_APP/MESSAGES/V2/controller_commands.proto
+13
-13
openair2/ENB_APP/MESSAGES/V2/flexran.proto
openair2/ENB_APP/MESSAGES/V2/flexran.proto
+210
-0
openair2/ENB_APP/MESSAGES/V2/header.proto
openair2/ENB_APP/MESSAGES/V2/header.proto
+19
-19
openair2/ENB_APP/MESSAGES/V2/mac_primitives.proto
openair2/ENB_APP/MESSAGES/V2/mac_primitives.proto
+24
-24
openair2/ENB_APP/MESSAGES/V2/stats_common.proto
openair2/ENB_APP/MESSAGES/V2/stats_common.proto
+56
-56
openair2/ENB_APP/MESSAGES/V2/stats_messages.proto
openair2/ENB_APP/MESSAGES/V2/stats_messages.proto
+30
-30
openair2/ENB_APP/MESSAGES/V2/time_common.proto
openair2/ENB_APP/MESSAGES/V2/time_common.proto
+10
-10
openair2/ENB_APP/enb_agent.c
openair2/ENB_APP/enb_agent.c
+8
-8
openair2/ENB_APP/enb_agent_common.c
openair2/ENB_APP/enb_agent_common.c
+203
-203
openair2/ENB_APP/enb_agent_common.h
openair2/ENB_APP/enb_agent_common.h
+38
-38
openair2/ENB_APP/enb_agent_handler.c
openair2/ENB_APP/enb_agent_handler.c
+32
-32
openair2/ENB_APP/enb_agent_mac.c
openair2/ENB_APP/enb_agent_mac.c
+209
-209
openair2/ENB_APP/enb_agent_mac.h
openair2/ENB_APP/enb_agent_mac.h
+17
-17
openair2/ENB_APP/enb_agent_mac_defs.h
openair2/ENB_APP/enb_agent_mac_defs.h
+6
-6
openair2/ENB_APP/enb_agent_mac_internal.c
openair2/ENB_APP/enb_agent_mac_internal.c
+83
-83
openair2/ENB_APP/enb_agent_mac_internal.h
openair2/ENB_APP/enb_agent_mac_internal.h
+16
-16
openair2/ENB_APP/enb_agent_task_manager.c
openair2/ENB_APP/enb_agent_task_manager.c
+1
-1
openair2/ENB_APP/enb_agent_task_manager.h
openair2/ENB_APP/enb_agent_task_manager.h
+4
-4
openair2/LAYER2/MAC/eNB_agent_scheduler_dataplane.c
openair2/LAYER2/MAC/eNB_agent_scheduler_dataplane.c
+42
-42
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue.c
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue.c
+32
-32
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue_remote.c
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue_remote.c
+1
-1
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue_remote.h
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue_remote.h
+3
-3
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+2
-2
openair2/LAYER2/MAC/enb_agent_mac_proto.h
openair2/LAYER2/MAC/enb_agent_mac_proto.h
+5
-5
openair2/LAYER2/MAC/flexran_dci_conversions.h
openair2/LAYER2/MAC/flexran_dci_conversions.h
+22
-22
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+2
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
b2181288
...
...
@@ -840,55 +840,55 @@ include_directories("${OPENAIR_DIR}")
################
if
(
ENB_AGENT_SB_IF
)
# set the version of protobuf messages, V3 not supported yet
add_list1_option
(
PRPT_VERSION V2
"PR
PT MSG protobuf grammar version"
V2 V3
)
if
(
${
PR
PT_VERSION
}
STREQUAL
"V2"
)
set
(
PR
PTDIR V2
)
elseif
(
${
PR
PT_VERSION
}
STREQUAL
"V3"
)
set
(
PR
PTDIR V3
)
endif
(
${
PR
PT_VERSION
}
STREQUAL
"V2"
)
set
(
PRPT_MSG_DIR
${
OPENAIR2_DIR
}
/ENB_APP/MESSAGES/
${
PR
PTDIR
}
)
set
(
PR
PT_MSG_FILES
${
PR
PT_MSG_DIR
}
/header.proto
${
PRPT_MSG_DIR
}
/prog
ran.proto
${
PR
PT_MSG_DIR
}
/stats_common.proto
${
PR
PT_MSG_DIR
}
/stats_messages.proto
${
PR
PT_MSG_DIR
}
/time_common.proto
${
PR
PT_MSG_DIR
}
/controller_commands.proto
${
PR
PT_MSG_DIR
}
/mac_primitives.proto
${
PR
PT_MSG_DIR
}
/config_messages.proto
${
PR
PT_MSG_DIR
}
/config_common.proto
${
PR
PT_MSG_DIR
}
/control_delegation.proto
add_list1_option
(
FLPT_VERSION V2
"FL
PT MSG protobuf grammar version"
V2 V3
)
if
(
${
FL
PT_VERSION
}
STREQUAL
"V2"
)
set
(
FL
PTDIR V2
)
elseif
(
${
FL
PT_VERSION
}
STREQUAL
"V3"
)
set
(
FL
PTDIR V3
)
endif
(
${
FL
PT_VERSION
}
STREQUAL
"V2"
)
set
(
FLPT_MSG_DIR
${
OPENAIR2_DIR
}
/ENB_APP/MESSAGES/
${
FL
PTDIR
}
)
set
(
FL
PT_MSG_FILES
${
FL
PT_MSG_DIR
}
/header.proto
${
FLPT_MSG_DIR
}
/flex
ran.proto
${
FL
PT_MSG_DIR
}
/stats_common.proto
${
FL
PT_MSG_DIR
}
/stats_messages.proto
${
FL
PT_MSG_DIR
}
/time_common.proto
${
FL
PT_MSG_DIR
}
/controller_commands.proto
${
FL
PT_MSG_DIR
}
/mac_primitives.proto
${
FL
PT_MSG_DIR
}
/config_messages.proto
${
FL
PT_MSG_DIR
}
/config_common.proto
${
FL
PT_MSG_DIR
}
/control_delegation.proto
)
set
(
PRPT_C_DIR
${
protobuf_generated_dir
}
/
${
PR
PTDIR
}
)
#message("calling protoc_call=${protoc_call}
PRPT_C_DIR=${PRPT_C_DIR} PRPT_MSG_FILES=${PR
PT_MSG_FILES}")
execute_process
(
COMMAND
${
protoc_call
}
${
PRPT_C_DIR
}
${
PRPT_MSG_DIR
}
${
PR
PT_MSG_FILES
}
)
file
(
GLOB
PRPT_source
${
PR
PT_C_DIR
}
/*.c
)
set
(
PR
PT_OAI_generated
${
PR
PT_C_DIR
}
/header.pb-c.c
${
PRPT_C_DIR
}
/prog
ran.pb-c.c
${
PR
PT_C_DIR
}
/stats_common.pb-c.c
${
PR
PT_C_DIR
}
/stats_messages.pb-c.c
${
PR
PT_C_DIR
}
/time_common.pb-c.c
${
PR
PT_C_DIR
}
/controller_commands.pb-c.c
${
PR
PT_C_DIR
}
/mac_primitives.pb-c.c
${
PR
PT_C_DIR
}
/config_messages.pb-c.c
${
PR
PT_C_DIR
}
/config_common.pb-c.c
${
PR
PT_C_DIR
}
/control_delegation.pb-c.c
set
(
FLPT_C_DIR
${
protobuf_generated_dir
}
/
${
FL
PTDIR
}
)
#message("calling protoc_call=${protoc_call}
FLPT_C_DIR=${FLPT_C_DIR} FLPT_MSG_FILES=${FL
PT_MSG_FILES}")
execute_process
(
COMMAND
${
protoc_call
}
${
FLPT_C_DIR
}
${
FLPT_MSG_DIR
}
${
FL
PT_MSG_FILES
}
)
file
(
GLOB
FLPT_source
${
FL
PT_C_DIR
}
/*.c
)
set
(
FL
PT_OAI_generated
${
FL
PT_C_DIR
}
/header.pb-c.c
${
FLPT_C_DIR
}
/flex
ran.pb-c.c
${
FL
PT_C_DIR
}
/stats_common.pb-c.c
${
FL
PT_C_DIR
}
/stats_messages.pb-c.c
${
FL
PT_C_DIR
}
/time_common.pb-c.c
${
FL
PT_C_DIR
}
/controller_commands.pb-c.c
${
FL
PT_C_DIR
}
/mac_primitives.pb-c.c
${
FL
PT_C_DIR
}
/config_messages.pb-c.c
${
FL
PT_C_DIR
}
/config_common.pb-c.c
${
FL
PT_C_DIR
}
/control_delegation.pb-c.c
)
file
(
GLOB
prpt_h
${
PR
PT_C_DIR
}
/*.h
)
set
(
prpt_h
${
pr
pt_h
}
)
file
(
GLOB
flpt_h
${
FL
PT_C_DIR
}
/*.h
)
set
(
flpt_h
${
fl
pt_h
}
)
add_library
(
PR
PT_MSG
${
PR
PT_OAI_generated
}
${
PR
PT_source
}
add_library
(
FL
PT_MSG
${
FL
PT_OAI_generated
}
${
FL
PT_source
}
)
set
(
PRPT_MSG_LIB PR
PT_MSG
)
#message("prpt c dir is : ${
PR
PT_C_DIR}")
include_directories
(
${
PR
PT_C_DIR
}
)
set
(
FLPT_MSG_LIB FL
PT_MSG
)
#message("prpt c dir is : ${
FL
PT_C_DIR}")
include_directories
(
${
FL
PT_C_DIR
}
)
add_library
(
ASYNC_IF
${
OPENAIR2_DIR
}
/UTIL/ASYNC_IF/socket_link.c
...
...
@@ -1757,7 +1757,7 @@ add_executable(lte-softmodem
target_link_libraries
(
lte-softmodem -ldl
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
MIH_LIB
}
${
PR
PT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
ENB_AGENT_LIB
}
LFDS7
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
MIH_LIB
}
${
FL
PT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
ENB_AGENT_LIB
}
LFDS7
-Wl,--end-group
)
target_link_libraries
(
lte-softmodem
${
LIBXML2_LIBRARIES
}
)
...
...
@@ -1791,7 +1791,7 @@ add_executable(lte-softmodem-nos1
)
target_link_libraries
(
lte-softmodem-nos1
-Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
ITTI_LIB
}
${
MIH_LIB
}
${
PR
PT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
ENB_AGENT_LIB
}
LFDS7
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
ITTI_LIB
}
${
MIH_LIB
}
${
FL
PT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
ENB_AGENT_LIB
}
LFDS7
-Wl,--end-group
)
target_link_libraries
(
lte-softmodem-nos1
${
LIBXML2_LIBRARIES
}
)
...
...
@@ -1936,7 +1936,7 @@ add_executable(oaisim_nos1
target_include_directories
(
oaisim_nos1 PUBLIC
${
OPENAIR_TARGETS
}
/SIMU/USER
)
target_link_libraries
(
oaisim_nos1
-Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS
${
MSC_LIB
}
L2
${
RAL_LIB
}
SIMU SIMU_ETH SECU_OSA
${
ITTI_LIB
}
${
MIH_LIB
}
${
PR
PT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
ENB_AGENT_LIB
}
LFDS7
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS
${
MSC_LIB
}
L2
${
RAL_LIB
}
SIMU SIMU_ETH SECU_OSA
${
ITTI_LIB
}
${
MIH_LIB
}
${
FL
PT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
ENB_AGENT_LIB
}
LFDS7
-Wl,--end-group
)
target_link_libraries
(
oaisim_nos1
${
LIBXML2_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
...
...
openair2/ENB_APP/MESSAGES/V2/config_common.proto
View file @
b2181288
...
...
@@ -5,64 +5,64 @@ package protocol;
// Cell config related structures and enums
//
message
prp
_si_config
{
message
flex
_si_config
{
optional
uint32
sfn
=
1
;
optional
uint32
sib1_length
=
2
;
// The length of SIB1 in bytes
optional
uint32
si_window_length
=
3
;
// The scheduling window for all SIs in SF
repeated
prp
_si_message
si_message
=
4
;
// List of SI messages to be sent.
repeated
flex
_si_message
si_message
=
4
;
// List of SI messages to be sent.
// The index identifies the type of an SI message
// 0 - SIB1
// 1..31 - SIx
// 32..63 - PCCH
}
message
prp
_si_message
{
message
flex
_si_message
{
optional
uint32
periodicity
=
1
;
// Periodicity of SI msg in radio frames
optional
uint32
length
=
2
;
// The length of the SI message in bytes
}
enum
prp
_hopping_mode
{
PR
HM_INTER
=
0
;
PR
HM_INTERINTRA
=
1
;
enum
flex
_hopping_mode
{
FL
HM_INTER
=
0
;
FL
HM_INTERINTRA
=
1
;
}
enum
prp
_phich_resource
{
PR
PR_ONE_SIXTH
=
0
;
PR
PR_HALF
=
1
;
PR
PR_ONE
=
2
;
PR
PR_TWO
=
3
;
enum
flex
_phich_resource
{
FL
PR_ONE_SIXTH
=
0
;
FL
PR_HALF
=
1
;
FL
PR_ONE
=
2
;
FL
PR_TWO
=
3
;
}
enum
prp
_phich_duration
{
PR
PD_NORMAL
=
0
;
PR
PD_EXTENDED
=
1
;
enum
flex
_phich_duration
{
FL
PD_NORMAL
=
0
;
FL
PD_EXTENDED
=
1
;
}
enum
prp
_ul_cyclic_prefix_length
{
PR
UCPL_NORMAL
=
0
;
PR
UCPL_EXTENDED
=
1
;
enum
flex
_ul_cyclic_prefix_length
{
FL
UCPL_NORMAL
=
0
;
FL
UCPL_EXTENDED
=
1
;
}
enum
prp
_dl_cyclic_prefix_length
{
PR
DCPL_NORMAL
=
0
;
PR
DCPL_EXTENDED
=
1
;
enum
flex
_dl_cyclic_prefix_length
{
FL
DCPL_NORMAL
=
0
;
FL
DCPL_EXTENDED
=
1
;
}
enum
prp
_duplex_mode
{
PR
DM_TDD
=
0
;
PR
DM_FDD
=
1
;
enum
flex
_duplex_mode
{
FL
DM_TDD
=
0
;
FL
DM_FDD
=
1
;
}
enum
prp
_qam
{
PR
EQ_MOD_16QAM
=
0
;
PR
EQ_MOD_64QAM
=
1
;
enum
flex
_qam
{
FL
EQ_MOD_16QAM
=
0
;
FL
EQ_MOD_64QAM
=
1
;
}
//
// UE config related structures and enums
//
message
prp
_drx_config
{
message
flex
_drx_config
{
optional
uint32
on_duration_timer
=
1
;
// Timer in SF. See TS 36.321
optional
uint32
drx_inactivity_timer
=
2
;
// Timer in SF. See TS 36.321
optional
uint32
drx_retransmission_timer
=
3
;
// Timer in SF. See TS 36.321
...
...
@@ -72,30 +72,30 @@ message prp_drx_config {
optional
uint32
drx_short_cycle_timer
=
7
;
// Timer in subframes. See TS 36.321
}
message
prp
_sps_config
{
message
flex
_sps_config
{
optional
uint32
semi_persistent_sched_interval_UL
=
1
;
// SPS UL scheduling interval in SF
optional
uint32
semi_persistent_sched_interval_DL
=
2
;
// SPS DL scheduling interval in SF
optional
uint32
num_of_conf_sps_proc
=
3
;
// Number of SPS HARQ processes. See TS 36.321
repeated
uint32
n1_PUCCH_AN_persistent_element
=
4
;
// See TS36.213. Ignored when config is used
// as part of
PR
PT_SET_UE_CONFIG
// as part of
FL
PT_SET_UE_CONFIG
optional
uint32
implicit_release_after
=
5
;
// number of empty transmissions before release of SPS
}
message
prp
_sr_config
{
message
flex
_sr_config
{
optional
uint32
sr_action
=
1
;
// Indicates if SR config should be changed or released
// One of the
PR
SRA_* enum values
// One of the
FL
SRA_* enum values
optional
uint32
sched_interval
=
2
;
// SR scheduling interval in SF
optional
uint32
dsr_trans_max
=
3
;
// See TS 36.213
}
message
prp
_cqi_config
{
message
flex
_cqi_config
{
optional
uint32
cqi_action
=
1
;
// Indicats if CQI changed or released.
// One of the
PR
SRA_* enum values
// One of the
FL
SRA_* enum values
optional
uint32
cqi_sched_interval
=
2
;
// CQI scheduling interval in SF
optional
uint32
ri_sched_interval
=
3
;
// RI scheduling interval in SF
}
message
prp
_ue_capabilities
{
message
flex
_ue_capabilities
{
optional
uint32
half_duplex
=
1
;
// Boolean value. Only half duplex support. FDD operation
optional
uint32
intra_SF_hopping
=
2
;
// Support for intra-subframe hopping. Boolean value
optional
uint32
type2_sb_1
=
3
;
// Support for type 2 hopping with n_sb > 1
...
...
@@ -103,7 +103,7 @@ message prp_ue_capabilities {
optional
uint32
res_alloc_type1
=
5
;
// Boolean value. UE support for resource allocation type 1
}
message
prp
_scell_config
{
message
flex
_scell_config
{
optional
uint32
carrier_index
=
1
;
// Id of the carrier component
optional
uint32
scell_index
=
2
;
// Index of this Scell (RRC SCellIndex)
optional
uint32
use_ccs
=
3
;
// Boolean value. Indicates if cross-carrier scheduling
...
...
@@ -113,46 +113,46 @@ message prp_scell_config {
optional
uint32
pdsch_start
=
5
;
// Starting OFDM symbol of PDSCH data region for this SCell
}
enum
prp
_meas_gap_config_pattern
{
PR
MGCP_GP1
=
0
;
PR
MGCP_GP2
=
1
;
PR
MGCP_OFF
=
2
;
enum
flex
_meas_gap_config_pattern
{
FL
MGCP_GP1
=
0
;
FL
MGCP_GP2
=
1
;
FL
MGCP_OFF
=
2
;
}
enum
prp
_setup_release_action
{
PR
SRA_SETUP
=
0
;
PR
SRA_RELEASE
=
1
;
enum
flex
_setup_release_action
{
FL
SRA_SETUP
=
0
;
FL
SRA_RELEASE
=
1
;
}
enum
prp
_ue_transmission_antenna
{
PR
UTA_NONE
=
0
;
PR
UTA_OPEN_LOOP
=
1
;
PR
UTA_CLOSED_LOOP
=
2
;
enum
flex
_ue_transmission_antenna
{
FL
UTA_NONE
=
0
;
FL
UTA_OPEN_LOOP
=
1
;
FL
UTA_CLOSED_LOOP
=
2
;
}
enum
prp
_aperiodic_cqi_report_mode
{
PR
ACRM_RM12
=
0
;
PR
ACRM_RM20
=
1
;
PR
ACRM_RM22
=
2
;
PR
ACRM_RM30
=
3
;
PR
ACRM_RM31
=
4
;
PR
ACRM_NONE
=
5
;
enum
flex
_aperiodic_cqi_report_mode
{
FL
ACRM_RM12
=
0
;
FL
ACRM_RM20
=
1
;
FL
ACRM_RM22
=
2
;
FL
ACRM_RM30
=
3
;
FL
ACRM_RM31
=
4
;
FL
ACRM_NONE
=
5
;
}
enum
prp
_tdd_ack_nack_feedback_mode
{
PR
TANFM_BUNDLING
=
0
;
PR
TANFM_MULTIPLEXING
=
1
;
enum
flex
_tdd_ack_nack_feedback_mode
{
FL
TANFM_BUNDLING
=
0
;
FL
TANFM_MULTIPLEXING
=
1
;
}
//
// Logical channel config related structures and enums
//
message
prp
_lc_config
{
message
flex
_lc_config
{
optional
uint32
lcid
=
1
;
// The logical channel id
optional
uint32
lcg
=
2
;
// The logical channel group (0..3) the LC is mapped to
optional
uint32
direction
=
3
;
// The LC direction. One of the
PR
LCD_* enum values
optional
uint32
qos_bearer_type
=
4
;
// GBR or NGBR bearer. One of the
PR
QBT_* enum values
optional
uint32
direction
=
3
;
// The LC direction. One of the
FL
LCD_* enum values
optional
uint32
qos_bearer_type
=
4
;
// GBR or NGBR bearer. One of the
FL
QBT_* enum values
optional
uint32
qci
=
5
;
// The QCI defined in TS 23.203, coded as defined in TS 36.413
// One less than the actual QCI value
optional
uint64
e_RAB_max_bitrate_UL
=
6
;
// In bps (GBR only)
...
...
@@ -161,20 +161,20 @@ message prp_lc_config {
optional
uint64
e_RAB_guaranteed_bitrate_DL
=
9
;
// In bps (GBR only)
}
enum
prp
_lc_direction
{
PR
LCD_UL
=
0
;
PR
LCD_DL
=
1
;
PR
LCD_BOTH
=
2
;
enum
flex
_lc_direction
{
FL
LCD_UL
=
0
;
FL
LCD_DL
=
1
;
FL
LCD_BOTH
=
2
;
}
enum
prp
_qos_bearer_type
{
PR
QBT_NON_GBR
=
0
;
PR
QBT_GBR
=
1
;
enum
flex
_qos_bearer_type
{
FL
QBT_NON_GBR
=
0
;
FL
QBT_GBR
=
1
;
}
enum
prp
_ue_state_change_type
{
PR
UESC_UPDATED
=
0
;
PR
UESC_ACTIVATED
=
1
;
PR
UESC_DEACTIVATED
=
2
;
PR
UESC_MOVED
=
3
;
enum
flex
_ue_state_change_type
{
FL
UESC_UPDATED
=
0
;
FL
UESC_ACTIVATED
=
1
;
FL
UESC_DEACTIVATED
=
2
;
FL
UESC_MOVED
=
3
;
}
\ No newline at end of file
openair2/ENB_APP/MESSAGES/V2/config_messages.proto
View file @
b2181288
...
...
@@ -3,23 +3,23 @@ package protocol;
import
"config_common.proto"
;
message
prp
_cell_config
{
message
flex
_cell_config
{
optional
uint32
phy_cell_id
=
1
;
// The PCI of this cell
optional
uint32
cell_id
=
2
;
// The PLMN cell id of this cell
optional
uint32
pusch_hopping_offset
=
3
;
// PUSCH resources in RBs for hopping
optional
uint32
hopping_mode
=
4
;
// One of the
PR
HM_* enum values
optional
uint32
hopping_mode
=
4
;
// One of the
FL
HM_* enum values
optional
uint32
n_sb
=
5
;
// The number of subbands
optional
uint32
phich_resource
=
6
;
// The number of REGs used for PHICH
// One of the
PR
PR_* enum values
optional
uint32
phich_duration
=
7
;
// One of the
PR
PD_* enum values
// One of the
FL
PR_* enum values
optional
uint32
phich_duration
=
7
;
// One of the
FL
PD_* enum values
optional
uint32
init_nr_PDCCH_OFDM_sym
=
8
;
// See TS 36.211, section 6.9
optional
prp
_si_config
si_config
=
9
;
// The SI configuration
optional
flex
_si_config
si_config
=
9
;
// The SI configuration
optional
uint32
dl_bandwidth
=
10
;
// The DL transmission bandwidth in RBs
optional
uint32
ul_bandwidth
=
11
;
// The UL transmission bandwidth in RBs
optional
uint32
ul_cyclic_prefix_length
=
13
;
// One of the
PR
UCPL_* enum values
optional
uint32
dl_cyclic_prefix_length
=
14
;
// One of the
PR
DCPL_* enum values
optional
uint32
ul_cyclic_prefix_length
=
13
;
// One of the
FL
UCPL_* enum values
optional
uint32
dl_cyclic_prefix_length
=
14
;
// One of the
FL
DCPL_* enum values
optional
uint32
antenna_ports_count
=
15
;
// Number of cell specific antenna ports
optional
uint32
duplex_mode
=
16
;
// One of the
PR
DM_* enum values
optional
uint32
duplex_mode
=
16
;
// One of the
FL
DM_* enum values
optional
uint32
subframe_assignment
=
17
;
// DL/UL subframe assignment. TDD only
optional
uint32
special_subframe_patterns
=
18
;
// TDD only. See TS 36.211, table 4.2.1
repeated
uint32
mbsfn_subframe_config_rfperiod
=
19
;
// The MBSFN radio frame period (Optional)
...
...
@@ -36,30 +36,30 @@ message prp_cell_config {
optional
uint32
srs_subframe_config
=
30
;
// See TS 36.211, table 5.5.3.3-1 and 2
optional
uint32
srs_bw_config
=
31
;
// See TS 36.211, section 5.5.3.2
optional
uint32
srs_mac_up_pts
=
32
;
// Boolean value. See TS 36.211, section 5.5.3.2. TDD only
optional
uint32
enable_64QAM
=
33
;
// One of the
PR
EQ_* enum values
optional
uint32
enable_64QAM
=
33
;
// One of the
FL
EQ_* enum values
optional
uint32
carrier_index
=
34
;
// Carrier component index
}
message
prp
_ue_config
{
message
flex
_ue_config
{
optional
uint32
rnti
=
1
;
optional
prp
_drx_config
drx_config
=
2
;
// The DRX configuration (Optional)
optional
flex
_drx_config
drx_config
=
2
;
// The DRX configuration (Optional)
optional
uint32
time_alignment_timer
=
3
;
// Timer in SF. Control the synchronization
// status of the UE, not the actual advance procedure
// See TS 36.321
optional
uint32
meas_gap_config_pattern
=
4
;
// Measurement gap configuration.
// One of the
PR
MGCP_* enum values
// One of the
FL
MGCP_* enum values
// See TS 36.133
optional
uint32
meas_gap_config_sf_offset
=
5
;
// Measurement gap offset if applicable
optional
prp
_sps_config
sps_config
=
6
;
// The SPS configuration (Optional)
optional
prp
_sr_config
sr_config
=
7
;
// The SR configuration (Optional)
optional
prp
_cqi_config
cqi_config
=
8
;
// The CQI configuration (Optional)
optional
flex
_sps_config
sps_config
=
6
;
// The SPS configuration (Optional)
optional
flex
_sr_config
sr_config
=
7
;
// The SR configuration (Optional)
optional
flex
_cqi_config
cqi_config
=
8
;
// The CQI configuration (Optional)
optional
uint32
transmission_mode
=
9
;
// The UE transmission mode
optional
uint64
ue_aggregated_max_bitrate_UL
=
10
;
// Aggregated bit-rate of non-gbr bearer
// per UE. See TS 36.413
optional
uint64
ue_aggregated_max_bitrate_DL
=
11
;
// Aggregated bit-rate of non-gbr bearer
// per UE. See TS 36.413
optional
prp
_ue_capabilities
capabilities
=
12
;
optional
uint32
ue_transmission_antenna
=
13
;
// One of the
PR
UTA_* enum values
optional
flex
_ue_capabilities
capabilities
=
12
;
optional
uint32
ue_transmission_antenna
=
13
;
// One of the
FL
UTA_* enum values
optional
uint32
tti_bundling
=
14
;
// Boolean value. See TS 36.321
optional
uint32
max_HARQ_tx
=
15
;
// The max HARQ retransmission for UL
optional
uint32
beta_offset_ACK_index
=
16
;
// See TS 36.213
...
...
@@ -67,20 +67,20 @@ message prp_ue_config {
optional
uint32
beta_offset_CQI_index
=
18
;
// See TS 36.213
optional
uint32
ack_nack_simultaneous_trans
=
19
;
// Boolean. See TS 36.213
optional
uint32
simultaneous_ack_nack_cqi
=
20
;
// Boolean. See TS 36.213
optional
uint32
aperiodic_cqi_rep_mode
=
21
;
// One of the
PR
ACRM_* enum values
optional
uint32
tdd_ack_nack_feedback
=
22
;
// One of the
PR
TANFM_* enum values
optional
uint32
aperiodic_cqi_rep_mode
=
21
;
// One of the
FL
ACRM_* enum values
optional
uint32
tdd_ack_nack_feedback
=
22
;
// One of the
FL
TANFM_* enum values
optional
uint32
ack_nack_repetition_factor
=
23
;
// See TS 36.213, section 10.1
optional
uint32
extended_bsr_size
=
24
;
// Boolean for extended BSR size
optional
uint32
ca_support
=
25
;
// Boolean. Support for carrier aggregation
optional
uint32
cross_carrier_sched_support
=
26
;
// Boolean value
optional
uint32
pcell_carrier_index
=
27
;
// Index of primary cell
repeated
prp
_scell_config
scell_config
=
28
;
// Secondary cells configuration
repeated
flex
_scell_config
scell_config
=
28
;
// Secondary cells configuration
optional
uint32
scell_deactivation_timer
=
29
;
// Deactivation timer for secondary cell
}
message
prp
_lc_ue_config
{
message
flex
_lc_ue_config
{
optional
uint32
rnti
=
1
;
repeated
prp
_lc_config
lc_config
=
2
;
// A list of LC configurations for the given UE
repeated
flex
_lc_config
lc_config
=
2
;
// A list of LC configurations for the given UE
}
...
...
openair2/ENB_APP/MESSAGES/V2/control_delegation.proto
View file @
b2181288
//'syntax = "proto2";'
package
protocol
;
enum
prp
_control_delegation_type
{
PR
CDT_MAC_DL_UE_SCHEDULER
=
1
;
// DL UE scheduler delegation
enum
flex
_control_delegation_type
{
FL
CDT_MAC_DL_UE_SCHEDULER
=
1
;
// DL UE scheduler delegation
}
\ No newline at end of file
openair2/ENB_APP/MESSAGES/V2/controller_commands.proto
View file @
b2181288
...
...
@@ -6,11 +6,11 @@ import "mac_primitives.proto";
// Body of UE DL MAC scheduling configuration info
//
message
prp
_dl_data
{
message
flex
_dl_data
{
optional
uint32
rnti
=
1
;
optional
prp
_dl_dci
dl_dci
=
2
;
optional
flex
_dl_dci
dl_dci
=
2
;
repeated
uint32
ce_bitmap
=
3
;
// list of 2 MAC CEs, one for each TB
repeated
prp
_rlc_pdu
rlc_pdu
=
4
;
// list of parameters for the creation of RLC PDUs. One for each lcid
repeated
flex
_rlc_pdu
rlc_pdu
=
4
;
// list of parameters for the creation of RLC PDUs. One for each lcid
optional
uint32
serv_cell_index
=
5
;
optional
uint32
act_deact_ce
=
6
;
//Hex content of MAC CE for Activation/Deactivation in CA
}
...
...
@@ -18,10 +18,10 @@ message prp_dl_data {
//
// Body of the RAR scheduler configuration
//
message
prp
_dl_rar
{
message
flex
_dl_rar
{
optional
uint32
rnti
=
1
;
optional
uint32
grant
=
2
;
// The 20-bit UL grant. TS 36.213, sec 6.2
optional
prp
_dl_dci
rar_dci
=
3
;
optional
flex
_dl_dci
rar_dci
=
3
;
optional
uint32
carrier_index
=
4
;
// The carrier index for the RAR
}
...
...
@@ -29,13 +29,13 @@ message prp_dl_rar {
// Body of the paging/broadcast configuration message
//
message
prp
_dl_broadcast
{
optional
uint32
type
=
1
;
// The
PR
BT_* values
message
flex
_dl_broadcast
{
optional
uint32
type
=
1
;
// The
FL
BT_* values
optional
uint32
index
=
2
;
// Index of the broadcast message:
// 0 - SIB1,
// 1..31 - Six,
// 32..63 - PCCH (PCCH index obtained from
prp
_paging_info)
optional
prp
_dl_dci
broad_dci
=
3
;
// 32..63 - PCCH (PCCH index obtained from
flex
_paging_info)
optional
flex
_dl_dci
broad_dci
=
3
;
optional
uint32
carrier_index
=
4
;
// Index of the carrier for broadcast
}
...
...
@@ -43,7 +43,7 @@ message prp_dl_broadcast {
// Body of the OFDM symbol count message
//
message
prp
_pdcch_ofdm_sym_count
{
message
flex
_pdcch_ofdm_sym_count
{
optional
uint32
carrier_index
=
1
;
optional
uint32
num_pdcch_ofdm_symbols
=
2
;
}
...
...
@@ -52,7 +52,7 @@ message prp_pdcch_ofdm_sym_count {
// Types of commands related enums
//
enum
prp
_broadcast_type
{
PR
BT_BCCH
=
0
;
PR
BT_PCCH
=
1
;
enum
flex
_broadcast_type
{
FL
BT_BCCH
=
0
;
FL
BT_PCCH
=
1
;
}
\ No newline at end of file
openair2/ENB_APP/MESSAGES/V2/
prog
ran.proto
→
openair2/ENB_APP/MESSAGES/V2/
flex
ran.proto
View file @
b2181288
...
...
@@ -8,30 +8,30 @@ import "config_messages.proto";
import
"controller_commands.proto"
;
import
"control_delegation.proto"
;
message
prog
ran_message
{
optional
prog
ran_direction
msg_dir
=
100
;
message
flex
ran_message
{
optional
flex
ran_direction
msg_dir
=
100
;
oneof
msg
{
prp
_hello
hello_msg
=
1
;
prp
_echo_request
echo_request_msg
=
2
;
prp
_echo_reply
echo_reply_msg
=
3
;
prp
_stats_request
stats_request_msg
=
4
;
prp
_stats_reply
stats_reply_msg
=
5
;
prp
_sf_trigger
sf_trigger_msg
=
6
;
prp
_ul_sr_info
ul_sr_info_msg
=
7
;
prp
_enb_config_request
enb_config_request_msg
=
8
;
prp
_enb_config_reply
enb_config_reply_msg
=
9
;
prp
_ue_config_request
ue_config_request_msg
=
10
;
prp
_ue_config_reply
ue_config_reply_msg
=
11
;
prp
_lc_config_request
lc_config_request_msg
=
12
;
prp
_lc_config_reply
lc_config_reply_msg
=
13
;
prp
_dl_mac_config
dl_mac_config_msg
=
14
;
prp
_ue_state_change
ue_state_change_msg
=
15
;
prp
_control_delegation
control_delegation_msg
=
16
;
prp
_agent_reconfiguration
agent_reconfiguration_msg
=
17
;
flex
_hello
hello_msg
=
1
;
flex
_echo_request
echo_request_msg
=
2
;
flex
_echo_reply
echo_reply_msg
=
3
;
flex
_stats_request
stats_request_msg
=
4
;
flex
_stats_reply
stats_reply_msg
=
5
;
flex
_sf_trigger
sf_trigger_msg
=
6
;
flex
_ul_sr_info
ul_sr_info_msg
=
7
;
flex
_enb_config_request
enb_config_request_msg
=
8
;
flex
_enb_config_reply
enb_config_reply_msg
=
9
;
flex
_ue_config_request
ue_config_request_msg
=
10
;
flex
_ue_config_reply
ue_config_reply_msg
=
11
;
flex
_lc_config_request
lc_config_request_msg
=
12
;
flex
_lc_config_reply
lc_config_reply_msg
=
13
;
flex
_dl_mac_config
dl_mac_config_msg
=
14
;
flex
_ue_state_change
ue_state_change_msg
=
15
;
flex
_control_delegation
control_delegation_msg
=
16
;
flex
_agent_reconfiguration
agent_reconfiguration_msg
=
17
;
}
}
enum
prog
ran_direction
{
enum
flex
ran_direction
{
//option allow_alias = true;
NOT_SET
=
0
;
INITIATING_MESSAGE
=
1
;
...
...
@@ -39,7 +39,7 @@ enum progran_direction {
UNSUCCESSFUL_OUTCOME
=
3
;
}
enum
prog
ran_err
{
enum
flex
ran_err
{
option
allow_alias
=
true
;
// message errors
NO_ERR
=
0
;
...
...
@@ -62,18 +62,18 @@ enum progran_err {
// Maintenance and discovery messages
//
message
prp
_hello
{
optional
prp
_header
header
=
1
;
message
flex
_hello
{
optional
flex
_header
header
=
1
;
}
message
prp
_echo_request
{
optional
prp
_header
header
=
1
;
message
flex
_echo_request
{
optional
flex
_header
header
=
1
;
extensions
100
to
199
;
}
message
prp
_echo_reply
{
optional
prp
_header
header
=
1
;
message
flex
_echo_reply
{
optional
flex
_header
header
=
1
;
extensions
100
to
199
;
}
...
...
@@ -82,39 +82,39 @@ message prp_echo_reply {
// Statistics request and reply message
//
message
prp
_stats_request
{
optional
prp
_header
header
=
1
;
optional
prp
_stats_type
type
=
2
;
message
flex
_stats_request
{
optional
flex
_header
header
=
1
;
optional
flex
_stats_type
type
=
2
;
oneof
body
{
prp
_complete_stats_request
complete_stats_request
=
3
;
prp
_cell_stats_request
cell_stats_request
=
4
;
prp
_ue_stats_request
ue_stats_request
=
5
;
flex
_complete_stats_request
complete_stats_request
=
3
;
flex
_cell_stats_request
cell_stats_request
=
4
;
flex
_ue_stats_request
ue_stats_request
=
5
;
}
}
message
prp
_stats_reply
{
optional
prp
_header
header
=
1
;
repeated
prp
_ue_stats_report
ue_report
=
2
;
repeated
prp
_cell_stats_report
cell_report
=
3
;
message
flex
_stats_reply
{
optional
flex
_header
header
=
1
;
repeated
flex
_ue_stats_report
ue_report
=
2
;
repeated
flex
_cell_stats_report
cell_report
=
3
;
}
//
// Time indication messages
//
message
prp
_sf_trigger
{
optional
prp
_header
header
=
1
;
message
flex
_sf_trigger
{
optional
flex
_header
header
=
1
;
optional
uint32
sfn_sf
=
2
;
repeated
prp
_dl_info
dl_info
=
3
;
repeated
prp
_ul_info
ul_info
=
4
;
repeated
flex
_dl_info
dl_info
=
3
;
repeated
flex
_ul_info
ul_info
=
4
;
}
//
// Asynchronous messages
//
message
prp
_ul_sr_info
{
optional
prp
_header
header
=
1
;
message
flex
_ul_sr_info
{
optional
flex
_header
header
=
1
;
optional
uint32
sfn_sf
=
2
;
repeated
uint32
rnti
=
3
;
}
...
...
@@ -122,64 +122,64 @@ message prp_ul_sr_info {
//
// eNB configuration messages
//
message
prp
_enb_config_request
{
optional
prp
_header
header
=
1
;
message
flex
_enb_config_request
{
optional
flex
_header
header
=
1
;
}
message
prp
_enb_config_reply
{
optional
prp
_header
header
=
1
;
message
flex
_enb_config_reply
{
optional
flex
_header
header
=
1
;
optional
uint32
eNB_id
=
2
;
// Unique id to distinguish the eNB
repeated
prp
_cell_config
cell_config
=
3
;
repeated
flex
_cell_config
cell_config
=
3
;
}
message
prp
_ue_config_request
{
optional
prp
_header
header
=
1
;
message
flex
_ue_config_request
{
optional
flex
_header
header
=
1
;
}
message
prp
_ue_config_reply
{
optional
prp
_header
header
=
1
;
repeated
prp
_ue_config
ue_config
=
2
;
message
flex
_ue_config_reply
{
optional
flex
_header
header
=
1
;
repeated
flex
_ue_config
ue_config
=
2
;
}
message
prp
_lc_config_request
{
optional
prp
_header
header
=
1
;
message
flex
_lc_config_request
{
optional
flex
_header
header
=
1
;
}
message
prp
_lc_config_reply
{
optional
prp
_header
header
=
1
;
repeated
prp
_lc_ue_config
lc_ue_config
=
2
;
message
flex
_lc_config_reply
{
optional
flex
_header
header
=
1
;
repeated
flex
_lc_ue_config
lc_ue_config
=
2
;
}
//
// Controller command messages
//
message
prp
_dl_mac_config
{
optional
prp
_header
header
=
1
;
message
flex
_dl_mac_config
{
optional
flex
_header
header
=
1
;
optional
uint32
sfn_sf
=
2
;
repeated
prp
_dl_data
dl_ue_data
=
3
;
repeated
prp
_dl_rar
dl_rar
=
4
;
repeated
prp
_dl_broadcast
dl_broadcast
=
5
;
repeated
prp
_pdcch_ofdm_sym_count
ofdm_sym
=
6
;
// OFDM symbol count for each CC
repeated
flex
_dl_data
dl_ue_data
=
3
;
repeated
flex
_dl_rar
dl_rar
=
4
;
repeated
flex
_dl_broadcast
dl_broadcast
=
5
;
repeated
flex
_pdcch_ofdm_sym_count
ofdm_sym
=
6
;
// OFDM symbol count for each CC
}
//
// UE state change message
//
message
prp
_ue_state_change
{
optional
prp
_header
header
=
1
;
optional
uint32
type
=
2
;
// One of the
PR
UESC_* values
optional
prp
_ue_config
config
=
3
;
// Body of the message (based on type)
message
flex
_ue_state_change
{
optional
flex
_header
header
=
1
;
optional
uint32
type
=
2
;
// One of the
FL
UESC_* values
optional
flex
_ue_config
config
=
3
;
// Body of the message (based on type)
}
//
// Control delegation message
//
message
prp
_control_delegation
{
optional
prp
_header
header
=
1
;
optional
uint32
delegation_type
=
2
;
// Bitmap of
PR
CDT_* flags
message
flex
_control_delegation
{
optional
flex
_header
header
=
1
;
optional
uint32
delegation_type
=
2
;
// Bitmap of
FL
CDT_* flags
optional
bytes
payload
=
3
;
// Byte array of shared lib containing the delegated functions
optional
string
name
=
4
;
// The delegated functions names ordered based on bitmap flags
}
...
...
@@ -188,21 +188,21 @@ message prp_control_delegation {
// Agent reconfiguration message
//
message
prp
_agent_reconfiguration
{
optional
prp
_header
header
=
1
;
message
flex
_agent_reconfiguration
{
optional
flex
_header
header
=
1
;
optional
string
policy
=
2
;
// The policy changes using YAML syntax in string format
}
// Extensions of the echo request and reply
// messages for carrying a latency value in ms
message
prp
_echo_request_latency
{
extend
prp
_echo_request
{
message
flex
_echo_request_latency
{
extend
flex
_echo_request
{
optional
uint32
latency
=
100
;
}
}
message
prp
_echo_reply_latency
{
extend
prp
_echo_reply
{
message
flex
_echo_reply_latency
{
extend
flex
_echo_reply
{
optional
uint32
latency
=
100
;
}
}
...
...
openair2/ENB_APP/MESSAGES/V2/header.proto
View file @
b2181288
package
protocol
;
message
prp
_header
{
message
flex
_header
{
optional
uint32
version
=
1
;
optional
uint32
type
=
2
;
optional
uint32
xid
=
4
;
}
enum
prp
_type
{
enum
flex
_type
{
// Discovery and maintenance messages
PR
PT_HELLO
=
0
;
PR
PT_ECHO_REQUEST
=
1
;
PR
PT_ECHO_REPLY
=
2
;
FL
PT_HELLO
=
0
;
FL
PT_ECHO_REQUEST
=
1
;
FL
PT_ECHO_REPLY
=
2
;
// Statistics and measurement messages
PR
PT_STATS_REQUEST
=
3
;
PR
PT_STATS_REPLY
=
4
;
FL
PT_STATS_REQUEST
=
3
;
FL
PT_STATS_REPLY
=
4
;
// Time indication messages
PR
PT_SF_TRIGGER
=
5
;
FL
PT_SF_TRIGGER
=
5
;
// Asynchronous messages
PR
PT_UL_SR_INFO
=
6
;
FL
PT_UL_SR_INFO
=
6
;
// eNB configuration messages
PR
PT_GET_ENB_CONFIG_REQUEST
=
7
;
PR
PT_GET_ENB_CONFIG_REPLY
=
8
;
PR
PT_GET_UE_CONFIG_REQUEST
=
9
;
PR
PT_GET_UE_CONFIG_REPLY
=
10
;
PR
PT_GET_LC_CONFIG_REQUEST
=
11
;
PR
PT_GET_LC_CONFIG_REPLY
=
12
;
FL
PT_GET_ENB_CONFIG_REQUEST
=
7
;
FL
PT_GET_ENB_CONFIG_REPLY
=
8
;
FL
PT_GET_UE_CONFIG_REQUEST
=
9
;
FL
PT_GET_UE_CONFIG_REPLY
=
10
;
FL
PT_GET_LC_CONFIG_REQUEST
=
11
;
FL
PT_GET_LC_CONFIG_REPLY
=
12
;
//Controller command messages
PR
PT_DL_MAC_CONFIG
=
13
;
FL
PT_DL_MAC_CONFIG
=
13
;
// UE state change messages
PR
PT_UE_STATE_CHANGE
=
14
;
FL
PT_UE_STATE_CHANGE
=
14
;
// Control delegation messages
PR
PT_DELEGATE_CONTROL
=
15
;
PR
PT_RECONFIGURE_AGENT
=
16
;
FL
PT_DELEGATE_CONTROL
=
15
;
FL
PT_RECONFIGURE_AGENT
=
16
;
}
openair2/ENB_APP/MESSAGES/V2/mac_primitives.proto
View file @
b2181288
...
...
@@ -4,7 +4,7 @@ package protocol;
// Message containing the DL DCI info
//
message
prp
_dl_dci
{
message
flex
_dl_dci
{
optional
uint32
rnti
=
1
;
optional
uint32
res_alloc
=
2
;
// Type of resource allocation
optional
uint32
rb_bitmap
=
3
;
// Bitmap for RB allocation
...
...
@@ -17,17 +17,17 @@ message prp_dl_dci {
optional
uint32
aggr_level
=
10
;
optional
uint32
precoding_info
=
11
;
// 2 antenna ports:0..6,
// 4 antenna ports:0..50
optional
uint32
format
=
12
;
// DCI format. A
PR
DCIF_* value
optional
uint32
format
=
12
;
// DCI format. A
FL
DCIF_* value
optional
uint32
tpc
=
13
;
// TS 36.213, sec 5.1.1.1
optional
uint32
harq_process
=
14
;
// HARQ process ID
optional
uint32
dai
=
15
;
// TDD only
optional
uint32
vrb_format
=
16
;
// One of the
PR
VRBF_* values
optional
uint32
vrb_format
=
16
;
// One of the
FL
VRBF_* values
optional
uint32
tb_swap
=
17
;
// Boolean. TB to codeword swap flag
optional
uint32
sps_release
=
18
;
// Flag value
optional
uint32
pdcch_order
=
19
;
optional
uint32
preamble_index
=
20
;
// Only valid if pdcch_order = 1
optional
uint32
prach_mask_index
=
21
;
// Only valid if pdcch_order = 1
optional
uint32
n_gap
=
22
;
// One of the
PR
NGV_* values
optional
uint32
n_gap
=
22
;
// One of the
FL
NGV_* values
optional
uint32
tbs_idx
=
23
;
// The TBS index for Format 1A
optional
uint32
dl_power_offset
=
24
;
// For format 1D
optional
uint32
pdcch_power_offset
=
25
;
// DL PDCCH power boosting in dB
...
...
@@ -39,11 +39,11 @@ message prp_dl_dci {
// Messages related to the creation of RLC PDUs
//
message
prp
_rlc_pdu
{
repeated
prp
_rlc_pdu_tb
rlc_pdu_tb
=
1
;
// list of parameters for the creation of RLC PDUs. One for each TB
message
flex
_rlc_pdu
{
repeated
flex
_rlc_pdu_tb
rlc_pdu_tb
=
1
;
// list of parameters for the creation of RLC PDUs. One for each TB
}
message
prp
_rlc_pdu_tb
{
message
flex
_rlc_pdu_tb
{
optional
uint32
logical_channel_id
=
1
;
optional
uint32
size
=
2
;
// Maximum RLC PDU to be created in bytes
}
...
...
@@ -52,25 +52,25 @@ message prp_rlc_pdu_tb {
// MAC content types related enums
//
enum
prp
_dci_format
{
PR
DCIF_1
=
0
;
PR
DCIF_1A
=
1
;
PR
DCIF_1B
=
2
;
PR
DCIF_1C
=
3
;
PR
DCIF_1D
=
4
;
PR
DCIF_2
=
5
;
PR
DCIF_2A
=
6
;
PR
DCIF_2B
=
7
;
PR
DCIF_3
=
8
;
PR
DCIF_3A
=
9
;
enum
flex
_dci_format
{
FL
DCIF_1
=
0
;
FL
DCIF_1A
=
1
;
FL
DCIF_1B
=
2
;
FL
DCIF_1C
=
3
;
FL
DCIF_1D
=
4
;
FL
DCIF_2
=
5
;
FL
DCIF_2A
=
6
;
FL
DCIF_2B
=
7
;
FL
DCIF_3
=
8
;
FL
DCIF_3A
=
9
;
}
enum
prp
_vrb_format
{
PR
VRBF_LOCALIZED
=
0
;
PR
VRBF_DISTRIBUTED
=
1
;
enum
flex
_vrb_format
{
FL
VRBF_LOCALIZED
=
0
;
FL
VRBF_DISTRIBUTED
=
1
;
}
enum
prp
_ngap_val
{
PR
NGV_1
=
0
;
PR
NGV_2
=
1
;
enum
flex
_ngap_val
{
FL
NGV_1
=
0
;
FL
NGV_2
=
1
;
}
\ No newline at end of file
openair2/ENB_APP/MESSAGES/V2/stats_common.proto
View file @
b2181288
...
...
@@ -5,7 +5,7 @@ package protocol;
//
// RLC buffer status for a specific logical channel of a UE
message
prp
_rlc_bsr
{
message
flex
_rlc_bsr
{
optional
uint32
lc_id
=
1
;
optional
uint32
tx_queue_size
=
2
;
optional
uint32
tx_queue_hol_delay
=
3
;
...
...
@@ -15,39 +15,39 @@ message prp_rlc_bsr {
}
// Flags for MAC Control Elements
enum
prp
_ce_type
{
PR
PCET_TA
=
1
;
PR
PCET_DRX
=
2
;
PR
PCET_CR
=
4
;
PR
PCET_CA
=
8
;
enum
flex
_ce_type
{
FL
PCET_TA
=
1
;
FL
PCET_DRX
=
2
;
FL
PCET_CR
=
4
;
FL
PCET_CA
=
8
;
}
// Types of DL CSI reports
enum
prp
_csi_type
{
PR
CSIT_P10
=
0
;
PR
CSIT_P11
=
1
;
PR
CSIT_P20
=
2
;
PR
CSIT_P21
=
3
;
PR
CSIT_A12
=
4
;
PR
CSIT_A22
=
5
;
PR
CSIT_A20
=
6
;
PR
CSIT_A30
=
7
;
PR
CSIT_A31
=
8
;
enum
flex
_csi_type
{
FL
CSIT_P10
=
0
;
FL
CSIT_P11
=
1
;
FL
CSIT_P20
=
2
;
FL
CSIT_P21
=
3
;
FL
CSIT_A12
=
4
;
FL
CSIT_A22
=
5
;
FL
CSIT_A20
=
6
;
FL
CSIT_A30
=
7
;
FL
CSIT_A31
=
8
;
}
// CSI type P10
message
prp
_csi_p10
{
message
flex
_csi_p10
{
optional
uint32
wb_cqi
=
1
;
}
// CSI type P11
message
prp
_csi_p11
{
message
flex
_csi_p11
{
repeated
uint32
wb_cqi
=
1
;
optional
uint32
wb_pmi
=
2
;
}
// CSI type P20
message
prp
_csi_p20
{
message
flex
_csi_p20
{
optional
uint32
wb_cqi
=
1
;
optional
uint32
sb_cqi
=
2
;
optional
uint32
bandwidth_part_index
=
3
;
...
...
@@ -55,7 +55,7 @@ message prp_csi_p20 {
}
// CSI type P21
message
prp
_csi_p21
{
message
flex
_csi_p21
{
repeated
uint32
wb_cqi
=
1
;
optional
uint32
wb_pmi
=
2
;
repeated
uint32
sb_cqi
=
3
;
...
...
@@ -64,13 +64,13 @@ message prp_csi_p21 {
}
// CSI type A12
message
prp
_csi_a12
{
message
flex
_csi_a12
{
repeated
uint32
wb_cqi
=
1
;
repeated
uint32
sb_pmi
=
2
;
}
// CSI type A22
message
prp
_csi_a22
{
message
flex
_csi_a22
{
repeated
uint32
wb_cqi
=
1
;
repeated
uint32
sb_cqi
=
2
;
optional
uint32
wb_pmi
=
3
;
...
...
@@ -79,56 +79,56 @@ message prp_csi_a22 {
}
// CSI type A20
message
prp
_csi_a20
{
message
flex
_csi_a20
{
optional
uint32
wb_cqi
=
1
;
optional
uint32
sb_cqi
=
2
;
repeated
uint32
sb_list
=
3
;
}
// CSI type A30
message
prp
_csi_a30
{
message
flex
_csi_a30
{
optional
uint32
wb_cqi
=
1
;
repeated
uint32
sb_cqi
=
2
;
}
// CSI type A31
message
prp
_csi_a31
{
message
flex
_csi_a31
{
repeated
uint32
wb_cqi
=
1
;
repeated
prp
_msb_cqi
sb_cqi
=
2
;
repeated
flex
_msb_cqi
sb_cqi
=
2
;
optional
uint32
wb_pmi
=
3
;
}
// The CQI for the M-preffered subband
message
prp
_msb_cqi
{
message
flex
_msb_cqi
{
repeated
uint32
sb_cqi
=
1
;
}
// The CSI report of the UE for a specific servCellIndex
message
prp
_dl_csi
{
message
flex
_dl_csi
{
optional
uint32
serv_cell_index
=
1
;
optional
uint32
ri
=
2
;
optional
prp
_csi_type
type
=
3
;
optional
flex
_csi_type
type
=
3
;
oneof
report
{
prp
_csi_p10
p10csi
=
4
;
prp
_csi_p11
p11csi
=
5
;
prp
_csi_p20
p20csi
=
6
;
prp
_csi_p21
p21csi
=
7
;
prp
_csi_a12
a12csi
=
8
;
prp
_csi_a22
a22csi
=
9
;
prp
_csi_a20
a20csi
=
10
;
prp
_csi_a30
a30csi
=
11
;
prp
_csi_a31
a31csi
=
12
;
flex
_csi_p10
p10csi
=
4
;
flex
_csi_p11
p11csi
=
5
;
flex
_csi_p20
p20csi
=
6
;
flex
_csi_p21
p21csi
=
7
;
flex
_csi_a12
a12csi
=
8
;
flex
_csi_a22
a22csi
=
9
;
flex
_csi_a20
a20csi
=
10
;
flex
_csi_a30
a30csi
=
11
;
flex
_csi_a31
a31csi
=
12
;
}
}
// The full DL CQI report for all CC of a UE
message
prp
_dl_cqi_report
{
message
flex
_dl_cqi_report
{
optional
uint32
sfn_sn
=
1
;
repeated
prp
_dl_csi
csi_report
=
2
;
repeated
flex
_dl_csi
csi_report
=
2
;
}
// Paging message info
message
prp
_paging_info
{
message
flex
_paging_info
{
optional
uint32
paging_index
=
1
;
optional
uint32
paging_message_size
=
2
;
optional
uint32
paging_subframe
=
3
;
...
...
@@ -136,34 +136,34 @@ message prp_paging_info {
}
// Report for the paging buffer status
message
prp
_paging_buffer_report
{
repeated
prp
_paging_info
paging_info
=
1
;
message
flex
_paging_buffer_report
{
repeated
flex
_paging_info
paging_info
=
1
;
}
// The type of UL CQI
enum
prp
_ul_cqi_type
{
PR
UCT_SRS
=
0
;
PR
UCT_PUSCH
=
1
;
PR
UCT_PUCCH_1
=
2
;
PR
UCT_PUCCH_2
=
3
;
PR
UCT_PRACH
=
4
;
enum
flex
_ul_cqi_type
{
FL
UCT_SRS
=
0
;
FL
UCT_PUSCH
=
1
;
FL
UCT_PUCCH_1
=
2
;
FL
UCT_PUCCH_2
=
3
;
FL
UCT_PRACH
=
4
;
}
// UL CQI report for a specific UE for a given report type
message
prp
_ul_cqi
{
optional
prp
_ul_cqi_type
type
=
1
;
message
flex
_ul_cqi
{
optional
flex
_ul_cqi_type
type
=
1
;
repeated
uint32
sinr
=
2
;
optional
uint32
serv_cell_index
=
3
;
}
// Full UL CQI report for a specific UE
message
prp
_ul_cqi_report
{
message
flex
_ul_cqi_report
{
optional
uint32
sfn_sn
=
1
;
repeated
prp
_ul_cqi
cqi_meas
=
2
;
repeated
prp
_pucch_dbm
pucch_dbm
=
3
;
repeated
flex
_ul_cqi
cqi_meas
=
2
;
repeated
flex
_pucch_dbm
pucch_dbm
=
3
;
}
message
prp
_pucch_dbm
{
message
flex
_pucch_dbm
{
optional
int32
p0_pucch_dbm
=
1
;
optional
uint32
serv_cell_index
=
2
;
}
...
...
@@ -173,7 +173,7 @@ message prp_pucch_dbm {
//
// The UL noise and interference report for a UE
message
prp
_noise_interference_report
{
message
flex
_noise_interference_report
{
optional
uint32
sfn_sf
=
1
;
optional
uint32
rip
=
2
;
optional
uint32
tnp
=
3
;
...
...
openair2/ENB_APP/MESSAGES/V2/stats_messages.proto
View file @
b2181288
...
...
@@ -7,19 +7,19 @@ import "stats_common.proto";
// Bodies of statistics report requests
//
message
prp
_complete_stats_request
{
optional
prp
_stats_report_freq
report_frequency
=
1
;
message
flex
_complete_stats_request
{
optional
flex
_stats_report_freq
report_frequency
=
1
;
optional
uint32
sf
=
2
;
optional
uint32
cell_report_flags
=
3
;
optional
uint32
ue_report_flags
=
4
;
}
message
prp
_cell_stats_request
{
message
flex
_cell_stats_request
{
repeated
uint32
cell
=
1
;
optional
uint32
flags
=
2
;
}
message
prp
_ue_stats_request
{
message
flex
_ue_stats_request
{
repeated
uint32
rnti
=
1
;
optional
uint32
flags
=
2
;
}
...
...
@@ -29,23 +29,23 @@ message prp_ue_stats_request {
//
// The full statistics report for a specific cell
message
prp
_cell_stats_report
{
message
flex
_cell_stats_report
{
optional
uint32
carrier_index
=
1
;
optional
uint32
flags
=
2
;
optional
prp
_noise_interference_report
noise_inter_report
=
3
;
optional
flex
_noise_interference_report
noise_inter_report
=
3
;
}
// Statistics report for a specific UE
message
prp
_ue_stats_report
{
message
flex
_ue_stats_report
{
optional
uint32
rnti
=
1
;
optional
uint32
flags
=
2
;
repeated
uint32
bsr
=
3
;
optional
uint32
phr
=
4
;
repeated
prp
_rlc_bsr
rlc_report
=
5
;
repeated
flex
_rlc_bsr
rlc_report
=
5
;
optional
uint32
pending_mac_ces
=
6
;
optional
prp
_dl_cqi_report
dl_cqi_report
=
7
;
optional
prp
_paging_buffer_report
pbr
=
8
;
optional
prp
_ul_cqi_report
ul_cqi_report
=
9
;
optional
flex
_dl_cqi_report
dl_cqi_report
=
7
;
optional
flex
_paging_buffer_report
pbr
=
8
;
optional
flex
_ul_cqi_report
ul_cqi_report
=
9
;
}
//
...
...
@@ -54,33 +54,33 @@ message prp_ue_stats_report {
//Types of statistics requested by the controller
enum
prp
_stats_type
{
PR
ST_COMPLETE_STATS
=
0
;
PR
ST_CELL_STATS
=
1
;
PR
ST_UE_STATS
=
2
;
enum
flex
_stats_type
{
FL
ST_COMPLETE_STATS
=
0
;
FL
ST_CELL_STATS
=
1
;
FL
ST_UE_STATS
=
2
;
}
// Report frequency for the requested statistics
enum
prp
_stats_report_freq
{
PR
SRF_ONCE
=
0
;
PR
SRF_PERIODICAL
=
1
;
PR
SRF_CONTINUOUS
=
2
;
PR
SRF_OFF
=
3
;
enum
flex
_stats_report_freq
{
FL
SRF_ONCE
=
0
;
FL
SRF_PERIODICAL
=
1
;
FL
SRF_CONTINUOUS
=
2
;
FL
SRF_OFF
=
3
;
}
// Flags for cell statistics
enum
prp
_cell_stats_type
{
PR
CST_NOISE_INTERFERENCE
=
1
;
enum
flex
_cell_stats_type
{
FL
CST_NOISE_INTERFERENCE
=
1
;
}
// Flags for UE-related statistics
enum
prp
_ue_stats_type
{
PR
UST_BSR
=
1
;
PR
UST_PRH
=
2
;
PR
UST_RLC_BS
=
4
;
PR
UST_MAC_CE_BS
=
8
;
PR
UST_DL_CQI
=
16
;
PR
UST_PBS
=
32
;
PR
UST_UL_CQI
=
64
;
enum
flex
_ue_stats_type
{
FL
UST_BSR
=
1
;
FL
UST_PRH
=
2
;
FL
UST_RLC_BS
=
4
;
FL
UST_MAC_CE_BS
=
8
;
FL
UST_DL_CQI
=
16
;
FL
UST_PBS
=
32
;
FL
UST_UL_CQI
=
64
;
// To be extended with more types of stats
}
\ No newline at end of file
openair2/ENB_APP/MESSAGES/V2/time_common.proto
View file @
b2181288
package
protocol
;
enum
prp
_harq_status
{
PR
HS_ACK
=
0
;
PR
HS_NACK
=
1
;
PR
HS_DTX
=
2
;
enum
flex
_harq_status
{
FL
HS_ACK
=
0
;
FL
HS_NACK
=
1
;
FL
HS_DTX
=
2
;
}
enum
prp
_reception_status
{
PR
RS_OK
=
0
;
PR
RS_NOT_OK
=
1
;
PR
RS_NOT_VALID
=
2
;
enum
flex
_reception_status
{
FL
RS_OK
=
0
;
FL
RS_NOT_OK
=
1
;
FL
RS_NOT_VALID
=
2
;
}
message
prp
_dl_info
{
message
flex
_dl_info
{
optional
uint32
rnti
=
1
;
optional
uint32
harq_process_id
=
2
;
repeated
uint32
harq_status
=
3
;
optional
uint32
serv_cell_index
=
4
;
}
message
prp
_ul_info
{
message
flex
_ul_info
{
optional
uint32
rnti
=
1
;
repeated
uint32
ul_reception
=
2
;
optional
uint32
reception_status
=
3
;
...
...
openair2/ENB_APP/enb_agent.c
View file @
b2181288
...
...
@@ -29,7 +29,7 @@
/*! \file enb_agent.h
* \brief top level enb agent receive thread and itti task
* \author
Navid Nikaein and Xenofon Foukas
* \author
Xenofon Foukas and Navid Nikaein
* \date 2016
* \version 0.1
*/
...
...
@@ -57,7 +57,7 @@ char local_cache[40];
void
*
send_thread
(
void
*
args
);
void
*
receive_thread
(
void
*
args
);
pthread_t
new_thread
(
void
*
(
*
f
)(
void
*
),
void
*
b
);
Protocol__
Prog
ranMessage
*
enb_agent_timeout
(
void
*
args
);
Protocol__
Flex
ranMessage
*
enb_agent_timeout
(
void
*
args
);
int
agent_task_created
=
0
;
...
...
@@ -68,7 +68,7 @@ int agent_task_created = 0;
void
*
enb_agent_task
(
void
*
args
){
//enb_agent_instance_t *d = (enb_agent_instance_t *) args;
Protocol__
Prog
ranMessage
*
msg
;
Protocol__
Flex
ranMessage
*
msg
;
void
*
data
;
int
size
;
err_code_t
err_code
;
...
...
@@ -104,7 +104,7 @@ void *enb_agent_task(void *args){
data
=
enb_agent_pack_message
(
msg
,
&
size
);
elem
=
get_timer_entry
(
msg_p
->
ittiMsg
.
timer_has_expired
.
timer_id
);
if
(
enb_agent_msg_send
(
elem
->
agent_id
,
ENB_AGENT_DEFAULT
,
data
,
size
,
priority
))
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_ENQUEUING
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_ENQUEUING
;
goto
error
;
}
...
...
@@ -135,11 +135,11 @@ void *receive_thread(void *args) {
int
priority
;
err_code_t
err_code
;
Protocol__
Prog
ranMessage
*
msg
;
Protocol__
Flex
ranMessage
*
msg
;
while
(
1
)
{
//if (enb_agent_msg_recv(d->enb_id, ENB_AGENT_DEFAULT, &data, &size, &priority)) {
// err_code = PROTOCOL__
PROG
RAN_ERR__MSG_DEQUEUING;
// err_code = PROTOCOL__
FLEX
RAN_ERR__MSG_DEQUEUING;
// goto error;
//}
...
...
@@ -157,7 +157,7 @@ void *receive_thread(void *args) {
data
=
enb_agent_pack_message
(
msg
,
&
size
);
if
(
enb_agent_msg_send
(
d
->
enb_id
,
ENB_AGENT_DEFAULT
,
data
,
size
,
priority
))
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_ENQUEUING
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_ENQUEUING
;
goto
error
;
}
...
...
@@ -337,7 +337,7 @@ error:
Protocol__
Prog
ranMessage
*
enb_agent_timeout
(
void
*
args
){
Protocol__
Flex
ranMessage
*
enb_agent_timeout
(
void
*
args
){
// enb_agent_timer_args_t *timer_args = calloc(1, sizeof(*timer_args));
//memcpy (timer_args, args, sizeof(*timer_args));
...
...
openair2/ENB_APP/enb_agent_common.c
View file @
b2181288
...
...
@@ -29,7 +29,7 @@
/*! \file enb_agent_common.c
* \brief common primitives for all agents
* \author
Navid Nikaein and Xenofon Foukas
* \author
Xenofon Foukas, Mohamed Kassem and Navid Nikaein
* \date 2016
* \version 0.1
*/
...
...
@@ -55,15 +55,15 @@ void * enb_rrc[NUM_MAX_ENB];
* message primitives
*/
int
enb_agent_serialize_message
(
Protocol__
Prog
ranMessage
*
msg
,
void
**
buf
,
int
*
size
)
{
int
enb_agent_serialize_message
(
Protocol__
Flex
ranMessage
*
msg
,
void
**
buf
,
int
*
size
)
{
*
size
=
protocol__
prog
ran_message__get_packed_size
(
msg
);
*
size
=
protocol__
flex
ran_message__get_packed_size
(
msg
);
*
buf
=
malloc
(
*
size
);
if
(
buf
==
NULL
)
goto
error
;
protocol__
prog
ran_message__pack
(
msg
,
*
buf
);
protocol__
flex
ran_message__pack
(
msg
,
*
buf
);
return
0
;
...
...
@@ -76,8 +76,8 @@ int enb_agent_serialize_message(Protocol__ProgranMessage *msg, void **buf, int *
/* We assume that the buffer size is equal to the message size.
Should be chekced durint Tx/Rx */
int
enb_agent_deserialize_message
(
void
*
data
,
int
size
,
Protocol__
Prog
ranMessage
**
msg
)
{
*
msg
=
protocol__
prog
ran_message__unpack
(
NULL
,
size
,
data
);
int
enb_agent_deserialize_message
(
void
*
data
,
int
size
,
Protocol__
Flex
ranMessage
**
msg
)
{
*
msg
=
protocol__
flex
ran_message__unpack
(
NULL
,
size
,
data
);
if
(
*
msg
==
NULL
)
goto
error
;
...
...
@@ -90,14 +90,14 @@ int enb_agent_deserialize_message(void *data, int size, Protocol__ProgranMessage
int
prp_create_header
(
xid_t
xid
,
Protocol__PrpType
type
,
Protocol__Prp
Header
**
header
)
{
int
flex_create_header
(
xid_t
xid
,
Protocol__FlexType
type
,
Protocol__Flex
Header
**
header
)
{
*
header
=
malloc
(
sizeof
(
Protocol__
Prp
Header
));
*
header
=
malloc
(
sizeof
(
Protocol__
Flex
Header
));
if
(
*
header
==
NULL
)
goto
error
;
protocol__
prp
_header__init
(
*
header
);
(
*
header
)
->
version
=
PROG
RAN_VERSION
;
protocol__
flex
_header__init
(
*
header
);
(
*
header
)
->
version
=
FLEX
RAN_VERSION
;
(
*
header
)
->
has_version
=
1
;
// check if the type is set
(
*
header
)
->
type
=
type
;
...
...
@@ -112,28 +112,28 @@ int prp_create_header(xid_t xid, Protocol__PrpType type, Protocol__PrpHeader **
}
int
enb_agent_hello
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_hello
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
Prp
Header
*
header
;
Protocol__
Flex
Header
*
header
;
/*TODO: Need to set random xid or xid from received hello message*/
xid_t
xid
=
1
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_HELLO
,
&
header
)
!=
0
)
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_HELLO
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
Hello
*
hello_msg
;
hello_msg
=
malloc
(
sizeof
(
Protocol__
Prp
Hello
));
Protocol__
Flex
Hello
*
hello_msg
;
hello_msg
=
malloc
(
sizeof
(
Protocol__
Flex
Hello
));
if
(
hello_msg
==
NULL
)
goto
error
;
protocol__
prp
_hello__init
(
hello_msg
);
protocol__
flex
_hello__init
(
hello_msg
);
hello_msg
->
header
=
header
;
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_HELLO_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_HELLO_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
(
*
msg
)
->
has_msg_dir
=
1
;
(
*
msg
)
->
hello_msg
=
hello_msg
;
return
0
;
...
...
@@ -150,9 +150,9 @@ int enb_agent_hello(mid_t mod_id, const void *params, Protocol__ProgranMessage *
}
int
enb_agent_destroy_hello
(
Protocol__
Prog
ranMessage
*
msg
)
{
int
enb_agent_destroy_hello
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_HELLO_MSG
)
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_HELLO_MSG
)
goto
error
;
free
(
msg
->
hello_msg
->
header
);
...
...
@@ -166,26 +166,26 @@ int enb_agent_destroy_hello(Protocol__ProgranMessage *msg) {
}
int
enb_agent_echo_request
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
Protocol__
Prp
Header
*
header
;
int
enb_agent_echo_request
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
Flex
Header
*
header
;
/*TODO: Need to set a random xid*/
xid_t
xid
=
1
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_ECHO_REQUEST
,
&
header
)
!=
0
)
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_ECHO_REQUEST
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
EchoRequest
*
echo_request_msg
;
echo_request_msg
=
malloc
(
sizeof
(
Protocol__
Prp
EchoRequest
));
Protocol__
Flex
EchoRequest
*
echo_request_msg
;
echo_request_msg
=
malloc
(
sizeof
(
Protocol__
Flex
EchoRequest
));
if
(
echo_request_msg
==
NULL
)
goto
error
;
protocol__
prp
_echo_request__init
(
echo_request_msg
);
protocol__
flex
_echo_request__init
(
echo_request_msg
);
echo_request_msg
->
header
=
header
;
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_ECHO_REQUEST_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__INITIATING_MESSAGE
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ECHO_REQUEST_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
echo_request_msg
=
echo_request_msg
;
return
0
;
...
...
@@ -201,8 +201,8 @@ int enb_agent_echo_request(mid_t mod_id, const void* params, Protocol__ProgranMe
}
int
enb_agent_destroy_echo_request
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_ECHO_REQUEST_MSG
)
int
enb_agent_destroy_echo_request
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ECHO_REQUEST_MSG
)
goto
error
;
free
(
msg
->
echo_request_msg
->
header
);
...
...
@@ -217,30 +217,30 @@ int enb_agent_destroy_echo_request(Protocol__ProgranMessage *msg) {
int
enb_agent_echo_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_echo_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
xid_t
xid
;
Protocol__
ProgranMessage
*
input
=
(
Protocol__Prog
ranMessage
*
)
params
;
Protocol__
Prp
EchoRequest
*
echo_req
=
input
->
echo_request_msg
;
Protocol__
FlexranMessage
*
input
=
(
Protocol__Flex
ranMessage
*
)
params
;
Protocol__
Flex
EchoRequest
*
echo_req
=
input
->
echo_request_msg
;
xid
=
(
echo_req
->
header
)
->
xid
;
Protocol__
Prp
Header
*
header
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_ECHO_REPLY
,
&
header
)
!=
0
)
Protocol__
Flex
Header
*
header
;
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_ECHO_REPLY
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
EchoReply
*
echo_reply_msg
;
echo_reply_msg
=
malloc
(
sizeof
(
Protocol__
Prp
EchoReply
));
Protocol__
Flex
EchoReply
*
echo_reply_msg
;
echo_reply_msg
=
malloc
(
sizeof
(
Protocol__
Flex
EchoReply
));
if
(
echo_reply_msg
==
NULL
)
goto
error
;
protocol__
prp
_echo_reply__init
(
echo_reply_msg
);
protocol__
flex
_echo_reply__init
(
echo_reply_msg
);
echo_reply_msg
->
header
=
header
;
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_ECHO_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ECHO_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
(
*
msg
)
->
has_msg_dir
=
1
;
(
*
msg
)
->
echo_reply_msg
=
echo_reply_msg
;
return
0
;
...
...
@@ -257,8 +257,8 @@ int enb_agent_echo_reply(mid_t mod_id, const void *params, Protocol__ProgranMess
}
int
enb_agent_destroy_echo_reply
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_ECHO_REPLY_MSG
)
int
enb_agent_destroy_echo_reply
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ECHO_REPLY_MSG
)
goto
error
;
free
(
msg
->
echo_reply_msg
->
header
);
...
...
@@ -272,12 +272,12 @@ int enb_agent_destroy_echo_reply(Protocol__ProgranMessage *msg) {
}
int
enb_agent_destroy_enb_config_reply
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG
)
int
enb_agent_destroy_enb_config_reply
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG
)
goto
error
;
free
(
msg
->
enb_config_reply_msg
->
header
);
int
i
,
j
;
Protocol__
Prp
EnbConfigReply
*
reply
=
msg
->
enb_config_reply_msg
;
Protocol__
Flex
EnbConfigReply
*
reply
=
msg
->
enb_config_reply_msg
;
for
(
i
=
0
;
i
<
reply
->
n_cell_config
;
i
++
){
free
(
reply
->
cell_config
[
i
]
->
mbsfn_subframe_config_rfoffset
);
...
...
@@ -302,12 +302,12 @@ int enb_agent_destroy_enb_config_reply(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_destroy_ue_config_reply
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG
)
int
enb_agent_destroy_ue_config_reply
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG
)
goto
error
;
free
(
msg
->
ue_config_reply_msg
->
header
);
int
i
,
j
;
Protocol__
Prp
UeConfigReply
*
reply
=
msg
->
ue_config_reply_msg
;
Protocol__
Flex
UeConfigReply
*
reply
=
msg
->
ue_config_reply_msg
;
for
(
i
=
0
;
i
<
reply
->
n_ue_config
;
i
++
){
free
(
reply
->
ue_config
[
i
]
->
capabilities
);
...
...
@@ -323,8 +323,8 @@ int enb_agent_destroy_ue_config_reply(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_destroy_lc_config_reply
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG
)
int
enb_agent_destroy_lc_config_reply
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG
)
goto
error
;
int
i
,
j
;
...
...
@@ -345,8 +345,8 @@ int enb_agent_destroy_lc_config_reply(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_destroy_ue_state_change
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG
)
int
enb_agent_destroy_ue_state_change
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG
)
goto
error
;
free
(
msg
->
ue_state_change_msg
->
header
);
//TODO: Free the contents of the UE config structure
...
...
@@ -359,8 +359,8 @@ int enb_agent_destroy_ue_state_change(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_destroy_enb_config_request
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG
)
int
enb_agent_destroy_enb_config_request
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG
)
goto
error
;
free
(
msg
->
enb_config_request_msg
->
header
);
free
(
msg
->
enb_config_request_msg
);
...
...
@@ -372,12 +372,12 @@ int enb_agent_destroy_enb_config_request(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_destroy_ue_config_request
(
Protocol__
Prog
ranMessage
*
msg
)
{
int
enb_agent_destroy_ue_config_request
(
Protocol__
Flex
ranMessage
*
msg
)
{
/* TODO: Deallocate memory for a dynamically allocated UE config message */
return
0
;
}
int
enb_agent_destroy_lc_config_request
(
Protocol__
Prog
ranMessage
*
msg
)
{
int
enb_agent_destroy_lc_config_request
(
Protocol__
Flex
ranMessage
*
msg
)
{
/* TODO: Deallocate memory for a dynamically allocated LC config message */
return
0
;
}
...
...
@@ -397,10 +397,10 @@ long timer_end(struct timespec start_time){
return
diffInNanos
;
}
int
enb_agent_control_delegation
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_control_delegation
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
ProgranMessage
*
input
=
(
Protocol__Prog
ranMessage
*
)
params
;
Protocol__
Prp
ControlDelegation
*
control_delegation_msg
=
input
->
control_delegation_msg
;
Protocol__
FlexranMessage
*
input
=
(
Protocol__Flex
ranMessage
*
)
params
;
Protocol__
Flex
ControlDelegation
*
control_delegation_msg
=
input
->
control_delegation_msg
;
uint32_t
delegation_type
=
control_delegation_msg
->
delegation_type
;
...
...
@@ -428,13 +428,13 @@ int enb_agent_control_delegation(mid_t mod_id, const void *params, Protocol__Pro
return
-
1
;
}
int
enb_agent_destroy_control_delegation
(
Protocol__
Prog
ranMessage
*
msg
)
{
int
enb_agent_destroy_control_delegation
(
Protocol__
Flex
ranMessage
*
msg
)
{
/*TODO: Dealocate memory for a dynamically allocated control delegation message*/
}
int
enb_agent_reconfiguration
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
Protocol__
ProgranMessage
*
input
=
(
Protocol__Prog
ranMessage
*
)
params
;
Protocol__
Prp
AgentReconfiguration
*
agent_reconfiguration_msg
=
input
->
agent_reconfiguration_msg
;
int
enb_agent_reconfiguration
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
FlexranMessage
*
input
=
(
Protocol__Flex
ranMessage
*
)
params
;
Protocol__
Flex
AgentReconfiguration
*
agent_reconfiguration_msg
=
input
->
agent_reconfiguration_msg
;
apply_reconfiguration_policy
(
mod_id
,
agent_reconfiguration_msg
->
policy
,
strlen
(
agent_reconfiguration_msg
->
policy
));
...
...
@@ -442,7 +442,7 @@ int enb_agent_reconfiguration(mid_t mod_id, const void *params, Protocol__Progra
return
0
;
}
int
enb_agent_destroy_agent_reconfiguration
(
Protocol__
Prog
ranMessage
*
msg
)
{
int
enb_agent_destroy_agent_reconfiguration
(
Protocol__
Flex
ranMessage
*
msg
)
{
/*TODO: Dealocate memory for a dynamically allocated agent reconfiguration message*/
}
...
...
@@ -949,11 +949,11 @@ int get_meas_gap_config(mid_t mod_id, mid_t ue_id) {
if
(
ue_context_p
->
ue_context
.
measGapConfig
!=
NULL
){
if
(
ue_context_p
->
ue_context
.
measGapConfig
->
present
==
MeasGapConfig_PR_setup
)
{
if
(
ue_context_p
->
ue_context
.
measGapConfig
->
choice
.
setup
.
gapOffset
.
present
==
MeasGapConfig__setup__gapOffset_PR_gp0
)
{
return
PROTOCOL__
PRP_MEAS_GAP_CONFIG_PATTERN__PR
MGCP_GP1
;
return
PROTOCOL__
FLEX_MEAS_GAP_CONFIG_PATTERN__FL
MGCP_GP1
;
}
else
if
(
ue_context_p
->
ue_context
.
measGapConfig
->
choice
.
setup
.
gapOffset
.
present
==
MeasGapConfig__setup__gapOffset_PR_gp1
)
{
return
PROTOCOL__
PRP_MEAS_GAP_CONFIG_PATTERN__PR
MGCP_GP2
;
return
PROTOCOL__
FLEX_MEAS_GAP_CONFIG_PATTERN__FL
MGCP_GP2
;
}
else
{
return
PROTOCOL__
PRP_MEAS_GAP_CONFIG_PATTERN__PR
MGCP_OFF
;
return
PROTOCOL__
FLEX_MEAS_GAP_CONFIG_PATTERN__FL
MGCP_OFF
;
}
}
}
...
...
@@ -1258,38 +1258,38 @@ int get_direction(mid_t ue_id, mid_t lc_id)
int
enb_agent_ue_state_change
(
mid_t
mod_id
,
uint32_t
rnti
,
uint8_t
state_change
)
{
int
size
;
Protocol__
Prog
ranMessage
*
msg
;
Protocol__
Prp
Header
*
header
;
Protocol__
Flex
ranMessage
*
msg
;
Protocol__
Flex
Header
*
header
;
void
*
data
;
int
priority
;
err_code_t
err_code
;
int
xid
=
0
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_UE_STATE_CHANGE
,
&
header
)
!=
0
)
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_UE_STATE_CHANGE
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
UeStateChange
*
ue_state_change_msg
;
ue_state_change_msg
=
malloc
(
sizeof
(
Protocol__
Prp
UeStateChange
));
Protocol__
Flex
UeStateChange
*
ue_state_change_msg
;
ue_state_change_msg
=
malloc
(
sizeof
(
Protocol__
Flex
UeStateChange
));
if
(
ue_state_change_msg
==
NULL
)
{
goto
error
;
}
protocol__
prp
_ue_state_change__init
(
ue_state_change_msg
);
protocol__
flex
_ue_state_change__init
(
ue_state_change_msg
);
ue_state_change_msg
->
has_type
=
1
;
ue_state_change_msg
->
type
=
state_change
;
Protocol__
Prp
UeConfig
*
config
;
config
=
malloc
(
sizeof
(
Protocol__
Prp
UeConfig
));
Protocol__
Flex
UeConfig
*
config
;
config
=
malloc
(
sizeof
(
Protocol__
Flex
UeConfig
));
if
(
config
==
NULL
)
{
goto
error
;
}
protocol__
prp
_ue_config__init
(
config
);
if
(
state_change
==
PROTOCOL__
PRP_UE_STATE_CHANGE_TYPE__PR
UESC_DEACTIVATED
)
{
protocol__
flex
_ue_config__init
(
config
);
if
(
state_change
==
PROTOCOL__
FLEX_UE_STATE_CHANGE_TYPE__FL
UESC_DEACTIVATED
)
{
// Simply set the rnti of the UE
config
->
has_rnti
=
1
;
config
->
rnti
=
rnti
;
}
else
if
(
state_change
==
PROTOCOL__
PRP_UE_STATE_CHANGE_TYPE__PR
UESC_UPDATED
||
state_change
==
PROTOCOL__
PRP_UE_STATE_CHANGE_TYPE__PR
UESC_ACTIVATED
)
{
}
else
if
(
state_change
==
PROTOCOL__
FLEX_UE_STATE_CHANGE_TYPE__FL
UESC_UPDATED
||
state_change
==
PROTOCOL__
FLEX_UE_STATE_CHANGE_TYPE__FL
UESC_ACTIVATED
)
{
int
i
=
find_UE_id
(
mod_id
,
rnti
);
config
->
has_rnti
=
1
;
config
->
rnti
=
rnti
;
...
...
@@ -1305,7 +1305,7 @@ int enb_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change)
}
//TODO: Set the measurement gap offset if applicable
if
(
config
->
has_meas_gap_config_pattern
==
1
&&
config
->
meas_gap_config_pattern
!=
PROTOCOL__
PRP_MEAS_GAP_CONFIG_PATTERN__PR
MGCP_OFF
)
{
config
->
meas_gap_config_pattern
!=
PROTOCOL__
FLEX_MEAS_GAP_CONFIG_PATTERN__FL
MGCP_OFF
)
{
config
->
meas_gap_config_sf_offset
=
get_meas_gap_config_offset
(
mod_id
,
i
);
config
->
has_meas_gap_config_sf_offset
=
1
;
}
...
...
@@ -1333,9 +1333,9 @@ int enb_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change)
config
->
has_ue_aggregated_max_bitrate_dl
=
1
;
//TODO: Set the UE capabilities
Protocol__
Prp
UeCapabilities
*
c_capabilities
;
c_capabilities
=
malloc
(
sizeof
(
Protocol__
Prp
UeCapabilities
));
protocol__
prp
_ue_capabilities__init
(
c_capabilities
);
Protocol__
Flex
UeCapabilities
*
c_capabilities
;
c_capabilities
=
malloc
(
sizeof
(
Protocol__
Flex
UeCapabilities
));
protocol__
flex
_ue_capabilities__init
(
c_capabilities
);
//TODO: Set half duplex (FDD operation)
c_capabilities
->
has_half_duplex
=
1
;
c_capabilities
->
half_duplex
=
1
;
//get_half_duplex(i);
...
...
@@ -1353,7 +1353,7 @@ int enb_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change)
c_capabilities
->
res_alloc_type1
=
1
;
//get_res_alloc_type1(i);
//Set the capabilites to the message
config
->
capabilities
=
c_capabilities
;
//TODO: Set UE transmission antenna. One of the
PR
UTA_* values
//TODO: Set UE transmission antenna. One of the
FL
UTA_* values
if
(
get_ue_transmission_antenna
(
mod_id
,
i
)
!=
-
1
){
config
->
has_ue_transmission_antenna
=
1
;
config
->
ue_transmission_antenna
=
get_ue_transmission_antenna
(
mod_id
,
i
);
...
...
@@ -1398,7 +1398,7 @@ int enb_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change)
config
->
has_aperiodic_cqi_rep_mode
=
1
;
int
mode
=
get_aperiodic_cqi_rep_mode
(
mod_id
,
i
);
if
(
mode
>
4
)
{
config
->
aperiodic_cqi_rep_mode
=
PROTOCOL__
PRP_APERIODIC_CQI_REPORT_MODE__PR
ACRM_NONE
;
config
->
aperiodic_cqi_rep_mode
=
PROTOCOL__
FLEX_APERIODIC_CQI_REPORT_MODE__FL
ACRM_NONE
;
}
else
{
config
->
aperiodic_cqi_rep_mode
=
mode
;
}
...
...
@@ -1435,24 +1435,24 @@ int enb_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change)
config
->
has_scell_deactivation_timer
=
1
;
config
->
scell_deactivation_timer
=
1
;
}
}
else
if
(
state_change
==
PROTOCOL__
PRP_UE_STATE_CHANGE_TYPE__PR
UESC_MOVED
)
{
}
else
if
(
state_change
==
PROTOCOL__
FLEX_UE_STATE_CHANGE_TYPE__FL
UESC_MOVED
)
{
// TODO: Not supported for now. Leave blank
}
ue_state_change_msg
->
config
=
config
;
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
msg
==
NULL
)
{
goto
error
;
}
protocol__
prog
ran_message__init
(
msg
);
msg
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG
;
msg
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__INITIATING_MESSAGE
;
protocol__
flex
ran_message__init
(
msg
);
msg
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG
;
msg
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__INITIATING_MESSAGE
;
msg
->
ue_state_change_msg
=
ue_state_change_msg
;
data
=
enb_agent_pack_message
(
msg
,
&
size
);
/*Send sr info using the MAC channel of the eNB*/
if
(
enb_agent_msg_send
(
mod_id
,
ENB_AGENT_DEFAULT
,
data
,
size
,
priority
))
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_ENQUEUING
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_ENQUEUING
;
goto
error
;
}
...
...
@@ -1466,38 +1466,38 @@ int enb_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_change)
* timer primitives
*/
int
enb_agent_lc_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_lc_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
xid_t
xid
;
Protocol__
ProgranMessage
*
input
=
(
Protocol__Prog
ranMessage
*
)
params
;
Protocol__
Prp
LcConfigRequest
*
lc_config_request_msg
=
input
->
lc_config_request_msg
;
Protocol__
FlexranMessage
*
input
=
(
Protocol__Flex
ranMessage
*
)
params
;
Protocol__
Flex
LcConfigRequest
*
lc_config_request_msg
=
input
->
lc_config_request_msg
;
xid
=
(
lc_config_request_msg
->
header
)
->
xid
;
int
i
,
j
;
Protocol__
Prp
Header
*
header
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_GET_LC_CONFIG_REPLY
,
&
header
)
!=
0
)
Protocol__
Flex
Header
*
header
;
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_GET_LC_CONFIG_REPLY
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
LcConfigReply
*
lc_config_reply_msg
;
lc_config_reply_msg
=
malloc
(
sizeof
(
Protocol__
Prp
LcConfigReply
));
Protocol__
Flex
LcConfigReply
*
lc_config_reply_msg
;
lc_config_reply_msg
=
malloc
(
sizeof
(
Protocol__
Flex
LcConfigReply
));
if
(
lc_config_reply_msg
==
NULL
)
goto
error
;
protocol__
prp
_lc_config_reply__init
(
lc_config_reply_msg
);
protocol__
flex
_lc_config_reply__init
(
lc_config_reply_msg
);
lc_config_reply_msg
->
header
=
header
;
//TODO: Fill in the actual number of UEs that we are going to report LC configs about
lc_config_reply_msg
->
n_lc_ue_config
=
get_num_ues
(
mod_id
);
Protocol__
Prp
LcUeConfig
**
lc_ue_config
;
Protocol__
Flex
LcUeConfig
**
lc_ue_config
;
if
(
lc_config_reply_msg
->
n_lc_ue_config
>
0
)
{
lc_ue_config
=
malloc
(
sizeof
(
Protocol__
Prp
LcUeConfig
*
)
*
lc_config_reply_msg
->
n_lc_ue_config
);
lc_ue_config
=
malloc
(
sizeof
(
Protocol__
Flex
LcUeConfig
*
)
*
lc_config_reply_msg
->
n_lc_ue_config
);
if
(
lc_ue_config
==
NULL
)
{
goto
error
;
}
// Fill the config for each UE
for
(
i
=
0
;
i
<
lc_config_reply_msg
->
n_lc_ue_config
;
i
++
)
{
lc_ue_config
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
LcUeConfig
));
protocol__
prp
_lc_ue_config__init
(
lc_ue_config
[
i
]);
lc_ue_config
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
LcUeConfig
));
protocol__
flex
_lc_ue_config__init
(
lc_ue_config
[
i
]);
//TODO: Set the RNTI of the UE
lc_ue_config
[
i
]
->
has_rnti
=
1
;
lc_ue_config
[
i
]
->
rnti
=
get_ue_crnti
(
mod_id
,
i
);
...
...
@@ -1512,15 +1512,15 @@ int enb_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Progra
}
else
{
lc_ue_config
[
i
]
->
n_lc_config
=
3
;
}
Protocol__
Prp
LcConfig
**
lc_config
;
Protocol__
Flex
LcConfig
**
lc_config
;
if
(
lc_ue_config
[
i
]
->
n_lc_config
>
0
)
{
lc_config
=
malloc
(
sizeof
(
Protocol__
Prp
LcConfig
*
)
*
lc_ue_config
[
i
]
->
n_lc_config
);
lc_config
=
malloc
(
sizeof
(
Protocol__
Flex
LcConfig
*
)
*
lc_ue_config
[
i
]
->
n_lc_config
);
if
(
lc_config
==
NULL
)
{
goto
error
;
}
for
(
j
=
0
;
j
<
lc_ue_config
[
i
]
->
n_lc_config
;
j
++
)
{
lc_config
[
j
]
=
malloc
(
sizeof
(
Protocol__
Prp
LcConfig
));
protocol__
prp
_lc_config__init
(
lc_config
[
j
]);
lc_config
[
j
]
=
malloc
(
sizeof
(
Protocol__
Flex
LcConfig
));
protocol__
flex
_lc_config__init
(
lc_config
[
j
]);
//TODO: Set the LC id
lc_config
[
j
]
->
has_lcid
=
1
;
lc_config
[
j
]
->
lcid
=
j
+
1
;
...
...
@@ -1533,14 +1533,14 @@ int enb_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Progra
//TODO: Set the LC direction
lc_config
[
j
]
->
has_direction
=
1
;
lc_config
[
j
]
->
direction
=
get_direction
(
i
,
j
+
1
);
//TODO: Bearer type. One of
PR
QBT_* values
//TODO: Bearer type. One of
FL
QBT_* values
lc_config
[
j
]
->
has_qos_bearer_type
=
1
;
lc_config
[
j
]
->
qos_bearer_type
=
PROTOCOL__
PRP_QOS_BEARER_TYPE__PR
QBT_NON_GBR
;
lc_config
[
j
]
->
qos_bearer_type
=
PROTOCOL__
FLEX_QOS_BEARER_TYPE__FL
QBT_NON_GBR
;
//TODO: Set the QCI defined in TS 23.203, coded as defined in TS 36.413
// One less than the actual QCI value
lc_config
[
j
]
->
has_qci
=
1
;
lc_config
[
j
]
->
qci
=
1
;
if
(
lc_config
[
j
]
->
direction
==
PROTOCOL__
PRP_QOS_BEARER_TYPE__PR
QBT_GBR
)
{
if
(
lc_config
[
j
]
->
direction
==
PROTOCOL__
FLEX_QOS_BEARER_TYPE__FL
QBT_GBR
)
{
//TODO: Set the max bitrate (UL)
lc_config
[
j
]
->
has_e_rab_max_bitrate_ul
=
1
;
lc_config
[
j
]
->
e_rab_max_bitrate_ul
=
1
;
...
...
@@ -1560,12 +1560,12 @@ int enb_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Progra
}
// end for UE
lc_config_reply_msg
->
lc_ue_config
=
lc_ue_config
;
}
// lc_config_reply_msg->n_lc_ue_config > 0
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
(
*
msg
)
->
lc_config_reply_msg
=
lc_config_reply_msg
;
return
0
;
...
...
@@ -1588,38 +1588,38 @@ int enb_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Progra
* ************************************
*/
int
enb_agent_ue_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_ue_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
xid_t
xid
;
Protocol__
ProgranMessage
*
input
=
(
Protocol__Prog
ranMessage
*
)
params
;
Protocol__
Prp
UeConfigRequest
*
ue_config_request_msg
=
input
->
ue_config_request_msg
;
Protocol__
FlexranMessage
*
input
=
(
Protocol__Flex
ranMessage
*
)
params
;
Protocol__
Flex
UeConfigRequest
*
ue_config_request_msg
=
input
->
ue_config_request_msg
;
xid
=
(
ue_config_request_msg
->
header
)
->
xid
;
int
i
;
Protocol__
Prp
Header
*
header
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_GET_UE_CONFIG_REPLY
,
&
header
)
!=
0
)
Protocol__
Flex
Header
*
header
;
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_GET_UE_CONFIG_REPLY
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
UeConfigReply
*
ue_config_reply_msg
;
ue_config_reply_msg
=
malloc
(
sizeof
(
Protocol__
Prp
UeConfigReply
));
Protocol__
Flex
UeConfigReply
*
ue_config_reply_msg
;
ue_config_reply_msg
=
malloc
(
sizeof
(
Protocol__
Flex
UeConfigReply
));
if
(
ue_config_reply_msg
==
NULL
)
goto
error
;
protocol__
prp
_ue_config_reply__init
(
ue_config_reply_msg
);
protocol__
flex
_ue_config_reply__init
(
ue_config_reply_msg
);
ue_config_reply_msg
->
header
=
header
;
//TODO: Fill in the actual number of UEs that are currently connected
ue_config_reply_msg
->
n_ue_config
=
get_num_ues
(
mod_id
);
Protocol__
Prp
UeConfig
**
ue_config
;
Protocol__
Flex
UeConfig
**
ue_config
;
if
(
ue_config_reply_msg
->
n_ue_config
>
0
)
{
ue_config
=
malloc
(
sizeof
(
Protocol__
Prp
UeConfig
*
)
*
ue_config_reply_msg
->
n_ue_config
);
ue_config
=
malloc
(
sizeof
(
Protocol__
Flex
UeConfig
*
)
*
ue_config_reply_msg
->
n_ue_config
);
if
(
ue_config
==
NULL
)
{
goto
error
;
}
for
(
i
=
0
;
i
<
ue_config_reply_msg
->
n_ue_config
;
i
++
)
{
ue_config
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
UeConfig
));
protocol__
prp
_ue_config__init
(
ue_config
[
i
]);
ue_config
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
UeConfig
));
protocol__
flex
_ue_config__init
(
ue_config
[
i
]);
//TODO: Set the RNTI of the ue with id i
ue_config
[
i
]
->
rnti
=
get_ue_crnti
(
mod_id
,
i
);
ue_config
[
i
]
->
has_rnti
=
1
;
...
...
@@ -1638,7 +1638,7 @@ int enb_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Progra
}
//TODO: Set the measurement gap offset if applicable
if
(
ue_config
[
i
]
->
has_meas_gap_config_pattern
==
1
&&
ue_config
[
i
]
->
meas_gap_config_pattern
!=
PROTOCOL__
PRP_MEAS_GAP_CONFIG_PATTERN__PR
MGCP_OFF
)
{
ue_config
[
i
]
->
meas_gap_config_pattern
!=
PROTOCOL__
FLEX_MEAS_GAP_CONFIG_PATTERN__FL
MGCP_OFF
)
{
ue_config
[
i
]
->
meas_gap_config_sf_offset
=
get_meas_gap_config_offset
(
mod_id
,
i
);
ue_config
[
i
]
->
has_meas_gap_config_sf_offset
=
1
;
}
...
...
@@ -1666,9 +1666,9 @@ int enb_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Progra
ue_config
[
i
]
->
has_ue_aggregated_max_bitrate_dl
=
1
;
//TODO: Set the UE capabilities
Protocol__
Prp
UeCapabilities
*
capabilities
;
capabilities
=
malloc
(
sizeof
(
Protocol__
Prp
UeCapabilities
));
protocol__
prp
_ue_capabilities__init
(
capabilities
);
Protocol__
Flex
UeCapabilities
*
capabilities
;
capabilities
=
malloc
(
sizeof
(
Protocol__
Flex
UeCapabilities
));
protocol__
flex
_ue_capabilities__init
(
capabilities
);
//TODO: Set half duplex (FDD operation)
capabilities
->
has_half_duplex
=
1
;
capabilities
->
half_duplex
=
1
;
//get_half_duplex(i);
...
...
@@ -1686,7 +1686,7 @@ int enb_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Progra
capabilities
->
res_alloc_type1
=
1
;
//get_res_alloc_type1(i);
//Set the capabilites to the message
ue_config
[
i
]
->
capabilities
=
capabilities
;
//TODO: Set UE transmission antenna. One of the
PR
UTA_* values
//TODO: Set UE transmission antenna. One of the
FL
UTA_* values
if
(
get_ue_transmission_antenna
(
mod_id
,
i
)
!=
-
1
){
ue_config
[
i
]
->
has_ue_transmission_antenna
=
1
;
ue_config
[
i
]
->
ue_transmission_antenna
=
get_ue_transmission_antenna
(
mod_id
,
i
);
...
...
@@ -1726,12 +1726,12 @@ int enb_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Progra
ue_config
[
i
]
->
has_simultaneous_ack_nack_cqi
=
1
;
ue_config
[
i
]
->
simultaneous_ack_nack_cqi
=
get_simultaneous_ack_nack_cqi
(
mod_id
,
i
);
}
//TODO: Set
PR
ACRM_* value regarding aperiodic cqi report mode
//TODO: Set
FL
ACRM_* value regarding aperiodic cqi report mode
if
(
get_aperiodic_cqi_rep_mode
(
mod_id
,
i
)
!=
-
1
){
ue_config
[
i
]
->
has_aperiodic_cqi_rep_mode
=
1
;
int
mode
=
get_aperiodic_cqi_rep_mode
(
mod_id
,
i
);
if
(
mode
>
4
)
{
ue_config
[
i
]
->
aperiodic_cqi_rep_mode
=
PROTOCOL__
PRP_APERIODIC_CQI_REPORT_MODE__PR
ACRM_NONE
;
ue_config
[
i
]
->
aperiodic_cqi_rep_mode
=
PROTOCOL__
FLEX_APERIODIC_CQI_REPORT_MODE__FL
ACRM_NONE
;
}
else
{
ue_config
[
i
]
->
aperiodic_cqi_rep_mode
=
mode
;
}
...
...
@@ -1770,12 +1770,12 @@ int enb_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Progra
}
ue_config_reply_msg
->
ue_config
=
ue_config
;
}
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
(
*
msg
)
->
ue_config_reply_msg
=
ue_config_reply_msg
;
return
0
;
...
...
@@ -1798,29 +1798,29 @@ int enb_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Progra
* ************************************
*/
int
enb_agent_enb_config_request
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_enb_config_request
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
Prp
Header
*
header
;
Protocol__
Flex
Header
*
header
;
xid_t
xid
=
1
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_GET_ENB_CONFIG_REQUEST
,
&
header
)
!=
0
)
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_GET_ENB_CONFIG_REQUEST
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
EnbConfigRequest
*
enb_config_request_msg
;
enb_config_request_msg
=
malloc
(
sizeof
(
Protocol__
Prp
EnbConfigRequest
));
Protocol__
Flex
EnbConfigRequest
*
enb_config_request_msg
;
enb_config_request_msg
=
malloc
(
sizeof
(
Protocol__
Flex
EnbConfigRequest
));
if
(
enb_config_request_msg
==
NULL
)
goto
error
;
protocol__
prp
_enb_config_request__init
(
enb_config_request_msg
);
protocol__
flex
_enb_config_request__init
(
enb_config_request_msg
);
enb_config_request_msg
->
header
=
header
;
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__INITIATING_MESSAGE
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
enb_config_request_msg
=
enb_config_request_msg
;
return
0
;
...
...
@@ -1836,26 +1836,26 @@ int enb_agent_enb_config_request(mid_t mod_id, const void* params, Protocol__Pro
return
-
1
;
}
int
enb_agent_enb_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_enb_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
xid_t
xid
;
Protocol__
ProgranMessage
*
input
=
(
Protocol__Prog
ranMessage
*
)
params
;
Protocol__
Prp
EnbConfigRequest
*
enb_config_req_msg
=
input
->
enb_config_request_msg
;
Protocol__
FlexranMessage
*
input
=
(
Protocol__Flex
ranMessage
*
)
params
;
Protocol__
Flex
EnbConfigRequest
*
enb_config_req_msg
=
input
->
enb_config_request_msg
;
xid
=
(
enb_config_req_msg
->
header
)
->
xid
;
int
i
,
j
,
k
;
int
cc_id
=
0
;
int
enb_id
=
mod_id
;
Protocol__
Prp
Header
*
header
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_GET_ENB_CONFIG_REPLY
,
&
header
)
!=
0
)
Protocol__
Flex
Header
*
header
;
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_GET_ENB_CONFIG_REPLY
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
EnbConfigReply
*
enb_config_reply_msg
;
enb_config_reply_msg
=
malloc
(
sizeof
(
Protocol__
Prp
EnbConfigReply
));
Protocol__
Flex
EnbConfigReply
*
enb_config_reply_msg
;
enb_config_reply_msg
=
malloc
(
sizeof
(
Protocol__
Flex
EnbConfigReply
));
if
(
enb_config_reply_msg
==
NULL
)
goto
error
;
protocol__
prp
_enb_config_reply__init
(
enb_config_reply_msg
);
protocol__
flex
_enb_config_reply__init
(
enb_config_reply_msg
);
enb_config_reply_msg
->
header
=
header
;
enb_config_reply_msg
->
enb_id
=
mod_id
;
...
...
@@ -1863,14 +1863,14 @@ int enb_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__Progr
enb_config_reply_msg
->
n_cell_config
=
MAX_NUM_CCs
;
Protocol__
Prp
CellConfig
**
cell_conf
;
Protocol__
Flex
CellConfig
**
cell_conf
;
if
(
enb_config_reply_msg
->
n_cell_config
>
0
){
cell_conf
=
malloc
(
sizeof
(
Protocol__
Prp
CellConfig
*
)
*
enb_config_reply_msg
->
n_cell_config
);
cell_conf
=
malloc
(
sizeof
(
Protocol__
Flex
CellConfig
*
)
*
enb_config_reply_msg
->
n_cell_config
);
if
(
cell_conf
==
NULL
)
goto
error
;
for
(
i
=
0
;
i
<
enb_config_reply_msg
->
n_cell_config
;
i
++
){
cell_conf
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
CellConfig
));
protocol__
prp
_cell_config__init
(
cell_conf
[
i
]);
cell_conf
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
CellConfig
));
protocol__
flex
_cell_config__init
(
cell_conf
[
i
]);
//TODO: Fill in with actual value, the PCI of this cell
cell_conf
[
i
]
->
phy_cell_id
=
1
;
cell_conf
[
i
]
->
has_phy_cell_id
=
get_cell_id
(
enb_id
,
i
);
...
...
@@ -1882,41 +1882,41 @@ int enb_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__Progr
cell_conf
[
i
]
->
has_pusch_hopping_offset
=
1
;
//TODO: Fill in with actual value
if
(
get_hopping_mode
(
enb_id
,
i
)
==
0
){
cell_conf
[
i
]
->
hopping_mode
=
PROTOCOL__
PRP_HOPPING_MODE__PR
HM_INTER
;
cell_conf
[
i
]
->
hopping_mode
=
PROTOCOL__
FLEX_HOPPING_MODE__FL
HM_INTER
;
}
else
if
(
get_hopping_mode
(
enb_id
,
i
)
==
1
){
cell_conf
[
i
]
->
hopping_mode
=
PROTOCOL__
PRP_HOPPING_MODE__PR
HM_INTERINTRA
;
cell_conf
[
i
]
->
hopping_mode
=
PROTOCOL__
FLEX_HOPPING_MODE__FL
HM_INTERINTRA
;
}
cell_conf
[
i
]
->
has_hopping_mode
=
1
;
//TODO: Fill in with actual value, the number of subbands
cell_conf
[
i
]
->
n_sb
=
get_n_SB
(
enb_id
,
i
);
cell_conf
[
i
]
->
has_n_sb
=
1
;
//TODO: Fill in with actual value, The number of resource element groups used for PHICH. One of
PR
PR_
//TODO: Fill in with actual value, The number of resource element groups used for PHICH. One of
FL
PR_
if
(
get_phich_resource
(
enb_id
,
i
)
==
0
){
cell_conf
[
i
]
->
phich_resource
=
PROTOCOL__
PRP_PHICH_RESOURCE__PR
PR_ONE_SIXTH
;
//0
cell_conf
[
i
]
->
phich_resource
=
PROTOCOL__
FLEX_PHICH_RESOURCE__FL
PR_ONE_SIXTH
;
//0
}
else
if
(
get_phich_resource
(
enb_id
,
i
)
==
1
){
cell_conf
[
i
]
->
phich_resource
=
PROTOCOL__
PRP_PHICH_RESOURCE__PR
PR_HALF
;
//1
cell_conf
[
i
]
->
phich_resource
=
PROTOCOL__
FLEX_PHICH_RESOURCE__FL
PR_HALF
;
//1
}
else
if
(
get_phich_resource
(
enb_id
,
i
)
==
2
){
cell_conf
[
i
]
->
phich_resource
=
PROTOCOL__
PRP_PHICH_RESOURCE__PR
PR_ONE
;
// 2
cell_conf
[
i
]
->
phich_resource
=
PROTOCOL__
FLEX_PHICH_RESOURCE__FL
PR_ONE
;
// 2
}
else
if
(
get_phich_resource
(
enb_id
,
i
)
==
3
){
cell_conf
[
i
]
->
phich_resource
=
PROTOCOL__
PRP_PHICH_RESOURCE__PR
PR_TWO
;
//3
cell_conf
[
i
]
->
phich_resource
=
PROTOCOL__
FLEX_PHICH_RESOURCE__FL
PR_TWO
;
//3
}
cell_conf
[
i
]
->
has_phich_resource
=
1
;
//TODO: Fill in with actual value, one of the
PR
PD_ values
//TODO: Fill in with actual value, one of the
FL
PD_ values
if
(
get_phich_duration
(
enb_id
,
i
)
==
0
){
cell_conf
[
i
]
->
phich_duration
=
PROTOCOL__
PRP_PHICH_DURATION__PR
PD_NORMAL
;
cell_conf
[
i
]
->
phich_duration
=
PROTOCOL__
FLEX_PHICH_DURATION__FL
PD_NORMAL
;
}
else
if
(
get_phich_duration
(
enb_id
,
i
)
==
1
){
cell_conf
[
i
]
->
phich_duration
=
PROTOCOL__
PRP_PHICH_DURATION__PR
PD_EXTENDED
;
cell_conf
[
i
]
->
phich_duration
=
PROTOCOL__
FLEX_PHICH_DURATION__FL
PD_EXTENDED
;
}
cell_conf
[
i
]
->
has_phich_duration
=
1
;
//TODO: Fill in with actual value, See TS 36.211, section 6.9
cell_conf
[
i
]
->
init_nr_pdcch_ofdm_sym
=
get_num_pdcch_symb
(
enb_id
,
i
);
cell_conf
[
i
]
->
has_init_nr_pdcch_ofdm_sym
=
1
;
//TODO: Fill in with actual value
/* Protocol__
Prp
SiConfig *si_config; */
/* si_config = malloc(sizeof(Protocol__
Prp
SiConfig)); */
/* Protocol__
Flex
SiConfig *si_config; */
/* si_config = malloc(sizeof(Protocol__
Flex
SiConfig)); */
/* if(si_config == NULL) */
/* goto error; */
/* protocol__
prp
_si_config__init(si_config); */
/* protocol__
flex
_si_config__init(si_config); */
/* //TODO: Fill in with actual value, Frame number to apply the SI configuration */
/* si_config->sfn = 1; */
/* si_config->has_sfn = 1; */
...
...
@@ -1928,15 +1928,15 @@ int enb_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__Progr
/* si_config->has_si_window_length = 1; */
/* //TODO: Fill in with actual value, the number of SI messages */
/* si_config->n_si_message=1; */
/* Protocol__
Prp
SiMessage **si_message; */
/* si_message = malloc(sizeof(Protocol__
Prp
SiMessage *) * si_config->n_si_message); */
/* Protocol__
Flex
SiMessage **si_message; */
/* si_message = malloc(sizeof(Protocol__
Flex
SiMessage *) * si_config->n_si_message); */
/* if(si_message == NULL) */
/* goto error; */
/* for(j = 0; j < si_config->n_si_message; j++){ */
/* si_message[j] = malloc(sizeof(Protocol__
Prp
SiMessage)); */
/* si_message[j] = malloc(sizeof(Protocol__
Flex
SiMessage)); */
/* if(si_message[j] == NULL) */
/* goto error; */
/* protocol__
prp
_si_message__init(si_message[j]); */
/* protocol__
flex
_si_message__init(si_message[j]); */
/* //TODO: Fill in with actual value, Periodicity of SI msg in radio frames */
/* si_message[j]->periodicity = 1; //SIPeriod */
/* si_message[j]->has_periodicity = 1; */
...
...
@@ -1955,29 +1955,29 @@ int enb_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__Progr
//TODO: Fill in with actual value, the UL transmission bandwidth in RBs
cell_conf
[
i
]
->
ul_bandwidth
=
get_N_RB_UL
(
enb_id
,
i
);
cell_conf
[
i
]
->
has_ul_bandwidth
=
1
;
//TODO: Fill in with actual value, one of
PR
UCPL values
//TODO: Fill in with actual value, one of
FL
UCPL values
if
(
get_ul_cyclic_prefix_length
(
enb_id
,
i
)
==
0
){
cell_conf
[
i
]
->
ul_cyclic_prefix_length
=
PROTOCOL__
PRP_UL_CYCLIC_PREFIX_LENGTH__PR
UCPL_NORMAL
;
cell_conf
[
i
]
->
ul_cyclic_prefix_length
=
PROTOCOL__
FLEX_UL_CYCLIC_PREFIX_LENGTH__FL
UCPL_NORMAL
;
}
else
if
(
get_ul_cyclic_prefix_length
(
enb_id
,
i
)
==
1
){
cell_conf
[
i
]
->
ul_cyclic_prefix_length
=
PROTOCOL__
PRP_UL_CYCLIC_PREFIX_LENGTH__PR
UCPL_EXTENDED
;
cell_conf
[
i
]
->
ul_cyclic_prefix_length
=
PROTOCOL__
FLEX_UL_CYCLIC_PREFIX_LENGTH__FL
UCPL_EXTENDED
;
}
cell_conf
[
i
]
->
has_ul_cyclic_prefix_length
=
1
;
//TODO: Fill in with actual value, one of
PR
UCPL values
//TODO: Fill in with actual value, one of
FL
UCPL values
if
(
get_ul_cyclic_prefix_length
(
enb_id
,
i
)
==
0
){
cell_conf
[
i
]
->
ul_cyclic_prefix_length
=
PROTOCOL__
PRP_DL_CYCLIC_PREFIX_LENGTH__PR
DCPL_NORMAL
;
cell_conf
[
i
]
->
ul_cyclic_prefix_length
=
PROTOCOL__
FLEX_DL_CYCLIC_PREFIX_LENGTH__FL
DCPL_NORMAL
;
}
else
if
(
get_ul_cyclic_prefix_length
(
enb_id
,
i
)
==
1
){
cell_conf
[
i
]
->
ul_cyclic_prefix_length
=
PROTOCOL__
PRP_DL_CYCLIC_PREFIX_LENGTH__PR
DCPL_EXTENDED
;
cell_conf
[
i
]
->
ul_cyclic_prefix_length
=
PROTOCOL__
FLEX_DL_CYCLIC_PREFIX_LENGTH__FL
DCPL_EXTENDED
;
}
cell_conf
[
i
]
->
has_dl_cyclic_prefix_length
=
1
;
//TODO: Fill in with actual value, number of cell specific antenna ports
cell_conf
[
i
]
->
antenna_ports_count
=
1
;
cell_conf
[
i
]
->
has_antenna_ports_count
=
1
;
//TODO: Fill in with actual value, one of
PR
DM values
//TODO: Fill in with actual value, one of
FL
DM values
if
(
get_duplex_mode
(
enb_id
,
i
)
==
1
){
cell_conf
[
i
]
->
duplex_mode
=
PROTOCOL__
PRP_DUPLEX_MODE__PR
DM_FDD
;
cell_conf
[
i
]
->
duplex_mode
=
PROTOCOL__
FLEX_DUPLEX_MODE__FL
DM_FDD
;
}
else
if
(
get_duplex_mode
(
enb_id
,
i
)
==
0
){
cell_conf
[
i
]
->
duplex_mode
=
PROTOCOL__
PRP_DUPLEX_MODE__PR
DM_TDD
;
cell_conf
[
i
]
->
duplex_mode
=
PROTOCOL__
FLEX_DUPLEX_MODE__FL
DM_TDD
;
}
cell_conf
[
i
]
->
has_duplex_mode
=
1
;
//TODO: Fill in with actual value, DL/UL subframe assignment. TDD only
...
...
@@ -2052,11 +2052,11 @@ int enb_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__Progr
//TODO: Fill in with actual value, Boolean value. See TS 36.211, section 5.5.3.2. TDD only
cell_conf
[
i
]
->
srs_mac_up_pts
=
get_srs_MaxUpPts
(
enb_id
,
i
);
cell_conf
[
i
]
->
has_srs_mac_up_pts
=
1
;
//TODO: Fill in with actual value, One of the
PR
EQ_ values
//TODO: Fill in with actual value, One of the
FL
EQ_ values
if
(
get_enable64QAM
(
enb_id
,
i
)
==
0
){
cell_conf
[
i
]
->
enable_64qam
=
PROTOCOL__
PRP_QAM__PR
EQ_MOD_16QAM
;
cell_conf
[
i
]
->
enable_64qam
=
PROTOCOL__
FLEX_QAM__FL
EQ_MOD_16QAM
;
}
else
if
(
get_enable64QAM
(
enb_id
,
i
)
==
1
){
cell_conf
[
i
]
->
enable_64qam
=
PROTOCOL__
PRP_QAM__PR
EQ_MOD_64QAM
;
cell_conf
[
i
]
->
enable_64qam
=
PROTOCOL__
FLEX_QAM__FL
EQ_MOD_64QAM
;
}
cell_conf
[
i
]
->
has_enable_64qam
=
1
;
//TODO: Fill in with actual value, Carrier component index
...
...
@@ -2065,12 +2065,12 @@ int enb_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__Progr
}
enb_config_reply_msg
->
cell_config
=
cell_conf
;
}
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
(
*
msg
)
->
enb_config_reply_msg
=
enb_config_reply_msg
;
return
0
;
...
...
@@ -2104,7 +2104,7 @@ err_code_t enb_agent_init_timer(void){
memset(&e, 0, sizeof(enb_agent_timer_element_t));
RB_INSERT(enb_agent_map, &agent_map, &e);
*/
return
PROTOCOL__
PROG
RAN_ERR__NO_ERR
;
return
PROTOCOL__
FLEX
RAN_ERR__NO_ERR
;
}
RB_GENERATE
(
enb_agent_map
,
enb_agent_timer_element_s
,
entry
,
enb_agent_compare_timer
);
...
...
@@ -2190,7 +2190,7 @@ err_code_t enb_agent_destroy_timer(long timer_id){
if
(
e
!=
NULL
)
{
RB_REMOVE
(
enb_agent_map
,
&
timer_instance
.
enb_agent_head
,
e
);
enb_agent_destroy_
prog
ran_message
(
e
->
timer_args
->
msg
);
enb_agent_destroy_
flex
ran_message
(
e
->
timer_args
->
msg
);
free
(
e
);
}
...
...
@@ -2211,7 +2211,7 @@ err_code_t enb_agent_destroy_timer_by_task_id(xid_t xid) {
if
(
e
->
xid
==
xid
)
{
timer_id
=
e
->
timer_id
;
RB_REMOVE
(
enb_agent_map
,
&
timer_instance
.
enb_agent_head
,
e
);
enb_agent_destroy_
prog
ran_message
(
e
->
timer_args
->
msg
);
enb_agent_destroy_
flex
ran_message
(
e
->
timer_args
->
msg
);
free
(
e
);
if
(
timer_remove
(
timer_id
)
<
0
)
{
goto
error
;
...
...
@@ -2232,7 +2232,7 @@ err_code_t enb_agent_destroy_timers(void){
RB_FOREACH
(
e
,
enb_agent_map
,
&
timer_instance
.
enb_agent_head
)
{
RB_REMOVE
(
enb_agent_map
,
&
timer_instance
.
enb_agent_head
,
e
);
timer_remove
(
e
->
timer_id
);
enb_agent_destroy_
prog
ran_message
(
e
->
timer_args
->
msg
);
enb_agent_destroy_
flex
ran_message
(
e
->
timer_args
->
msg
);
free
(
e
);
}
...
...
@@ -2310,7 +2310,7 @@ err_code_t enb_agent_restart_timer(uint32_t *timer_id){
}
if (ret < 0 ) {
return PROTOCOL__
PROG
RAN_ERR__TIMER_SETUP_FAILED;
return PROTOCOL__
FLEX
RAN_ERR__TIMER_SETUP_FAILED;
}
return 0;
...
...
openair2/ENB_APP/enb_agent_common.h
View file @
b2181288
...
...
@@ -29,7 +29,7 @@
/*! \file enb_agent_common.h
* \brief common message primitves and utilities
* \author
Navid Nikaein and Xenofon Foukas
* \author
Xenofon Foukas, Mohamed Kassem and Navid Nikaein
* \date 2016
* \version 0.1
*/
...
...
@@ -42,7 +42,7 @@
#include <time.h>
#include "header.pb-c.h"
#include "
prog
ran.pb-c.h"
#include "
flex
ran.pb-c.h"
#include "stats_messages.pb-c.h"
#include "stats_common.pb-c.h"
...
...
@@ -56,72 +56,72 @@
# include "intertask_interface.h"
# include "timer.h"
#define
PROG
RAN_VERSION 0
#define
FLEX
RAN_VERSION 0
typedef
int
(
*
enb_agent_message_decoded_callback
)(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
Protocol__
Flex
ranMessage
**
msg
);
typedef
int
(
*
enb_agent_message_destruction_callback
)(
Protocol__
Prog
ranMessage
*
msg
Protocol__
Flex
ranMessage
*
msg
);
/**********************************
*
prog
RAN protocol messages helper
*
Flex
RAN protocol messages helper
* functions and generic handlers
**********************************/
int
enb_agent_serialize_message
(
Protocol__
Prog
ranMessage
*
msg
,
void
**
buf
,
int
*
size
);
int
enb_agent_deserialize_message
(
void
*
data
,
int
size
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_serialize_message
(
Protocol__
Flex
ranMessage
*
msg
,
void
**
buf
,
int
*
size
);
int
enb_agent_deserialize_message
(
void
*
data
,
int
size
,
Protocol__
Flex
ranMessage
**
msg
);
void
*
enb_agent_pack_message
(
Protocol__
Prog
ranMessage
*
msg
,
void
*
enb_agent_pack_message
(
Protocol__
Flex
ranMessage
*
msg
,
uint32_t
*
size
);
err_code_t
enb_agent_destroy_
progran_message
(
Protocol__Prog
ranMessage
*
msg
);
err_code_t
enb_agent_destroy_
flexran_message
(
Protocol__Flex
ranMessage
*
msg
);
int
prp_create_header
(
xid_t
xid
,
Protocol__PrpType
type
,
Protocol__Prp
Header
**
header
);
int
flex_create_header
(
xid_t
xid
,
Protocol__FlexType
type
,
Protocol__Flex
Header
**
header
);
int
enb_agent_hello
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_hello
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_hello
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_hello
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_echo_request
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_echo_request
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_echo_request
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_echo_request
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_echo_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_echo_reply
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_echo_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_echo_reply
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_enb_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_enb_config_reply
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_enb_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_enb_config_reply
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_ue_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_ue_config_reply
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_ue_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_ue_config_reply
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_lc_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_lc_config_reply
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_lc_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_lc_config_reply
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_enb_config_request
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_enb_config_request
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_enb_config_request
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_enb_config_request
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_destroy_ue_config_request
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_destroy_ue_config_request
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_destroy_lc_config_request
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_destroy_lc_config_request
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_ue_state_change
(
mid_t
mod_id
,
uint32_t
rnti
,
uint8_t
state_change
);
int
enb_agent_destroy_ue_state_change
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_destroy_ue_state_change
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_control_delegation
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_control_delegation
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_control_delegation
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_control_delegation
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_reconfiguration
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_destroy_agent_reconfiguration
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_reconfiguration
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_destroy_agent_reconfiguration
(
Protocol__
Flex
ranMessage
*
msg
);
Protocol__
Prog
ranMessage
*
enb_agent_handle_message
(
mid_t
mod_id
,
Protocol__
Flex
ranMessage
*
enb_agent_handle_message
(
mid_t
mod_id
,
uint8_t
*
data
,
uint32_t
size
);
Protocol__
Prog
ranMessage
*
enb_agent_handle_timed_task
(
void
*
args
);
Protocol__
Flex
ranMessage
*
enb_agent_handle_timed_task
(
void
*
args
);
...
...
@@ -145,7 +145,7 @@ unsigned int get_current_system_frame_num(mid_t mod_id);
unsigned
int
get_current_subframe
(
mid_t
mod_id
);
/*Return the frame and subframe number in compact 16-bit format.
Bits 0-3 subframe, rest for frame. Required by
prog
RAN protocol*/
Bits 0-3 subframe, rest for frame. Required by
Flex
RAN protocol*/
uint16_t
get_sfn_sf
(
mid_t
mod_id
);
uint16_t
get_future_sfn_sf
(
mid_t
mod_id
,
int
ahead_of_time
);
...
...
@@ -287,7 +287,7 @@ int get_direction(mid_t ue_id, mid_t lc_id);
/* Type of the callback executed when the timer expired */
typedef
Protocol__
Prog
ranMessage
*
(
*
enb_agent_timer_callback_t
)(
void
*
);
typedef
Protocol__
Flex
ranMessage
*
(
*
enb_agent_timer_callback_t
)(
void
*
);
typedef
enum
{
/* oneshot timer: */
...
...
@@ -319,7 +319,7 @@ typedef enum {
typedef
struct
enb_agent_timer_args_s
{
mid_t
mod_id
;
Protocol__
Prog
ranMessage
*
msg
;
Protocol__
Flex
ranMessage
*
msg
;
}
enb_agent_timer_args_t
;
...
...
@@ -371,7 +371,7 @@ err_code_t enb_agent_restart_timer(long *timer_id);
struct
enb_agent_timer_element_s
*
get_timer_entry
(
long
timer_id
);
Protocol__
Prog
ranMessage
*
enb_agent_process_timeout
(
long
timer_id
,
void
*
timer_args
);
Protocol__
Flex
ranMessage
*
enb_agent_process_timeout
(
long
timer_id
,
void
*
timer_args
);
int
enb_agent_compare_timer
(
struct
enb_agent_timer_element_s
*
a
,
struct
enb_agent_timer_element_s
*
b
);
...
...
openair2/ENB_APP/enb_agent_handler.c
View file @
b2181288
...
...
@@ -29,7 +29,7 @@
/*! \file enb_agent_handler.c
* \brief enb agent tx and rx message handler
* \author
Navid Nikaein and Xenofon Foukas
* \author
Xenofon Foukas and Navid Nikaein
* \date 2016
* \version 0.1
*/
...
...
@@ -42,23 +42,23 @@
#include "assertions.h"
enb_agent_message_decoded_callback
agent_messages_callback
[][
3
]
=
{
{
enb_agent_hello
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_HELLO_MSG*/
{
enb_agent_echo_reply
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_ECHO_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_ECHO_REPLY_MSG*/
//Must add handler when receiving echo reply
{
enb_agent_mac_handle_stats
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_STATS_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_STATS_REPLY_MSG*/
{
0
,
0
,
0
},
/*PROTOCOK__
PROG
RAN_MESSAGE__MSG_SF_TRIGGER_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_UL_SR_INFO_MSG*/
{
enb_agent_enb_config_reply
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG*/
{
enb_agent_ue_config_reply
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_UE_CONFIG_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG*/
{
enb_agent_lc_config_reply
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_LC_CONFIG_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG*/
{
enb_agent_mac_handle_dl_mac_config
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG*/
{
enb_agent_control_delegation
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_CONTROL_DELEGATION_MSG*/
{
enb_agent_reconfiguration
,
0
,
0
},
/*PROTOCOL__
PROG
RAN_MESSAGE__MSG_AGENT_RECONFIGURATION_MSG*/
{
enb_agent_hello
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_HELLO_MSG*/
{
enb_agent_echo_reply
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ECHO_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ECHO_REPLY_MSG*/
//Must add handler when receiving echo reply
{
enb_agent_mac_handle_stats
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_STATS_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_STATS_REPLY_MSG*/
{
0
,
0
,
0
},
/*PROTOCOK__
FLEX
RAN_MESSAGE__MSG_SF_TRIGGER_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UL_SR_INFO_MSG*/
{
enb_agent_enb_config_reply
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG*/
{
enb_agent_ue_config_reply
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UE_CONFIG_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG*/
{
enb_agent_lc_config_reply
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_LC_CONFIG_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG*/
{
enb_agent_mac_handle_dl_mac_config
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG*/
{
enb_agent_control_delegation
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_CONTROL_DELEGATION_MSG*/
{
enb_agent_reconfiguration
,
0
,
0
},
/*PROTOCOL__
FLEX
RAN_MESSAGE__MSG_AGENT_RECONFIGURATION_MSG*/
};
enb_agent_message_destruction_callback
message_destruction_callback
[]
=
{
...
...
@@ -89,27 +89,27 @@ static const char *enb_agent_direction2String[] = {
};
Protocol__
Prog
ranMessage
*
enb_agent_handle_message
(
mid_t
mod_id
,
Protocol__
Flex
ranMessage
*
enb_agent_handle_message
(
mid_t
mod_id
,
uint8_t
*
data
,
uint32_t
size
){
Protocol__
Prog
ranMessage
*
decoded_message
,
*
reply_message
;
Protocol__
Flex
ranMessage
*
decoded_message
,
*
reply_message
;
err_code_t
err_code
;
DevAssert
(
data
!=
NULL
);
if
(
enb_agent_deserialize_message
(
data
,
size
,
&
decoded_message
)
<
0
)
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_DECODING
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_DECODING
;
goto
error
;
}
if
((
decoded_message
->
msg_case
>
sizeof
(
agent_messages_callback
)
/
(
3
*
sizeof
(
enb_agent_message_decoded_callback
)))
||
(
decoded_message
->
msg_dir
>
PROTOCOL__
PROG
RAN_DIRECTION__UNSUCCESSFUL_OUTCOME
)){
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_NOT_HANDLED
;
(
decoded_message
->
msg_dir
>
PROTOCOL__
FLEX
RAN_DIRECTION__UNSUCCESSFUL_OUTCOME
)){
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_NOT_HANDLED
;
goto
error
;
}
if
(
agent_messages_callback
[
decoded_message
->
msg_case
-
1
][
decoded_message
->
msg_dir
-
1
]
==
NULL
)
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_NOT_SUPPORTED
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_NOT_SUPPORTED
;
goto
error
;
}
...
...
@@ -118,7 +118,7 @@ Protocol__ProgranMessage* enb_agent_handle_message (mid_t mod_id,
if
(
err_code
<
0
){
goto
error
;
}
else
if
(
err_code
==
1
)
{
//If err_code > 1, we do not want to dispose the message yet
protocol__
prog
ran_message__free_unpacked
(
decoded_message
,
NULL
);
protocol__
flex
ran_message__free_unpacked
(
decoded_message
,
NULL
);
}
return
reply_message
;
...
...
@@ -130,14 +130,14 @@ error:
void
*
enb_agent_pack_message
(
Protocol__
Prog
ranMessage
*
msg
,
void
*
enb_agent_pack_message
(
Protocol__
Flex
ranMessage
*
msg
,
uint32_t
*
size
){
void
*
buffer
;
err_code_t
err_code
=
PROTOCOL__
PROG
RAN_ERR__NO_ERR
;
err_code_t
err_code
=
PROTOCOL__
FLEX
RAN_ERR__NO_ERR
;
if
(
enb_agent_serialize_message
(
msg
,
&
buffer
,
size
)
<
0
)
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_ENCODING
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_ENCODING
;
goto
error
;
}
...
...
@@ -157,11 +157,11 @@ void * enb_agent_pack_message(Protocol__ProgranMessage *msg,
return
NULL
;
}
Protocol__
Prog
ranMessage
*
enb_agent_handle_timed_task
(
void
*
args
)
{
Protocol__
Flex
ranMessage
*
enb_agent_handle_timed_task
(
void
*
args
)
{
err_code_t
err_code
;
enb_agent_timer_args_t
*
timer_args
=
(
enb_agent_timer_args_t
*
)
args
;
Protocol__
Prog
ranMessage
*
timed_task
,
*
reply_message
;
Protocol__
Flex
ranMessage
*
timed_task
,
*
reply_message
;
timed_task
=
timer_args
->
msg
;
err_code
=
((
*
agent_messages_callback
[
timed_task
->
msg_case
-
1
][
timed_task
->
msg_dir
-
1
])(
timer_args
->
mod_id
,
(
void
*
)
timed_task
,
&
reply_message
));
if
(
err_code
<
0
){
...
...
@@ -175,7 +175,7 @@ Protocol__ProgranMessage *enb_agent_handle_timed_task(void *args) {
return
NULL
;
}
Protocol__
Prog
ranMessage
*
enb_agent_process_timeout
(
long
timer_id
,
void
*
timer_args
){
Protocol__
Flex
ranMessage
*
enb_agent_process_timeout
(
long
timer_id
,
void
*
timer_args
){
struct
enb_agent_timer_element_s
*
found
=
get_timer_entry
(
timer_id
);
...
...
@@ -192,6 +192,6 @@ Protocol__ProgranMessage* enb_agent_process_timeout(long timer_id, void* timer_a
return
TIMER_ELEMENT_NOT_FOUND
;
}
err_code_t
enb_agent_destroy_
progran_message
(
Protocol__Prog
ranMessage
*
msg
)
{
err_code_t
enb_agent_destroy_
flexran_message
(
Protocol__Flex
ranMessage
*
msg
)
{
return
((
*
message_destruction_callback
[
msg
->
msg_case
-
1
])(
msg
));
}
openair2/ENB_APP/enb_agent_mac.c
View file @
b2181288
...
...
@@ -29,7 +29,7 @@
/*! \file enb_agent_mac.c
* \brief enb agent message handler for MAC layer
* \author
Navid Nikaein and Xenofon Foukas
* \author
Xenofon Foukas, Mohamed Kassem and Navid Nikaein
* \date 2016
* \version 0.1
*/
...
...
@@ -61,7 +61,7 @@ struct lfds700_ringbuffer_element *dl_mac_config_array[NUM_MAX_ENB];
struct
lfds700_ringbuffer_state
ringbuffer_state
[
NUM_MAX_ENB
];
int
enb_agent_mac_handle_stats
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
){
int
enb_agent_mac_handle_stats
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
){
// TODO: Must deal with sanitization of input
// TODO: Must check if RNTIs and cell ids of the request actually exist
...
...
@@ -86,16 +86,16 @@ int enb_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__Progr
uint32_t
ue_flags
=
0
;
uint32_t
c_flags
=
0
;
Protocol__
ProgranMessage
*
input
=
(
Protocol__Prog
ranMessage
*
)
params
;
Protocol__
FlexranMessage
*
input
=
(
Protocol__Flex
ranMessage
*
)
params
;
Protocol__
Prp
StatsRequest
*
stats_req
=
input
->
stats_request_msg
;
Protocol__
Flex
StatsRequest
*
stats_req
=
input
->
stats_request_msg
;
xid
=
(
stats_req
->
header
)
->
xid
;
// Check the type of request that is made
switch
(
stats_req
->
body_case
)
{
case
PROTOCOL__
PRP
_STATS_REQUEST__BODY_COMPLETE_STATS_REQUEST
:
;
Protocol__
Prp
CompleteStatsRequest
*
comp_req
=
stats_req
->
complete_stats_request
;
if
(
comp_req
->
report_frequency
==
PROTOCOL__
PRP_STATS_REPORT_FREQ__PR
SRF_OFF
)
{
case
PROTOCOL__
FLEX
_STATS_REQUEST__BODY_COMPLETE_STATS_REQUEST
:
;
Protocol__
Flex
CompleteStatsRequest
*
comp_req
=
stats_req
->
complete_stats_request
;
if
(
comp_req
->
report_frequency
==
PROTOCOL__
FLEX_STATS_REPORT_FREQ__FL
SRF_OFF
)
{
/*Disable both periodic and continuous updates*/
enb_agent_disable_cont_mac_stats_update
(
mod_id
);
enb_agent_destroy_timer_by_task_id
(
xid
);
...
...
@@ -133,12 +133,12 @@ int enb_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__Progr
report_config
.
cc_report_type
[
i
].
cc_report_flags
=
c_flags
;
}
/* Check if request was periodical */
if
(
comp_req
->
report_frequency
==
PROTOCOL__
PRP_STATS_REPORT_FREQ__PR
SRF_PERIODICAL
)
{
/* Create a one off
prog
ran message as an argument for the periodical task */
Protocol__
Prog
ranMessage
*
timer_msg
;
if
(
comp_req
->
report_frequency
==
PROTOCOL__
FLEX_STATS_REPORT_FREQ__FL
SRF_PERIODICAL
)
{
/* Create a one off
flex
ran message as an argument for the periodical task */
Protocol__
Flex
ranMessage
*
timer_msg
;
stats_request_config_t
request_config
;
request_config
.
report_type
=
PROTOCOL__
PRP_STATS_TYPE__PR
ST_COMPLETE_STATS
;
request_config
.
report_frequency
=
PROTOCOL__
PRP_STATS_REPORT_FREQ__PR
SRF_ONCE
;
request_config
.
report_type
=
PROTOCOL__
FLEX_STATS_TYPE__FL
ST_COMPLETE_STATS
;
request_config
.
report_frequency
=
PROTOCOL__
FLEX_STATS_REPORT_FREQ__FL
SRF_ONCE
;
request_config
.
period
=
0
;
/* Need to make sure that the ue flags are saved (Bug) */
if
(
report_config
.
nr_ue
==
0
)
{
...
...
@@ -170,13 +170,13 @@ int enb_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__Progr
usec_interval
=
usec_interval
%
(
1000
*
1000
);
}
enb_agent_create_timer
(
sec_interval
,
usec_interval
,
ENB_AGENT_DEFAULT
,
enb_id
,
ENB_AGENT_TIMER_TYPE_PERIODIC
,
xid
,
enb_agent_handle_timed_task
,(
void
*
)
timer_args
,
&
timer_id
);
}
else
if
(
comp_req
->
report_frequency
==
PROTOCOL__
PRP_STATS_REPORT_FREQ__PR
SRF_CONTINUOUS
)
{
}
else
if
(
comp_req
->
report_frequency
==
PROTOCOL__
FLEX_STATS_REPORT_FREQ__FL
SRF_CONTINUOUS
)
{
/*If request was for continuous updates, disable the previous configuration and
set up a new one*/
enb_agent_disable_cont_mac_stats_update
(
mod_id
);
stats_request_config_t
request_config
;
request_config
.
report_type
=
PROTOCOL__
PRP_STATS_TYPE__PR
ST_COMPLETE_STATS
;
request_config
.
report_frequency
=
PROTOCOL__
PRP_STATS_REPORT_FREQ__PR
SRF_ONCE
;
request_config
.
report_type
=
PROTOCOL__
FLEX_STATS_TYPE__FL
ST_COMPLETE_STATS
;
request_config
.
report_frequency
=
PROTOCOL__
FLEX_STATS_REPORT_FREQ__FL
SRF_ONCE
;
request_config
.
period
=
0
;
/* Need to make sure that the ue flags are saved (Bug) */
if
(
report_config
.
nr_ue
==
0
)
{
...
...
@@ -195,8 +195,8 @@ int enb_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__Progr
}
}
break
;
case
PROTOCOL__
PRP
_STATS_REQUEST__BODY_CELL_STATS_REQUEST
:;
Protocol__
Prp
CellStatsRequest
*
cell_req
=
stats_req
->
cell_stats_request
;
case
PROTOCOL__
FLEX
_STATS_REQUEST__BODY_CELL_STATS_REQUEST
:;
Protocol__
Flex
CellStatsRequest
*
cell_req
=
stats_req
->
cell_stats_request
;
// UE report config will be blank
report_config
.
nr_ue
=
0
;
report_config
.
ue_report_type
=
NULL
;
...
...
@@ -213,8 +213,8 @@ int enb_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__Progr
report_config
.
cc_report_type
[
i
].
cc_report_flags
=
cell_req
->
flags
;
}
break
;
case
PROTOCOL__
PRP
_STATS_REQUEST__BODY_UE_STATS_REQUEST
:;
Protocol__
Prp
UeStatsRequest
*
ue_req
=
stats_req
->
ue_stats_request
;
case
PROTOCOL__
FLEX
_STATS_REQUEST__BODY_UE_STATS_REQUEST
:;
Protocol__
Flex
UeStatsRequest
*
ue_req
=
stats_req
->
ue_stats_request
;
// Cell report config will be blank
report_config
.
nr_cc
=
0
;
report_config
.
cc_report_type
=
NULL
;
...
...
@@ -237,7 +237,7 @@ int enb_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__Progr
}
if
(
enb_agent_mac_stats_reply
(
enb_id
,
xid
,
&
report_config
,
msg
)
<
0
){
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_BUILD
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_BUILD
;
goto
error
;
}
...
...
@@ -254,32 +254,32 @@ int enb_agent_mac_handle_stats(mid_t mod_id, const void *params, Protocol__Progr
int
enb_agent_mac_stats_request
(
mid_t
mod_id
,
xid_t
xid
,
const
stats_request_config_t
*
report_config
,
Protocol__
Prog
ranMessage
**
msg
)
{
Protocol__
Prp
Header
*
header
;
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
Flex
Header
*
header
;
int
i
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_STATS_REQUEST
,
&
header
)
!=
0
)
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_STATS_REQUEST
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
StatsRequest
*
stats_request_msg
;
stats_request_msg
=
malloc
(
sizeof
(
Protocol__
Prp
StatsRequest
));
Protocol__
Flex
StatsRequest
*
stats_request_msg
;
stats_request_msg
=
malloc
(
sizeof
(
Protocol__
Flex
StatsRequest
));
if
(
stats_request_msg
==
NULL
)
goto
error
;
protocol__
prp
_stats_request__init
(
stats_request_msg
);
protocol__
flex
_stats_request__init
(
stats_request_msg
);
stats_request_msg
->
header
=
header
;
stats_request_msg
->
type
=
report_config
->
report_type
;
stats_request_msg
->
has_type
=
1
;
switch
(
report_config
->
report_type
)
{
case
PROTOCOL__
PRP_STATS_TYPE__PR
ST_COMPLETE_STATS
:
stats_request_msg
->
body_case
=
PROTOCOL__
PRP
_STATS_REQUEST__BODY_COMPLETE_STATS_REQUEST
;
Protocol__
Prp
CompleteStatsRequest
*
complete_stats
;
complete_stats
=
malloc
(
sizeof
(
Protocol__
Prp
CompleteStatsRequest
));
case
PROTOCOL__
FLEX_STATS_TYPE__FL
ST_COMPLETE_STATS
:
stats_request_msg
->
body_case
=
PROTOCOL__
FLEX
_STATS_REQUEST__BODY_COMPLETE_STATS_REQUEST
;
Protocol__
Flex
CompleteStatsRequest
*
complete_stats
;
complete_stats
=
malloc
(
sizeof
(
Protocol__
Flex
CompleteStatsRequest
));
if
(
complete_stats
==
NULL
)
goto
error
;
protocol__
prp
_complete_stats_request__init
(
complete_stats
);
protocol__
flex
_complete_stats_request__init
(
complete_stats
);
complete_stats
->
report_frequency
=
report_config
->
report_frequency
;
complete_stats
->
has_report_frequency
=
1
;
complete_stats
->
sf
=
report_config
->
period
;
...
...
@@ -294,13 +294,13 @@ int enb_agent_mac_stats_request(mid_t mod_id,
}
stats_request_msg
->
complete_stats_request
=
complete_stats
;
break
;
case
PROTOCOL__
PRP_STATS_TYPE__PR
ST_CELL_STATS
:
stats_request_msg
->
body_case
=
PROTOCOL__
PRP
_STATS_REQUEST__BODY_CELL_STATS_REQUEST
;
Protocol__
Prp
CellStatsRequest
*
cell_stats
;
cell_stats
=
malloc
(
sizeof
(
Protocol__
Prp
CellStatsRequest
));
case
PROTOCOL__
FLEX_STATS_TYPE__FL
ST_CELL_STATS
:
stats_request_msg
->
body_case
=
PROTOCOL__
FLEX
_STATS_REQUEST__BODY_CELL_STATS_REQUEST
;
Protocol__
Flex
CellStatsRequest
*
cell_stats
;
cell_stats
=
malloc
(
sizeof
(
Protocol__
Flex
CellStatsRequest
));
if
(
cell_stats
==
NULL
)
goto
error
;
protocol__
prp
_cell_stats_request__init
(
cell_stats
);
protocol__
flex
_cell_stats_request__init
(
cell_stats
);
cell_stats
->
n_cell
=
report_config
->
config
->
nr_cc
;
cell_stats
->
has_flags
=
1
;
if
(
cell_stats
->
n_cell
>
0
)
{
...
...
@@ -314,13 +314,13 @@ int enb_agent_mac_stats_request(mid_t mod_id,
}
stats_request_msg
->
cell_stats_request
=
cell_stats
;
break
;
case
PROTOCOL__
PRP_STATS_TYPE__PR
ST_UE_STATS
:
stats_request_msg
->
body_case
=
PROTOCOL__
PRP
_STATS_REQUEST__BODY_UE_STATS_REQUEST
;
Protocol__
Prp
UeStatsRequest
*
ue_stats
;
ue_stats
=
malloc
(
sizeof
(
Protocol__
Prp
UeStatsRequest
));
case
PROTOCOL__
FLEX_STATS_TYPE__FL
ST_UE_STATS
:
stats_request_msg
->
body_case
=
PROTOCOL__
FLEX
_STATS_REQUEST__BODY_UE_STATS_REQUEST
;
Protocol__
Flex
UeStatsRequest
*
ue_stats
;
ue_stats
=
malloc
(
sizeof
(
Protocol__
Flex
UeStatsRequest
));
if
(
ue_stats
==
NULL
)
goto
error
;
protocol__
prp
_ue_stats_request__init
(
ue_stats
);
protocol__
flex
_ue_stats_request__init
(
ue_stats
);
ue_stats
->
n_rnti
=
report_config
->
config
->
nr_ue
;
ue_stats
->
has_flags
=
1
;
if
(
ue_stats
->
n_rnti
>
0
)
{
...
...
@@ -337,12 +337,12 @@ int enb_agent_mac_stats_request(mid_t mod_id,
default:
goto
error
;
}
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_STATS_REQUEST_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__INITIATING_MESSAGE
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_STATS_REQUEST_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
stats_request_msg
=
stats_request_msg
;
return
0
;
...
...
@@ -358,14 +358,14 @@ int enb_agent_mac_stats_request(mid_t mod_id,
return
-
1
;
}
int
enb_agent_mac_destroy_stats_request
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_STATS_REQUEST_MSG
)
int
enb_agent_mac_destroy_stats_request
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_STATS_REQUEST_MSG
)
goto
error
;
free
(
msg
->
stats_request_msg
->
header
);
if
(
msg
->
stats_request_msg
->
body_case
==
PROTOCOL__
PRP
_STATS_REQUEST__BODY_CELL_STATS_REQUEST
)
{
if
(
msg
->
stats_request_msg
->
body_case
==
PROTOCOL__
FLEX
_STATS_REQUEST__BODY_CELL_STATS_REQUEST
)
{
free
(
msg
->
stats_request_msg
->
cell_stats_request
->
cell
);
}
if
(
msg
->
stats_request_msg
->
body_case
==
PROTOCOL__
PRP
_STATS_REQUEST__BODY_UE_STATS_REQUEST
)
{
if
(
msg
->
stats_request_msg
->
body_case
==
PROTOCOL__
FLEX
_STATS_REQUEST__BODY_UE_STATS_REQUEST
)
{
free
(
msg
->
stats_request_msg
->
ue_stats_request
->
rnti
);
}
free
(
msg
->
stats_request_msg
);
...
...
@@ -380,8 +380,8 @@ int enb_agent_mac_destroy_stats_request(Protocol__ProgranMessage *msg) {
int
enb_agent_mac_stats_reply
(
mid_t
mod_id
,
xid_t
xid
,
const
report_config_t
*
report_config
,
Protocol__
Prog
ranMessage
**
msg
)
{
Protocol__
Prp
Header
*
header
;
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
Flex
Header
*
header
;
int
i
,
j
,
k
;
int
cc_id
=
0
;
int
enb_id
=
mod_id
;
...
...
@@ -389,31 +389,31 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
//UE_list_t *eNB_UE_list= &eNB->UE_list;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_STATS_REPLY
,
&
header
)
!=
0
)
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_STATS_REPLY
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
StatsReply
*
stats_reply_msg
;
stats_reply_msg
=
malloc
(
sizeof
(
Protocol__
Prp
StatsReply
));
Protocol__
Flex
StatsReply
*
stats_reply_msg
;
stats_reply_msg
=
malloc
(
sizeof
(
Protocol__
Flex
StatsReply
));
if
(
stats_reply_msg
==
NULL
)
goto
error
;
protocol__
prp
_stats_reply__init
(
stats_reply_msg
);
protocol__
flex
_stats_reply__init
(
stats_reply_msg
);
stats_reply_msg
->
header
=
header
;
stats_reply_msg
->
n_ue_report
=
report_config
->
nr_ue
;
stats_reply_msg
->
n_cell_report
=
report_config
->
nr_cc
;
Protocol__
Prp
UeStatsReport
**
ue_report
;
Protocol__
Prp
CellStatsReport
**
cell_report
;
Protocol__
Flex
UeStatsReport
**
ue_report
;
Protocol__
Flex
CellStatsReport
**
cell_report
;
/* Allocate memory for list of UE reports */
if
(
report_config
->
nr_ue
>
0
)
{
ue_report
=
malloc
(
sizeof
(
Protocol__
Prp
UeStatsReport
*
)
*
report_config
->
nr_ue
);
ue_report
=
malloc
(
sizeof
(
Protocol__
Flex
UeStatsReport
*
)
*
report_config
->
nr_ue
);
if
(
ue_report
==
NULL
)
goto
error
;
for
(
i
=
0
;
i
<
report_config
->
nr_ue
;
i
++
)
{
ue_report
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
UeStatsReport
));
protocol__
prp
_ue_stats_report__init
(
ue_report
[
i
]);
ue_report
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
UeStatsReport
));
protocol__
flex
_ue_stats_report__init
(
ue_report
[
i
]);
ue_report
[
i
]
->
rnti
=
report_config
->
ue_report_type
[
i
].
ue_rnti
;
ue_report
[
i
]
->
has_rnti
=
1
;
ue_report
[
i
]
->
flags
=
report_config
->
ue_report_type
[
i
].
ue_report_flags
;
...
...
@@ -421,9 +421,9 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
/* Check the types of reports that need to be constructed based on flag values */
/* Check flag for creation of buffer status report */
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_BSR
)
{
//TODO: Create a report for each LCG (4 elements). See
prp
_ue_stats_report of
//
prog
RAN specifications for more details
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_BSR
)
{
//TODO: Create a report for each LCG (4 elements). See
flex
_ue_stats_report of
//
Flex
RAN specifications for more details
ue_report
[
i
]
->
n_bsr
=
4
;
uint32_t
*
elem
;
elem
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
ue_report
[
i
]
->
n_bsr
);
...
...
@@ -438,28 +438,28 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
}
/* Check flag for creation of PRH report */
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_PRH
)
{
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_PRH
)
{
// TODO: Fill in the actual power headroom value for the RNTI
ue_report
[
i
]
->
phr
=
get_ue_phr
(
enb_id
,
i
);
// eNB_UE_list->UE_template[UE_PCCID(enb_id,i)][i].phr_info;
ue_report
[
i
]
->
has_phr
=
1
;
}
/* Check flag for creation of RLC buffer status report */
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_RLC_BS
)
{
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_RLC_BS
)
{
// TODO: Fill in the actual RLC buffer status reports
ue_report
[
i
]
->
n_rlc_report
=
3
;
// Set this to the number of LCs for this UE
Protocol__
Prp
RlcBsr
**
rlc_reports
;
rlc_reports
=
malloc
(
sizeof
(
Protocol__
Prp
RlcBsr
*
)
*
ue_report
[
i
]
->
n_rlc_report
);
Protocol__
Flex
RlcBsr
**
rlc_reports
;
rlc_reports
=
malloc
(
sizeof
(
Protocol__
Flex
RlcBsr
*
)
*
ue_report
[
i
]
->
n_rlc_report
);
if
(
rlc_reports
==
NULL
)
goto
error
;
// Fill the buffer status report for each logical channel of the UE
// NN: see LAYER2/openair2_proc.c for rlc status
for
(
j
=
0
;
j
<
ue_report
[
i
]
->
n_rlc_report
;
j
++
)
{
rlc_reports
[
j
]
=
malloc
(
sizeof
(
Protocol__
Prp
RlcBsr
));
rlc_reports
[
j
]
=
malloc
(
sizeof
(
Protocol__
Flex
RlcBsr
));
if
(
rlc_reports
[
j
]
==
NULL
)
goto
error
;
protocol__
prp
_rlc_bsr__init
(
rlc_reports
[
j
]);
protocol__
flex
_rlc_bsr__init
(
rlc_reports
[
j
]);
//TODO:Set logical channel id
rlc_reports
[
j
]
->
lc_id
=
j
+
1
;
rlc_reports
[
j
]
->
has_lc_id
=
1
;
...
...
@@ -485,38 +485,38 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
}
/* Check flag for creation of MAC CE buffer status report */
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_MAC_CE_BS
)
{
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_MAC_CE_BS
)
{
// TODO: Fill in the actual MAC CE buffer status report
ue_report
[
i
]
->
pending_mac_ces
=
(
get_MAC_CE_bitmap_TA
(
enb_id
,
i
,
0
)
|
(
0
<<
1
)
|
(
0
<<
2
)
|
(
0
<<
3
))
&
15
;
/* Use as bitmap. Set one or more of the; /* Use as bitmap. Set one or more of the
PROTOCOL__
PRP_CE_TYPE__PR
PCET_ values
PROTOCOL__
FLEX_CE_TYPE__FL
PCET_ values
found in stats_common.pb-c.h. See
prp_ce_type in prog
RAN specification */
flex_ce_type in Flex
RAN specification */
ue_report
[
i
]
->
has_pending_mac_ces
=
1
;
}
/* Check flag for creation of DL CQI report */
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_DL_CQI
)
{
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_DL_CQI
)
{
// TODO: Fill in the actual DL CQI report for the UE based on its configuration
Protocol__
Prp
DlCqiReport
*
dl_report
;
dl_report
=
malloc
(
sizeof
(
Protocol__
Prp
DlCqiReport
));
Protocol__
Flex
DlCqiReport
*
dl_report
;
dl_report
=
malloc
(
sizeof
(
Protocol__
Flex
DlCqiReport
));
if
(
dl_report
==
NULL
)
goto
error
;
protocol__
prp
_dl_cqi_report__init
(
dl_report
);
protocol__
flex
_dl_cqi_report__init
(
dl_report
);
//TODO:Set the SFN and SF of the last report held in the agent.
dl_report
->
sfn_sn
=
get_sfn_sf
(
enb_id
);
dl_report
->
has_sfn_sn
=
1
;
//TODO:Set the number of DL CQI reports for this UE. One for each CC
dl_report
->
n_csi_report
=
get_active_CC
(
enb_id
,
i
);
//TODO:Create the actual CSI reports.
Protocol__
Prp
DlCsi
**
csi_reports
;
csi_reports
=
malloc
(
sizeof
(
Protocol__
Prp
DlCsi
*
)
*
dl_report
->
n_csi_report
);
Protocol__
Flex
DlCsi
**
csi_reports
;
csi_reports
=
malloc
(
sizeof
(
Protocol__
Flex
DlCsi
*
)
*
dl_report
->
n_csi_report
);
if
(
csi_reports
==
NULL
)
goto
error
;
for
(
j
=
0
;
j
<
dl_report
->
n_csi_report
;
j
++
)
{
csi_reports
[
j
]
=
malloc
(
sizeof
(
Protocol__
Prp
DlCsi
));
csi_reports
[
j
]
=
malloc
(
sizeof
(
Protocol__
Flex
DlCsi
));
if
(
csi_reports
[
j
]
==
NULL
)
goto
error
;
protocol__
prp
_dl_csi__init
(
csi_reports
[
j
]);
protocol__
flex
_dl_csi__init
(
csi_reports
[
j
]);
//TODO: the servCellIndex for this report
csi_reports
[
j
]
->
serv_cell_index
=
j
;
csi_reports
[
j
]
->
has_serv_cell_index
=
1
;
...
...
@@ -526,16 +526,16 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
//TODO: the type of CSI report based on the configuration of the UE
//For this example we use type P10, which only needs a wideband value
//The full set of types can be found in stats_common.pb-c.h and
//in the
prog
RAN specifications
csi_reports
[
j
]
->
type
=
PROTOCOL__
PRP_CSI_TYPE__PR
CSIT_P10
;
//in the
Flex
RAN specifications
csi_reports
[
j
]
->
type
=
PROTOCOL__
FLEX_CSI_TYPE__FL
CSIT_P10
;
csi_reports
[
j
]
->
has_type
=
1
;
csi_reports
[
j
]
->
report_case
=
PROTOCOL__
PRP
_DL_CSI__REPORT_P10CSI
;
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_P10CSI
){
Protocol__
Prp
CsiP10
*
csi10
;
csi10
=
malloc
(
sizeof
(
Protocol__
Prp
CsiP10
));
csi_reports
[
j
]
->
report_case
=
PROTOCOL__
FLEX
_DL_CSI__REPORT_P10CSI
;
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_P10CSI
){
Protocol__
Flex
CsiP10
*
csi10
;
csi10
=
malloc
(
sizeof
(
Protocol__
Flex
CsiP10
));
if
(
csi10
==
NULL
)
goto
error
;
protocol__
prp
_csi_p10__init
(
csi10
);
protocol__
flex
_csi_p10__init
(
csi10
);
//TODO: set the wideband value
// NN: this is also depends on cc_id
csi10
->
wb_cqi
=
get_ue_wcqi
(
enb_id
,
i
);
//eNB_UE_list->eNB_UE_stats[UE_PCCID(enb_id,i)][i].dl_cqi;
...
...
@@ -543,28 +543,28 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
//Add the type of measurements to the csi report in the proper union type
csi_reports
[
j
]
->
p10csi
=
csi10
;
}
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_P11CSI
){
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_P11CSI
){
}
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_P20CSI
){
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_P20CSI
){
}
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_P21CSI
){
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_P21CSI
){
}
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_A12CSI
){
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_A12CSI
){
}
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_A22CSI
){
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_A22CSI
){
}
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_A20CSI
){
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_A20CSI
){
}
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_A30CSI
){
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_A30CSI
){
}
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
PRP
_DL_CSI__REPORT_A31CSI
){
else
if
(
csi_reports
[
j
]
->
report_case
==
PROTOCOL__
FLEX
_DL_CSI__REPORT_A31CSI
){
}
}
...
...
@@ -575,26 +575,26 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
}
/* Check flag for creation of paging buffer status report */
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_PBS
)
{
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_PBS
)
{
//TODO: Fill in the actual paging buffer status report. For this field to be valid, the RNTI
//set in the report must be a P-RNTI
Protocol__
Prp
PagingBufferReport
*
paging_report
;
paging_report
=
malloc
(
sizeof
(
Protocol__
Prp
PagingBufferReport
));
Protocol__
Flex
PagingBufferReport
*
paging_report
;
paging_report
=
malloc
(
sizeof
(
Protocol__
Flex
PagingBufferReport
));
if
(
paging_report
==
NULL
)
goto
error
;
protocol__
prp
_paging_buffer_report__init
(
paging_report
);
protocol__
flex
_paging_buffer_report__init
(
paging_report
);
//Set the number of pending paging messages
paging_report
->
n_paging_info
=
1
;
//Provide a report for each pending paging message
Protocol__
Prp
PagingInfo
**
p_info
;
p_info
=
malloc
(
sizeof
(
Protocol__
Prp
PagingInfo
*
)
*
paging_report
->
n_paging_info
);
Protocol__
Flex
PagingInfo
**
p_info
;
p_info
=
malloc
(
sizeof
(
Protocol__
Flex
PagingInfo
*
)
*
paging_report
->
n_paging_info
);
if
(
p_info
==
NULL
)
goto
error
;
for
(
j
=
0
;
j
<
paging_report
->
n_paging_info
;
j
++
)
{
p_info
[
j
]
=
malloc
(
sizeof
(
Protocol__
Prp
PagingInfo
));
p_info
[
j
]
=
malloc
(
sizeof
(
Protocol__
Flex
PagingInfo
));
if
(
p_info
[
j
]
==
NULL
)
goto
error
;
protocol__
prp
_paging_info__init
(
p_info
[
j
]);
protocol__
flex
_paging_info__init
(
p_info
[
j
]);
//TODO: Set paging index. This index is the same that will be used for the scheduling of the
//paging message by the controller
p_info
[
j
]
->
paging_index
=
10
;
...
...
@@ -616,35 +616,35 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
}
/* Check flag for creation of UL CQI report */
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_UL_CQI
)
{
if
(
report_config
->
ue_report_type
[
i
].
ue_report_flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_UL_CQI
)
{
//Fill in the full UL CQI report of the UE
Protocol__
Prp
UlCqiReport
*
full_ul_report
;
full_ul_report
=
malloc
(
sizeof
(
Protocol__
Prp
UlCqiReport
));
Protocol__
Flex
UlCqiReport
*
full_ul_report
;
full_ul_report
=
malloc
(
sizeof
(
Protocol__
Flex
UlCqiReport
));
if
(
full_ul_report
==
NULL
)
goto
error
;
protocol__
prp
_ul_cqi_report__init
(
full_ul_report
);
protocol__
flex
_ul_cqi_report__init
(
full_ul_report
);
//TODO:Set the SFN and SF of the generated report
full_ul_report
->
sfn_sn
=
get_sfn_sf
(
enb_id
);
full_ul_report
->
has_sfn_sn
=
1
;
//TODO:Set the number of UL measurement reports based on the types of measurements
//configured for this UE and on the servCellIndex
full_ul_report
->
n_cqi_meas
=
1
;
Protocol__
Prp
UlCqi
**
ul_report
;
ul_report
=
malloc
(
sizeof
(
Protocol__
Prp
UlCqi
*
)
*
full_ul_report
->
n_cqi_meas
);
Protocol__
Flex
UlCqi
**
ul_report
;
ul_report
=
malloc
(
sizeof
(
Protocol__
Flex
UlCqi
*
)
*
full_ul_report
->
n_cqi_meas
);
if
(
ul_report
==
NULL
)
goto
error
;
//Fill each UL report of the UE for each of the configured report types
for
(
j
=
0
;
j
<
full_ul_report
->
n_cqi_meas
;
j
++
)
{
ul_report
[
j
]
=
malloc
(
sizeof
(
Protocol__
Prp
UlCqi
));
ul_report
[
j
]
=
malloc
(
sizeof
(
Protocol__
Flex
UlCqi
));
if
(
ul_report
[
j
]
==
NULL
)
goto
error
;
protocol__
prp
_ul_cqi__init
(
ul_report
[
j
]);
protocol__
flex
_ul_cqi__init
(
ul_report
[
j
]);
//TODO: Set the type of the UL report. As an example set it to SRS UL report
// See enum
prp_ul_cqi_type in prog
RAN specification for more details
ul_report
[
j
]
->
type
=
PROTOCOL__
PRP_UL_CQI_TYPE__PR
UCT_SRS
;
// See enum
flex_ul_cqi_type in Flex
RAN specification for more details
ul_report
[
j
]
->
type
=
PROTOCOL__
FLEX_UL_CQI_TYPE__FL
UCT_SRS
;
ul_report
[
j
]
->
has_type
=
1
;
//TODO:Set the number of SINR measurements based on the report type
//See struct
prp_ul_cqi in prog
RAN specification for more details
//See struct
flex_ul_cqi in Flex
RAN specification for more details
ul_report
[
j
]
->
n_sinr
=
100
;
uint32_t
*
sinr_meas
;
sinr_meas
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
ul_report
[
j
]
->
n_sinr
);
...
...
@@ -663,11 +663,11 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
full_ul_report
->
cqi_meas
=
ul_report
;
full_ul_report
->
n_pucch_dbm
=
MAX_NUM_CCs
;
full_ul_report
->
pucch_dbm
=
malloc
(
sizeof
(
Protocol__
Prp
PucchDbm
*
)
*
full_ul_report
->
n_pucch_dbm
);
full_ul_report
->
pucch_dbm
=
malloc
(
sizeof
(
Protocol__
Flex
PucchDbm
*
)
*
full_ul_report
->
n_pucch_dbm
);
for
(
j
=
0
;
j
<
MAX_NUM_CCs
;
j
++
)
{
full_ul_report
->
pucch_dbm
[
j
]
=
malloc
(
sizeof
(
Protocol__
Prp
PucchDbm
));
protocol__
prp
_pucch_dbm__init
(
full_ul_report
->
pucch_dbm
[
j
]);
full_ul_report
->
pucch_dbm
[
j
]
=
malloc
(
sizeof
(
Protocol__
Flex
PucchDbm
));
protocol__
flex
_pucch_dbm__init
(
full_ul_report
->
pucch_dbm
[
j
]);
full_ul_report
->
pucch_dbm
[
j
]
->
has_serv_cell_index
=
1
;
full_ul_report
->
pucch_dbm
[
j
]
->
serv_cell_index
=
j
;
if
(
get_p0_pucch_dbm
(
enb_id
,
i
,
j
)
!=
-
1
){
...
...
@@ -687,28 +687,28 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
/* Allocate memory for list of cell reports */
if
(
report_config
->
nr_cc
>
0
)
{
cell_report
=
malloc
(
sizeof
(
Protocol__
Prp
CellStatsReport
*
)
*
report_config
->
nr_cc
);
cell_report
=
malloc
(
sizeof
(
Protocol__
Flex
CellStatsReport
*
)
*
report_config
->
nr_cc
);
if
(
cell_report
==
NULL
)
goto
error
;
// Fill in the Cell reports
for
(
i
=
0
;
i
<
report_config
->
nr_cc
;
i
++
)
{
cell_report
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
CellStatsReport
));
cell_report
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
CellStatsReport
));
if
(
cell_report
[
i
]
==
NULL
)
goto
error
;
protocol__
prp
_cell_stats_report__init
(
cell_report
[
i
]);
protocol__
flex
_cell_stats_report__init
(
cell_report
[
i
]);
cell_report
[
i
]
->
carrier_index
=
report_config
->
cc_report_type
[
i
].
cc_id
;
cell_report
[
i
]
->
has_carrier_index
=
1
;
cell_report
[
i
]
->
flags
=
report_config
->
cc_report_type
[
i
].
cc_report_flags
;
cell_report
[
i
]
->
has_flags
=
1
;
/* Check flag for creation of noise and interference report */
if
(
report_config
->
cc_report_type
[
i
].
cc_report_flags
&
PROTOCOL__
PRP_CELL_STATS_TYPE__PR
CST_NOISE_INTERFERENCE
)
{
if
(
report_config
->
cc_report_type
[
i
].
cc_report_flags
&
PROTOCOL__
FLEX_CELL_STATS_TYPE__FL
CST_NOISE_INTERFERENCE
)
{
// TODO: Fill in the actual noise and interference report for this cell
Protocol__
Prp
NoiseInterferenceReport
*
ni_report
;
ni_report
=
malloc
(
sizeof
(
Protocol__
Prp
NoiseInterferenceReport
));
Protocol__
Flex
NoiseInterferenceReport
*
ni_report
;
ni_report
=
malloc
(
sizeof
(
Protocol__
Flex
NoiseInterferenceReport
));
if
(
ni_report
==
NULL
)
goto
error
;
protocol__
prp
_noise_interference_report__init
(
ni_report
);
protocol__
flex
_noise_interference_report__init
(
ni_report
);
// Current frame and subframe number
ni_report
->
sfn_sf
=
get_sfn_sf
(
enb_id
);
ni_report
->
has_sfn_sf
=
1
;
...
...
@@ -728,12 +728,12 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
stats_reply_msg
->
cell_report
=
cell_report
;
}
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_STATS_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_STATS_REPLY_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
(
*
msg
)
->
stats_reply_msg
=
stats_reply_msg
;
return
0
;
...
...
@@ -749,17 +749,17 @@ int enb_agent_mac_stats_reply(mid_t mod_id,
return
-
1
;
}
int
enb_agent_mac_destroy_stats_reply
(
Protocol__
Prog
ranMessage
*
msg
)
{
int
enb_agent_mac_destroy_stats_reply
(
Protocol__
Flex
ranMessage
*
msg
)
{
//TODO: Need to deallocate memory for the stats reply message
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_STATS_REPLY_MSG
)
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_STATS_REPLY_MSG
)
goto
error
;
free
(
msg
->
stats_reply_msg
->
header
);
int
i
,
j
,
k
;
Protocol__
Prp
StatsReply
*
reply
=
msg
->
stats_reply_msg
;
Protocol__
Prp
DlCqiReport
*
dl_report
;
Protocol__
Prp
UlCqiReport
*
ul_report
;
Protocol__
Prp
PagingBufferReport
*
paging_report
;
Protocol__
Flex
StatsReply
*
reply
=
msg
->
stats_reply_msg
;
Protocol__
Flex
DlCqiReport
*
dl_report
;
Protocol__
Flex
UlCqiReport
*
ul_report
;
Protocol__
Flex
PagingBufferReport
*
paging_report
;
// Free the memory for the UE reports
for
(
i
=
0
;
i
<
reply
->
n_ue_report
;
i
++
)
{
...
...
@@ -769,47 +769,47 @@ int enb_agent_mac_destroy_stats_reply(Protocol__ProgranMessage *msg) {
}
free
(
reply
->
ue_report
[
i
]
->
rlc_report
);
// If DL CQI report flag was set
if
(
reply
->
ue_report
[
i
]
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_DL_CQI
)
{
if
(
reply
->
ue_report
[
i
]
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_DL_CQI
)
{
dl_report
=
reply
->
ue_report
[
i
]
->
dl_cqi_report
;
// Delete all CSI reports
for
(
j
=
0
;
j
<
dl_report
->
n_csi_report
;
j
++
)
{
//Must free memory based on the type of report
switch
(
dl_report
->
csi_report
[
j
]
->
report_case
)
{
case
PROTOCOL__
PRP
_DL_CSI__REPORT_P10CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_P10CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
p10csi
);
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_P11CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_P11CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
p11csi
->
wb_cqi
);
free
(
dl_report
->
csi_report
[
j
]
->
p11csi
);
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_P20CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_P20CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
p20csi
);
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_P21CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_P21CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
p21csi
->
wb_cqi
);
free
(
dl_report
->
csi_report
[
j
]
->
p21csi
->
sb_cqi
);
free
(
dl_report
->
csi_report
[
j
]
->
p21csi
);
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A12CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A12CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
a12csi
->
wb_cqi
);
free
(
dl_report
->
csi_report
[
j
]
->
a12csi
->
sb_pmi
);
free
(
dl_report
->
csi_report
[
j
]
->
a12csi
);
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A22CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A22CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
a22csi
->
wb_cqi
);
free
(
dl_report
->
csi_report
[
j
]
->
a22csi
->
sb_cqi
);
free
(
dl_report
->
csi_report
[
j
]
->
a22csi
->
sb_list
);
free
(
dl_report
->
csi_report
[
j
]
->
a22csi
);
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A20CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A20CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
a20csi
->
sb_list
);
free
(
dl_report
->
csi_report
[
j
]
->
a20csi
);
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A30CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A30CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
a30csi
->
sb_cqi
);
free
(
dl_report
->
csi_report
[
j
]
->
a30csi
);
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A31CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A31CSI
:
free
(
dl_report
->
csi_report
[
j
]
->
a31csi
->
wb_cqi
);
for
(
k
=
0
;
k
<
dl_report
->
csi_report
[
j
]
->
a31csi
->
n_sb_cqi
;
k
++
)
{
free
(
dl_report
->
csi_report
[
j
]
->
a31csi
->
sb_cqi
[
k
]);
...
...
@@ -824,7 +824,7 @@ int enb_agent_mac_destroy_stats_reply(Protocol__ProgranMessage *msg) {
free
(
dl_report
);
}
// If Paging buffer report flag was set
if
(
reply
->
ue_report
[
i
]
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_PBS
)
{
if
(
reply
->
ue_report
[
i
]
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_PBS
)
{
paging_report
=
reply
->
ue_report
[
i
]
->
pbr
;
// Delete all paging buffer reports
for
(
j
=
0
;
j
<
paging_report
->
n_paging_info
;
j
++
)
{
...
...
@@ -834,7 +834,7 @@ int enb_agent_mac_destroy_stats_reply(Protocol__ProgranMessage *msg) {
free
(
paging_report
);
}
// If UL CQI report flag was set
if
(
reply
->
ue_report
[
i
]
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_UL_CQI
)
{
if
(
reply
->
ue_report
[
i
]
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_UL_CQI
)
{
ul_report
=
reply
->
ue_report
[
i
]
->
ul_cqi_report
;
for
(
j
=
0
;
j
<
ul_report
->
n_cqi_meas
;
j
++
)
{
free
(
ul_report
->
cqi_meas
[
j
]
->
sinr
);
...
...
@@ -866,19 +866,19 @@ int enb_agent_mac_destroy_stats_reply(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_mac_sr_info
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
Protocol__
Prp
Header
*
header
;
int
enb_agent_mac_sr_info
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
Flex
Header
*
header
;
int
i
;
const
int
xid
=
*
((
int
*
)
params
);
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_UL_SR_INFO
,
&
header
)
!=
0
)
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_UL_SR_INFO
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
UlSrInfo
*
ul_sr_info_msg
;
ul_sr_info_msg
=
malloc
(
sizeof
(
Protocol__
Prp
UlSrInfo
));
Protocol__
Flex
UlSrInfo
*
ul_sr_info_msg
;
ul_sr_info_msg
=
malloc
(
sizeof
(
Protocol__
Flex
UlSrInfo
));
if
(
ul_sr_info_msg
==
NULL
)
{
goto
error
;
}
protocol__
prp
_ul_sr_info__init
(
ul_sr_info_msg
);
protocol__
flex
_ul_sr_info__init
(
ul_sr_info_msg
);
ul_sr_info_msg
->
header
=
header
;
ul_sr_info_msg
->
has_sfn_sf
=
1
;
...
...
@@ -895,12 +895,12 @@ int enb_agent_mac_sr_info(mid_t mod_id, const void *params, Protocol__ProgranMes
ul_sr_info_msg
->
rnti
[
i
]
=
1
;
}
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_UL_SR_INFO_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__INITIATING_MESSAGE
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UL_SR_INFO_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
ul_sr_info_msg
=
ul_sr_info_msg
;
return
0
;
...
...
@@ -918,8 +918,8 @@ int enb_agent_mac_sr_info(mid_t mod_id, const void *params, Protocol__ProgranMes
return
-
1
;
}
int
enb_agent_mac_destroy_sr_info
(
Protocol__
Prog
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_UL_SR_INFO_MSG
)
int
enb_agent_mac_destroy_sr_info
(
Protocol__
Flex
ranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_UL_SR_INFO_MSG
)
goto
error
;
free
(
msg
->
ul_sr_info_msg
->
header
);
...
...
@@ -933,19 +933,19 @@ int enb_agent_mac_destroy_sr_info(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_mac_sf_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
Protocol__
Prp
Header
*
header
;
int
enb_agent_mac_sf_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
Protocol__
Flex
Header
*
header
;
int
i
,
j
;
const
int
xid
=
*
((
int
*
)
params
);
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_SF_TRIGGER
,
&
header
)
!=
0
)
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_SF_TRIGGER
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
SfTrigger
*
sf_trigger_msg
;
sf_trigger_msg
=
malloc
(
sizeof
(
Protocol__
Prp
SfTrigger
));
Protocol__
Flex
SfTrigger
*
sf_trigger_msg
;
sf_trigger_msg
=
malloc
(
sizeof
(
Protocol__
Flex
SfTrigger
));
if
(
sf_trigger_msg
==
NULL
)
{
goto
error
;
}
protocol__
prp
_sf_trigger__init
(
sf_trigger_msg
);
protocol__
flex
_sf_trigger__init
(
sf_trigger_msg
);
frame_t
frame
;
sub_frame_t
subframe
;
...
...
@@ -974,18 +974,18 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
*/
sf_trigger_msg
->
n_dl_info
=
get_num_ues
(
mod_id
);
Protocol__
Prp
DlInfo
**
dl_info
=
NULL
;
Protocol__
Flex
DlInfo
**
dl_info
=
NULL
;
if
(
sf_trigger_msg
->
n_dl_info
>
0
)
{
dl_info
=
malloc
(
sizeof
(
Protocol__
Prp
DlInfo
*
)
*
sf_trigger_msg
->
n_dl_info
);
dl_info
=
malloc
(
sizeof
(
Protocol__
Flex
DlInfo
*
)
*
sf_trigger_msg
->
n_dl_info
);
if
(
dl_info
==
NULL
)
goto
error
;
//Fill the status of the current HARQ process for each UE
for
(
i
=
0
;
i
<
sf_trigger_msg
->
n_dl_info
;
i
++
)
{
dl_info
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
DlInfo
));
dl_info
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
DlInfo
));
if
(
dl_info
[
i
]
==
NULL
)
goto
error
;
protocol__
prp
_dl_info__init
(
dl_info
[
i
]);
protocol__
flex
_dl_info__init
(
dl_info
[
i
]);
dl_info
[
i
]
->
rnti
=
get_ue_crnti
(
mod_id
,
i
);
dl_info
[
i
]
->
has_rnti
=
1
;
/*TODO: fill in the right id of this round's HARQ process for this UE*/
...
...
@@ -1000,9 +1000,9 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
for
(
j
=
0
;
j
<
dl_info
[
i
]
->
n_harq_status
;
j
++
)
{
// TODO: This should be different per TB
if
(
harq_status
==
0
)
dl_info
[
i
]
->
harq_status
[
j
]
=
PROTOCOL__
PRP_HARQ_STATUS__PR
HS_ACK
;
dl_info
[
i
]
->
harq_status
[
j
]
=
PROTOCOL__
FLEX_HARQ_STATUS__FL
HS_ACK
;
else
if
(
harq_status
==
1
)
dl_info
[
i
]
->
harq_status
[
j
]
=
PROTOCOL__
PRP_HARQ_STATUS__PR
HS_NACK
;
dl_info
[
i
]
->
harq_status
[
j
]
=
PROTOCOL__
FLEX_HARQ_STATUS__FL
HS_NACK
;
}
/*TODO: fill in the serving cell index for this UE */
dl_info
[
i
]
->
serv_cell_index
=
UE_PCCID
(
mod_id
,
i
);
...
...
@@ -1017,18 +1017,18 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
*/
sf_trigger_msg
->
n_ul_info
=
get_num_ues
(
mod_id
);
Protocol__
Prp
UlInfo
**
ul_info
=
NULL
;
Protocol__
Flex
UlInfo
**
ul_info
=
NULL
;
if
(
sf_trigger_msg
->
n_ul_info
>
0
)
{
ul_info
=
malloc
(
sizeof
(
Protocol__
Prp
UlInfo
*
)
*
sf_trigger_msg
->
n_ul_info
);
ul_info
=
malloc
(
sizeof
(
Protocol__
Flex
UlInfo
*
)
*
sf_trigger_msg
->
n_ul_info
);
if
(
ul_info
==
NULL
)
goto
error
;
//Fill the reception info for each transmitting UE
for
(
i
=
0
;
i
<
sf_trigger_msg
->
n_ul_info
;
i
++
)
{
ul_info
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
UlInfo
));
ul_info
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
UlInfo
));
if
(
ul_info
[
i
]
==
NULL
)
goto
error
;
protocol__
prp
_ul_info__init
(
ul_info
[
i
]);
protocol__
flex
_ul_info__init
(
ul_info
[
i
]);
ul_info
[
i
]
->
rnti
=
get_ue_crnti
(
mod_id
,
i
);
ul_info
[
i
]
->
has_rnti
=
1
;
/*TODO: fill in the Tx power control command for this UE (if available)*/
...
...
@@ -1048,7 +1048,7 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
ul_info
[
i
]
->
ul_reception
[
j
]
=
100
;
}
/*TODO: Fill in the reception status for each UEs data*/
ul_info
[
i
]
->
reception_status
=
PROTOCOL__
PRP_RECEPTION_STATUS__PR
RS_OK
;
ul_info
[
i
]
->
reception_status
=
PROTOCOL__
FLEX_RECEPTION_STATUS__FL
RS_OK
;
ul_info
[
i
]
->
has_reception_status
=
1
;
/*TODO: fill in the serving cell index for this UE */
ul_info
[
i
]
->
serv_cell_index
=
UE_PCCID
(
mod_id
,
i
);
...
...
@@ -1058,12 +1058,12 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
sf_trigger_msg
->
ul_info
=
ul_info
;
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_SF_TRIGGER_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__INITIATING_MESSAGE
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_SF_TRIGGER_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
sf_trigger_msg
=
sf_trigger_msg
;
return
0
;
...
...
@@ -1087,9 +1087,9 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
return
-
1
;
}
int
enb_agent_mac_destroy_sf_trigger
(
Protocol__
Prog
ranMessage
*
msg
)
{
int
enb_agent_mac_destroy_sf_trigger
(
Protocol__
Flex
ranMessage
*
msg
)
{
int
i
;
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_SF_TRIGGER_MSG
)
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_SF_TRIGGER_MSG
)
goto
error
;
free
(
msg
->
sf_trigger_msg
->
header
);
...
...
@@ -1113,30 +1113,30 @@ int enb_agent_mac_destroy_sf_trigger(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_mac_create_empty_dl_config
(
mid_t
mod_id
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_mac_create_empty_dl_config
(
mid_t
mod_id
,
Protocol__
Flex
ranMessage
**
msg
)
{
int
xid
=
0
;
Protocol__
Prp
Header
*
header
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_DL_MAC_CONFIG
,
&
header
)
!=
0
)
Protocol__
Flex
Header
*
header
;
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_DL_MAC_CONFIG
,
&
header
)
!=
0
)
goto
error
;
Protocol__
Prp
DlMacConfig
*
dl_mac_config_msg
;
dl_mac_config_msg
=
malloc
(
sizeof
(
Protocol__
Prp
DlMacConfig
));
Protocol__
Flex
DlMacConfig
*
dl_mac_config_msg
;
dl_mac_config_msg
=
malloc
(
sizeof
(
Protocol__
Flex
DlMacConfig
));
if
(
dl_mac_config_msg
==
NULL
)
{
goto
error
;
}
protocol__
prp
_dl_mac_config__init
(
dl_mac_config_msg
);
protocol__
flex
_dl_mac_config__init
(
dl_mac_config_msg
);
dl_mac_config_msg
->
header
=
header
;
dl_mac_config_msg
->
has_sfn_sf
=
1
;
dl_mac_config_msg
->
sfn_sf
=
get_sfn_sf
(
mod_id
);
*
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
*
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__INITIATING_MESSAGE
;
protocol__
flex
ran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
dl_mac_config_msg
=
dl_mac_config_msg
;
return
0
;
...
...
@@ -1145,12 +1145,12 @@ int enb_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__ProgranMessage
return
-
1
;
}
int
enb_agent_mac_destroy_dl_config
(
Protocol__
Prog
ranMessage
*
msg
)
{
int
enb_agent_mac_destroy_dl_config
(
Protocol__
Flex
ranMessage
*
msg
)
{
int
i
,
j
,
k
;
if
(
msg
->
msg_case
!=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG
)
if
(
msg
->
msg_case
!=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG
)
goto
error
;
Protocol__
Prp
DlDci
*
dl_dci
;
Protocol__
Flex
DlDci
*
dl_dci
;
free
(
msg
->
dl_mac_config_msg
->
header
);
for
(
i
=
0
;
i
<
msg
->
dl_mac_config_msg
->
n_dl_ue_data
;
i
++
)
{
...
...
@@ -1208,7 +1208,7 @@ int enb_agent_mac_destroy_dl_config(Protocol__ProgranMessage *msg) {
return
-
1
;
}
void
enb_agent_get_pending_dl_mac_config
(
mid_t
mod_id
,
Protocol__
Prog
ranMessage
**
msg
)
{
void
enb_agent_get_pending_dl_mac_config
(
mid_t
mod_id
,
Protocol__
Flex
ranMessage
**
msg
)
{
struct
lfds700_misc_prng_state
ls
;
...
...
@@ -1220,11 +1220,11 @@ void enb_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__ProgranMessage
}
}
int
enb_agent_mac_handle_dl_mac_config
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
)
{
int
enb_agent_mac_handle_dl_mac_config
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
)
{
struct
lfds700_misc_prng_state
ls
;
enum
lfds700_misc_flag
overwrite_occurred_flag
;
Protocol__
Prog
ranMessage
*
overwritten_dl_config
;
Protocol__
Flex
ranMessage
*
overwritten_dl_config
;
LFDS700_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE
;
lfds700_misc_prng_init
(
&
ls
);
...
...
@@ -1264,7 +1264,7 @@ void enb_agent_init_mac_agent(mid_t mod_id) {
void
enb_agent_send_sr_info
(
mid_t
mod_id
)
{
int
size
;
Protocol__
Prog
ranMessage
*
msg
;
Protocol__
Flex
ranMessage
*
msg
;
void
*
data
;
int
priority
;
err_code_t
err_code
;
...
...
@@ -1281,7 +1281,7 @@ void enb_agent_send_sr_info(mid_t mod_id) {
data
=
enb_agent_pack_message
(
msg
,
&
size
);
/*Send sr info using the MAC channel of the eNB*/
if
(
enb_agent_msg_send
(
mod_id
,
ENB_AGENT_MAC
,
data
,
size
,
priority
))
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_ENQUEUING
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_ENQUEUING
;
goto
error
;
}
...
...
@@ -1294,7 +1294,7 @@ void enb_agent_send_sr_info(mid_t mod_id) {
void
enb_agent_send_sf_trigger
(
mid_t
mod_id
)
{
int
size
;
Protocol__
Prog
ranMessage
*
msg
;
Protocol__
Flex
ranMessage
*
msg
;
void
*
data
;
int
priority
;
err_code_t
err_code
;
...
...
@@ -1311,7 +1311,7 @@ void enb_agent_send_sf_trigger(mid_t mod_id) {
data
=
enb_agent_pack_message
(
msg
,
&
size
);
/*Send sr info using the MAC channel of the eNB*/
if
(
enb_agent_msg_send
(
mod_id
,
ENB_AGENT_MAC
,
data
,
size
,
priority
))
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_ENQUEUING
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_ENQUEUING
;
goto
error
;
}
...
...
@@ -1324,7 +1324,7 @@ void enb_agent_send_sf_trigger(mid_t mod_id) {
void
enb_agent_send_update_mac_stats
(
mid_t
mod_id
)
{
Protocol__
Prog
ranMessage
*
current_report
=
NULL
,
*
msg
;
Protocol__
Flex
ranMessage
*
current_report
=
NULL
,
*
msg
;
void
*
data
;
int
size
;
err_code_t
err_code
;
...
...
@@ -1352,7 +1352,7 @@ void enb_agent_send_update_mac_stats(mid_t mod_id) {
/* msg = enb_agent_generate_diff_mac_stats_report(current_report, mac_stats_context[mod_id].prev_stats_reply); */
/* /\*Destroy the old stats*\/ */
/* enb_agent_destroy_
prog
ran_message(mac_stats_context[mod_id].prev_stats_reply); */
/* enb_agent_destroy_
flex
ran_message(mac_stats_context[mod_id].prev_stats_reply); */
/* } */
/* /\*Use the current report for future comparissons*\/ */
/* mac_stats_context[mod_id].prev_stats_reply = current_report; */
...
...
@@ -1366,7 +1366,7 @@ void enb_agent_send_update_mac_stats(mid_t mod_id) {
data
=
enb_agent_pack_message
(
current_report
,
&
size
);
/*Send any stats updates using the MAC channel of the eNB*/
if
(
enb_agent_msg_send
(
mod_id
,
ENB_AGENT_MAC
,
data
,
size
,
priority
))
{
err_code
=
PROTOCOL__
PROG
RAN_ERR__MSG_ENQUEUING
;
err_code
=
PROTOCOL__
FLEX
RAN_ERR__MSG_ENQUEUING
;
goto
error
;
}
...
...
@@ -1447,8 +1447,8 @@ err_code_t enb_agent_destroy_cont_mac_stats_update(mid_t mod_id) {
/*Disable the continuous updates for the MAC*/
mac_stats_context
[
mod_id
].
cont_update
=
0
;
mac_stats_context
[
mod_id
].
is_initialized
=
0
;
enb_agent_destroy_
prog
ran_message
(
mac_stats_context
[
mod_id
].
stats_req
);
enb_agent_destroy_
prog
ran_message
(
mac_stats_context
[
mod_id
].
prev_stats_reply
);
enb_agent_destroy_
flex
ran_message
(
mac_stats_context
[
mod_id
].
stats_req
);
enb_agent_destroy_
flex
ran_message
(
mac_stats_context
[
mod_id
].
prev_stats_reply
);
free
(
mac_stats_context
[
mod_id
].
mutex
);
mac_agent_registered
[
mod_id
]
=
NULL
;
...
...
@@ -1463,7 +1463,7 @@ err_code_t enb_agent_enable_cont_mac_stats_update(mid_t mod_id,
goto
error
;
}
Protocol__
Prog
ranMessage
*
req_msg
;
Protocol__
Flex
ranMessage
*
req_msg
;
enb_agent_mac_stats_request
(
mod_id
,
xid
,
stats_req
,
&
req_msg
);
mac_stats_context
[
mod_id
].
stats_req
=
req_msg
;
...
...
@@ -1490,10 +1490,10 @@ err_code_t enb_agent_disable_cont_mac_stats_update(mid_t mod_id) {
mac_stats_context
[
mod_id
].
cont_update
=
0
;
mac_stats_context
[
mod_id
].
xid
=
0
;
if
(
mac_stats_context
[
mod_id
].
stats_req
!=
NULL
)
{
enb_agent_destroy_
prog
ran_message
(
mac_stats_context
[
mod_id
].
stats_req
);
enb_agent_destroy_
flex
ran_message
(
mac_stats_context
[
mod_id
].
stats_req
);
}
if
(
mac_stats_context
[
mod_id
].
prev_stats_reply
!=
NULL
)
{
enb_agent_destroy_
prog
ran_message
(
mac_stats_context
[
mod_id
].
prev_stats_reply
);
enb_agent_destroy_
flex
ran_message
(
mac_stats_context
[
mod_id
].
prev_stats_reply
);
}
if
(
pthread_mutex_unlock
(
mac_stats_context
[
mod_id
].
mutex
))
{
goto
error
;
...
...
openair2/ENB_APP/enb_agent_mac.h
View file @
b2181288
...
...
@@ -29,7 +29,7 @@
/*! \file enb_agent_mac.h
* \brief enb agent message handler APIs for MAC layer
* \author
Navid Nikaein and Xenofon Foukas
* \author
Xenofon Foukas, Mohamed Kassem and Navid Nikaein
* \date 2016
* \version 0.1
*/
...
...
@@ -38,7 +38,7 @@
#define ENB_AGENT_MAC_H_
#include "header.pb-c.h"
#include "
prog
ran.pb-c.h"
#include "
flex
ran.pb-c.h"
#include "stats_messages.pb-c.h"
#include "stats_common.pb-c.h"
...
...
@@ -52,14 +52,14 @@ typedef struct {
uint16_t
ue_rnti
;
uint32_t
ue_report_flags
;
/* Indicates the report elements
required for this UE id. See
Prog
RAN specification 1.2.4.2 */
Flex
RAN specification 1.2.4.2 */
}
ue_report_type_t
;
typedef
struct
{
uint16_t
cc_id
;
uint32_t
cc_report_flags
;
/* Indicates the report elements
required for this CC index. See
Prog
RAN specification 1.2.4.3 */
Flex
RAN specification 1.2.4.3 */
}
cc_report_type_t
;
typedef
struct
{
...
...
@@ -79,29 +79,29 @@ typedef struct stats_request_config_s{
/* Initialization function for the agent structures etc */
void
enb_agent_init_mac_agent
(
mid_t
mod_id
);
int
enb_agent_mac_handle_stats
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_mac_handle_stats
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_mac_stats_request
(
mid_t
mod_id
,
xid_t
xid
,
const
stats_request_config_t
*
report_config
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_mac_stats_request
(
mid_t
mod_id
,
xid_t
xid
,
const
stats_request_config_t
*
report_config
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_mac_destroy_stats_request
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_mac_destroy_stats_request
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_mac_stats_reply
(
mid_t
mod_id
,
xid_t
xid
,
const
report_config_t
*
report_config
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_mac_stats_reply
(
mid_t
mod_id
,
xid_t
xid
,
const
report_config_t
*
report_config
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_mac_destroy_stats_reply
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_mac_destroy_stats_reply
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_mac_sr_info
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_mac_sr_info
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_mac_destroy_sr_info
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_mac_destroy_sr_info
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_mac_sf_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_mac_sf_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_mac_destroy_sf_trigger
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_mac_destroy_sf_trigger
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_mac_create_empty_dl_config
(
mid_t
mod_id
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_mac_create_empty_dl_config
(
mid_t
mod_id
,
Protocol__
Flex
ranMessage
**
msg
);
int
enb_agent_mac_destroy_dl_config
(
Protocol__
Prog
ranMessage
*
msg
);
int
enb_agent_mac_destroy_dl_config
(
Protocol__
Flex
ranMessage
*
msg
);
int
enb_agent_mac_handle_dl_mac_config
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Prog
ranMessage
**
msg
);
int
enb_agent_mac_handle_dl_mac_config
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__
Flex
ranMessage
**
msg
);
/**********************************
...
...
@@ -119,7 +119,7 @@ void enb_agent_send_sf_trigger(mid_t mod_id);
void
enb_agent_send_update_mac_stats
(
mid_t
mod_id
);
/// Provide to the scheduler a pending dl_mac_config message
void
enb_agent_get_pending_dl_mac_config
(
mid_t
mod_id
,
Protocol__
Prog
ranMessage
**
msg
);
void
enb_agent_get_pending_dl_mac_config
(
mid_t
mod_id
,
Protocol__
Flex
ranMessage
**
msg
);
/*Register technology specific interface callbacks*/
int
enb_agent_register_mac_xface
(
mid_t
mod_id
,
AGENT_MAC_xface
*
xface
);
...
...
openair2/ENB_APP/enb_agent_mac_defs.h
View file @
b2181288
...
...
@@ -39,7 +39,7 @@
#define __ENB_AGENT_MAC_PRIMITIVES_H__
#include "enb_agent_defs.h"
#include "
prog
ran.pb-c.h"
#include "
flex
ran.pb-c.h"
#include "header.pb-c.h"
#define RINGBUFFER_SIZE 100
...
...
@@ -60,13 +60,13 @@ typedef struct {
/// Provide to the scheduler a pending dl_mac_config message
void
(
*
enb_agent_get_pending_dl_mac_config
)(
mid_t
mod_id
,
Protocol__
Prog
ranMessage
**
msg
);
Protocol__
Flex
ranMessage
**
msg
);
/// Run the UE DL scheduler and fill the Protocol__
Prog
ranMessage. Assumes that
/// dl_info is already initialized as
prp
_dl_mac_config and fills the
///
prp
_dl_data part of it
/// Run the UE DL scheduler and fill the Protocol__
Flex
ranMessage. Assumes that
/// dl_info is already initialized as
flex
_dl_mac_config and fills the
///
flex
_dl_data part of it
void
(
*
enb_agent_schedule_ue_spec
)(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__
Prog
ranMessage
**
dl_info
);
int
*
mbsfn_flag
,
Protocol__
Flex
ranMessage
**
dl_info
);
/// Notify the controller for a state change of a particular UE, by sending the proper
...
...
openair2/ENB_APP/enb_agent_mac_internal.c
View file @
b2181288
...
...
@@ -39,20 +39,20 @@
#include "enb_agent_mac_internal.h"
Protocol__
ProgranMessage
*
enb_agent_generate_diff_mac_stats_report
(
Protocol__Prog
ranMessage
*
new_message
,
Protocol__
Prog
ranMessage
*
old_message
)
{
Protocol__
FlexranMessage
*
enb_agent_generate_diff_mac_stats_report
(
Protocol__Flex
ranMessage
*
new_message
,
Protocol__
Flex
ranMessage
*
old_message
)
{
int
i
,
j
;
Protocol__
Prp
StatsReply
*
old_report
,
*
new_report
;
Protocol__
Flex
StatsReply
*
old_report
,
*
new_report
;
Protocol__
Prp
StatsReply
*
stats_reply_msg
=
NULL
;
Protocol__
Prog
ranMessage
*
msg
=
NULL
;
Protocol__
Flex
StatsReply
*
stats_reply_msg
=
NULL
;
Protocol__
Flex
ranMessage
*
msg
=
NULL
;
Protocol__
Prp
UeStatsReport
**
ue_report
;
Protocol__
Prp
UeStatsReport
*
tmp_ue_report
[
NUM_MAX_UE
];
Protocol__
Prp
CellStatsReport
**
cell_report
;
Protocol__
Prp
CellStatsReport
*
tmp_cell_report
[
NUM_MAX_UE
];
Protocol__
Flex
UeStatsReport
**
ue_report
;
Protocol__
Flex
UeStatsReport
*
tmp_ue_report
[
NUM_MAX_UE
];
Protocol__
Flex
CellStatsReport
**
cell_report
;
Protocol__
Flex
CellStatsReport
*
tmp_cell_report
[
NUM_MAX_UE
];
old_report
=
old_message
->
stats_reply_msg
;
new_report
=
new_message
->
stats_reply_msg
;
...
...
@@ -113,7 +113,7 @@ Protocol__ProgranMessage * enb_agent_generate_diff_mac_stats_report(Protocol__Pr
/*TODO: create the reply message based on the findings*/
/*Create ue report list*/
if
(
n_ue_report
>
0
)
{
ue_report
=
malloc
(
sizeof
(
Protocol__
Prp
UeStatsReport
*
));
ue_report
=
malloc
(
sizeof
(
Protocol__
Flex
UeStatsReport
*
));
for
(
i
=
0
;
i
<
n_ue_report
;
i
++
)
{
ue_report
[
i
]
=
tmp_ue_report
[
i
];
}
...
...
@@ -121,7 +121,7 @@ Protocol__ProgranMessage * enb_agent_generate_diff_mac_stats_report(Protocol__Pr
/*Create cell report list*/
if
(
n_cell_report
>
0
)
{
cell_report
=
malloc
(
sizeof
(
Protocol__
Prp
CellStatsReport
*
));
cell_report
=
malloc
(
sizeof
(
Protocol__
Flex
CellStatsReport
*
));
for
(
i
=
0
;
i
<
n_cell_report
;
i
++
)
{
cell_report
[
i
]
=
tmp_cell_report
[
i
];
}
...
...
@@ -130,23 +130,23 @@ Protocol__ProgranMessage * enb_agent_generate_diff_mac_stats_report(Protocol__Pr
if
(
n_cell_report
>
0
||
n_ue_report
>
0
)
{
/*Create header*/
int
xid
=
old_report
->
header
->
xid
;
Protocol__
Prp
Header
*
header
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PR
PT_STATS_REPLY
,
&
header
)
!=
0
)
{
Protocol__
Flex
Header
*
header
;
if
(
flex_create_header
(
xid
,
PROTOCOL__FLEX_TYPE__FL
PT_STATS_REPLY
,
&
header
)
!=
0
)
{
goto
error
;
}
stats_reply_msg
=
malloc
(
sizeof
(
Protocol__
Prp
StatsReply
));
protocol__
prp
_stats_reply__init
(
stats_reply_msg
);
stats_reply_msg
=
malloc
(
sizeof
(
Protocol__
Flex
StatsReply
));
protocol__
flex
_stats_reply__init
(
stats_reply_msg
);
stats_reply_msg
->
header
=
header
;
stats_reply_msg
->
n_ue_report
=
n_ue_report
;
stats_reply_msg
->
ue_report
=
ue_report
;
stats_reply_msg
->
n_cell_report
=
n_cell_report
;
stats_reply_msg
->
cell_report
=
cell_report
;
msg
=
malloc
(
sizeof
(
Protocol__
Prog
ranMessage
));
msg
=
malloc
(
sizeof
(
Protocol__
Flex
ranMessage
));
if
(
msg
==
NULL
)
goto
error
;
protocol__
prog
ran_message__init
(
msg
);
msg
->
msg_case
=
PROTOCOL__
PROG
RAN_MESSAGE__MSG_STATS_REPLY_MSG
;
msg
->
msg_dir
=
PROTOCOL__
PROG
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
protocol__
flex
ran_message__init
(
msg
);
msg
->
msg_case
=
PROTOCOL__
FLEX
RAN_MESSAGE__MSG_STATS_REPLY_MSG
;
msg
->
msg_dir
=
PROTOCOL__
FLEX
RAN_DIRECTION__SUCCESSFUL_OUTCOME
;
msg
->
stats_reply_msg
=
stats_reply_msg
;
}
return
msg
;
...
...
@@ -155,28 +155,28 @@ Protocol__ProgranMessage * enb_agent_generate_diff_mac_stats_report(Protocol__Pr
return
NULL
;
}
int
compare_ue_stats_reports
(
Protocol__
Prp
UeStatsReport
*
rep1
,
Protocol__
Prp
UeStatsReport
*
rep2
)
{
int
compare_ue_stats_reports
(
Protocol__
Flex
UeStatsReport
*
rep1
,
Protocol__
Flex
UeStatsReport
*
rep2
)
{
return
1
;
}
int
compare_cell_stats_reports
(
Protocol__
Prp
CellStatsReport
*
rep1
,
Protocol__
Prp
CellStatsReport
*
rep2
)
{
int
compare_cell_stats_reports
(
Protocol__
Flex
CellStatsReport
*
rep1
,
Protocol__
Flex
CellStatsReport
*
rep2
)
{
return
1
;
}
Protocol__
PrpUeStatsReport
*
copy_ue_stats_report
(
Protocol__Prp
UeStatsReport
*
original
)
{
Protocol__
FlexUeStatsReport
*
copy_ue_stats_report
(
Protocol__Flex
UeStatsReport
*
original
)
{
int
i
;
Protocol__
PrpUeStatsReport
*
copy
=
malloc
(
sizeof
(
Protocol__Prp
UeStatsReport
));
Protocol__
FlexUeStatsReport
*
copy
=
malloc
(
sizeof
(
Protocol__Flex
UeStatsReport
));
if
(
copy
==
NULL
)
goto
error
;
protocol__
prp
_ue_stats_report__init
(
copy
);
protocol__
flex
_ue_stats_report__init
(
copy
);
copy
->
rnti
=
original
->
rnti
;
copy
->
has_rnti
=
original
->
has_rnti
;
copy
->
flags
=
original
->
flags
;
copy
->
has_flags
=
original
->
has_flags
;
if
(
copy
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_BSR
)
{
if
(
copy
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_BSR
)
{
copy
->
n_bsr
=
original
->
n_bsr
;
if
(
copy
->
n_bsr
>
0
)
{
uint32_t
*
elem
;
...
...
@@ -190,16 +190,16 @@ Protocol__PrpUeStatsReport * copy_ue_stats_report(Protocol__PrpUeStatsReport * o
}
}
if
(
copy
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_PRH
)
{
if
(
copy
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_PRH
)
{
copy
->
has_phr
=
original
->
has_phr
;
copy
->
phr
=
original
->
phr
;
}
if
(
copy
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_RLC_BS
)
{
if
(
copy
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_RLC_BS
)
{
copy
->
n_rlc_report
=
original
->
n_rlc_report
;
if
(
copy
->
n_rlc_report
>
0
)
{
Protocol__
Prp
RlcBsr
**
rlc_reports
;
rlc_reports
=
malloc
(
sizeof
(
Protocol__
Prp
RlcBsr
)
*
copy
->
n_rlc_report
);
Protocol__
Flex
RlcBsr
**
rlc_reports
;
rlc_reports
=
malloc
(
sizeof
(
Protocol__
Flex
RlcBsr
)
*
copy
->
n_rlc_report
);
if
(
rlc_reports
==
NULL
)
goto
error
;
for
(
i
=
0
;
i
<
copy
->
n_rlc_report
;
i
++
)
{
...
...
@@ -209,22 +209,22 @@ Protocol__PrpUeStatsReport * copy_ue_stats_report(Protocol__PrpUeStatsReport * o
}
}
if
(
copy
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_MAC_CE_BS
)
{
if
(
copy
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_MAC_CE_BS
)
{
copy
->
has_pending_mac_ces
=
original
->
has_pending_mac_ces
;
copy
->
pending_mac_ces
=
original
->
pending_mac_ces
;
}
if
(
copy
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_DL_CQI
)
{
if
(
copy
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_DL_CQI
)
{
copy
->
dl_cqi_report
=
copy_dl_cqi_report
(
original
->
dl_cqi_report
);
}
if
(
copy
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_PBS
)
{
if
(
copy
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_PBS
)
{
/*Copy the Paging Buffer report*/
copy
->
pbr
=
copy_paging_buffer_report
(
original
->
pbr
);
}
if
(
copy
->
flags
&
PROTOCOL__
PRP_UE_STATS_TYPE__PR
UST_UL_CQI
)
{
if
(
copy
->
flags
&
PROTOCOL__
FLEX_UE_STATS_TYPE__FL
UST_UL_CQI
)
{
/*TODO: Copy the UL report*/
copy
->
ul_cqi_report
=
copy_ul_cqi_report
(
original
->
ul_cqi_report
);
}
...
...
@@ -235,11 +235,11 @@ Protocol__PrpUeStatsReport * copy_ue_stats_report(Protocol__PrpUeStatsReport * o
return
NULL
;
}
Protocol__
PrpRlcBsr
*
copy_rlc_report
(
Protocol__Prp
RlcBsr
*
original
)
{
Protocol__
PrpRlcBsr
*
copy
=
malloc
(
sizeof
(
Protocol__Prp
RlcBsr
));
Protocol__
FlexRlcBsr
*
copy_rlc_report
(
Protocol__Flex
RlcBsr
*
original
)
{
Protocol__
FlexRlcBsr
*
copy
=
malloc
(
sizeof
(
Protocol__Flex
RlcBsr
));
if
(
copy
==
NULL
)
goto
error
;
protocol__
prp
_rlc_bsr__init
(
copy
);
protocol__
flex
_rlc_bsr__init
(
copy
);
copy
->
lc_id
=
original
->
lc_id
;
copy
->
has_lc_id
=
original
->
has_lc_id
;
copy
->
tx_queue_size
=
original
->
tx_queue_size
;
...
...
@@ -259,30 +259,30 @@ Protocol__PrpRlcBsr * copy_rlc_report(Protocol__PrpRlcBsr * original) {
return
NULL
;
}
Protocol__
PrpUlCqiReport
*
copy_ul_cqi_report
(
Protocol__Prp
UlCqiReport
*
original
)
{
Protocol__
FlexUlCqiReport
*
copy_ul_cqi_report
(
Protocol__Flex
UlCqiReport
*
original
)
{
int
i
,
j
;
//Fill in the full UL CQI report of the UE
Protocol__
Prp
UlCqiReport
*
full_ul_report
;
full_ul_report
=
malloc
(
sizeof
(
Protocol__
Prp
UlCqiReport
));
Protocol__
Flex
UlCqiReport
*
full_ul_report
;
full_ul_report
=
malloc
(
sizeof
(
Protocol__
Flex
UlCqiReport
));
if
(
full_ul_report
==
NULL
)
{
goto
error
;
}
protocol__
prp
_ul_cqi_report__init
(
full_ul_report
);
protocol__
flex
_ul_cqi_report__init
(
full_ul_report
);
//TODO:Set the SFN and SF of the generated report
full_ul_report
->
sfn_sn
=
original
->
sfn_sn
;
full_ul_report
->
has_sfn_sn
=
original
->
has_sfn_sn
;
full_ul_report
->
n_cqi_meas
=
original
->
n_cqi_meas
;
Protocol__
Prp
UlCqi
**
ul_report
;
ul_report
=
malloc
(
sizeof
(
Protocol__
Prp
UlCqi
*
)
*
full_ul_report
->
n_cqi_meas
);
Protocol__
Flex
UlCqi
**
ul_report
;
ul_report
=
malloc
(
sizeof
(
Protocol__
Flex
UlCqi
*
)
*
full_ul_report
->
n_cqi_meas
);
if
(
ul_report
==
NULL
)
goto
error
;
for
(
i
=
0
;
i
++
;
i
<
full_ul_report
->
n_cqi_meas
)
{
ul_report
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
UlCqi
));
ul_report
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
UlCqi
));
if
(
ul_report
[
i
]
==
NULL
)
goto
error
;
protocol__
prp
_ul_cqi__init
(
ul_report
[
i
]);
protocol__
flex
_ul_cqi__init
(
ul_report
[
i
]);
ul_report
[
i
]
->
type
=
original
->
cqi_meas
[
i
]
->
type
;
ul_report
[
i
]
->
has_type
=
original
->
cqi_meas
[
i
]
->
has_type
;
ul_report
[
i
]
->
n_sinr
=
original
->
cqi_meas
[
i
]
->
n_sinr
;
...
...
@@ -305,21 +305,21 @@ Protocol__PrpUlCqiReport * copy_ul_cqi_report(Protocol__PrpUlCqiReport * origina
return
NULL
;
}
Protocol__
PrpDlCqiReport
*
copy_dl_cqi_report
(
Protocol__Prp
DlCqiReport
*
original
)
{
Protocol__
FlexDlCqiReport
*
copy_dl_cqi_report
(
Protocol__Flex
DlCqiReport
*
original
)
{
int
i
;
/*Copy the DL report*/
Protocol__
Prp
DlCqiReport
*
dl_report
;
dl_report
=
malloc
(
sizeof
(
Protocol__
Prp
DlCqiReport
));
Protocol__
Flex
DlCqiReport
*
dl_report
;
dl_report
=
malloc
(
sizeof
(
Protocol__
Flex
DlCqiReport
));
if
(
dl_report
==
NULL
)
goto
error
;
protocol__
prp
_dl_cqi_report__init
(
dl_report
);
protocol__
flex
_dl_cqi_report__init
(
dl_report
);
dl_report
->
sfn_sn
=
original
->
sfn_sn
;
dl_report
->
has_sfn_sn
=
original
->
has_sfn_sn
;
dl_report
->
n_csi_report
=
original
->
n_csi_report
;
Protocol__
Prp
DlCsi
**
csi_reports
;
csi_reports
=
malloc
(
sizeof
(
Protocol__
Prp
DlCsi
*
)
*
dl_report
->
n_csi_report
);
Protocol__
Flex
DlCsi
**
csi_reports
;
csi_reports
=
malloc
(
sizeof
(
Protocol__
Flex
DlCsi
*
)
*
dl_report
->
n_csi_report
);
if
(
csi_reports
==
NULL
)
goto
error
;
...
...
@@ -334,26 +334,26 @@ Protocol__PrpDlCqiReport * copy_dl_cqi_report(Protocol__PrpDlCqiReport * origina
return
NULL
;
}
Protocol__
PrpPagingBufferReport
*
copy_paging_buffer_report
(
Protocol__Prp
PagingBufferReport
*
original
)
{
Protocol__
FlexPagingBufferReport
*
copy_paging_buffer_report
(
Protocol__Flex
PagingBufferReport
*
original
)
{
int
i
;
Protocol__
Prp
PagingBufferReport
*
copy
;
copy
=
malloc
(
sizeof
(
Protocol__
Prp
PagingBufferReport
));
Protocol__
Flex
PagingBufferReport
*
copy
;
copy
=
malloc
(
sizeof
(
Protocol__
Flex
PagingBufferReport
));
if
(
copy
==
NULL
)
goto
error
;
protocol__
prp
_paging_buffer_report__init
(
copy
);
protocol__
flex
_paging_buffer_report__init
(
copy
);
copy
->
n_paging_info
=
original
->
n_paging_info
;
Protocol__
Prp
PagingInfo
**
p_info
;
p_info
=
malloc
(
sizeof
(
Protocol__
Prp
PagingInfo
*
)
*
copy
->
n_paging_info
);
Protocol__
Flex
PagingInfo
**
p_info
;
p_info
=
malloc
(
sizeof
(
Protocol__
Flex
PagingInfo
*
)
*
copy
->
n_paging_info
);
if
(
p_info
==
NULL
)
goto
error
;
for
(
i
=
0
;
i
<
copy
->
n_paging_info
;
i
++
)
{
p_info
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
PagingInfo
));
p_info
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
PagingInfo
));
if
(
p_info
[
i
]
==
NULL
)
goto
error
;
protocol__
prp
_paging_info__init
(
p_info
[
i
]);
protocol__
flex
_paging_info__init
(
p_info
[
i
]);
p_info
[
i
]
->
paging_index
=
original
->
paging_info
[
i
]
->
paging_index
;
p_info
[
i
]
->
has_paging_index
=
original
->
paging_info
[
i
]
->
has_paging_index
;;
p_info
[
i
]
->
paging_message_size
=
original
->
paging_info
[
i
]
->
paging_message_size
;
...
...
@@ -371,12 +371,12 @@ Protocol__PrpPagingBufferReport * copy_paging_buffer_report(Protocol__PrpPagingB
return
NULL
;
}
Protocol__
PrpDlCsi
*
copy_csi_report
(
Protocol__Prp
DlCsi
*
original
)
{
Protocol__
FlexDlCsi
*
copy_csi_report
(
Protocol__Flex
DlCsi
*
original
)
{
int
i
,
j
;
Protocol__
PrpDlCsi
*
copy
=
malloc
(
sizeof
(
Protocol__Prp
DlCsi
));
Protocol__
FlexDlCsi
*
copy
=
malloc
(
sizeof
(
Protocol__Flex
DlCsi
));
if
(
copy
==
NULL
)
goto
error
;
protocol__
prp
_dl_csi__init
(
copy
);
protocol__
flex
_dl_csi__init
(
copy
);
copy
->
serv_cell_index
=
original
->
serv_cell_index
;
copy
->
has_serv_cell_index
=
original
->
has_serv_cell_index
;
copy
->
ri
=
original
->
ri
;
...
...
@@ -387,11 +387,11 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
report_case
=
original
->
report_case
;
switch
(
copy
->
report_case
)
{
case
PROTOCOL__
PRP
_DL_CSI__REPORT_P10CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_P10CSI
:
copy
->
p10csi
->
wb_cqi
=
original
->
p10csi
->
wb_cqi
;
copy
->
p10csi
->
has_wb_cqi
=
original
->
p10csi
->
has_wb_cqi
;
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_P11CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_P11CSI
:
copy
->
p11csi
->
n_wb_cqi
=
original
->
p11csi
->
n_wb_cqi
;
copy
->
p11csi
->
wb_cqi
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
copy
->
p11csi
->
n_wb_cqi
);
for
(
i
=
0
;
i
<
copy
->
p11csi
->
n_wb_cqi
;
i
++
)
{
...
...
@@ -400,7 +400,7 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
p11csi
->
has_wb_pmi
=
original
->
p11csi
->
has_wb_pmi
;
copy
->
p11csi
->
wb_pmi
=
original
->
p11csi
->
wb_pmi
;
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_P20CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_P20CSI
:
copy
->
p20csi
->
has_wb_cqi
=
original
->
p20csi
->
has_wb_cqi
;
copy
->
p20csi
->
wb_cqi
=
original
->
p20csi
->
wb_cqi
;
copy
->
p20csi
->
has_sb_cqi
=
original
->
p20csi
->
has_sb_cqi
;
...
...
@@ -410,7 +410,7 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
p20csi
->
has_sb_index
=
original
->
p20csi
->
has_sb_index
;
copy
->
p20csi
->
sb_index
=
original
->
p20csi
->
sb_index
;
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_P21CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_P21CSI
:
copy
->
p21csi
->
n_wb_cqi
=
original
->
p21csi
->
n_wb_cqi
;
copy
->
p21csi
->
wb_cqi
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
copy
->
p21csi
->
n_wb_cqi
);
for
(
i
=
0
;
i
<
copy
->
p21csi
->
n_wb_cqi
;
i
++
)
{
...
...
@@ -428,7 +428,7 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
p21csi
->
has_sb_index
=
original
->
p21csi
->
has_sb_index
;
copy
->
p21csi
->
sb_index
=
original
->
p21csi
->
sb_index
;
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A12CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A12CSI
:
copy
->
a12csi
->
n_wb_cqi
=
original
->
a12csi
->
n_wb_cqi
;
copy
->
a12csi
->
wb_cqi
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
copy
->
a12csi
->
n_wb_cqi
);
for
(
i
=
0
;
i
<
copy
->
a12csi
->
n_wb_cqi
;
i
++
)
{
...
...
@@ -440,7 +440,7 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
a12csi
->
sb_pmi
[
i
]
=
original
->
a12csi
->
sb_pmi
[
i
];
}
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A22CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A22CSI
:
copy
->
a22csi
->
n_wb_cqi
=
original
->
a22csi
->
n_wb_cqi
;
copy
->
a22csi
->
wb_cqi
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
copy
->
a22csi
->
n_wb_cqi
);
for
(
i
=
0
;
i
<
copy
->
a22csi
->
n_wb_cqi
;
i
++
)
{
...
...
@@ -461,7 +461,7 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
a22csi
->
sb_list
[
i
]
=
original
->
a22csi
->
sb_list
[
i
];
}
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A20CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A20CSI
:
copy
->
a20csi
->
has_wb_cqi
=
original
->
a20csi
->
has_wb_cqi
;
copy
->
a20csi
->
wb_cqi
=
original
->
a20csi
->
wb_cqi
;
copy
->
a20csi
->
has_sb_cqi
=
original
->
a20csi
->
has_sb_cqi
;
...
...
@@ -472,7 +472,7 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
a20csi
->
sb_list
[
i
]
=
original
->
a20csi
->
sb_list
[
i
];
}
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A30CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A30CSI
:
copy
->
a30csi
->
has_wb_cqi
=
original
->
a30csi
->
has_wb_cqi
;
copy
->
a30csi
->
wb_cqi
=
original
->
a30csi
->
wb_cqi
;
copy
->
a30csi
->
n_sb_cqi
=
original
->
a30csi
->
n_sb_cqi
;
...
...
@@ -481,7 +481,7 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
a30csi
->
sb_cqi
[
i
]
=
original
->
a30csi
->
sb_cqi
[
i
];
}
break
;
case
PROTOCOL__
PRP
_DL_CSI__REPORT_A31CSI
:
case
PROTOCOL__
FLEX
_DL_CSI__REPORT_A31CSI
:
copy
->
a31csi
->
n_wb_cqi
=
original
->
a31csi
->
n_wb_cqi
;
copy
->
a31csi
->
wb_cqi
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
copy
->
a31csi
->
n_wb_cqi
);
for
(
i
=
0
;
i
<
copy
->
a31csi
->
n_wb_cqi
;
i
++
)
{
...
...
@@ -490,16 +490,16 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
copy
->
a31csi
->
has_wb_pmi
=
original
->
a31csi
->
has_wb_pmi
;
copy
->
a31csi
->
wb_pmi
=
original
->
a31csi
->
wb_pmi
;
copy
->
a31csi
->
n_sb_cqi
=
original
->
a31csi
->
n_sb_cqi
;
copy
->
a31csi
->
sb_cqi
=
malloc
(
sizeof
(
Protocol__
Prp
MsbCqi
*
)
*
copy
->
a31csi
->
n_sb_cqi
);
copy
->
a31csi
->
sb_cqi
=
malloc
(
sizeof
(
Protocol__
Flex
MsbCqi
*
)
*
copy
->
a31csi
->
n_sb_cqi
);
if
(
copy
->
a31csi
==
NULL
)
{
goto
error
;
}
for
(
i
=
0
;
i
<
copy
->
a31csi
->
n_sb_cqi
;
i
++
)
{
copy
->
a31csi
->
sb_cqi
[
i
]
=
malloc
(
sizeof
(
Protocol__
Prp
MsbCqi
));
copy
->
a31csi
->
sb_cqi
[
i
]
=
malloc
(
sizeof
(
Protocol__
Flex
MsbCqi
));
if
(
copy
->
a31csi
->
sb_cqi
[
i
]
==
NULL
)
{
goto
error
;
}
protocol__
prp
_msb_cqi__init
(
copy
->
a31csi
->
sb_cqi
[
i
]);
protocol__
flex
_msb_cqi__init
(
copy
->
a31csi
->
sb_cqi
[
i
]);
copy
->
a31csi
->
sb_cqi
[
i
]
->
n_sb_cqi
=
original
->
a31csi
->
sb_cqi
[
i
]
->
n_sb_cqi
;
copy
->
a31csi
->
sb_cqi
[
i
]
->
sb_cqi
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
copy
->
a31csi
->
sb_cqi
[
i
]
->
n_sb_cqi
);
for
(
j
=
0
;
j
<
copy
->
a31csi
->
sb_cqi
[
i
]
->
n_sb_cqi
;
j
++
)
{
...
...
@@ -516,20 +516,20 @@ Protocol__PrpDlCsi * copy_csi_report(Protocol__PrpDlCsi * original) {
return
NULL
;
}
Protocol__
PrpCellStatsReport
*
copy_cell_stats_report
(
Protocol__Prp
CellStatsReport
*
original
)
{
Protocol__
FlexCellStatsReport
*
copy_cell_stats_report
(
Protocol__Flex
CellStatsReport
*
original
)
{
Protocol__
PrpCellStatsReport
*
copy
=
malloc
(
sizeof
(
Protocol__Prp
CellStatsReport
));
Protocol__
FlexCellStatsReport
*
copy
=
malloc
(
sizeof
(
Protocol__Flex
CellStatsReport
));
if
(
copy
==
NULL
)
{
goto
error
;
}
protocol__
prp
_cell_stats_report__init
(
copy
);
protocol__
flex
_cell_stats_report__init
(
copy
);
copy
->
carrier_index
=
original
->
carrier_index
;
copy
->
has_carrier_index
=
original
->
has_carrier_index
;
copy
->
flags
=
original
->
flags
;
copy
->
has_flags
=
original
->
has_flags
;
if
(
copy
->
flags
&
PROTOCOL__
PRP_CELL_STATS_TYPE__PR
CST_NOISE_INTERFERENCE
)
{
if
(
copy
->
flags
&
PROTOCOL__
FLEX_CELL_STATS_TYPE__FL
CST_NOISE_INTERFERENCE
)
{
copy
->
noise_inter_report
=
copy_noise_inter_report
(
original
->
noise_inter_report
);
}
...
...
@@ -539,13 +539,13 @@ Protocol__PrpCellStatsReport * copy_cell_stats_report(Protocol__PrpCellStatsRepo
return
NULL
;
}
Protocol__
PrpNoiseInterferenceReport
*
copy_noise_inter_report
(
Protocol__Prp
NoiseInterferenceReport
*
original
)
{
Protocol__
Prp
NoiseInterferenceReport
*
ni_report
;
ni_report
=
malloc
(
sizeof
(
Protocol__
Prp
NoiseInterferenceReport
));
Protocol__
FlexNoiseInterferenceReport
*
copy_noise_inter_report
(
Protocol__Flex
NoiseInterferenceReport
*
original
)
{
Protocol__
Flex
NoiseInterferenceReport
*
ni_report
;
ni_report
=
malloc
(
sizeof
(
Protocol__
Flex
NoiseInterferenceReport
));
if
(
ni_report
==
NULL
)
{
goto
error
;
}
protocol__
prp
_noise_interference_report__init
(
ni_report
);
protocol__
flex
_noise_interference_report__init
(
ni_report
);
// Current frame and subframe number
ni_report
->
sfn_sf
=
original
->
sfn_sf
;
ni_report
->
has_sfn_sf
=
original
->
sfn_sf
;
...
...
openair2/ENB_APP/enb_agent_mac_internal.h
View file @
b2181288
...
...
@@ -53,8 +53,8 @@ typedef struct {
uint8_t
is_initialized
;
volatile
uint8_t
cont_update
;
xid_t
xid
;
Protocol__
Prog
ranMessage
*
stats_req
;
Protocol__
Prog
ranMessage
*
prev_stats_reply
;
Protocol__
Flex
ranMessage
*
stats_req
;
Protocol__
Flex
ranMessage
*
prev_stats_reply
;
pthread_mutex_t
*
mutex
;
}
mac_stats_updates_context_t
;
...
...
@@ -75,30 +75,30 @@ err_code_t enb_agent_enable_cont_mac_stats_update(mid_t mod_id, xid_t xid,
err_code_t
enb_agent_disable_cont_mac_stats_update
(
mid_t
mod_id
);
Protocol__
ProgranMessage
*
enb_agent_generate_diff_mac_stats_report
(
Protocol__Prog
ranMessage
*
new_report
,
Protocol__
Prog
ranMessage
*
old_report
);
Protocol__
FlexranMessage
*
enb_agent_generate_diff_mac_stats_report
(
Protocol__Flex
ranMessage
*
new_report
,
Protocol__
Flex
ranMessage
*
old_report
);
Protocol__
PrpUeStatsReport
*
copy_ue_stats_report
(
Protocol__Prp
UeStatsReport
*
original
);
Protocol__
FlexUeStatsReport
*
copy_ue_stats_report
(
Protocol__Flex
UeStatsReport
*
original
);
Protocol__
PrpCellStatsReport
*
copy_cell_stats_report
(
Protocol__Prp
CellStatsReport
*
original
);
Protocol__
FlexCellStatsReport
*
copy_cell_stats_report
(
Protocol__Flex
CellStatsReport
*
original
);
Protocol__
PrpRlcBsr
*
copy_rlc_report
(
Protocol__Prp
RlcBsr
*
original
);
Protocol__
FlexRlcBsr
*
copy_rlc_report
(
Protocol__Flex
RlcBsr
*
original
);
Protocol__
PrpUlCqiReport
*
copy_ul_cqi_report
(
Protocol__Prp
UlCqiReport
*
original
);
Protocol__
FlexUlCqiReport
*
copy_ul_cqi_report
(
Protocol__Flex
UlCqiReport
*
original
);
Protocol__
PrpDlCqiReport
*
copy_dl_cqi_report
(
Protocol__Prp
DlCqiReport
*
original
);
Protocol__
FlexDlCqiReport
*
copy_dl_cqi_report
(
Protocol__Flex
DlCqiReport
*
original
);
Protocol__
PrpPagingBufferReport
*
copy_paging_buffer_report
(
Protocol__Prp
PagingBufferReport
*
original
);
Protocol__
FlexPagingBufferReport
*
copy_paging_buffer_report
(
Protocol__Flex
PagingBufferReport
*
original
);
Protocol__
PrpDlCsi
*
copy_csi_report
(
Protocol__Prp
DlCsi
*
original
);
Protocol__
FlexDlCsi
*
copy_csi_report
(
Protocol__Flex
DlCsi
*
original
);
Protocol__
PrpNoiseInterferenceReport
*
copy_noise_inter_report
(
Protocol__Prp
NoiseInterferenceReport
*
original
);
Protocol__
FlexNoiseInterferenceReport
*
copy_noise_inter_report
(
Protocol__Flex
NoiseInterferenceReport
*
original
);
int
compare_ue_stats_reports
(
Protocol__
Prp
UeStatsReport
*
rep1
,
Protocol__
Prp
UeStatsReport
*
rep2
);
int
compare_ue_stats_reports
(
Protocol__
Flex
UeStatsReport
*
rep1
,
Protocol__
Flex
UeStatsReport
*
rep2
);
int
compare_cell_stats_reports
(
Protocol__
Prp
CellStatsReport
*
rep1
,
Protocol__
Prp
CellStatsReport
*
rep2
);
int
compare_cell_stats_reports
(
Protocol__
Flex
CellStatsReport
*
rep1
,
Protocol__
Flex
CellStatsReport
*
rep2
);
/* Functions for parsing the MAC agent policy reconfiguration command */
...
...
openair2/ENB_APP/enb_agent_task_manager.c
View file @
b2181288
...
...
@@ -48,7 +48,7 @@
#define RIGHT(x) (2 * (x) + 2)
#define PARENT(x) ((x - 1) / 2)
enb_agent_task_t
*
enb_agent_task_create
(
Protocol__
Prog
ranMessage
*
msg
,
enb_agent_task_t
*
enb_agent_task_create
(
Protocol__
Flex
ranMessage
*
msg
,
uint16_t
frame_num
,
uint8_t
subframe_num
)
{
enb_agent_task_t
*
task
=
NULL
;
task
=
malloc
(
sizeof
(
enb_agent_task_t
));
...
...
openair2/ENB_APP/enb_agent_task_manager.h
View file @
b2181288
...
...
@@ -41,7 +41,7 @@
#include <stdint.h>
#include <pthread.h>
#include "
prog
ran.pb-c.h"
#include "
flex
ran.pb-c.h"
#include "enb_agent_common.h"
...
...
@@ -59,8 +59,8 @@ typedef struct enb_agent_task_s {
uint16_t
frame_num
;
/* The subframe in which the task needs to be executed */
uint8_t
subframe_num
;
/* The task to be executed in the form of a Protocol__
Prog
ranMessage */
Protocol__
Prog
ranMessage
*
task
;
/* The task to be executed in the form of a Protocol__
Flex
ranMessage */
Protocol__
Flex
ranMessage
*
task
;
}
enb_agent_task_t
;
/**
...
...
@@ -95,7 +95,7 @@ typedef enum {
/**
* Allocate memory for a task in the queue
*/
enb_agent_task_t
*
enb_agent_task_create
(
Protocol__
Prog
ranMessage
*
msg
,
enb_agent_task_t
*
enb_agent_task_create
(
Protocol__
Flex
ranMessage
*
msg
,
uint16_t
frame_num
,
uint8_t
subframe_num
);
/**
...
...
openair2/LAYER2/MAC/eNB_agent_scheduler_dataplane.c
View file @
b2181288
...
...
@@ -48,7 +48,7 @@
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/
prog
ran_dci_conversions.h"
#include "LAYER2/MAC/
flex
ran_dci_conversions.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
...
...
@@ -60,7 +60,7 @@
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "header.pb-c.h"
#include "
prog
ran.pb-c.h"
#include "
flex
ran.pb-c.h"
#include "SIMULATION/TOOLS/defs.h" // for taus
...
...
@@ -69,9 +69,9 @@ void apply_dl_scheduling_decisions(mid_t mod_id,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
const
Protocol__
Prog
ranMessage
*
dl_scheduling_info
)
{
const
Protocol__
Flex
ranMessage
*
dl_scheduling_info
)
{
Protocol__
Prp
DlMacConfig
*
mac_config
=
dl_scheduling_info
->
dl_mac_config_msg
;
Protocol__
Flex
DlMacConfig
*
mac_config
=
dl_scheduling_info
->
dl_mac_config_msg
;
// Check if there is anything to schedule for random access
if
(
mac_config
->
n_dl_rar
>
0
)
{
...
...
@@ -97,7 +97,7 @@ void apply_ue_spec_scheduling_decisions(mid_t mod_id,
uint32_t
subframe
,
int
*
mbsfn_flag
,
uint32_t
n_dl_ue_data
,
const
Protocol__
Prp
DlData
**
dl_ue_data
)
{
const
Protocol__
Flex
DlData
**
dl_ue_data
)
{
uint8_t
CC_id
;
int
UE_id
;
...
...
@@ -128,8 +128,8 @@ void apply_ue_spec_scheduling_decisions(mid_t mod_id,
int
i
;
Protocol__
Prp
DlData
*
dl_data
;
Protocol__
Prp
DlDci
*
dl_dci
;
Protocol__
Flex
DlData
*
dl_data
;
Protocol__
Flex
DlDci
*
dl_dci
;
uint32_t
rlc_size
,
n_lc
,
lcid
;
...
...
@@ -161,7 +161,7 @@ void apply_ue_spec_scheduling_decisions(mid_t mod_id,
if
(
dl_data
->
n_ce_bitmap
>
0
)
{
//Check if there is TA command and set the length appropriately
ta_len
=
(
dl_data
->
ce_bitmap
[
0
]
&
PROTOCOL__
PRP_CE_TYPE__PR
PCET_TA
)
?
2
:
0
;
ta_len
=
(
dl_data
->
ce_bitmap
[
0
]
&
PROTOCOL__
FLEX_CE_TYPE__FL
PCET_TA
)
?
2
:
0
;
}
if
(
ta_len
>
0
)
{
...
...
@@ -359,7 +359,7 @@ void apply_ue_spec_scheduling_decisions(mid_t mod_id,
}
void
fill_oai_dci
(
mid_t
mod_id
,
uint32_t
CC_id
,
uint32_t
rnti
,
const
Protocol__
Prp
DlDci
*
dl_dci
)
{
const
Protocol__
Flex
DlDci
*
dl_dci
)
{
void
*
DLSCH_dci
=
NULL
;
DCI_PDU
*
DCI_pdu
;
...
...
@@ -397,92 +397,92 @@ void fill_oai_dci(mid_t mod_id, uint32_t CC_id, uint32_t rnti,
switch
(
frame_parms
[
CC_id
]
->
N_RB_DL
)
{
case
6
:
if
(
frame_parms
[
CC_id
]
->
frame_type
==
TDD
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
)
{
FILL_DCI_TDD_1
(
DCI1_1_5MHz_TDD_t
,
DLSCH_dci
,
dl_dci
);
size_bytes
=
sizeof
(
DCI1_1_5MHz_TDD_t
);
size_bits
=
sizeof_DCI1_1_5MHz_TDD_t
;
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
)
{
//TODO
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
)
{
//TODO
}
}
else
{
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
)
{
FILL_DCI_FDD_1
(
DCI1_1_5MHz_FDD_t
,
DLSCH_dci
,
dl_dci
);
size_bytes
=
sizeof
(
DCI1_1_5MHz_FDD_t
);
size_bits
=
sizeof_DCI1_1_5MHz_FDD_t
;
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
)
{
//TODO
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
)
{
//TODO
}
}
break
;
case
25
:
if
(
frame_parms
[
CC_id
]
->
frame_type
==
TDD
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
)
{
FILL_DCI_TDD_1
(
DCI1_5MHz_TDD_t
,
DLSCH_dci
,
dl_dci
);
size_bytes
=
sizeof
(
DCI1_5MHz_TDD_t
);
size_bits
=
sizeof_DCI1_5MHz_TDD_t
;
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
)
{
//TODO
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
)
{
//TODO
}
}
else
{
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
)
{
FILL_DCI_FDD_1
(
DCI1_5MHz_FDD_t
,
DLSCH_dci
,
dl_dci
);
size_bytes
=
sizeof
(
DCI1_5MHz_FDD_t
);
size_bits
=
sizeof_DCI1_5MHz_FDD_t
;
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
)
{
//TODO
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
)
{
//TODO
}
}
break
;
case
50
:
if
(
frame_parms
[
CC_id
]
->
frame_type
==
TDD
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
)
{
FILL_DCI_TDD_1
(
DCI1_10MHz_TDD_t
,
DLSCH_dci
,
dl_dci
);
size_bytes
=
sizeof
(
DCI1_10MHz_TDD_t
);
size_bits
=
sizeof_DCI1_10MHz_TDD_t
;
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
)
{
//TODO
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
)
{
//TODO
}
}
else
{
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
)
{
FILL_DCI_FDD_1
(
DCI1_10MHz_FDD_t
,
DLSCH_dci
,
dl_dci
);
size_bytes
=
sizeof
(
DCI1_10MHz_FDD_t
);
size_bits
=
sizeof_DCI1_10MHz_FDD_t
;
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
)
{
//TODO
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
)
{
//TODO
}
}
break
;
case
100
:
if
(
frame_parms
[
CC_id
]
->
frame_type
==
TDD
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
)
{
FILL_DCI_TDD_1
(
DCI1_20MHz_TDD_t
,
DLSCH_dci
,
dl_dci
);
size_bytes
=
sizeof
(
DCI1_20MHz_TDD_t
);
size_bits
=
sizeof_DCI1_20MHz_TDD_t
;
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
)
{
//TODO
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
)
{
//TODO
}
}
else
{
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
)
{
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
)
{
FILL_DCI_FDD_1
(
DCI1_20MHz_FDD_t
,
DLSCH_dci
,
dl_dci
);
size_bytes
=
sizeof
(
DCI1_20MHz_FDD_t
);
size_bits
=
sizeof_DCI1_20MHz_FDD_t
;
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
)
{
//TODO
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
)
{
}
else
if
(
dl_dci
->
format
==
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
)
{
//TODO
}
}
...
...
@@ -491,31 +491,31 @@ void fill_oai_dci(mid_t mod_id, uint32_t CC_id, uint32_t rnti,
//Set format to the proper type
switch
(
dl_dci
->
format
)
{
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
:
format
=
format1
;
break
;
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1A
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1A
:
format
=
format1A
;
break
;
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1B
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1B
:
format
=
format1B
;
break
;
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1C
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1C
:
format
=
format1C
;
break
;
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
:
format
=
format1E_2A_M10PRB
;
break
;
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2
:
format
=
format2
;
break
;
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
:
format
=
format2A
;
break
;
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2B
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2B
:
format
=
format2B
;
break
;
case
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_3
:
case
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_3
:
format
=
3
;
break
;
default:
...
...
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue.c
View file @
b2181288
...
...
@@ -63,7 +63,7 @@
#include "pdcp.h"
#include "header.pb-c.h"
#include "
prog
ran.pb-c.h"
#include "
flex
ran.pb-c.h"
#include "enb_agent_mac.h"
#include "SIMULATION/TOOLS/defs.h" // for taus
...
...
@@ -81,7 +81,7 @@ schedule_ue_spec_default(
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__
Prog
ranMessage
**
dl_info
Protocol__
Flex
ranMessage
**
dl_info
)
//------------------------------------------------------------------------------
{
...
...
@@ -109,14 +109,14 @@ schedule_ue_spec_default(
static
int32_t
tpc_accumulated
=
0
;
UE_sched_ctrl
*
ue_sched_ctl
;
Protocol__
Prp
DlData
*
dl_data
[
NUM_MAX_UE
];
Protocol__
Flex
DlData
*
dl_data
[
NUM_MAX_UE
];
int
num_ues_added
=
0
;
int
channels_added
=
0
;
Protocol__
Prp
DlDci
*
dl_dci
;
Protocol__
Prp
RlcPdu
*
rlc_pdus
[
11
];
Protocol__
Flex
DlDci
*
dl_dci
;
Protocol__
Flex
RlcPdu
*
rlc_pdus
[
11
];
uint32_t
*
ce_bitmap
;
Protocol__
Prp
RlcPdu
**
rlc_pdu
;
Protocol__
Flex
RlcPdu
**
rlc_pdu
;
int
num_tb
;
uint32_t
ce_flags
=
0
;
...
...
@@ -216,8 +216,8 @@ schedule_ue_spec_default(
channels_added
=
0
;
// After this point all the UEs will be scheduled
dl_data
[
num_ues_added
]
=
(
Protocol__
PrpDlData
*
)
malloc
(
sizeof
(
Protocol__Prp
DlData
));
protocol__
prp
_dl_data__init
(
dl_data
[
num_ues_added
]);
dl_data
[
num_ues_added
]
=
(
Protocol__
FlexDlData
*
)
malloc
(
sizeof
(
Protocol__Flex
DlData
));
protocol__
flex
_dl_data__init
(
dl_data
[
num_ues_added
]);
dl_data
[
num_ues_added
]
->
has_rnti
=
1
;
dl_data
[
num_ues_added
]
->
rnti
=
rnti
;
dl_data
[
num_ues_added
]
->
n_rlc_pdu
=
0
;
...
...
@@ -258,8 +258,8 @@ schedule_ue_spec_default(
eNB_UE_stats
->
DL_cqi
[
0
],
mcs
,
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
rrc_status
);
dl_dci
=
(
Protocol__
PrpDlDci
*
)
malloc
(
sizeof
(
Protocol__Prp
DlDci
));
protocol__
prp
_dl_dci__init
(
dl_dci
);
dl_dci
=
(
Protocol__
FlexDlDci
*
)
malloc
(
sizeof
(
Protocol__Flex
DlDci
));
protocol__
flex
_dl_dci__init
(
dl_dci
);
dl_data
[
num_ues_added
]
->
dl_dci
=
dl_dci
;
...
...
@@ -353,12 +353,12 @@ schedule_ue_spec_default(
dl_data
[
num_ues_added
]
->
ce_bitmap
=
(
uint32_t
*
)
malloc
(
sizeof
(
uint32_t
)
*
2
);
if
(
ta_len
>
0
)
{
ce_flags
|=
PROTOCOL__
PRP_CE_TYPE__PR
PCET_TA
;
ce_flags
|=
PROTOCOL__
FLEX_CE_TYPE__FL
PCET_TA
;
}
/*TODO: Add other flags if DRX and other CE are required*/
// Add the control element flags to the
prog
ran message
// Add the control element flags to the
flex
ran message
dl_data
[
num_ues_added
]
->
ce_bitmap
[
0
]
=
ce_flags
;
dl_data
[
num_ues_added
]
->
ce_bitmap
[
1
]
=
ce_flags
;
...
...
@@ -394,18 +394,18 @@ schedule_ue_spec_default(
data_to_request
++
;
//It is not correct but fixes some RLC bug for DCCH
}
LOG_D
(
MAC
,
"[TEST]Will request %d from DCCH
\n
"
,
data_to_request
);
rlc_pdus
[
channels_added
]
=
(
Protocol__
PrpRlcPdu
*
)
malloc
(
sizeof
(
Protocol__Prp
RlcPdu
));
protocol__
prp
_rlc_pdu__init
(
rlc_pdus
[
channels_added
]);
rlc_pdus
[
channels_added
]
=
(
Protocol__
FlexRlcPdu
*
)
malloc
(
sizeof
(
Protocol__Flex
RlcPdu
));
protocol__
flex
_rlc_pdu__init
(
rlc_pdus
[
channels_added
]);
rlc_pdus
[
channels_added
]
->
n_rlc_pdu_tb
=
2
;
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
=
(
Protocol__
PrpRlcPduTb
**
)
malloc
(
sizeof
(
Protocol__Prp
RlcPduTb
*
)
*
2
);
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
0
]
=
(
Protocol__
PrpRlcPduTb
*
)
malloc
(
sizeof
(
Protocol__Prp
RlcPduTb
));
protocol__
prp
_rlc_pdu_tb__init
(
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
0
]);
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
=
(
Protocol__
FlexRlcPduTb
**
)
malloc
(
sizeof
(
Protocol__Flex
RlcPduTb
*
)
*
2
);
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
0
]
=
(
Protocol__
FlexRlcPduTb
*
)
malloc
(
sizeof
(
Protocol__Flex
RlcPduTb
));
protocol__
flex
_rlc_pdu_tb__init
(
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
0
]);
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
0
]
->
has_logical_channel_id
=
1
;
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
0
]
->
logical_channel_id
=
j
;
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
0
]
->
has_size
=
1
;
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
0
]
->
size
=
data_to_request
;
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
1
]
=
(
Protocol__
PrpRlcPduTb
*
)
malloc
(
sizeof
(
Protocol__Prp
RlcPduTb
));
protocol__
prp
_rlc_pdu_tb__init
(
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
1
]);
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
1
]
=
(
Protocol__
FlexRlcPduTb
*
)
malloc
(
sizeof
(
Protocol__Flex
RlcPduTb
));
protocol__
flex
_rlc_pdu_tb__init
(
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
1
]);
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
1
]
->
has_logical_channel_id
=
1
;
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
1
]
->
logical_channel_id
=
j
;
rlc_pdus
[
channels_added
]
->
rlc_pdu_tb
[
1
]
->
has_size
=
1
;
...
...
@@ -422,7 +422,7 @@ schedule_ue_spec_default(
}
// End of iterating the logical channels
// Add rlc_pdus to the dl_data message
dl_data
[
num_ues_added
]
->
rlc_pdu
=
(
Protocol__
PrpRlcPdu
**
)
malloc
(
sizeof
(
Protocol__Prp
RlcPdu
*
)
*
dl_data
[
num_ues_added
]
->
rlc_pdu
=
(
Protocol__
FlexRlcPdu
**
)
malloc
(
sizeof
(
Protocol__Flex
RlcPdu
*
)
*
dl_data
[
num_ues_added
]
->
n_rlc_pdu
);
for
(
i
=
0
;
i
<
dl_data
[
num_ues_added
]
->
n_rlc_pdu
;
i
++
)
{
dl_data
[
num_ues_added
]
->
rlc_pdu
[
i
]
=
rlc_pdus
[
i
];
...
...
@@ -595,9 +595,9 @@ schedule_ue_spec_default(
dl_dci
->
has_res_alloc
=
1
;
dl_dci
->
res_alloc
=
0
;
dl_dci
->
has_vrb_format
=
1
;
dl_dci
->
vrb_format
=
PROTOCOL__
PRP_VRB_FORMAT__PR
VRBF_LOCALIZED
;
dl_dci
->
vrb_format
=
PROTOCOL__
FLEX_VRB_FORMAT__FL
VRBF_LOCALIZED
;
dl_dci
->
has_format
=
1
;
dl_dci
->
format
=
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1
;
dl_dci
->
format
=
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1
;
dl_dci
->
has_rb_bitmap
=
1
;
dl_dci
->
rb_bitmap
=
allocate_prbs_sub
(
nb_rb
,
rballoc_sub
);
dl_dci
->
has_rb_shift
=
1
;
...
...
@@ -625,9 +625,9 @@ schedule_ue_spec_default(
dl_dci
->
has_res_alloc
=
1
;
dl_dci
->
res_alloc
=
0
;
dl_dci
->
has_vrb_format
=
1
;
dl_dci
->
vrb_format
=
PROTOCOL__
PRP_VRB_FORMAT__PR
VRBF_LOCALIZED
;
dl_dci
->
vrb_format
=
PROTOCOL__
FLEX_VRB_FORMAT__FL
VRBF_LOCALIZED
;
dl_dci
->
has_format
=
1
;
dl_dci
->
format
=
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
;
dl_dci
->
format
=
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
;
dl_dci
->
has_rb_bitmap
=
1
;
dl_dci
->
rb_bitmap
=
allocate_prbs_sub
(
nb_rb
,
rballoc_sub
);
dl_dci
->
has_rb_shift
=
1
;
...
...
@@ -659,9 +659,9 @@ schedule_ue_spec_default(
dl_dci
->
has_res_alloc
=
1
;
dl_dci
->
res_alloc
=
0
;
dl_dci
->
has_vrb_format
=
1
;
dl_dci
->
vrb_format
=
PROTOCOL__
PRP_VRB_FORMAT__PR
VRBF_LOCALIZED
;
dl_dci
->
vrb_format
=
PROTOCOL__
FLEX_VRB_FORMAT__FL
VRBF_LOCALIZED
;
dl_dci
->
has_format
=
1
;
dl_dci
->
format
=
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_2A
;
dl_dci
->
format
=
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_2A
;
dl_dci
->
has_rb_bitmap
=
1
;
dl_dci
->
rb_bitmap
=
allocate_prbs_sub
(
nb_rb
,
rballoc_sub
);
dl_dci
->
has_rb_shift
=
1
;
...
...
@@ -693,9 +693,9 @@ schedule_ue_spec_default(
dl_dci
->
has_res_alloc
=
1
;
dl_dci
->
res_alloc
=
0
;
dl_dci
->
has_vrb_format
=
1
;
dl_dci
->
vrb_format
=
PROTOCOL__
PRP_VRB_FORMAT__PR
VRBF_LOCALIZED
;
dl_dci
->
vrb_format
=
PROTOCOL__
FLEX_VRB_FORMAT__FL
VRBF_LOCALIZED
;
dl_dci
->
has_format
=
1
;
dl_dci
->
format
=
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
;
dl_dci
->
format
=
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
;
dl_dci
->
has_rb_bitmap
=
1
;
dl_dci
->
rb_bitmap
=
allocate_prbs_sub
(
nb_rb
,
rballoc_sub
);
dl_dci
->
has_rb_shift
=
1
;
...
...
@@ -733,9 +733,9 @@ schedule_ue_spec_default(
dl_dci
->
has_res_alloc
=
1
;
dl_dci
->
res_alloc
=
0
;
dl_dci
->
has_vrb_format
=
1
;
dl_dci
->
vrb_format
=
PROTOCOL__
PRP_VRB_FORMAT__PR
VRBF_LOCALIZED
;
dl_dci
->
vrb_format
=
PROTOCOL__
FLEX_VRB_FORMAT__FL
VRBF_LOCALIZED
;
dl_dci
->
has_format
=
1
;
dl_dci
->
format
=
PROTOCOL__
PRP_DCI_FORMAT__PR
DCIF_1D
;
dl_dci
->
format
=
PROTOCOL__
FLEX_DCI_FORMAT__FL
DCIF_1D
;
dl_dci
->
has_rb_bitmap
=
1
;
dl_dci
->
rb_bitmap
=
allocate_prbs_sub
(
nb_rb
,
rballoc_sub
);
dl_dci
->
has_rb_shift
=
1
;
...
...
@@ -770,9 +770,9 @@ schedule_ue_spec_default(
}
// UE_id loop
}
// CC_id loop
// Add all the dl_data elements to the
prog
ran message
// Add all the dl_data elements to the
flex
ran message
(
*
dl_info
)
->
dl_mac_config_msg
->
n_dl_ue_data
=
num_ues_added
;
(
*
dl_info
)
->
dl_mac_config_msg
->
dl_ue_data
=
(
Protocol__
PrpDlData
**
)
malloc
(
sizeof
(
Protocol__Prp
DlData
*
)
*
num_ues_added
);
(
*
dl_info
)
->
dl_mac_config_msg
->
dl_ue_data
=
(
Protocol__
FlexDlData
**
)
malloc
(
sizeof
(
Protocol__Flex
DlData
*
)
*
num_ues_added
);
for
(
i
=
0
;
i
<
num_ues_added
;
i
++
)
{
(
*
dl_info
)
->
dl_mac_config_msg
->
dl_ue_data
[
i
]
=
dl_data
[
i
];
}
...
...
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue_remote.c
View file @
b2181288
...
...
@@ -53,7 +53,7 @@ int queue_initialized = 0;
//uint32_t sched [] = {1, 2, 3};
void
schedule_ue_spec_remote
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__
Prog
ranMessage
**
dl_info
)
{
int
*
mbsfn_flag
,
Protocol__
Flex
ranMessage
**
dl_info
)
{
//if ((subframe == skip_subframe) && (frame % period == 0)) {
...
...
openair2/LAYER2/MAC/eNB_agent_scheduler_dlsch_ue_remote.h
View file @
b2181288
...
...
@@ -40,7 +40,7 @@
#ifndef __LAYER2_MAC_ENB_AGENT_SCHEDULER_DLSCH_UE_REMOTE_H__
#define __LAYER2_MAC_ENB_AGENT_SCHEDULER_DLSCH_UE_REMOTE_H___
#include "
prog
ran.pb-c.h"
#include "
flex
ran.pb-c.h"
#include "header.pb-c.h"
#include "ENB_APP/enb_agent_defs.h"
...
...
@@ -54,7 +54,7 @@
#define SCHED_AHEAD_SUBFRAMES 20
typedef
struct
dl_mac_config_element_s
{
Protocol__
Prog
ranMessage
*
dl_info
;
Protocol__
Flex
ranMessage
*
dl_info
;
TAILQ_ENTRY
(
dl_mac_config_element_s
)
configs
;
}
dl_mac_config_element_t
;
...
...
@@ -64,7 +64,7 @@ TAILQ_HEAD(DlMacConfigHead, dl_mac_config_element_s);
* Default scheduler used by the eNB agent
*/
void
schedule_ue_spec_remote
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__
Prog
ranMessage
**
dl_info
);
int
*
mbsfn_flag
,
Protocol__
Flex
ranMessage
**
dl_info
);
// Find the difference in subframes from the given subframe
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
b2181288
...
...
@@ -103,7 +103,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
void
*
DLSCH_dci
=
NULL
;
int
size_bits
=
0
,
size_bytes
=
0
;
Protocol__
Prog
ranMessage
*
msg
;
Protocol__
Flex
ranMessage
*
msg
;
LOG_D
(
MAC
,
"[eNB %d] Frame %d, Subframe %d, entering MAC scheduler (UE_list->head %d)
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_list
->
head
);
...
...
@@ -143,7 +143,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
if
(
mac_agent_registered
[
module_idP
])
{
agent_mac_xface
[
module_idP
]
->
enb_agent_notify_ue_state_change
(
module_idP
,
rnti
,
PROTOCOL__
PRP_UE_STATE_CHANGE_TYPE__PR
UESC_DEACTIVATED
);
PROTOCOL__
FLEX_UE_STATE_CHANGE_TYPE__FL
UESC_DEACTIVATED
);
}
}
else
{
...
...
openair2/LAYER2/MAC/enb_agent_mac_proto.h
View file @
b2181288
...
...
@@ -42,29 +42,29 @@
#include "enb_agent_defs.h"
#include "header.pb-c.h"
#include "
prog
ran.pb-c.h"
#include "
flex
ran.pb-c.h"
/*
* Default scheduler used by the eNB agent
*/
void
schedule_ue_spec_default
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__
Prog
ranMessage
**
dl_info
);
int
*
mbsfn_flag
,
Protocol__
Flex
ranMessage
**
dl_info
);
/*
* Data plane function for applying the DL decisions of the scheduler
*/
void
apply_dl_scheduling_decisions
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
const
Protocol__
Prog
ranMessage
*
dl_scheduling_info
);
const
Protocol__
Flex
ranMessage
*
dl_scheduling_info
);
/*
* Data plane function for applying the UE specific DL decisions of the scheduler
*/
void
apply_ue_spec_scheduling_decisions
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
uint32_t
n_dl_ue_data
,
const
Protocol__
Prp
DlData
**
dl_ue_data
);
uint32_t
n_dl_ue_data
,
const
Protocol__
Flex
DlData
**
dl_ue_data
);
/*
* Data plane function for filling the DCI structure
*/
void
fill_oai_dci
(
mid_t
mod_id
,
uint32_t
CC_id
,
uint32_t
rnti
,
const
Protocol__
Prp
DlDci
*
dl_dci
);
void
fill_oai_dci
(
mid_t
mod_id
,
uint32_t
CC_id
,
uint32_t
rnti
,
const
Protocol__
Flex
DlDci
*
dl_dci
);
#endif
openair2/LAYER2/MAC/
prog
ran_dci_conversions.h
→
openair2/LAYER2/MAC/
flex
ran_dci_conversions.h
View file @
b2181288
...
...
@@ -28,32 +28,32 @@
*******************************************************************************/
/*! \file dci_conversions.h
* \brief Conversion helpers from
prog
ran messages to OAI formats DCI
* \brief Conversion helpers from
flex
ran messages to OAI formats DCI
* \author Xenofon Foukas
* \date 2016
* \version 0.1
*/
#ifndef LAYER2_MAC_
PROG
RAN_DCI_CONVERISIONS_H__
#define LAYER2_MAC_DCI_
PROG
RAN_CONVERISIONS_H__
#define FILL_DCI_FDD_1(TYPE, DCI,
PROG
RAN_DCI) \
((TYPE*)DCI)->harq_pid =
PROG
RAN_DCI->harq_process; \
((TYPE*)DCI)->rv =
PROG
RAN_DCI->rv[0]; \
((TYPE*)DCI)->rballoc =
PROG
RAN_DCI->rb_bitmap; \
((TYPE*)DCI)->rah =
PROG
RAN_DCI->res_alloc; \
((TYPE*)DCI)->mcs =
PROG
RAN_DCI->mcs[0]; \
((TYPE*)DCI)->TPC =
PROG
RAN_DCI->tpc; \
((TYPE*)DCI)->ndi =
PROG
RAN_DCI->ndi[0];
#define FILL_DCI_TDD_1(TYPE, DCI,
PROG
RAN_DCI) \
((TYPE*)DCI)->harq_pid =
PROG
RAN_DCI->harq_process; \
((TYPE*)DCI)->rv =
PROG
RAN_DCI->rv[0]; \
((TYPE*)DCI)->dai =
PROG
RAN_DCI->dai; \
((TYPE*)DCI)->rballoc =
PROG
RAN_DCI->rb_bitmap; \
((TYPE*)DCI)->rah =
PROG
RAN_DCI->res_alloc; \
((TYPE*)DCI)->mcs =
PROG
RAN_DCI->mcs[0]; \
((TYPE*)DCI)->TPC =
PROG
RAN_DCI->tpc; \
((TYPE*)DCI)->ndi =
PROG
RAN_DCI->ndi[0];
#ifndef LAYER2_MAC_
FLEX
RAN_DCI_CONVERISIONS_H__
#define LAYER2_MAC_DCI_
FLEX
RAN_CONVERISIONS_H__
#define FILL_DCI_FDD_1(TYPE, DCI,
FLEX
RAN_DCI) \
((TYPE*)DCI)->harq_pid =
FLEX
RAN_DCI->harq_process; \
((TYPE*)DCI)->rv =
FLEX
RAN_DCI->rv[0]; \
((TYPE*)DCI)->rballoc =
FLEX
RAN_DCI->rb_bitmap; \
((TYPE*)DCI)->rah =
FLEX
RAN_DCI->res_alloc; \
((TYPE*)DCI)->mcs =
FLEX
RAN_DCI->mcs[0]; \
((TYPE*)DCI)->TPC =
FLEX
RAN_DCI->tpc; \
((TYPE*)DCI)->ndi =
FLEX
RAN_DCI->ndi[0];
#define FILL_DCI_TDD_1(TYPE, DCI,
FLEX
RAN_DCI) \
((TYPE*)DCI)->harq_pid =
FLEX
RAN_DCI->harq_process; \
((TYPE*)DCI)->rv =
FLEX
RAN_DCI->rv[0]; \
((TYPE*)DCI)->dai =
FLEX
RAN_DCI->dai; \
((TYPE*)DCI)->rballoc =
FLEX
RAN_DCI->rb_bitmap; \
((TYPE*)DCI)->rah =
FLEX
RAN_DCI->res_alloc; \
((TYPE*)DCI)->mcs =
FLEX
RAN_DCI->mcs[0]; \
((TYPE*)DCI)->TPC =
FLEX
RAN_DCI->tpc; \
((TYPE*)DCI)->ndi =
FLEX
RAN_DCI->ndi[0];
#endif
openair2/RRC/LITE/rrc_eNB.c
View file @
b2181288
...
...
@@ -4545,7 +4545,7 @@ rrc_eNB_decode_dcch(
if
(
mac_agent_registered
[
ctxt_pP
->
module_id
])
{
agent_mac_xface
[
ctxt_pP
->
eNB_index
]
->
enb_agent_notify_ue_state_change
(
ctxt_pP
->
module_id
,
ue_context_p
->
ue_id_rnti
,
PROTOCOL__
PRP_UE_STATE_CHANGE_TYPE__PR
UESC_UPDATED
);
PROTOCOL__
FLEX_UE_STATE_CHANGE_TYPE__FL
UESC_UPDATED
);
}
}
#if defined(ENABLE_ITTI)
...
...
@@ -4646,7 +4646,7 @@ rrc_eNB_decode_dcch(
if
(
mac_agent_registered
[
ctxt_pP
->
module_id
])
{
agent_mac_xface
[
ctxt_pP
->
eNB_index
]
->
enb_agent_notify_ue_state_change
(
ctxt_pP
->
module_id
,
ue_context_p
->
ue_id_rnti
,
PROTOCOL__
PRP_UE_STATE_CHANGE_TYPE__PR
UESC_ACTIVATED
);
PROTOCOL__
FLEX_UE_STATE_CHANGE_TYPE__FL
UESC_ACTIVATED
);
}
}
}
...
...
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