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
Michael Black
OpenXG-RAN
Commits
b925dd3e
Commit
b925dd3e
authored
Mar 09, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rfsimulator: introduce configurable wait timeout if no UE connected
Use --rfsimulator.wait_timeout 20
parent
d379bbae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
radio/rfsimulator/simulator.c
radio/rfsimulator/simulator.c
+4
-2
No files found.
radio/rfsimulator/simulator.c
View file @
b925dd3e
...
...
@@ -84,7 +84,8 @@
{"modelname", "<channel model name>\n", simOpt, strptr:&modelname, defstrval:"AWGN", TYPE_STRING, 0 },\
{"ploss", "<channel path loss in dB>\n", simOpt, dblptr:&(rfsimulator->chan_pathloss), defdblval:0, TYPE_DOUBLE, 0 },\
{"forgetfact", "<channel forget factor ((0 to 1)>\n", simOpt, dblptr:&(rfsimulator->chan_forgetfact), defdblval:0, TYPE_DOUBLE, 0 },\
{"offset", "<channel offset in samps>\n", simOpt, iptr:&(rfsimulator->chan_offset), defintval:0, TYPE_INT, 0 }\
{"offset", "<channel offset in samps>\n", simOpt, iptr:&(rfsimulator->chan_offset), defintval:0, TYPE_INT, 0 },\
{"wait_timeout", "<wait timeout if no UE connected>\n", simOpt, iptr:&(rfsimulator->wait_timeout), defintval:1, TYPE_INT, 0 },\
};
static
void
getset_currentchannels_type
(
char
*
buf
,
int
debug
,
webdatadef_t
*
tdata
,
telnet_printfunc_t
prnt
);
...
...
@@ -141,6 +142,7 @@ typedef struct {
float
noise_power_dB
;
void
*
telnetcmd_qid
;
poll_telnetcmdq_func_t
poll_telnetcmdq
;
int
wait_timeout
;
}
rfsimulator_state_t
;
...
...
@@ -817,7 +819,7 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest
if
(
t
->
nextRxTstamp
==
0
)
LOG_W
(
HW
,
"No connected device, generating void samples...
\n
"
);
if
(
!
flushInput
(
t
,
1
,
nsamps
))
{
if
(
!
flushInput
(
t
,
t
->
wait_timeout
,
nsamps
))
{
for
(
int
x
=
0
;
x
<
nbAnt
;
x
++
)
memset
(
samplesVoid
[
x
],
0
,
sampleToByte
(
nsamps
,
1
));
...
...
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