diff options
author | Tom Rondeau <tom@trondeau.com> | 2015-10-07 07:15:56 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2015-10-16 15:48:47 -0400 |
commit | 09b03871e81da2b09792a454ee3caf28bdad4c3c (patch) | |
tree | 577b2ca08026ce833963e7e494069e593b5a489f /gr-blocks/lib/copy_impl.cc | |
parent | ce28185909272d2aebc0e8279a4ab2c3cca16c02 (diff) |
ctrlport: provides a ControlPort model that connects directly with a
block's message handler.
We still need to register this in setup_rpc, but there might be a way
to automate the registering of this during set_msg_handler if
ControlPort is enabled.
Diffstat (limited to 'gr-blocks/lib/copy_impl.cc')
-rw-r--r-- | gr-blocks/lib/copy_impl.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gr-blocks/lib/copy_impl.cc b/gr-blocks/lib/copy_impl.cc index 02848369d1..acac576075 100644 --- a/gr-blocks/lib/copy_impl.cc +++ b/gr-blocks/lib/copy_impl.cc @@ -99,5 +99,18 @@ namespace gr { return n; } + + void + copy_impl::setup_rpc() + { +#ifdef GR_CTRLPORT + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_handler<copy>( + alias(), "en", + "", "Enable", + RPC_PRIVLVL_MIN, DISPNULL))); +#endif /* GR_CTRLPORT */ + } + } /* namespace blocks */ } /* namespace gr */ |