diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-03-01 11:44:42 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-03-01 11:44:42 -0500 |
commit | ceb1c3496fd69cbff37a12e634c8baf7fc38f581 (patch) | |
tree | ad0460a13265918aaa2a7a28b3642999eebe86b1 /gr-blocks/lib/throttle_impl.cc | |
parent | 95f38c65bbdf1b1464999e7aa3275b3492dee3ac (diff) |
ctrlport: readding setup_rpc to throttle block that got lost in the transition.
Diffstat (limited to 'gr-blocks/lib/throttle_impl.cc')
-rw-r--r-- | gr-blocks/lib/throttle_impl.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gr-blocks/lib/throttle_impl.cc b/gr-blocks/lib/throttle_impl.cc index 49743e3f26..b1cfe4b3c8 100644 --- a/gr-blocks/lib/throttle_impl.cc +++ b/gr-blocks/lib/throttle_impl.cc @@ -93,5 +93,25 @@ namespace gr { return noutput_items; } + void + throttle_impl::setup_rpc() + { +#ifdef GR_CTRLPORT + d_rpc_vars.push_back( + rpcbasic_sptr(new rpcbasic_register_get<throttle, double>( + alias(), "sample_rate", &throttle::sample_rate, + pmt::mp(0.0), pmt::mp(100.0e6), pmt::mp(0.0), + "Hz", "Sample Rate", RPC_PRIVLVL_MIN, + DISPTIME | DISPOPTSTRIP))); + + d_rpc_vars.push_back( + rpcbasic_sptr(new rpcbasic_register_set<throttle, double>( + alias(), "sample_rate", &throttle::set_sample_rate, + pmt::mp(0.0), pmt::mp(100.0e6), pmt::mp(0.0), + "Hz", "Sample Rate", RPC_PRIVLVL_MIN, + DISPTIME | DISPOPTSTRIP))); +#endif /* GR_CTRLPORT */ + } + } /* namespace blocks */ } /* namespace gr */ |