diff options
Diffstat (limited to 'gr-uhd/lib')
-rw-r--r-- | gr-uhd/lib/CMakeLists.txt | 10 | ||||
-rw-r--r-- | gr-uhd/lib/amsg_source_impl.cc | 2 | ||||
-rw-r--r-- | gr-uhd/lib/amsg_source_impl.h | 4 | ||||
-rw-r--r-- | gr-uhd/lib/usrp_sink_impl.cc | 22 | ||||
-rw-r--r-- | gr-uhd/lib/usrp_sink_impl.h | 2 | ||||
-rw-r--r-- | gr-uhd/lib/usrp_source_impl.cc | 22 | ||||
-rw-r--r-- | gr-uhd/lib/usrp_source_impl.h | 2 |
7 files changed, 57 insertions, 7 deletions
diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt index a6bd4e98b7..9121dd41b8 100644 --- a/gr-uhd/lib/CMakeLists.txt +++ b/gr-uhd/lib/CMakeLists.txt @@ -23,8 +23,7 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${GR_UHD_INCLUDE_DIRS} - ${GNURADIO_CORE_INCLUDE_DIRS} - ${GRUEL_INCLUDE_DIRS} + ${GNURADIO_RUNTIME_INCLUDE_DIRS} ${LOG4CXX_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${UHD_INCLUDE_DIRS} @@ -41,6 +40,9 @@ if(ENABLE_GR_CTRLPORT) include_directories(${ICE_INCLUDE_DIR}) endif(ENABLE_GR_CTRLPORT) +include_directories(${LOG4CPP_INCLUDE_DIRS}) +link_directories(${LOG4CPP_LIBRARY_DIRS}) + ######################################################################## # Setup library ######################################################################## @@ -65,10 +67,10 @@ if(MSVC) endif(MSVC) list(APPEND uhd_libs - gnuradio-core + gnuradio-runtime ${Boost_LIBRARIES} ${UHD_LIBRARIES} - ${LOG4CXX_LIBRARIES} + ${LOG4CPP_LIBRARIES} ) add_library(gnuradio-uhd SHARED ${gr_uhd_sources}) diff --git a/gr-uhd/lib/amsg_source_impl.cc b/gr-uhd/lib/amsg_source_impl.cc index 76603e4989..cf344db202 100644 --- a/gr-uhd/lib/amsg_source_impl.cc +++ b/gr-uhd/lib/amsg_source_impl.cc @@ -48,7 +48,7 @@ namespace gr { { _dev = ::uhd::usrp::multi_usrp::make(device_addr); _amsg_thread = - gruel::thread(boost::bind(&amsg_source_impl::recv_loop, this)); + gr::thread::thread(boost::bind(&amsg_source_impl::recv_loop, this)); } amsg_source_impl::~amsg_source_impl() diff --git a/gr-uhd/lib/amsg_source_impl.h b/gr-uhd/lib/amsg_source_impl.h index 2928e85adb..f0f3d4bfb1 100644 --- a/gr-uhd/lib/amsg_source_impl.h +++ b/gr-uhd/lib/amsg_source_impl.h @@ -21,7 +21,7 @@ */ #include <uhd/amsg_source.h> -#include <gruel/thread.h> +#include <thread/thread.h> namespace gr { namespace uhd { @@ -38,7 +38,7 @@ namespace gr { protected: ::uhd::usrp::multi_usrp::sptr _dev; - gruel::thread _amsg_thread; + gr::thread::thread _amsg_thread; gr_msg_queue_sptr _msgq; bool _running; }; diff --git a/gr-uhd/lib/usrp_sink_impl.cc b/gr-uhd/lib/usrp_sink_impl.cc index 563917abaf..a049e79d8f 100644 --- a/gr-uhd/lib/usrp_sink_impl.cc +++ b/gr-uhd/lib/usrp_sink_impl.cc @@ -571,5 +571,27 @@ namespace gr { return true; } + void + usrp_sink_impl::setup_rpc() + { +#ifdef GR_CTRLPORT + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_get<usrp_sink, double>( + alias(), "samp_rate", + &usrp_sink::get_samp_rate, + pmt::mp(100000.0f), pmt::mp(25000000.0f), pmt::mp(1000000.0f), + "sps", "TX Sample Rate", RPC_PRIVLVL_MIN, + DISPTIME | DISPOPTSTRIP))); + + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_set<usrp_sink, double>( + alias(), "samp_rate", + &usrp_sink::set_samp_rate, + pmt::mp(100000.0f), pmt::mp(25000000.0f), pmt::mp(1000000.0f), + "sps", "TX Sample Rate", + RPC_PRIVLVL_MIN, DISPNULL))); +#endif /* GR_CTRLPORT */ + } + } /* namespace uhd */ } /* namespace gr */ diff --git a/gr-uhd/lib/usrp_sink_impl.h b/gr-uhd/lib/usrp_sink_impl.h index d630e0f2fc..d2058fb4a8 100644 --- a/gr-uhd/lib/usrp_sink_impl.h +++ b/gr-uhd/lib/usrp_sink_impl.h @@ -56,6 +56,8 @@ namespace gr { const ::uhd::stream_args_t &stream_args); ~usrp_sink_impl(); + void setup_rpc(); + ::uhd::dict<std::string, std::string> get_usrp_info(size_t chan); double get_samp_rate(void); ::uhd::meta_range_t get_samp_rates(void); diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc index 9d6a55ae5a..ad3ffef2ad 100644 --- a/gr-uhd/lib/usrp_source_impl.cc +++ b/gr-uhd/lib/usrp_source_impl.cc @@ -624,5 +624,27 @@ namespace gr { return num_samps; } + void + usrp_source_impl::setup_rpc() + { +#ifdef GR_CTRLPORT + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_get<usrp_source, double>( + alias(), "samp_rate", + &usrp_source::get_samp_rate, + pmt::mp(100000.0f), pmt::mp(25000000.0f), pmt::mp(1000000.0f), + "sps", "RX Sample Rate", RPC_PRIVLVL_MIN, + DISPTIME | DISPOPTSTRIP))); + + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_set<usrp_source, double>( + alias(), "samp_rate", + &usrp_source::set_samp_rate, + pmt::mp(100000.0f), pmt::mp(25000000.0f), pmt::mp(1000000.0f), + "sps", "RX Sample Rate", + RPC_PRIVLVL_MIN, DISPNULL))); +#endif /* GR_CTRLPORT */ + } + } /* namespace uhd */ } /* namespace gr */ diff --git a/gr-uhd/lib/usrp_source_impl.h b/gr-uhd/lib/usrp_source_impl.h index b0b04a795b..e31263bda0 100644 --- a/gr-uhd/lib/usrp_source_impl.h +++ b/gr-uhd/lib/usrp_source_impl.h @@ -56,6 +56,8 @@ namespace gr { const ::uhd::stream_args_t &stream_args); ~usrp_source_impl(); + void setup_rpc(); + // Get Commands ::uhd::dict<std::string, std::string> get_usrp_info(size_t chan); std::string get_subdev_spec(size_t mboard); |