Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
1f520630
Commit
1f520630
authored
Jan 19, 2016
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged UL/DL trigger messages to a single SF trigger message
parent
876d9eac
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
157 deletions
+60
-157
openair2/ENB_APP/MESSAGES/V2/header.proto
openair2/ENB_APP/MESSAGES/V2/header.proto
+2
-3
openair2/ENB_APP/MESSAGES/V2/progran.proto
openair2/ENB_APP/MESSAGES/V2/progran.proto
+4
-10
openair2/ENB_APP/enb_agent_handler.c
openair2/ENB_APP/enb_agent_handler.c
+2
-4
openair2/ENB_APP/enb_agent_mac.c
openair2/ENB_APP/enb_agent_mac.c
+48
-129
openair2/ENB_APP/enb_agent_mac.h
openair2/ENB_APP/enb_agent_mac.h
+3
-9
openair2/ENB_APP/enb_agent_mac_defs.h
openair2/ENB_APP/enb_agent_mac_defs.h
+1
-2
No files found.
openair2/ENB_APP/MESSAGES/V2/header.proto
View file @
1f520630
...
...
@@ -17,10 +17,9 @@ enum prp_type {
PRPT_STATS_REPLY
=
4
;
// Time indication messages
PRPT_DL_TRIGGER
=
5
;
PRPT_UL_TRIGGER
=
6
;
PRPT_SF_TRIGGER
=
5
;
//Asynchronous messages
PRPT_UL_SR_INFO
=
7
;
PRPT_UL_SR_INFO
=
6
;
}
openair2/ENB_APP/MESSAGES/V2/progran.proto
View file @
1f520630
...
...
@@ -13,9 +13,8 @@ message progran_message {
prp_echo_reply
echo_reply_msg
=
3
;
prp_stats_request
stats_request_msg
=
4
;
prp_stats_reply
stats_reply_msg
=
5
;
prp_dl_trigger
dl_trigger_msg
=
6
;
prp_ul_trigger
ul_trigger_msg
=
7
;
prp_ul_sr_info
ul_sr_info_msg
=
8
;
prp_sf_trigger
sf_trigger_msg
=
6
;
prp_ul_sr_info
ul_sr_info_msg
=
7
;
}
}
...
...
@@ -90,16 +89,11 @@ message prp_stats_reply {
// Time indication messages
//
message
prp_
dl
_trigger
{
message
prp_
sf
_trigger
{
optional
prp_header
header
=
1
;
optional
uint32
sfn_sf
=
2
;
repeated
prp_dl_info
dl_info
=
3
;
}
message
prp_ul_trigger
{
optional
prp_header
header
=
1
;
optional
uint32
sfn_sf
=
2
;
repeated
prp_ul_info
ul_info
=
3
;
repeated
prp_ul_info
ul_info
=
4
;
}
//
...
...
openair2/ENB_APP/enb_agent_handler.c
View file @
1f520630
...
...
@@ -47,8 +47,7 @@ enb_agent_message_decoded_callback messages_callback[][3] = {
{
0
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_ECHO_REPLY_MSG*/
//Must add handler when receiving echo reply
{
enb_agent_mac_handle_stats
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_STATS_REQUEST_MSG*/
{
0
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_STATS_REPLY_MSG*/
{
0
,
0
,
0
},
/*DL_TRIGGER*/
{
0
,
0
,
0
},
/*UL_TRIGGER*/
{
0
,
0
,
0
},
/*PROTOCOK__PROGRAN_MESSAGE__MSG_SF_TRIGGER_MSG*/
{
0
,
0
,
0
},
/*SR_INFO*/
};
...
...
@@ -59,8 +58,7 @@ enb_agent_message_destruction_callback message_destruction_callback[] = {
enb_agent_destroy_echo_reply
,
enb_agent_mac_destroy_stats_request
,
enb_agent_mac_destroy_stats_reply
,
enb_agent_mac_destroy_dl_trigger
,
enb_agent_mac_destroy_ul_trigger
,
enb_agent_mac_destroy_sf_trigger
,
enb_agent_mac_destroy_sr_info
,
};
...
...
openair2/ENB_APP/enb_agent_mac.c
View file @
1f520630
...
...
@@ -828,37 +828,37 @@ int enb_agent_mac_destroy_sr_info(Protocol__ProgranMessage *msg) {
return
-
1
;
}
int
enb_agent_mac_
dl
_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
)
{
int
enb_agent_mac_
sf
_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
)
{
Protocol__PrpHeader
*
header
;
int
i
,
j
;
const
int
xid
=
*
((
int
*
)
params
);
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PRPT_
DL
_TRIGGER
,
&
header
)
!=
0
)
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PRPT_
SF
_TRIGGER
,
&
header
)
!=
0
)
goto
error
;
Protocol__Prp
DlTrigger
*
dl
_trigger_msg
;
dl_trigger_msg
=
malloc
(
sizeof
(
Protocol__PrpDl
Trigger
));
if
(
dl
_trigger_msg
==
NULL
)
{
Protocol__Prp
SfTrigger
*
sf
_trigger_msg
;
sf_trigger_msg
=
malloc
(
sizeof
(
Protocol__PrpSf
Trigger
));
if
(
sf
_trigger_msg
==
NULL
)
{
goto
error
;
}
protocol__prp_
dl_trigger__init
(
dl
_trigger_msg
);
protocol__prp_
sf_trigger__init
(
sf
_trigger_msg
);
dl
_trigger_msg
->
header
=
header
;
dl
_trigger_msg
->
has_sfn_sf
=
1
;
dl
_trigger_msg
->
sfn_sf
=
get_sfn_sf
(
mod_id
);
sf
_trigger_msg
->
header
=
header
;
sf
_trigger_msg
->
has_sfn_sf
=
1
;
sf
_trigger_msg
->
sfn_sf
=
get_sfn_sf
(
mod_id
);
/*TODO: Fill in the number of dl HARQ related info, based on the number of currently
*transmitting UEs
*/
dl
_trigger_msg
->
n_dl_info
=
get_num_ues
(
mod_id
);
sf
_trigger_msg
->
n_dl_info
=
get_num_ues
(
mod_id
);
Protocol__PrpDlInfo
**
dl_info
=
NULL
;
if
(
dl
_trigger_msg
->
n_dl_info
>
0
)
{
dl_info
=
malloc
(
sizeof
(
Protocol__PrpDlInfo
*
)
*
dl
_trigger_msg
->
n_dl_info
);
if
(
sf
_trigger_msg
->
n_dl_info
>
0
)
{
dl_info
=
malloc
(
sizeof
(
Protocol__PrpDlInfo
*
)
*
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
++
;
i
<
dl
_trigger_msg
->
n_dl_info
)
{
for
(
i
=
0
;
i
++
;
i
<
sf
_trigger_msg
->
n_dl_info
)
{
dl_info
[
i
]
=
malloc
(
sizeof
(
Protocol__PrpDlInfo
));
if
(
dl_info
[
i
]
==
NULL
)
goto
error
;
...
...
@@ -880,85 +880,21 @@ int enb_agent_mac_dl_trigger(mid_t mod_id, const void *params, Protocol__Progran
}
}
dl_trigger_msg
->
dl_info
=
dl_info
;
*
msg
=
malloc
(
sizeof
(
Protocol__ProgranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__progran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__PROGRAN_MESSAGE__MSG_DL_TRIGGER_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__PROGRAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
dl_trigger_msg
=
dl_trigger_msg
;
return
0
;
error:
if
(
header
!=
NULL
)
free
(
header
);
if
(
dl_trigger_msg
!=
NULL
)
{
for
(
i
=
0
;
i
<
dl_trigger_msg
->
n_dl_info
;
i
++
)
{
free
(
dl_trigger_msg
->
dl_info
[
i
]
->
harq_status
);
}
free
(
dl_trigger_msg
->
dl_info
);
free
(
dl_trigger_msg
);
}
if
(
*
msg
!=
NULL
)
free
(
*
msg
);
//LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
return
-
1
;
}
int
enb_agent_mac_destroy_dl_trigger
(
Protocol__ProgranMessage
*
msg
)
{
int
i
;
if
(
msg
->
msg_case
!=
PROTOCOL__PROGRAN_MESSAGE__MSG_DL_TRIGGER_MSG
)
goto
error
;
free
(
msg
->
dl_trigger_msg
->
header
);
for
(
i
=
0
;
i
<
msg
->
dl_trigger_msg
->
n_dl_info
;
i
++
)
{
free
(
msg
->
dl_trigger_msg
->
dl_info
[
i
]
->
harq_status
);
}
free
(
msg
->
dl_trigger_msg
->
dl_info
);
free
(
msg
->
dl_trigger_msg
);
free
(
msg
);
return
0
;
error:
//LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
return
-
1
;
}
int
enb_agent_mac_ul_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
)
{
Protocol__PrpHeader
*
header
;
int
i
,
j
;
const
int
xid
=
*
((
int
*
)
params
);
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PRPT_UL_TRIGGER
,
&
header
)
!=
0
)
goto
error
;
sf_trigger_msg
->
dl_info
=
dl_info
;
Protocol__PrpUlTrigger
*
ul_trigger_msg
;
ul_trigger_msg
=
malloc
(
sizeof
(
Protocol__PrpUlTrigger
));
if
(
ul_trigger_msg
==
NULL
)
{
goto
error
;
}
protocol__prp_ul_trigger__init
(
ul_trigger_msg
);
ul_trigger_msg
->
header
=
header
;
ul_trigger_msg
->
has_sfn_sf
=
1
;
/*TODO: Must fix this to get the proper subframe number*/
ul_trigger_msg
->
sfn_sf
=
get_sfn_sf
(
mod_id
);
/*TODO: Fill in the number of UL reception status related info, based on the number of currently
/*TODO: Fill in the number of UL reception status related info, based on the number of currently
*transmitting UEs
*/
ul
_trigger_msg
->
n_ul_info
=
get_num_ues
(
mod_id
);
sf
_trigger_msg
->
n_ul_info
=
get_num_ues
(
mod_id
);
Protocol__PrpUlInfo
**
ul_info
=
NULL
;
if
(
ul
_trigger_msg
->
n_ul_info
>
0
)
{
ul_info
=
malloc
(
sizeof
(
Protocol__PrpUlInfo
*
)
*
ul
_trigger_msg
->
n_ul_info
);
if
(
sf
_trigger_msg
->
n_ul_info
>
0
)
{
ul_info
=
malloc
(
sizeof
(
Protocol__PrpUlInfo
*
)
*
sf
_trigger_msg
->
n_ul_info
);
if
(
ul_info
==
NULL
)
goto
error
;
//Fill the reception info for each transmitting UE
for
(
i
=
0
;
i
++
;
i
<
ul
_trigger_msg
->
n_ul_info
)
{
for
(
i
=
0
;
i
++
;
i
<
sf
_trigger_msg
->
n_ul_info
)
{
ul_info
[
i
]
=
malloc
(
sizeof
(
Protocol__PrpUlInfo
));
if
(
ul_info
[
i
]
==
NULL
)
goto
error
;
...
...
@@ -984,26 +920,30 @@ int enb_agent_mac_ul_trigger(mid_t mod_id, const void *params, Protocol__Progran
}
}
ul
_trigger_msg
->
ul_info
=
ul_info
;
sf
_trigger_msg
->
ul_info
=
ul_info
;
*
msg
=
malloc
(
sizeof
(
Protocol__ProgranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__progran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__PROGRAN_MESSAGE__MSG_
UL
_TRIGGER_MSG
;
(
*
msg
)
->
msg_case
=
PROTOCOL__PROGRAN_MESSAGE__MSG_
SF
_TRIGGER_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__PROGRAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
ul_trigger_msg
=
ul
_trigger_msg
;
(
*
msg
)
->
sf_trigger_msg
=
sf
_trigger_msg
;
return
0
;
error:
if
(
header
!=
NULL
)
free
(
header
);
if
(
ul_trigger_msg
!=
NULL
)
{
for
(
i
=
0
;
i
<
ul_trigger_msg
->
n_ul_info
;
i
++
)
{
free
(
ul_trigger_msg
->
ul_info
[
i
]
->
reception_status
);
if
(
sf_trigger_msg
!=
NULL
)
{
for
(
i
=
0
;
i
<
sf_trigger_msg
->
n_dl_info
;
i
++
)
{
free
(
sf_trigger_msg
->
dl_info
[
i
]
->
harq_status
);
}
free
(
sf_trigger_msg
->
dl_info
);
for
(
i
=
0
;
i
<
sf_trigger_msg
->
n_ul_info
;
i
++
)
{
free
(
sf_trigger_msg
->
ul_info
[
i
]
->
reception_status
);
}
free
(
ul
_trigger_msg
->
ul_info
);
free
(
ul
_trigger_msg
);
free
(
sf
_trigger_msg
->
ul_info
);
free
(
sf
_trigger_msg
);
}
if
(
*
msg
!=
NULL
)
free
(
*
msg
);
...
...
@@ -1011,17 +951,21 @@ int enb_agent_mac_ul_trigger(mid_t mod_id, const void *params, Protocol__Progran
return
-
1
;
}
int
enb_agent_mac_destroy_
ul
_trigger
(
Protocol__ProgranMessage
*
msg
)
{
int
enb_agent_mac_destroy_
sf
_trigger
(
Protocol__ProgranMessage
*
msg
)
{
int
i
;
if
(
msg
->
msg_case
!=
PROTOCOL__PROGRAN_MESSAGE__MSG_
UL
_TRIGGER_MSG
)
if
(
msg
->
msg_case
!=
PROTOCOL__PROGRAN_MESSAGE__MSG_
SF
_TRIGGER_MSG
)
goto
error
;
free
(
msg
->
ul
_trigger_msg
->
header
);
for
(
i
=
0
;
i
<
msg
->
ul_trigger_msg
->
n_u
l_info
;
i
++
)
{
free
(
msg
->
ul_trigger_msg
->
ul_info
[
i
]
->
reception
_status
);
free
(
msg
->
sf
_trigger_msg
->
header
);
for
(
i
=
0
;
i
<
msg
->
sf_trigger_msg
->
n_d
l_info
;
i
++
)
{
free
(
msg
->
sf_trigger_msg
->
dl_info
[
i
]
->
harq
_status
);
}
free
(
msg
->
ul_trigger_msg
->
ul_info
);
free
(
msg
->
ul_trigger_msg
);
free
(
msg
->
sf_trigger_msg
->
dl_info
);
for
(
i
=
0
;
i
<
msg
->
sf_trigger_msg
->
n_ul_info
;
i
++
)
{
free
(
msg
->
sf_trigger_msg
->
ul_info
[
i
]
->
reception_status
);
}
free
(
msg
->
sf_trigger_msg
->
ul_info
);
free
(
msg
->
sf_trigger_msg
);
free
(
msg
);
return
0
;
...
...
@@ -1058,7 +1002,7 @@ void enb_agent_send_sr_info(mid_t mod_id, msg_context_t *context) {
LOG_D
(
ENB_AGENT
,
"Could not send sr message
\n
"
);
}
void
enb_agent_send_
dl
_trigger
(
mid_t
mod_id
,
msg_context_t
*
context
)
{
void
enb_agent_send_
sf
_trigger
(
mid_t
mod_id
,
msg_context_t
*
context
)
{
int
size
;
Protocol__ProgranMessage
*
msg
;
void
*
data
;
...
...
@@ -1066,7 +1010,7 @@ void enb_agent_send_dl_trigger(mid_t mod_id, msg_context_t *context) {
err_code_t
err_code
;
/*TODO: Must use a proper xid*/
err_code
=
enb_agent_mac_
dl
_trigger
(
mod_id
,
(
void
*
)
&
(
context
->
tx_xid
),
&
msg
);
err_code
=
enb_agent_mac_
sf
_trigger
(
mod_id
,
(
void
*
)
&
(
context
->
tx_xid
),
&
msg
);
if
(
err_code
<
0
)
{
goto
error
;
}
...
...
@@ -1082,34 +1026,7 @@ void enb_agent_send_dl_trigger(mid_t mod_id, msg_context_t *context) {
LOG_D
(
ENB_AGENT
,
"sent message with size %d
\n
"
,
size
);
}
error:
LOG_D
(
ENB_AGENT
,
"Could not send dl trigger message
\n
"
);
}
void
enb_agent_send_ul_trigger
(
mid_t
mod_id
,
msg_context_t
*
context
)
{
int
size
;
Protocol__ProgranMessage
*
msg
;
void
*
data
;
int
priority
;
err_code_t
err_code
;
/*TODO: Must use a proper xid*/
err_code
=
enb_agent_mac_ul_trigger
(
mod_id
,
(
void
*
)
&
(
context
->
tx_xid
),
&
msg
);
if
(
err_code
<
0
)
{
goto
error
;
}
if
(
msg
!=
NULL
){
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__PROGRAN_ERR__MSG_ENQUEUING
;
goto
error
;
}
LOG_D
(
ENB_AGENT
,
"sent message with size %d
\n
"
,
size
);
}
error:
LOG_D
(
ENB_AGENT
,
"Could not send ul trigger message
\n
"
);
LOG_D
(
ENB_AGENT
,
"Could not send sf trigger message
\n
"
);
}
int
enb_agent_register_mac_xface
(
mid_t
mod_id
,
AGENT_MAC_xface
*
xface
)
{
...
...
@@ -1120,6 +1037,7 @@ int enb_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
xface
->
agent_ctxt
=
&
shared_ctxt
[
mod_id
];
xface
->
enb_agent_send_sr_info
=
enb_agent_send_sr_info
;
xface
->
enb_agent_send_sf_trigger
=
enb_agent_send_sf_trigger
;
mac_agent_registered
[
mod_id
]
=
1
;
return
1
;
...
...
@@ -1134,6 +1052,7 @@ int enb_agent_unregister_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
xface
->
agent_ctxt
=
NULL
;
xface
->
enb_agent_send_sr_info
=
NULL
;
xface
->
enb_agent_send_sf_trigger
=
NULL
;
mac_agent_registered
[
mod_id
]
=
NULL
;
return
1
;
...
...
openair2/ENB_APP/enb_agent_mac.h
View file @
1f520630
...
...
@@ -94,13 +94,9 @@ int enb_agent_mac_sr_info(mid_t mod_id, const void *params, Protocol__ProgranMes
int
enb_agent_mac_destroy_sr_info
(
Protocol__ProgranMessage
*
msg
);
int
enb_agent_mac_
dl
_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
);
int
enb_agent_mac_
sf
_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
);
int
enb_agent_mac_destroy_dl_trigger
(
Protocol__ProgranMessage
*
msg
);
int
enb_agent_mac_ul_trigger
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
);
int
enb_agent_mac_destroy_ul_trigger
(
Protocol__ProgranMessage
*
msg
);
int
enb_agent_mac_destroy_sf_trigger
(
Protocol__ProgranMessage
*
msg
);
/**********************************
...
...
@@ -111,9 +107,7 @@ int enb_agent_mac_destroy_ul_trigger(Protocol__ProgranMessage *msg);
void
enb_agent_send_sr_info
(
mid_t
mod_id
,
msg_context_t
*
context
);
/*Inform the controller about the current UL/DL subframe*/
void
enb_agent_send_dl_trigger
(
mid_t
mod_id
,
msg_context_t
*
context
);
void
enb_agent_send_ul_trigger
(
mid_t
mod_id
,
msg_context_t
*
context
);
void
enb_agent_send_sf_trigger
(
mid_t
mod_id
,
msg_context_t
*
context
);
/*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 @
1f520630
...
...
@@ -48,8 +48,7 @@ typedef struct {
void
(
*
enb_agent_send_sr_info
)(
mid_t
mod_id
,
msg_context_t
*
context
);
/// Inform the controller about the current UL/DL subframe
void
(
*
enb_agent_send_dl_trigger
)(
mid_t
mod_id
,
msg_context_t
*
context
);
void
(
*
enb_agent_send_ul_trigger
)(
mid_t
mod_id
,
msg_context_t
*
context
);
void
(
*
enb_agent_send_sf_trigger
)(
mid_t
mod_id
,
msg_context_t
*
context
);
/*TODO: Fill in with the rest of the MAC layer technology specific callbacks (UL/DL scheduling, RACH info etc)*/
...
...
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