Cleanup, changed ifc_name() to interface_name()
[debian/gnuradio] / usrp2 / host / lib / usrp2.cc
index c71fb728b54e60b6c8593e371e97d7e82ae5d07d..2e8540e91cb13dd3cd7f36eb29116675bee45236 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2009 Free Software Foundation, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -160,13 +160,12 @@ namespace usrp2 {
     return d_impl->mac_addr();
   }
 
-  bool
-  usrp2::burn_mac_addr(const std::string &new_addr)
+  std::string
+  usrp2::interface_name()
   {
-    return d_impl->burn_mac_addr(new_addr);
+    return d_impl->interface_name();
   }
 
-
   // Receive
 
   bool 
@@ -175,18 +174,60 @@ namespace usrp2 {
     return d_impl->set_rx_gain(gain);
   }
   
+  double
+  usrp2::rx_gain_min()
+  {
+    return d_impl->rx_gain_min();
+  }
+
+  double
+  usrp2::rx_gain_max()
+  {
+    return d_impl->rx_gain_max();
+  }
+
+  double
+  usrp2::rx_gain_db_per_step()
+  {
+    return d_impl->rx_gain_db_per_step();
+  }
+
+  bool
+  usrp2::set_rx_lo_offset(double frequency)
+  {
+    return d_impl->set_rx_lo_offset(frequency);
+  }
+
   bool
   usrp2::set_rx_center_freq(double frequency, tune_result *result)
   {
     return d_impl->set_rx_center_freq(frequency, result);
   }
   
+  double
+  usrp2::rx_freq_min()
+  {
+    return d_impl->rx_freq_min();
+  }
+
+  double
+  usrp2::rx_freq_max()
+  {
+    return d_impl->rx_freq_max();
+  }
+
   bool
   usrp2::set_rx_decim(int decimation_factor)
   {
     return d_impl->set_rx_decim(decimation_factor);
   }
   
+  int
+  usrp2::rx_decim()
+  {
+    return d_impl->rx_decim();
+  }
+
   bool
   usrp2::set_rx_scale_iq(int scale_i, int scale_q)
   {
@@ -231,18 +272,67 @@ namespace usrp2 {
     return d_impl->set_tx_gain(gain);
   }
   
+  double
+  usrp2::tx_gain_min()
+  {
+    return d_impl->tx_gain_min();
+  }
+
+  double
+  usrp2::tx_gain_max()
+  {
+    return d_impl->tx_gain_max();
+  }
+
+  double
+  usrp2::tx_gain_db_per_step()
+  {
+    return d_impl->tx_gain_db_per_step();
+  }
+
+  bool
+  usrp2::set_tx_lo_offset(double frequency)
+  {
+    return d_impl->set_tx_lo_offset(frequency);
+  }
+
   bool
   usrp2::set_tx_center_freq(double frequency, tune_result *result)
   {
     return d_impl->set_tx_center_freq(frequency, result);
   }
   
+  double
+  usrp2::tx_freq_min()
+  {
+    return d_impl->tx_freq_min();
+  }
+
+  double
+  usrp2::tx_freq_max()
+  {
+    return d_impl->tx_freq_max();
+  }
+
+
   bool
   usrp2::set_tx_interp(int interpolation_factor)
   {
     return d_impl->set_tx_interp(interpolation_factor);
   }
   
+  int
+  usrp2::tx_interp()
+  {
+    return d_impl->tx_interp();
+  }
+
+  void
+  usrp2::default_tx_scale_iq(int interpolation_factor, int *scale_i, int *scale_q)
+  {
+    d_impl->default_tx_scale_iq(interpolation_factor, scale_i, scale_q);
+  }
+
   bool
   usrp2::set_tx_scale_iq(int scale_i, int scale_q)
   {
@@ -250,21 +340,21 @@ namespace usrp2 {
   }
   
   bool
-  usrp2::tx_complex_float(unsigned int channel,
-                         const std::complex<float> *samples,
-                         size_t nsamples,
-                         const tx_metadata *metadata)
+  usrp2::tx_32fc(unsigned int channel,
+                const std::complex<float> *samples,
+                size_t nsamples,
+                const tx_metadata *metadata)
   {
-    return d_impl->tx_complex_float(channel, samples, nsamples, metadata);
+    return d_impl->tx_32fc(channel, samples, nsamples, metadata);
   }
 
   bool
-  usrp2::tx_complex_int16(unsigned int channel,
-                         const std::complex<int16_t> *samples,
-                         size_t nsamples,
-                         const tx_metadata *metadata)
+  usrp2::tx_16sc(unsigned int channel,
+                const std::complex<int16_t> *samples,
+                size_t nsamples,
+                const tx_metadata *metadata)
   {
-    return d_impl->tx_complex_int16(channel, samples, nsamples, metadata);
+    return d_impl->tx_16sc(channel, samples, nsamples, metadata);
   }
 
   bool
@@ -276,6 +366,77 @@ namespace usrp2 {
     return d_impl->tx_raw(channel, items, nitems, metadata);
   }
 
+  // miscellaneous methods
+
+  bool
+  usrp2::config_mimo(int flags)
+  {
+    return d_impl->config_mimo(flags);
+  }
+
+  bool
+  usrp2::fpga_master_clock_freq(long *freq)
+  {
+    return d_impl->fpga_master_clock_freq(freq);
+  }
+
+  bool
+  usrp2::adc_rate(long *rate)
+  {
+    return d_impl->adc_rate(rate);
+  }
+
+  bool
+  usrp2::dac_rate(long *rate)
+  {
+    return d_impl->dac_rate(rate);
+  }
+
+  bool
+  usrp2::tx_daughterboard_id(int *dbid)
+  {
+    return d_impl->tx_daughterboard_id(dbid);
+  }
+
+  bool
+  usrp2::rx_daughterboard_id(int *dbid)
+  {
+    return d_impl->rx_daughterboard_id(dbid);
+  }
+  
+
+  // low level methods
+
+  bool
+  usrp2::burn_mac_addr(const std::string &new_addr)
+  {
+    return d_impl->burn_mac_addr(new_addr);
+  }
+
+  bool
+  usrp2::sync_to_pps()
+  {
+    return d_impl->sync_to_pps();
+  }
+
+  bool
+  usrp2::sync_every_pps(bool enable)
+  {
+    return d_impl->sync_every_pps(enable);
+  }
+
+  std::vector<uint32_t>
+  usrp2::peek32(uint32_t addr, uint32_t words)
+  {
+    return d_impl->peek32(addr, words);
+  }
+
+  bool
+  usrp2::poke32(uint32_t addr, const std::vector<uint32_t> &data)
+  {
+    return d_impl->poke32(addr, data);
+  }
+
 } // namespace usrp2