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
3533b6d3
Commit
3533b6d3
authored
Nov 23, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make L2-sim UE's CQI configurable through telnet
parent
27f413ed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletion
+40
-1
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+9
-1
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+31
-0
No files found.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
3533b6d3
...
...
@@ -44,6 +44,14 @@ nfapi_dl_config_request_t* dl_config_req = NULL;
nfapi_ul_config_request_t
*
ul_config_req
=
NULL
;
nfapi_hi_dci0_request_t
*
hi_dci0_req
=
NULL
;
int
cqi
[
MAX_MOBILES_PER_ENB
]
=
{
[
0
...
MAX_MOBILES_PER_ENB
-
1
]
=
15
};
int
get_ue_cqi
(
int
mod_id
)
{
if
(
cqi
[
mod_id
]
>=
0
&&
cqi
[
mod_id
]
<=
15
)
return
cqi
[
mod_id
];
else
return
6
+
rand
()
%
10
;
}
extern
nfapi_tx_request_pdu_t
*
tx_request_pdu
[
1023
][
10
][
10
];
//extern int timer_subframe;
//extern int timer_frame;
...
...
@@ -254,7 +262,7 @@ void fill_ulsch_cqi_indication_UE_MAC(int Mod_id,
pdu
->
ul_cqi_information
.
channel
=
1
;
// PUSCH
// eNB_scheduler_primitives.c:4839: the upper four bits seem to be the CQI
const
int
cqi
=
15
;
const
int
cqi
=
get_ue_cqi
(
Mod_id
)
;
raw_pdu
->
pdu
[
0
]
=
cqi
<<
4
;
UL_INFO
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
++
;
...
...
targets/RT/USER/lte-ue.c
View file @
3533b6d3
...
...
@@ -74,8 +74,39 @@ int ue_enable_cmd(char *s, int debug, telnet_printfunc_t prnt)
UE_mac_inst
[
ue
].
UE_mode
[
0
]
=
NOT_SYNCHED
;
return
0
;
}
extern
int
cqi
[
MAX_MOBILES_PER_ENB
];
int
ue_cqi_set
(
char
*
s
,
int
debug
,
telnet_printfunc_t
prnt
)
{
LOG_W
(
MAC
,
"%s(): input %s
\n
"
,
__func__
,
s
);
const
char
*
sue
=
strtok
(
s
,
" "
);
if
(
!
sue
)
{
LOG_E
(
MAC
,
"error: could not strtok() UE part of input!
\n
"
);
return
-
1
;
}
/* try to convert: if valid number, use it, else if it might be zero, check
* that string was zero, otherwise give -1 (any) */
const
int
ue
=
atoi
(
sue
)
?
atoi
(
sue
)
:
(
strcmp
(
s
,
"0"
)
==
0
?
0
:
-
1
);
const
char
*
scqi
=
strtok
(
NULL
,
" "
);
if
(
!
scqi
)
{
LOG_E
(
MAC
,
"error: could not strtok() CQI part of input!
\n
"
);
return
-
1
;
}
const
int
c
=
atoi
(
scqi
)
?
atoi
(
scqi
)
:
(
strcmp
(
s
,
"0"
)
==
0
?
0
:
-
1
);
if
(
ue
>=
0
)
cqi
[
ue
]
=
c
;
else
for
(
int
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
++
i
)
cqi
[
i
]
=
c
;
LOG_W
(
MAC
,
"set ue %d (%s) to cqi %d (%s)
\n
"
,
ue
,
ue
<
0
?
"all UEs"
:
"single UE"
,
c
,
c
>=
0
&&
c
<=
15
?
"fixed CQI"
:
"random CQI"
);
return
0
;
}
telnetshell_cmddef_t
ue_status_cmdarray
[]
=
{
{
"ue"
,
"any number >=0"
,
ue_enable_cmd
},
{
"cqi"
,
"[UE] [CQI] -> UE=* for all, CQI=* for random"
,
ue_cqi_set
},
{
""
,
""
,
NULL
},
};
telnetshell_vardef_t
ue_status_vardef
[]
=
{
...
...
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