diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2017-10-05 14:20:47 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2017-10-05 14:40:43 -0700 |
commit | 6d2221196082a4954c249dc6955e33d5832a56f2 (patch) | |
tree | 395b17bedf5b63701f7717c4ac625870890de9df | |
parent | 26b3cd78b30f5c1163060f45a3d9e6175395e962 (diff) | |
parent | aa2308eba953289d2058d01cee927ed26cdf1c09 (diff) |
Merge remote-tracking branch 'github/pr/1476' into maint
-rw-r--r-- | gnuradio-runtime/lib/hier_block2_detail.cc | 17 | ||||
-rw-r--r-- | gr-blocks/examples/ctrlport/simple_copy.grc | 50 |
2 files changed, 11 insertions, 56 deletions
diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc b/gnuradio-runtime/lib/hier_block2_detail.cc index 49eb34a6d1..82a40fe211 100644 --- a/gnuradio-runtime/lib/hier_block2_detail.cc +++ b/gnuradio-runtime/lib/hier_block2_detail.cc @@ -787,13 +787,6 @@ namespace gr { std::vector<basic_block_sptr>::const_iterator b; // Because flatten_aux is const for(b = d_blocks.begin(); b != d_blocks.end(); b++) { tmp.push_back(*b); - // for every block, attempt to setup RPC - if(ctrlport_on) { - if(!(*b)->is_rpc_set()) { - (*b)->setup_rpc(); - (*b)->rpc_set(); - } - } } // Now add the list of connected input blocks @@ -901,6 +894,16 @@ namespace gr { std::cout << "flatten_aux finished in top_block" << std::endl; sfg->dump(); } + + // if ctrlport is enabled, call setup RPC for all blocks in the flowgraph + if(ctrlport_on) { + for(b = blocks.begin(); b != blocks.end(); b++) { + if(!(*b)->is_rpc_set()) { + (*b)->setup_rpc(); + (*b)->rpc_set(); + } + } + } } void diff --git a/gr-blocks/examples/ctrlport/simple_copy.grc b/gr-blocks/examples/ctrlport/simple_copy.grc index a52c350ded..f61c6cd18a 100644 --- a/gr-blocks/examples/ctrlport/simple_copy.grc +++ b/gr-blocks/examples/ctrlport/simple_copy.grc @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<?grc format='1' created='3.7.11'?> +<?grc format='1' created='3.7.12'?> <flow_graph> <timestamp>Sat Mar 16 22:03:14 2013</timestamp> <block> @@ -393,48 +393,6 @@ to enable/disablethis block</value> </param> </block> <block> - <key>epy_block</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>_io_cache</key> - <value>('Null Msg Source', 'blk', [], [], [('fake_output', 'message', 1)], '', [])</value> - </param> - <param> - <key>_source_code</key> - <value># Block that doesn't do anything, just used to get a msg input port on another block exposed to ControlPort -from gnuradio import gr -import pmt -class blk(gr.basic_block): - def __init__(self): - gr.basic_block.__init__(self,name='Null Msg Source',in_sig=[],out_sig=[]) - self.message_port_register_out(pmt.intern("fake_output")) -</value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(357, 218)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>epy_block_0</value> - </param> - </block> - <block> <key>note</key> <param> <key>alias</key> @@ -861,10 +819,4 @@ python simple_copy_controller.py 127.0.0.1 <PORT> true</value> <source_key>0</source_key> <sink_key>0</sink_key> </connection> - <connection> - <source_block_id>epy_block_0</source_block_id> - <sink_block_id>blocks_copy_0</sink_block_id> - <source_key>fake_output</source_key> - <sink_key>en</sink_key> - </connection> </flow_graph> |