diff options
author | Tom Rondeau <tom@trondeau.com> | 2015-09-26 20:05:09 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2015-10-16 15:48:46 -0400 |
commit | 9bf9b47dc713f76a5a105ed274aa74ecb0568baa (patch) | |
tree | 6e416971f7d2a0a9459df1693970f8ba45138dc3 /gr-blocks/lib/multiply_const_vff_impl.cc | |
parent | 616fee53793b55dcd36d4c78a7c12057b1a05839 (diff) |
ctrlport: blocks: added controlport support to multiply_const_XXX blocks.
Diffstat (limited to 'gr-blocks/lib/multiply_const_vff_impl.cc')
-rw-r--r-- | gr-blocks/lib/multiply_const_vff_impl.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gr-blocks/lib/multiply_const_vff_impl.cc b/gr-blocks/lib/multiply_const_vff_impl.cc index ab53ce3ce3..6a4719e5d3 100644 --- a/gr-blocks/lib/multiply_const_vff_impl.cc +++ b/gr-blocks/lib/multiply_const_vff_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2014 Free Software Foundation, Inc. + * Copyright 2014-2015 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -68,5 +68,29 @@ namespace gr { return noutput_items; } + void + multiply_const_vff_impl::setup_rpc() + { +#ifdef GR_CTRLPORT + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_get<multiply_const_vff, + std::vector<float> >( + alias(), "coefficient", + &multiply_const_vff::k, + pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f), + "", "Coefficient", RPC_PRIVLVL_MIN, + DISPTIME | DISPOPTSTRIP))); + + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_set<multiply_const_vff, + std::vector<float> >( + alias(), "coefficient", + &multiply_const_vff::set_k, + pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f), + "", "Coefficient", + RPC_PRIVLVL_MIN, DISPNULL))); +#endif /* GR_CTRLPORT */ + } + } /* namespace blocks */ } /* namespace gr */ |