commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9982 - gnuradio/branches/features/cppdb/gnuradio-exam


From: trondeau
Subject: [Commit-gnuradio] r9982 - gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test
Date: Wed, 12 Nov 2008 19:49:34 -0700 (MST)

Author: trondeau
Date: 2008-11-12 19:49:34 -0700 (Wed, 12 Nov 2008)
New Revision: 9982

Modified:
   
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_rx.cc
   
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_rx.h
   
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_tx.cc
   
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_tx.h
Log:
formatting

Modified: 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_rx.cc
===================================================================
--- 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_rx.cc
    2008-11-13 00:52:26 UTC (rev 9981)
+++ 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_rx.cc
    2008-11-13 02:49:34 UTC (rev 9982)
@@ -24,20 +24,24 @@
 #include <gr_head.h>
 
 // Shared pointer constructor
-usrp_test_sptr make_usrp_test(int which, usrp_subdev_spec spec, int decim, 
double freq, float gain)
+usrp_test_rx_sptr make_usrp_test_rx(int which, usrp_subdev_spec spec, 
+                                   int decim, double freq, float gain)
 {
-  return gnuradio::get_initial_sptr(new usrp_test(which, spec, decim, freq, 
gain));
+  return gnuradio::get_initial_sptr(new usrp_test_rx(which, spec, 
+                                                    decim, freq, gain));
 }
 
 // Hierarchical block constructor, with no inputs or outputs
-usrp_test::usrp_test(int which, usrp_subdev_spec spec, int decim, double freq, 
float gain) : 
-    gr_top_block("usrp_test")
+usrp_test_rx::usrp_test_rx(int which, usrp_subdev_spec spec, 
+                          int decim, double freq, float gain) : 
+    gr_top_block("usrp_test_rx")
 {
   usrp_source_c_sptr usrp = usrp_make_source_c(which, decim);
 
   db_base_sptr subdev = usrp->selected_subdev(spec);
   printf("Subdevice name is %s\n", subdev->name().c_str());
-  printf("Subdevice freq range: (%g, %g)\n", subdev->freq_min(), 
subdev->freq_max());
+  printf("Subdevice freq range: (%g, %g)\n", 
+        subdev->freq_min(), subdev->freq_max());
 
   unsigned int mux = usrp->determine_rx_mux_value(spec);
   printf("mux: %x\n",  mux);
@@ -86,7 +90,8 @@
   double freq = strtod(argv[1], NULL); // set the frequency
   float gain = -1;                     // set the gain; -1 will set the 
mid-point gain
 
-  usrp_test_sptr top_block = make_usrp_test(which, spec, decim, freq, gain);
+  usrp_test_rx_sptr top_block = make_usrp_test_rx(which, spec, 
+                                                 decim, freq, gain);
   top_block->run();
   
   std::vector<gr_complex> data = top_block->sink->data();

Modified: 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_rx.h
===================================================================
--- 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_rx.h 
    2008-11-13 00:52:26 UTC (rev 9981)
+++ 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_rx.h 
    2008-11-13 02:49:34 UTC (rev 9982)
@@ -23,15 +23,19 @@
 #include <usrp_source_c.h>
 #include <gr_vector_sink_c.h>
 
-class usrp_test;
-typedef boost::shared_ptr<usrp_test> usrp_test_sptr;
-usrp_test_sptr make_usrp_test();
+class usrp_test_rx;
+typedef boost::shared_ptr<usrp_test_rx> usrp_test_rx_sptr;
+usrp_test_rx_sptr make_usrp_test_rx();
 
-class usrp_test : public gr_top_block
+class usrp_test_rx : public gr_top_block
 {
 private:
-    usrp_test(int which, usrp_subdev_spec spec, int decim, double freq, float 
gain);
-    friend usrp_test_sptr make_usrp_test(int which, usrp_subdev_spec spec, int 
decim, double freq, float gain);
+    usrp_test_rx(int which, usrp_subdev_spec spec, 
+                int decim, double freq, float gain);
+    friend usrp_test_rx_sptr make_usrp_test_rx(int which, 
+                                              usrp_subdev_spec spec, 
+                                              int decim, double freq, 
+                                              float gain);
 
  public:
     gr_vector_sink_c_sptr sink;

Modified: 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_tx.cc
===================================================================
--- 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_tx.cc
    2008-11-13 00:52:26 UTC (rev 9981)
+++ 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_tx.cc
    2008-11-13 02:49:34 UTC (rev 9982)
@@ -24,20 +24,24 @@
 #include <gr_head.h>
 
 // Shared pointer constructor
-usrp_test_tx_sptr make_usrp_test_tx(int which, usrp_subdev_spec spec, int 
interp, double freq, float amp)
+usrp_test_tx_sptr make_usrp_test_tx(int which, usrp_subdev_spec spec, 
+                                   int interp, double freq, float amp)
 {
-  return gnuradio::get_initial_sptr(new usrp_test_tx(which, spec, interp, 
freq, amp));
+  return gnuradio::get_initial_sptr(new usrp_test_tx(which, spec, 
+                                                    interp, freq, amp));
 }
 
 // Hierarchical block constructor, with no inputs or outputs
-usrp_test_tx::usrp_test_tx(int which, usrp_subdev_spec spec, int interp, 
double freq, float amp) : 
+usrp_test_tx::usrp_test_tx(int which, usrp_subdev_spec spec, 
+                          int interp, double freq, float amp) : 
     gr_top_block("usrp_test_tx")
 {
   usrp_sink_c_sptr usrp = usrp_make_sink_c(which, interp);
 
   db_base_sptr subdev = usrp->selected_subdev(spec);
   printf("Subdevice name is %s\n", subdev->name().c_str());
-  printf("Subdevice freq range: (%g, %g)\n", subdev->freq_min(), 
subdev->freq_max());
+  printf("Subdevice freq range: (%g, %g)\n", 
+        subdev->freq_min(), subdev->freq_max());
 
   unsigned int mux = usrp->determine_tx_mux_value(spec);
   printf("mux: %x\n",  mux);
@@ -76,7 +80,8 @@
   double freq = strtod(argv[1], NULL); // set the frequency
   float amp = 10;                      // set the amplutide
 
-  usrp_test_tx_sptr top_block = make_usrp_test_tx(which, spec, interp, freq, 
amp);
+  usrp_test_tx_sptr top_block = make_usrp_test_tx(which, spec, 
+                                                 interp, freq, amp);
   top_block->run();
   
   return 0;

Modified: 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_tx.h
===================================================================
--- 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_tx.h 
    2008-11-13 00:52:26 UTC (rev 9981)
+++ 
gnuradio/branches/features/cppdb/gnuradio-examples/c++/usrp_test/usrp_test_tx.h 
    2008-11-13 02:49:34 UTC (rev 9982)
@@ -30,8 +30,12 @@
 class usrp_test_tx : public gr_top_block
 {
 private:
-    usrp_test_tx(int which, usrp_subdev_spec spec, int interp, double freq, 
float amp);
-    friend usrp_test_tx_sptr make_usrp_test_tx(int which, usrp_subdev_spec 
spec, int interp, double freq, float amp);
+    usrp_test_tx(int which, usrp_subdev_spec spec, 
+                int interp, double freq, float amp);
+    friend usrp_test_tx_sptr make_usrp_test_tx(int which, 
+                                              usrp_subdev_spec spec, 
+                                              int interp, double freq,
+                                              float amp);
 
  public:
     gr_sig_source_c_sptr source;





reply via email to

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