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
2def2ee4
Commit
2def2ee4
authored
Dec 18, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing return value
parent
fa7fd716
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+32
-3
No files found.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
2def2ee4
...
...
@@ -928,9 +928,38 @@ int trx_usrp_get_stats(openair0_device *device) {
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
uhd
::
async_metadata_t
async_metadata
;
s
->
tx_stream
->
recv_async_msg
(
async_metadata
,
0.0001
);
return
(
async_metadata
.
event_code
);
if
(
s
->
tx_stream
->
recv_async_msg
(
async_metadata
,
0.0001
))
{
switch
(
async_metadata
.
event_code
)
{
case
uhd
:
:
async_metadata_t
::
EVENT_CODE_BURST_ACK
:
//A burst was successfully transmitted.
return
(
0
);
case
uhd
:
:
async_metadata_t
::
EVENT_CODE_UNDERFLOW
:
//An internal send buffer has emptied.
return
(
1
);
case
uhd
:
:
async_metadata_t
::
EVENT_CODE_SEQ_ERROR
:
//Packet loss between host and device.
return
(
2
);
case
uhd
:
:
async_metadata_t
::
EVENT_CODE_TIME_ERROR
:
//Packet had time that was late.
return
(
3
);
case
uhd
:
:
async_metadata_t
::
EVENT_CODE_UNDERFLOW_IN_PACKET
:
//Underflow occurred inside a packet.
return
(
4
);
case
uhd
:
:
async_metadata_t
::
EVENT_CODE_SEQ_ERROR_IN_BURST
:
//Packet loss within a burst.
return
(
5
);
case
uhd
:
:
async_metadata_t
::
EVENT_CODE_USER_PAYLOAD
:
//Some kind of custom user payload.
return
(
6
);
default:
return
(
-
1
);
}
}
else
{
return
(
-
1
);
}
}
/*! \brief Reset the USRP statistics
...
...
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