Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
55641754
Commit
55641754
authored
7 years ago
by
Cédric Roux
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/issue281_iq_filename' into develop_integration_2018_w02
parents
c3ba7ba7
1823ce95
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!257
Develop integration 2018 w02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+3
-7
3 additions, 7 deletions
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
with
3 additions
and
7 deletions
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+
3
−
7
View file @
55641754
...
@@ -283,12 +283,11 @@ int64_t wrap_ts = 0;
...
@@ -283,12 +283,11 @@ int64_t wrap_ts = 0;
unsigned
int
u_sf_mode
=
0
;
// 1=record, 2=replay
unsigned
int
u_sf_mode
=
0
;
// 1=record, 2=replay
unsigned
int
u_sf_record
=
0
;
// record mode
unsigned
int
u_sf_record
=
0
;
// record mode
unsigned
int
u_sf_replay
=
0
;
// replay mode
unsigned
int
u_sf_replay
=
0
;
// replay mode
char
u_sf_filename
[
1024
]
;
// subframes file path
char
u_sf_filename
[
1024
]
=
""
;
// subframes file path
unsigned
int
u_sf_max
=
DEF_NB_SF
;
// max number of recorded subframes
unsigned
int
u_sf_max
=
DEF_NB_SF
;
// max number of recorded subframes
unsigned
int
u_sf_loops
=
DEF_SF_NB_LOOP
;
// number of loops in replay mode
unsigned
int
u_sf_loops
=
DEF_SF_NB_LOOP
;
// number of loops in replay mode
unsigned
int
u_sf_read_delay
=
DEF_SF_DELAY_READ
;
// read delay in replay mode
unsigned
int
u_sf_read_delay
=
DEF_SF_DELAY_READ
;
// read delay in replay mode
unsigned
int
u_sf_write_delay
=
DEF_SF_DELAY_WRITE
;
// write delay in replay mode
unsigned
int
u_sf_write_delay
=
DEF_SF_DELAY_WRITE
;
// write delay in replay mode
char
*
tmp_filename
[
1
];
// use an array of pointer (libconfig does not seems to work with char array yet)
char
config_opt_sf_file
[]
=
CONFIG_OPT_SF_FILE
;
char
config_opt_sf_file
[]
=
CONFIG_OPT_SF_FILE
;
char
config_def_sf_file
[]
=
DEF_SF_FILE
;
char
config_def_sf_file
[]
=
DEF_SF_FILE
;
...
@@ -837,7 +836,7 @@ int trx_usrp_recplay_config_init(paramdef_t *usrp_recplay_params) {
...
@@ -837,7 +836,7 @@ int trx_usrp_recplay_config_init(paramdef_t *usrp_recplay_params) {
memcpy
(
usrp_recplay_params
[
0
].
optname
,
config_opt_sf_file
,
strlen
(
config_opt_sf_file
));
memcpy
(
usrp_recplay_params
[
0
].
optname
,
config_opt_sf_file
,
strlen
(
config_opt_sf_file
));
usrp_recplay_params
[
0
].
helpstr
=
config_hlp_sf_file
;
usrp_recplay_params
[
0
].
helpstr
=
config_hlp_sf_file
;
usrp_recplay_params
[
0
].
paramflags
=
PARAMFLAG_NOFREE
;
usrp_recplay_params
[
0
].
paramflags
=
PARAMFLAG_NOFREE
;
usrp_recplay_params
[
0
].
strptr
=
(
char
**
)
&
tmp
_filename
[
0
]
;
usrp_recplay_params
[
0
].
strptr
=
(
char
**
)
&
u_sf
_filename
;
usrp_recplay_params
[
0
].
defstrval
=
NULL
;
usrp_recplay_params
[
0
].
defstrval
=
NULL
;
usrp_recplay_params
[
0
].
type
=
TYPE_STRING
;
usrp_recplay_params
[
0
].
type
=
TYPE_STRING
;
usrp_recplay_params
[
0
].
numelt
=
sizeof
(
u_sf_filename
);
usrp_recplay_params
[
0
].
numelt
=
sizeof
(
u_sf_filename
);
...
@@ -912,16 +911,13 @@ extern "C" {
...
@@ -912,16 +911,13 @@ extern "C" {
// end to check
// end to check
memset
(
usrp_recplay_params
,
0
,
7
*
sizeof
(
paramdef_t
));
memset
(
usrp_recplay_params
,
0
,
7
*
sizeof
(
paramdef_t
));
memset
(
&
u_sf_filename
[
0
],
0
,
1024
);
memset
(
&
u_sf_filename
[
0
],
0
,
1024
);
tmp_filename
[
0
]
=
u_sf_filename
;
if
(
trx_usrp_recplay_config_init
(
usrp_recplay_params
)
!=
0
)
{
if
(
trx_usrp_recplay_config_init
(
usrp_recplay_params
)
!=
0
)
{
std
::
cerr
<<
"USRP device record/replay mode configuration error exiting"
<<
std
::
endl
;
std
::
cerr
<<
"USRP device record/replay mode configuration error exiting"
<<
std
::
endl
;
return
-
1
;
return
-
1
;
}
}
config_process_cmdline
(
usrp_recplay_params
,
sizeof
(
usrp_recplay_params
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
usrp_recplay_params
,
sizeof
(
usrp_recplay_params
)
/
sizeof
(
paramdef_t
),
NULL
);
if
(
strlen
(
tmp_filename
[
0
])
!=
0
)
{
if
(
strlen
(
u_sf_filename
)
==
0
)
{
(
void
)
strcpy
(
u_sf_filename
,
tmp_filename
[
0
]);
}
else
{
(
void
)
strcpy
(
u_sf_filename
,
DEF_SF_FILE
);
(
void
)
strcpy
(
u_sf_filename
,
DEF_SF_FILE
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment