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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
971bacb7
Commit
971bacb7
authored
2 years ago
by
francescomani
Committed by
Robert Schmidt
2 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang warning fixes to compile rfsimulator
parent
5d38a999
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
radio/rfsimulator/simulator.c
radio/rfsimulator/simulator.c
+19
-19
No files found.
radio/rfsimulator/simulator.c
View file @
971bacb7
...
@@ -77,15 +77,15 @@
...
@@ -77,15 +77,15 @@
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define simOpt PARAMFLAG_NOFREE|PARAMFLAG_CMDLINE_NOPREFIXENABLED
#define simOpt PARAMFLAG_NOFREE|PARAMFLAG_CMDLINE_NOPREFIXENABLED
#define RFSIMULATOR_PARAMS_DESC { \
#define RFSIMULATOR_PARAMS_DESC { \
{"serveraddr", "<ip address to connect to>\n", simOpt,
strptr:&rfsimulator->ip, defstrval:
"127.0.0.1", TYPE_STRING, 0 },\
{"serveraddr", "<ip address to connect to>\n", simOpt,
.strptr=&rfsimulator->ip, .defstrval=
"127.0.0.1", TYPE_STRING, 0 },\
{"serverport", "<port to connect to>\n", simOpt,
u16ptr:&(rfsimulator->port), defuintval:
PORT, TYPE_UINT16, 0 },\
{"serverport", "<port to connect to>\n", simOpt,
.u16ptr=&(rfsimulator->port), .defuintval=
PORT, TYPE_UINT16, 0 },\
{RFSIMU_OPTIONS_PARAMNAME, RFSIM_CONFIG_HELP_OPTIONS, 0,
strlistptr:NULL, defstrlistval:
NULL, TYPE_STRINGLIST,0 },\
{RFSIMU_OPTIONS_PARAMNAME, RFSIM_CONFIG_HELP_OPTIONS, 0,
.strlistptr=NULL, .defstrlistval=
NULL, TYPE_STRINGLIST,0 },\
{"IQfile", "<file path to use when saving IQs>\n",simOpt,
strptr:&saveF, defstrval:
"/tmp/rfsimulator.iqs",TYPE_STRING, 0 },\
{"IQfile", "<file path to use when saving IQs>\n",simOpt,
.strptr=&saveF, .defstrval=
"/tmp/rfsimulator.iqs",TYPE_STRING, 0 },\
{"modelname", "<channel model name>\n", simOpt,
strptr:&modelname, defstrval:
"AWGN", TYPE_STRING, 0 },\
{"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 },\
{"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 },\
{"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 },\
{"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
);
static
void
getset_currentchannels_type
(
char
*
buf
,
int
debug
,
webdatadef_t
*
tdata
,
telnet_printfunc_t
prnt
);
...
@@ -557,12 +557,12 @@ static int startServer(openair0_device *device) {
...
@@ -557,12 +557,12 @@ static int startServer(openair0_device *device) {
int
enable
=
1
;
int
enable
=
1
;
AssertFatal
(
setsockopt
(
t
->
listen_sock
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
enable
,
sizeof
(
int
))
==
0
,
""
);
AssertFatal
(
setsockopt
(
t
->
listen_sock
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
enable
,
sizeof
(
int
))
==
0
,
""
);
struct
sockaddr_in
addr
=
{
struct
sockaddr_in
addr
=
{
sin_family:
.
sin_family
=
AF_INET
,
AF_INET
,
sin_port:
.
sin_port
=
htons
(
t
->
port
),
htons
(
t
->
port
),
sin_addr:
.
sin_addr
=
{
s_addr
:
INADDR_ANY
}
{
.
s_addr
=
INADDR_ANY
}
};
};
int
rc
=
bind
(
t
->
listen_sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
int
rc
=
bind
(
t
->
listen_sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
AssertFatal
(
rc
==
0
,
"bind failed: errno %d, %s"
,
errno
,
strerror
(
errno
));
AssertFatal
(
rc
==
0
,
"bind failed: errno %d, %s"
,
errno
,
strerror
(
errno
));
...
@@ -580,12 +580,12 @@ static int startClient(openair0_device *device) {
...
@@ -580,12 +580,12 @@ static int startClient(openair0_device *device) {
int
sock
;
int
sock
;
AssertFatal
((
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
>=
0
,
""
);
AssertFatal
((
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
>=
0
,
""
);
struct
sockaddr_in
addr
=
{
struct
sockaddr_in
addr
=
{
sin_family:
.
sin_family
=
AF_INET
,
AF_INET
,
sin_port:
.
sin_port
=
htons
(
t
->
port
),
htons
(
t
->
port
),
sin_addr:
.
sin_addr
=
{
s_addr
:
INADDR_ANY
}
{
.
s_addr
=
INADDR_ANY
}
};
};
addr
.
sin_addr
.
s_addr
=
inet_addr
(
t
->
ip
);
addr
.
sin_addr
.
s_addr
=
inet_addr
(
t
->
ip
);
bool
connected
=
false
;
bool
connected
=
false
;
...
@@ -634,7 +634,7 @@ static int rfsimulator_write_internal(rfsimulator_state_t *t, openair0_timestamp
...
@@ -634,7 +634,7 @@ static int rfsimulator_write_internal(rfsimulator_state_t *t, openair0_timestamp
}
}
}
}
if
(
t
->
lastWroteTS
!=
0
&&
abs
((
double
)
t
->
lastWroteTS
-
timestamp
)
>
(
double
)
CirSize
)
if
(
t
->
lastWroteTS
!=
0
&&
f
abs
((
double
)
t
->
lastWroteTS
-
timestamp
)
>
(
double
)
CirSize
)
LOG_E
(
HW
,
"Discontinuous TX gap too large Tx:%lu, %lu
\n
"
,
t
->
lastWroteTS
,
timestamp
);
LOG_E
(
HW
,
"Discontinuous TX gap too large Tx:%lu, %lu
\n
"
,
t
->
lastWroteTS
,
timestamp
);
if
(
t
->
lastWroteTS
>
timestamp
+
nsamps
)
if
(
t
->
lastWroteTS
>
timestamp
+
nsamps
)
...
@@ -770,7 +770,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
...
@@ -770,7 +770,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
pthread_mutex_lock
(
&
Sockmutex
);
pthread_mutex_lock
(
&
Sockmutex
);
if
(
t
->
lastWroteTS
!=
0
&&
(
abs
((
double
)
t
->
lastWroteTS
-
b
->
lastReceivedTS
)
>
(
double
)
CirSize
))
if
(
t
->
lastWroteTS
!=
0
&&
(
f
abs
((
double
)
t
->
lastWroteTS
-
b
->
lastReceivedTS
)
>
(
double
)
CirSize
))
LOG_E
(
HW
,
"UEsock: %d Tx/Rx shift too large Tx:%lu, Rx:%lu
\n
"
,
fd
,
t
->
lastWroteTS
,
b
->
lastReceivedTS
);
LOG_E
(
HW
,
"UEsock: %d Tx/Rx shift too large Tx:%lu, Rx:%lu
\n
"
,
fd
,
t
->
lastWroteTS
,
b
->
lastReceivedTS
);
pthread_mutex_unlock
(
&
Sockmutex
);
pthread_mutex_unlock
(
&
Sockmutex
);
...
...
This diff is collapsed.
Click to expand it.
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