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
92f54765
Commit
92f54765
authored
Jan 27, 2016
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrated MAC DL config progran message to agent
parent
c1c9b0bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
9 deletions
+56
-9
openair2/ENB_APP/enb_agent_handler.c
openair2/ENB_APP/enb_agent_handler.c
+5
-3
openair2/ENB_APP/enb_agent_mac.c
openair2/ENB_APP/enb_agent_mac.c
+47
-6
openair2/ENB_APP/enb_agent_mac.h
openair2/ENB_APP/enb_agent_mac.h
+4
-0
No files found.
openair2/ENB_APP/enb_agent_handler.c
View file @
92f54765
...
...
@@ -46,9 +46,10 @@ enb_agent_message_decoded_callback messages_callback[][3] = {
{
enb_agent_echo_reply
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_ECHO_REQUEST_MSG*/
{
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
},
/*PROTOCOK__PROGRAN_MESSAGE__MSG_SF_TRIGGER_MSG*/
{
0
,
0
,
0
},
/*SR_INFO*/
{
0
,
0
,
0
},
/*PROTOCOL__PROGRAN_MESSAGE__MSG_STATS_REPLY_MSG*/
{
0
,
0
,
0
},
/*PROTOCOK__PROGRAN_MESSAGE__MSG_SF_TRIGGER_MSG*/
{
0
,
0
,
0
},
/*SR_INFO*/
{
0
,
0
,
0
},
/*DL_MAC_CONFIG*/
};
...
...
@@ -60,6 +61,7 @@ enb_agent_message_destruction_callback message_destruction_callback[] = {
enb_agent_mac_destroy_stats_reply
,
enb_agent_mac_destroy_sf_trigger
,
enb_agent_mac_destroy_sr_info
,
enb_agent_mac_destroy_dl_config
,
};
static
const
char
*
enb_agent_direction2String
[]
=
{
...
...
openair2/ENB_APP/enb_agent_mac.c
View file @
92f54765
...
...
@@ -45,6 +45,9 @@
/*Flags showing if a mac agent has already been registered*/
unsigned
int
mac_agent_registered
[
NUM_MAX_ENB
];
/*Array containing the Agent-MAC interfaces*/
AGENT_MAC_xface
*
agent_mac_xface
[
NUM_MAX_ENB
];
int
enb_agent_mac_handle_stats
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__ProgranMessage
**
msg
){
// TODO: Must deal with sanitization of input
...
...
@@ -991,6 +994,43 @@ 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__ProgranMessage
**
msg
)
{
int
xid
=
0
;
Protocol__PrpHeader
*
header
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PRPT_DL_MAC_CONFIG
,
&
header
)
!=
0
)
goto
error
;
Protocol__PrpDlMacConfig
*
dl_mac_config_msg
;
dl_mac_config_msg
=
malloc
(
sizeof
(
Protocol__PrpDlMacConfig
));
if
(
dl_mac_config_msg
==
NULL
)
{
goto
error
;
}
protocol__prp_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__ProgranMessage
));
if
(
*
msg
==
NULL
)
goto
error
;
protocol__progran_message__init
(
*
msg
);
(
*
msg
)
->
msg_case
=
PROTOCOL__PROGRAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG
;
(
*
msg
)
->
msg_dir
=
PROTOCOL__PROGRAN_DIRECTION__INITIATING_MESSAGE
;
(
*
msg
)
->
dl_mac_config_msg
=
dl_mac_config_msg
;
return
0
;
error:
return
-
1
;
}
int
enb_agent_mac_destroy_dl_config
(
Protocol__ProgranMessage
*
msg
)
{
//TODO: De-allocate the memory of the message
return
-
1
;
}
/***********************************************
* eNB agent - technology mac API implementation
***********************************************/
...
...
@@ -1109,7 +1149,7 @@ void enb_agent_send_update_mac_stats(mid_t mod_id) {
}
int
enb_agent_register_mac_xface
(
mid_t
mod_id
,
AGENT_MAC_xface
*
xface
)
{
if
(
!
mac_agent_registered
[
mod_id
])
{
if
(
mac_agent_registered
[
mod_id
])
{
LOG_E
(
MAC
,
"MAC agent for eNB %d is already registered
\n
"
,
mod_id
);
return
-
1
;
}
...
...
@@ -1119,22 +1159,23 @@ int enb_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
xface
->
enb_agent_send_sf_trigger
=
enb_agent_send_sf_trigger
;
xface
->
enb_agent_send_update_mac_stats
=
enb_agent_send_update_mac_stats
;
mac_agent_registered
[
mod_id
]
=
1
;
agent_mac_xface
[
mod_id
]
=
xface
;
return
0
;
}
int
enb_agent_unregister_mac_xface
(
mid_t
mod_id
,
AGENT_MAC_xface
*
xface
)
{
if
(
mac_agent_registered
[
mod_id
])
{
LOG_E
(
MAC
,
"MAC agent for eNB %d is already registered
\n
"
,
mod_id
);
return
-
1
;
}
//xface->agent_ctxt = NULL;
xface
->
enb_agent_send_sr_info
=
NULL
;
xface
->
enb_agent_send_sf_trigger
=
NULL
;
xface
->
enb_agent_send_update_mac_stats
=
NULL
;
mac_agent_registered
[
mod_id
]
=
0
;
agent_mac_xface
[
mod_id
]
=
NULL
;
return
0
;
}
...
...
openair2/ENB_APP/enb_agent_mac.h
View file @
92f54765
...
...
@@ -94,6 +94,10 @@ int enb_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Progran
int
enb_agent_mac_destroy_sf_trigger
(
Protocol__ProgranMessage
*
msg
);
int
enb_agent_mac_create_empty_dl_config
(
mid_t
mod_id
,
Protocol__ProgranMessage
**
msg
);
int
enb_agent_mac_destroy_dl_config
(
Protocol__ProgranMessage
*
msg
);
/**********************************
* eNB agent - technology mac API
...
...
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