commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r5636 - gnuradio/branches/developers/eb/ibu/usrp/host/


From: eb
Subject: [Commit-gnuradio] r5636 - gnuradio/branches/developers/eb/ibu/usrp/host/apps
Date: Sun, 3 Jun 2007 10:12:06 -0600 (MDT)

Author: eb
Date: 2007-06-03 10:12:05 -0600 (Sun, 03 Jun 2007)
New Revision: 5636

Modified:
   gnuradio/branches/developers/eb/ibu/usrp/host/apps/test_usrp_inband_tx.cc
Log:
testing inband TX completes all states and generates frames, need to check 
output

Modified: 
gnuradio/branches/developers/eb/ibu/usrp/host/apps/test_usrp_inband_tx.cc
===================================================================
--- gnuradio/branches/developers/eb/ibu/usrp/host/apps/test_usrp_inband_tx.cc   
2007-06-03 15:57:20 UTC (rev 5635)
+++ gnuradio/branches/developers/eb/ibu/usrp/host/apps/test_usrp_inband_tx.cc   
2007-06-03 16:12:05 UTC (rev 5636)
@@ -165,7 +165,7 @@
   pmt_t status = PMT_F;
   std::string error_msg;
   
-  // std::cout << msg << std::endl;
+  //std::cout << msg << std::endl;
 
   switch(d_state){
   case OPENING_USRP:
@@ -215,7 +215,35 @@
     goto unhandled;
 
   case CLOSING_CHANNEL:
+    if (pmt_eq(event, s_response_deallocate_channel)){
+      status = pmt_nth(1, data);
+
+      if (pmt_eq(status, PMT_T)){
+       close_usrp();
+       return;
+      }
+      else {
+       error_msg = "failed to deallocate channel:";
+       goto bail;
+      }
+    }
+    goto unhandled;
+
   case CLOSING_USRP:
+    if (pmt_eq(event, s_response_close)){
+      status = pmt_nth(1, data);
+
+      if (pmt_eq(status, PMT_T)){
+       shutdown_all(PMT_T);
+       return;
+      }
+      else {
+       error_msg = "failed to close USRP:";
+       goto bail;
+      }
+    }
+    goto unhandled;
+
   default:
     goto unhandled;
   }
@@ -328,14 +356,10 @@
 test_usrp_tx::enter_closing_channel()
 {
   d_state = CLOSING_CHANNEL;
-  std::cout << "enter_closing_channel\n";
   
-  // FIXME
-
-  shutdown_all(PMT_T);
+  d_tx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_tx_chan));
 }
 
-
 REGISTER_MBLOCK_CLASS(test_usrp_tx);
 
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]