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
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp
index 89f1231..3bcf2de 100644
--- a/Transceiver52M/UHDDevice.cpp
+++ b/Transceiver52M/UHDDevice.cpp
@@ -341,7 +341,8 @@
 	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 @@
 	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 @@
 		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);
diff --git a/Transceiver52M/USRPDevice.cpp b/Transceiver52M/USRPDevice.cpp
index 175b187..e321b0a 100644
--- a/Transceiver52M/USRPDevice.cpp
+++ b/Transceiver52M/USRPDevice.cpp
@@ -522,7 +522,7 @@
     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 @@
     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;
diff --git a/Transceiver52M/runTransceiver.cpp b/Transceiver52M/runTransceiver.cpp
index 8c22420..1b8df36 100644
--- a/Transceiver52M/runTransceiver.cpp
+++ b/Transceiver52M/runTransceiver.cpp
@@ -80,6 +80,7 @@
   int mOversamplingRate = numARFCN/2 + numARFCN;
   RadioDevice *usrp = RadioDevice::make(DEVICERATE);
   if (!usrp->open()) {
+    LOG(ALERT) << "Transceiver exiting..." << std::endl;
     return EXIT_FAILURE;
   }