[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r6615 - gnuradio/branches/developers/gnychis/inband-pr
From: |
gnychis |
Subject: |
[Commit-gnuradio] r6615 - gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband |
Date: |
Wed, 10 Oct 2007 11:43:50 -0600 (MDT) |
Author: gnychis
Date: 2007-10-10 11:43:49 -0600 (Wed, 10 Oct 2007)
New Revision: 6615
Modified:
gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband/test_usrp_inband_rx.cc
Log:
inband_rx ready for testing, now has command line parameter to specify the
number of samples to receive
Modified:
gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband/test_usrp_inband_rx.cc
===================================================================
---
gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband/test_usrp_inband_rx.cc
2007-10-10 16:26:48 UTC (rev 6614)
+++
gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband/test_usrp_inband_rx.cc
2007-10-10 17:43:49 UTC (rev 6615)
@@ -46,6 +46,7 @@
#include <symbols_usrp_rx.h>
static bool verbose = true;
+long samples_to_recv;
class test_usrp_rx : public mb_mblock
{
@@ -89,7 +90,7 @@
test_usrp_rx::test_usrp_rx(mb_runtime *runtime, const std::string
&instance_name, pmt_t user_arg)
: mb_mblock(runtime, instance_name, user_arg),
d_samples_recvd(0),
- d_samples_to_recv(5e6)
+ d_samples_to_recv(samples_to_recv)
{
d_rx = define_port("rx0", "usrp-rx", false, mb_port::INTERNAL);
@@ -101,11 +102,11 @@
// Specify the RBF to use
pmt_dict_set(usrp_dict,
pmt_intern("rbf"),
- pmt_intern("nanocell9.rbf"));
+ pmt_intern("cs1.rbf"));
pmt_dict_set(usrp_dict,
pmt_intern("decim-rx"),
- pmt_from_long(128));
+ pmt_from_long(64));
define_component("server", "usrp_server", usrp_dict);
@@ -266,6 +267,9 @@
void
test_usrp_rx::close_usrp()
{
+
+ sleep(5);
+
d_cs->send(s_cmd_close, pmt_list1(PMT_NIL));
d_state = CLOSING_USRP;
@@ -327,7 +331,7 @@
test_usrp_rx::enter_closing_channel()
{
d_state = CLOSING_CHANNEL;
-
+
sleep(2);
d_rx->send(s_cmd_deallocate_channel, pmt_list2(PMT_NIL, d_rx_chan));
@@ -345,9 +349,22 @@
main (int argc, char **argv)
{
// handle any command line args here
+ if(argc < 2) {
+ std::cout << "Usage: ./test_usrp_inband_rx <n_samples_to_recv>\n";
+ return -1;
+ }
+ samples_to_recv = atol(argv[1]);
+
+ if(samples_to_recv <= 0) {
+ std::cout << "Usage: ./test_usrp_inband_rx <n_samples_to_recv>\n";
+ std::cout << "\nPlease specify n_samples_to_recv > 0\n";
+ return -1;
+ }
+
mb_runtime_sptr rt = mb_make_runtime();
pmt_t result = PMT_NIL;
rt->run("top", "test_usrp_rx", PMT_F, &result);
+
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r6615 - gnuradio/branches/developers/gnychis/inband-profiling/usrp/host/apps-inband,
gnychis <=