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_ff_impl.cc | |
parent | 616fee53793b55dcd36d4c78a7c12057b1a05839 (diff) |
ctrlport: blocks: added controlport support to multiply_const_XXX blocks.
Diffstat (limited to 'gr-blocks/lib/multiply_const_ff_impl.cc')
-rw-r--r-- | gr-blocks/lib/multiply_const_ff_impl.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/gr-blocks/lib/multiply_const_ff_impl.cc b/gr-blocks/lib/multiply_const_ff_impl.cc index 366c06181f..c5d0ce1e9a 100644 --- a/gr-blocks/lib/multiply_const_ff_impl.cc +++ b/gr-blocks/lib/multiply_const_ff_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004,2009,2010,2012 Free Software Foundation, Inc. + * Copyright 2004,2009,2010,2012,2015 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -63,5 +63,27 @@ namespace gr { return noutput_items; } + void + multiply_const_ff_impl::setup_rpc() + { +#ifdef GR_CTRLPORT + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_get<multiply_const_ff, float>( + alias(), "coefficient", + &multiply_const_ff::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_ff, float>( + alias(), "coefficient", + &multiply_const_ff::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 */ |