[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r5611 - gnuradio/branches/developers/gnychis/inband/us
From: |
gnychis |
Subject: |
[Commit-gnuradio] r5611 - gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband |
Date: |
Sat, 2 Jun 2007 16:43:27 -0600 (MDT) |
Author: gnychis
Date: 2007-06-02 16:43:26 -0600 (Sat, 02 Jun 2007)
New Revision: 5611
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.cc
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.cc
Log:
checking in the newest set of allocation tests
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-02 21:58:11 UTC (rev 5610)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/qa_inband_usrp_server.cc
2007-06-02 22:43:26 UTC (rev 5611)
@@ -91,9 +91,9 @@
: mb_mblock(runtime, instance_name, user_arg)
{
d_nrecvd=0;
- d_nmsgs_to_recv = 7;
+ d_nmsgs_to_recv = 6;
d_nstatus=0;
- d_nstatus_to_recv = 4;
+ d_nstatus_to_recv = 50;
d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
d_tx = define_port("tx0", "usrp-tx", false, mb_port::INTERNAL);
@@ -116,11 +116,15 @@
void
qa_alloc_top::initial_transition()
{
+ // Allocations should fail before open
+ d_tx->send(s_cmd_allocate_channel, pmt_list2(PMT_F, pmt_from_long(1)));
+ d_rx->send(s_cmd_allocate_channel, pmt_list2(PMT_F, pmt_from_long(1)));
+
// Retrieve information about the USRP, then run tests
d_cs->send(s_cmd_open, pmt_list2(PMT_T, pmt_from_long(0)));
- d_cs->send(s_cmd_max_capacity, pmt_list1(PMT_F));
- d_cs->send(s_cmd_ntx_chan, pmt_list1(PMT_F));
- d_cs->send(s_cmd_nrx_chan, pmt_list1(PMT_F));
+ d_cs->send(s_cmd_max_capacity, pmt_list1(PMT_T));
+ d_cs->send(s_cmd_ntx_chan, pmt_list1(PMT_T));
+ d_cs->send(s_cmd_nrx_chan, pmt_list1(PMT_T));
}
void
@@ -168,15 +172,15 @@
if (pmt_eq(msg->port_id(), d_cs->port_symbol())) {
if(pmt_eq(msg->signal(), s_response_max_capacity)) {
- d_max_capacity = pmt_to_long(pmt_nth(1, data));
+ d_max_capacity = pmt_to_long(pmt_nth(2, data));
std::cout << "[qa_alloc_top] USRP has max capacity of " <<
d_max_capacity << "\n";
}
else if(pmt_eq(msg->signal(), s_response_ntx_chan)) {
- d_ntx_chan = pmt_to_long(pmt_nth(1, data));
+ d_ntx_chan = pmt_to_long(pmt_nth(2, data));
std::cout << "[qa_alloc_top] USRP tx channels: " << d_ntx_chan << "\n";
}
else if(pmt_eq(msg->signal(), s_response_nrx_chan)) {
- d_nrx_chan = pmt_to_long(pmt_nth(1, data));
+ d_nrx_chan = pmt_to_long(pmt_nth(2, data));
std::cout << "[qa_alloc_top] USRP rx channels: " << d_nrx_chan << "\n";
}
else if(pmt_eq(msg->signal(), s_response_current_capacity_allocation)) {
@@ -185,6 +189,8 @@
d_nstatus++;
+ check_message(msg);
+
if(d_nstatus==d_nstatus_to_recv)
run_tests();
}
@@ -282,9 +288,9 @@
{
// Retrieve information about the USRP, then run tests
d_cs->send(s_cmd_open, pmt_list2(PMT_T, pmt_from_long(0)));
- d_cs->send(s_cmd_max_capacity, pmt_list1(PMT_F));
- d_cs->send(s_cmd_ntx_chan, pmt_list1(PMT_F));
- d_cs->send(s_cmd_nrx_chan, pmt_list1(PMT_F));
+ d_cs->send(s_cmd_max_capacity, pmt_list1(PMT_T));
+ d_cs->send(s_cmd_ntx_chan, pmt_list1(PMT_T));
+ d_cs->send(s_cmd_nrx_chan, pmt_list1(PMT_T));
}
void
@@ -335,7 +341,7 @@
// The used capacity should be back to 0 now that we've deallocated
everything
- d_cs->send(s_cmd_current_capacity_allocation, pmt_list1(pmt_from_long(0)));
+ d_cs->send(s_cmd_current_capacity_allocation, pmt_list1(PMT_T));
}
void
@@ -357,15 +363,15 @@
if (pmt_eq(msg->port_id(), d_cs->port_symbol())) {
if(pmt_eq(msg->signal(), s_response_max_capacity)) {
- d_max_capacity = pmt_to_long(pmt_nth(1, data));
+ d_max_capacity = pmt_to_long(pmt_nth(2, data));
std::cout << "[qa_dealloc_top] USRP has max capacity of " <<
d_max_capacity << "\n";
}
else if(pmt_eq(msg->signal(), s_response_ntx_chan)) {
- d_ntx_chan = pmt_to_long(pmt_nth(1, data));
+ d_ntx_chan = pmt_to_long(pmt_nth(2, data));
std::cout << "[qa_dealloc_top] USRP tx channels: " << d_ntx_chan << "\n";
}
else if(pmt_eq(msg->signal(), s_response_nrx_chan)) {
- d_nrx_chan = pmt_to_long(pmt_nth(1, data));
+ d_nrx_chan = pmt_to_long(pmt_nth(2, data));
std::cout << "[qa_dealloc_top] USRP rx channels: " << d_nrx_chan << "\n";
}
else if(pmt_eq(msg->signal(), s_response_current_capacity_allocation)) {
Modified:
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.cc
===================================================================
---
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.cc
2007-06-02 21:58:11 UTC (rev 5610)
+++
gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband/usrp_server.cc
2007-06-02 22:43:26 UTC (rev 5611)
@@ -269,7 +269,7 @@
d_cs->send(s_response_max_capacity, pmt_list3(invocation_handle,
PMT_F, pmt_from_long(0)));
return;
}
- reply_data = pmt_list2(invocation_handle, pmt_from_long(max_capacity()));
+ reply_data = pmt_list3(invocation_handle, PMT_T,
pmt_from_long(max_capacity()));
d_cs->send(s_response_max_capacity, reply_data);
return;
}
@@ -279,7 +279,7 @@
d_cs->send(s_response_ntx_chan, pmt_list3(invocation_handle, PMT_F,
pmt_from_long(0)));
return;
}
- reply_data = pmt_list2(invocation_handle, pmt_from_long(d_ntx_chan));
+ reply_data = pmt_list3(invocation_handle, PMT_T,
pmt_from_long(d_ntx_chan));
d_cs->send(s_response_ntx_chan, reply_data);
return;
}
@@ -289,7 +289,7 @@
d_cs->send(s_response_nrx_chan, pmt_list3(invocation_handle, PMT_F,
pmt_from_long(0)));
return;
}
- reply_data = pmt_list2(invocation_handle, pmt_from_long(d_nrx_chan));
+ reply_data = pmt_list3(invocation_handle, PMT_T,
pmt_from_long(d_nrx_chan));
d_cs->send(s_response_nrx_chan, reply_data);
return;
}
@@ -299,7 +299,7 @@
d_cs->send(s_response_current_capacity_allocation,
pmt_list3(invocation_handle, PMT_F, pmt_from_long(0)));
return;
}
- reply_data = pmt_list2(invocation_handle,
pmt_from_long(current_capacity_allocation()));
+ reply_data = pmt_list3(invocation_handle, PMT_T,
pmt_from_long(current_capacity_allocation()));
d_cs->send(s_response_current_capacity_allocation, reply_data);
return;
}
@@ -587,7 +587,7 @@
}
// Parse the messages that were queued while waiting for an open response
- for(int i=0; i < recall.size(); i++)
+ for(int i=0; i < (int)recall.size(); i++)
handle_message(recall[i]);
return;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r5611 - gnuradio/branches/developers/gnychis/inband/usrp/host/lib/inband,
gnychis <=