Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
298d8d67
Commit
298d8d67
authored
10 years ago
by
Raymond Knopp
Browse files
Options
Downloads
Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5605
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
fda79001
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+11
-2
11 additions, 2 deletions
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
with
11 additions
and
2 deletions
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+
11
−
2
View file @
298d8d67
...
...
@@ -65,7 +65,7 @@ static int trx_usrp_start(openair0_device *device)
// init recv and send streaming
uhd
::
stream_cmd_t
cmd
(
uhd
::
stream_cmd_t
::
STREAM_MODE_START_CONTINUOUS
);
cmd
.
time_spec
=
s
->
usrp
->
get_time_now
()
+
uhd
::
time_spec_t
(
0.01
);
cmd
.
time_spec
=
s
->
usrp
->
get_time_now
()
+
uhd
::
time_spec_t
(
0.
0
01
);
cmd
.
stream_now
=
false
;
// start at constant delay
s
->
rx_stream
->
issue_stream_cmd
(
cmd
);
...
...
@@ -134,6 +134,14 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
return
samples_received
;
}
openair0_timestamp
get_usrp_time
(
openair0_device
*
device
)
{
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
return
s
->
usrp
->
get_time_now
().
to_ticks
(
s
->
sample_rate
);
}
static
bool
is_equal
(
double
a
,
double
b
)
{
return
std
::
fabs
(
a
-
b
)
<
std
::
numeric_limits
<
double
>::
epsilon
();
...
...
@@ -141,11 +149,12 @@ static bool is_equal(double a, double b)
int
openair0_device_init
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
// uhd::set_thread_priority_safe(1.0);
usrp_state_t
*
s
=
(
usrp_state_t
*
)
malloc
(
sizeof
(
usrp_state_t
));
memset
(
s
,
0
,
sizeof
(
usrp_state_t
));
// Initialize USRP device
std
::
string
args
=
""
;
std
::
string
args
=
"
type=b200
"
;
uhd
::
device_addrs_t
device_adds
=
uhd
::
device
::
find
(
args
);
if
(
device_adds
.
size
()
==
0
)
{
...
...
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