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
78bc736c
Commit
78bc736c
authored
Jan 19, 2016
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed frame-subframe numbering bug
parent
1f520630
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
openair2/ENB_APP/enb_agent_common.c
openair2/ENB_APP/enb_agent_common.c
+17
-8
openair2/ENB_APP/enb_agent_common.h
openair2/ENB_APP/enb_agent_common.h
+8
-2
No files found.
openair2/ENB_APP/enb_agent_common.c
View file @
78bc736c
...
...
@@ -292,13 +292,18 @@ int get_current_time_ms (mid_t mod_id, int subframe_flag){
}
int
get_current_frame
(
mid_t
mod_id
)
{
unsigned
int
get_current_frame
(
mid_t
mod_id
)
{
#warning "SFN will not be in [0-1023] when oaisim is used"
return
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
frame
;
}
int
get_current_subframe
(
mid_t
mod_id
)
{
unsigned
int
get_current_system_frame_num
(
mid_t
mod_id
)
{
return
(
get_current_frame
(
mod_id
)
%
1024
);
}
unsigned
int
get_current_subframe
(
mid_t
mod_id
)
{
return
((
eNB_MAC_INST
*
)
enb
[
mod_id
])
->
subframe
;
...
...
@@ -306,12 +311,16 @@ int get_current_subframe (mid_t mod_id) {
uint16_t
get_sfn_sf
(
mid_t
mod_id
)
{
uint16_t
frame
,
subframe
;
uint16_t
sfn_sf
;
frame_t
frame
;
sub_frame_t
subframe
;
uint16_t
sfn_sf
,
frame_mask
,
sf_mask
;
frame
=
(
frame_t
)
get_current_system_frame_num
(
mod_id
);
subframe
=
(
sub_frame_t
)
get_current_subframe
(
mod_id
);
frame_mask
=
((
1
<<
12
)
-
1
);
sf_mask
=
((
1
<<
4
)
-
1
);
sfn_sf
=
(
subframe
&
sf_mask
)
|
((
frame
&
frame_mask
)
<<
4
);
frame
=
(
uint16_t
)
get_current_frame
(
mod_id
);
subframe
=
(
uint16_t
)
get_current_subframe
(
mod_id
);
sfn_sf
=
(
subframe
<<
12
)
|
frame
;
return
sfn_sf
;
}
...
...
openair2/ENB_APP/enb_agent_common.h
View file @
78bc736c
...
...
@@ -109,9 +109,15 @@ void set_enb_vars(mid_t mod_id, ran_name_t ran);
int
get_current_time_ms
(
mid_t
mod_id
,
int
subframe_flag
);
int
get_current_frame
(
mid_t
mod_id
);
/*Return the current frame number
*Could be using implementation specific numbering of frames
*/
unsigned
int
get_current_frame
(
mid_t
mod_id
);
/*Return the current SFN (0-1023)*/
unsigned
int
get_current_system_frame_num
(
mid_t
mod_id
);
int
get_current_subframe
(
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 progRAN protocol*/
...
...
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