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
wangjie
OpenXG-RAN
Commits
95d51446
Commit
95d51446
authored
Feb 22, 2016
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ue_state_change stub implementation
parent
465168d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
4 deletions
+77
-4
openair2/ENB_APP/enb_agent_common.c
openair2/ENB_APP/enb_agent_common.c
+70
-3
openair2/ENB_APP/enb_agent_mac.c
openair2/ENB_APP/enb_agent_mac.c
+1
-1
openair2/ENB_APP/enb_agent_mac_defs.h
openair2/ENB_APP/enb_agent_mac_defs.h
+6
-0
No files found.
openair2/ENB_APP/enb_agent_common.c
View file @
95d51446
...
...
@@ -604,13 +604,80 @@ int enb_agent_destroy_lc_config_reply(Protocol__ProgranMessage *msg) {
}
int
enb_agent_ue_state_change
(
mid_t
mod_id
,
uint32_t
rnti
,
uint8_t
state_change
)
{
/* TODO: Create a progRAN message with the state changes requested for the UE with RNTI rnti */
return
0
;
int
size
;
Protocol__ProgranMessage
*
msg
;
Protocol__PrpHeader
*
header
;
void
*
data
;
int
priority
;
err_code_t
err_code
;
int
xid
=
0
;
if
(
prp_create_header
(
xid
,
PROTOCOL__PRP_TYPE__PRPT_UE_STATE_CHANGE
,
&
header
)
!=
0
)
goto
error
;
Protocol__PrpUeStateChange
*
ue_state_change_msg
;
ue_state_change_msg
=
malloc
(
sizeof
(
Protocol__PrpUeStateChange
));
if
(
ue_state_change_msg
==
NULL
)
{
goto
error
;
}
protocol__prp_ue_state_change__init
(
ue_state_change_msg
);
ue_state_change_msg
->
has_type
=
1
;
ue_state_change_msg
->
type
=
state_change
;
Protocol__PrpUeConfig
*
config
;
config
=
malloc
(
sizeof
(
Protocol__PrpUeConfig
));
if
(
config
==
NULL
)
{
goto
error
;
}
protocol__prp_ue_config__init
(
config
);
if
(
state_change
==
PROTOCOL__PRP_UE_STATE_CHANGE_TYPE__PRUESC_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__PRUESC_UPDATED
||
state_change
==
PROTOCOL__PRP_UE_STATE_CHANGE_TYPE__PRUESC_ACTIVATED
)
{
// TODO: Set the whole UE configuration message
}
else
if
(
state_change
==
PROTOCOL__PRP_UE_STATE_CHANGE_TYPE__PRUESC_MOVED
)
{
// TODO: Not supported for now. Leave blank
}
ue_state_change_msg
->
config
=
config
;
msg
=
malloc
(
sizeof
(
Protocol__ProgranMessage
));
if
(
msg
==
NULL
)
{
goto
error
;
}
protocol__progran_message__init
(
msg
);
msg
->
msg_case
=
PROTOCOL__PROGRAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG
;
msg
->
msg_dir
=
PROTOCOL__PROGRAN_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__PROGRAN_ERR__MSG_ENQUEUING
;
goto
error
;
}
LOG_D
(
ENB_AGENT
,
"sent message with size %d
\n
"
,
size
);
return
;
error:
LOG_D
(
ENB_AGENT
,
"Could not send UE state message
\n
"
);
}
int
enb_agent_destroy_ue_state_change
(
Protocol__ProgranMessage
*
msg
)
{
/* TODO: Dealocate memory for a dynamically allocated UE state change message */
if
(
msg
->
msg_case
!=
PROTOCOL__PROGRAN_MESSAGE__MSG_UE_STATE_CHANGE_MSG
)
goto
error
;
free
(
msg
->
ue_state_change_msg
->
header
);
//TODO: Free the contents of the UE config structure
free
(
msg
->
ue_state_change_msg
);
free
(
msg
);
return
0
;
error:
//LOG_E(MAC, "%s: an error occured\n", __FUNCTION__);
return
-
1
;
}
int
enb_agent_destroy_enb_config_request
(
Protocol__ProgranMessage
*
msg
)
{
...
...
openair2/ENB_APP/enb_agent_mac.c
View file @
95d51446
...
...
@@ -1266,7 +1266,7 @@ 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
;
xface
->
enb_agent_schedule_ue_spec
=
schedule_ue_spec_default
;
xface
->
enb_agent_notify_ue_state_change
=
enb_agent_ue_state_change
;
mac_agent_registered
[
mod_id
]
=
1
;
agent_mac_xface
[
mod_id
]
=
xface
;
...
...
openair2/ENB_APP/enb_agent_mac_defs.h
View file @
95d51446
...
...
@@ -62,6 +62,12 @@ typedef struct {
void
(
*
enb_agent_schedule_ue_spec
)(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__ProgranMessage
*
dl_info
);
/// Notify the controller for a state change of a particular UE, by sending the proper
/// UE state change message (ACTIVATION, DEACTIVATION, HANDOVER)
void
(
*
enb_agent_notify_ue_state_change
)(
mid_t
mod_id
,
uint32_t
rnti
,
uint32_t
state_change
);
/*TODO: Fill in with the rest of the MAC layer technology specific callbacks (UL/DL scheduling, RACH info etc)*/
}
AGENT_MAC_xface
;
...
...
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