diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-02-27 18:32:31 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-02-27 18:32:31 -0500 |
commit | 5a5338f584297f30e451e43dcb05f331cad51cd4 (patch) | |
tree | 0453980f5c44fd5d814d2b0f2f34e1dbdd6e102a | |
parent | ab64b2a5dddf61d2039ab9a36aff84a90a5a713b (diff) |
ctrlport: adding option to toggle export of the list of edges on/off.
-rw-r--r-- | gnuradio-core/gnuradio-core.conf | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block.cc | 16 |
2 files changed, 10 insertions, 7 deletions
diff --git a/gnuradio-core/gnuradio-core.conf b/gnuradio-core/gnuradio-core.conf index 3ed9892c73..cf3df4aea7 100644 --- a/gnuradio-core/gnuradio-core.conf +++ b/gnuradio-core/gnuradio-core.conf @@ -12,4 +12,5 @@ export = True [ControlPort] on = False +edges_list = False config = # ${prefix}/etc/gnuradio/ctrlport.conf diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.cc b/gnuradio-core/src/lib/runtime/gr_top_block.cc index e5859768de..c6118bcfdd 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_top_block.cc @@ -138,13 +138,15 @@ gr_top_block::setup_rpc() "items", "Max number of output items", RPC_PRIVLVL_MIN, DISPNULL))); - add_rpc_variable( - rpcbasic_sptr(new rpcbasic_register_get<gr_top_block, std::string>( - alias(), "edge list", - &gr_top_block::edge_list, - pmt::mp(""), pmt::mp(""), pmt::mp(""), - "edges", "List of edges in the graph", - RPC_PRIVLVL_MIN, DISPNULL))); + if(gr_prefs::singleton()->get_bool("ControlPort", "edges_list", false)) { + add_rpc_variable( + rpcbasic_sptr(new rpcbasic_register_get<gr_top_block, std::string>( + alias(), "edge list", + &gr_top_block::edge_list, + pmt::mp(""), pmt::mp(""), pmt::mp(""), + "edges", "List of edges in the graph", + RPC_PRIVLVL_MIN, DISPNULL))); + } // Setters add_rpc_variable( |