transceiver: uhd: prevent output of underrun message at ERROR level

The appearance of underruns on B100 due to the latency transmit
window scares people. These should not be logged at ERROR level
because the events are generally not real errors. So use the same
behaviour of USRP1 of not logging these events. The presence of
underrun events can be determined by changes in the latency window
that is shown with log level set at INFO.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3988 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
ttsou 2012-08-08 23:30:23 +00:00
parent 221f23ee44
commit 60dc4c9da4
1 changed files with 8 additions and 4 deletions

View File

@ -760,14 +760,18 @@ bool uhd_device::setRxFreq(double wFreq)
bool uhd_device::recv_async_msg()
{
uhd::async_metadata_t metadata;
if (!usrp_dev->get_device()->recv_async_msg(metadata))
uhd::async_metadata_t md;
if (!usrp_dev->get_device()->recv_async_msg(md))
return false;
// Assume that any error requires resynchronization
if (metadata.event_code != uhd::async_metadata_t::EVENT_CODE_BURST_ACK) {
if (md.event_code != uhd::async_metadata_t::EVENT_CODE_BURST_ACK) {
aligned = false;
LOG(ERR) << str_code(metadata);
if ((md.event_code != uhd::async_metadata_t::EVENT_CODE_UNDERFLOW) &&
(md.event_code != uhd::async_metadata_t::EVENT_CODE_TIME_ERROR)) {
LOG(ERR) << str_code(md);
}
}
return true;