mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-10-23 16:13:52 +00:00
transceiver52M: bump critial errors to ALERT level
Device errors regarding properties such as sample rate or frequency tuning are almost always fatal and lead to the common error "assuming TRX is dead". Make sure that these errors are clearly presented to the user. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2700 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
@@ -341,7 +341,8 @@ double uhd_device::set_rates(double rate)
|
||||
actual_clk_rt = usrp_dev->get_master_clock_rate();
|
||||
|
||||
if (actual_clk_rt != master_clk_rt) {
|
||||
LOG(ERR) << "Failed to set master clock rate";
|
||||
LOG(ALERT) << "Failed to set master clock rate";
|
||||
LOG(ALERT) << "Actual clock rate " << actual_clk_rt;
|
||||
return -1.0;
|
||||
}
|
||||
#endif
|
||||
@@ -352,11 +353,11 @@ double uhd_device::set_rates(double rate)
|
||||
actual_rt = usrp_dev->get_tx_rate();
|
||||
|
||||
if (actual_rt != rate) {
|
||||
LOG(ERR) << "Actual sample rate differs from desired rate";
|
||||
LOG(ALERT) << "Actual sample rate differs from desired rate";
|
||||
return -1.0;
|
||||
}
|
||||
if (usrp_dev->get_rx_rate() != actual_rt) {
|
||||
LOG(ERR) << "Transmit and receive sample rates do not match";
|
||||
LOG(ALERT) << "Transmit and receive sample rates do not match";
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
@@ -643,7 +644,7 @@ int uhd_device::readSamples(short *buf, int len, bool *overrun,
|
||||
rc = check_rx_md_err(metadata, num_smpls);
|
||||
switch (rc) {
|
||||
case ERROR_UNRECOVERABLE:
|
||||
LOG(ERR) << "UHD: Unrecoverable error, exiting.";
|
||||
LOG(ALERT) << "Unrecoverable error, exiting...";
|
||||
exit(-1);
|
||||
case ERROR_TIMING:
|
||||
restart(prev_ts);
|
||||
|
@@ -522,7 +522,7 @@ bool USRPDevice::setTxFreq(double wFreq)
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
LOG(ERR) << "set TX: " << wFreq << "failed" << std::endl
|
||||
LOG(ALERT) << "set TX: " << wFreq << "failed" << std::endl
|
||||
<< " baseband freq: " << result.baseband_freq << std::endl
|
||||
<< " DDC freq: " << result.dxc_freq << std::endl
|
||||
<< " residual freq: " << result.residual_freq;
|
||||
@@ -542,7 +542,7 @@ bool USRPDevice::setRxFreq(double wFreq)
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
LOG(ERR) << "set RX: " << wFreq << "failed" << std::endl
|
||||
LOG(ALERT) << "set RX: " << wFreq << "failed" << std::endl
|
||||
<< " baseband freq: " << result.baseband_freq << std::endl
|
||||
<< " DDC freq: " << result.dxc_freq << std::endl
|
||||
<< " residual freq: " << result.residual_freq;
|
||||
|
@@ -80,6 +80,7 @@ int main(int argc, char *argv[])
|
||||
int mOversamplingRate = numARFCN/2 + numARFCN;
|
||||
RadioDevice *usrp = RadioDevice::make(DEVICERATE);
|
||||
if (!usrp->open()) {
|
||||
LOG(ALERT) << "Transceiver exiting..." << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user