[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5721 - gnuradio/branches/developers/gnychis/inband/us
From: |
gnychis |
Subject: |
[Commit-gnuradio] r5721 - gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband |
Date: |
Wed, 6 Jun 2007 16:58:49 -0600 (MDT) |
Author: gnychis
Date: 2007-06-06 16:58:48 -0600 (Wed, 06 Jun 2007)
New Revision: 5721
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.cc
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.h
Log:
Checking in cleaner QA code for TX side
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.cc
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.cc
2007-06-06 22:56:32 UTC (rev 5720)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.cc
2007-06-06 22:58:48 UTC (rev 5721)
@@ -631,11 +631,11 @@
// Perform an open, and a second open which should fail
d_cs->send(s_cmd_open,
pmt_list2(pmt_list2(s_response_open,PMT_T),
- pmt_from_long(0)));
+ pmt_from_long(0)));
d_cs->send(s_cmd_open,
pmt_list2(pmt_list2(s_response_open,PMT_F),
- pmt_from_long(0)));
+ pmt_from_long(0)));
// A close should now be successful since the interface is open
d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
@@ -646,7 +646,7 @@
// Just to be thorough, try an open and close again
d_cs->send(s_cmd_open,
pmt_list2(pmt_list2(s_response_open,PMT_T),
- pmt_from_long(0)));
+ pmt_from_long(0)));
d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
@@ -766,30 +766,70 @@
std::cout << "[qa_tx_top] Starting tests\n";
// A transmit before an open should fail
- d_tx->send(s_cmd_xmit_raw_frame,
pmt_list4(pmt_list2(s_response_xmit_raw_frame,PMT_F), pmt_from_long(0),
pmt_make_u32vector(transport_pkt::max_payload()/4, 0), pmt_from_long(0)));
+ d_tx->send(s_cmd_xmit_raw_frame,
+ pmt_list4(pmt_list2(s_response_xmit_raw_frame, PMT_F),
+ pmt_from_long(0),
+ pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
+ pmt_from_long(0)));
// Now open
- d_cs->send(s_cmd_open, pmt_list2(pmt_list2(s_response_open,PMT_T),
pmt_from_long(0)));
+ d_cs->send(s_cmd_open,
+ pmt_list2(pmt_list2(s_response_open,PMT_T),
+ pmt_from_long(0)));
// Try to transmit on a channel that we have no allocation for
- d_tx->send(s_cmd_xmit_raw_frame,
pmt_list4(pmt_list2(s_response_xmit_raw_frame,pmt_from_long(usrp_server::PERMISSION_DENIED)),
pmt_from_long(0), pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
pmt_from_long(0)));
+ d_tx->send(s_cmd_xmit_raw_frame,
+ pmt_list4(pmt_list2(s_response_xmit_raw_frame,
+
pmt_from_long(usrp_server::PERMISSION_DENIED)),
+ pmt_from_long(0),
+ pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
+ pmt_from_long(0)));
- // Get a channel allocation and send on it, we assume 0 (FIXME) until
'defer' is implemented for simplicity
- d_tx->send(s_cmd_allocate_channel,
pmt_list2(pmt_list2(s_response_allocate_channel,PMT_T), pmt_from_long(1)));
- d_tx->send(s_cmd_xmit_raw_frame,
pmt_list4(pmt_list2(s_response_xmit_raw_frame,PMT_T), pmt_from_long(0),
pmt_make_u32vector(transport_pkt::max_payload()/4, 0), pmt_from_long(0)));
+ // Get a channel allocation and send on it, we assume 0 (FIXME) until 'defer'
+ // is implemented for simplicity
+ d_tx->send(s_cmd_allocate_channel,
+ pmt_list2(pmt_list2(s_response_allocate_channel, PMT_T),
+ pmt_from_long(1)));
+ d_tx->send(s_cmd_xmit_raw_frame,
+ pmt_list4(pmt_list2(s_response_xmit_raw_frame, PMT_T),
+ pmt_from_long(0),
+ pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
+ pmt_from_long(0)));
+
// Close should be successful
d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
// After closing, a new transmit raw frame should fail again
- d_tx->send(s_cmd_xmit_raw_frame,
pmt_list4(pmt_list2(s_response_xmit_raw_frame,PMT_F), pmt_from_long(0),
pmt_make_u32vector(transport_pkt::max_payload()/4, 0), pmt_from_long(0)));
+ d_tx->send(s_cmd_xmit_raw_frame,
+ pmt_list4(pmt_list2(s_response_xmit_raw_frame, PMT_F),
+ pmt_from_long(0),
+ pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
+ pmt_from_long(0)));
- // Reopen and retry before getting an allocation, the first xmit should
fail, after we allocate it should work again
- d_cs->send(s_cmd_open, pmt_list2(pmt_list2(s_response_open,PMT_T),
pmt_from_long(0)));
- d_tx->send(s_cmd_xmit_raw_frame,
pmt_list4(pmt_list2(s_response_xmit_raw_frame,pmt_from_long(usrp_server::PERMISSION_DENIED)),
pmt_from_long(0), pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
pmt_from_long(0)));
- d_tx->send(s_cmd_allocate_channel,
pmt_list2(pmt_list2(s_response_allocate_channel,PMT_T), pmt_from_long(1)));
- d_tx->send(s_cmd_xmit_raw_frame,
pmt_list4(pmt_list2(s_response_xmit_raw_frame,PMT_T), pmt_from_long(0),
pmt_make_u32vector(transport_pkt::max_payload()/4, 0), pmt_from_long(0)));
+ // Reopen and retry before getting an allocation, the first xmit should fail,
+ // after we allocate it should work again
+ d_cs->send(s_cmd_open,
+ pmt_list2(pmt_list2(s_response_open, PMT_T),
+ pmt_from_long(0)));
+ d_tx->send(s_cmd_xmit_raw_frame,
+ pmt_list4(pmt_list2(s_response_xmit_raw_frame,
+
pmt_from_long(usrp_server::PERMISSION_DENIED)),
+ pmt_from_long(0),
+ pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
+ pmt_from_long(0)));
+
+ d_tx->send(s_cmd_allocate_channel,
+ pmt_list2(pmt_list2(s_response_allocate_channel, PMT_T),
+ pmt_from_long(1)));
+
+ d_tx->send(s_cmd_xmit_raw_frame,
+ pmt_list4(pmt_list2(s_response_xmit_raw_frame,PMT_T),
+ pmt_from_long(0),
+ pmt_make_u32vector(transport_pkt::max_payload()/4, 0),
+ pmt_from_long(0)));
+
// A final close which should be successful
d_cs->send(s_cmd_close, pmt_list1(pmt_list2(s_response_close,PMT_T)));
@@ -836,11 +876,14 @@
pmt_t e_status = pmt_nth(1, expected);
if(!pmt_eqv(e_status, status) || !pmt_eqv(e_event, event)) {
- // std::cout << "[qa_tx_top] FAILED check_deallocation... Got: " << result
<< " Expected: " << expected_result << "\n";
+ if(verbose)
+ std::cout << "[qa_tx_top] FAILED check_deallocation... Got: "
+ << status << " Expected: " << e_status << "\n";
shutdown_all(PMT_F);
return;
} else {
- // std::cout << "[qa_tx_top] Received expected deallocation response for
message\n";
+ if(verbose)
+ std::cout << "[qa_tx_top] Received expected deallocation response\n";
}
}
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.h
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.h
2007-06-06 22:56:32 UTC (rev 5720)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.h
2007-06-06 22:58:48 UTC (rev 5721)
@@ -31,7 +31,7 @@
CPPUNIT_TEST(test_open_close);
CPPUNIT_TEST(test_chan_allocation);
CPPUNIT_TEST(test_chan_deallocation);
-// CPPUNIT_TEST(test_tx);
+ CPPUNIT_TEST(test_tx);
// CPPUNIT_TEST(test_rx);
CPPUNIT_TEST_SUITE_END();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5721 - gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband,
gnychis <=