gr::top_block
gr::hier_block2
gnuradio/top_block.h
std::unique_ptr< top_block_impl > std::unique_ptr<top_block_impl> gr::top_block::d_impl d_impl gr::top_block::d_impl
gr::top_block::top_block
(const std::string &name, bool catch_exceptions=true)
top_block
gr::top_block::top_block
const std::string & name
bool catch_exceptions true
gr::basic_block::name
gr::top_block::~top_block
() override
~top_block
gr::top_block::~top_block
void void gr::top_block::run (int max_noutput_items=100000000) run gr::top_block::run int max_noutput_items 100000000

The simple interface to running a flowgraph.

Calls start() then wait(). Used to run a flowgraph that will stop on its own, or when another thread will call stop().

max_noutput_items

the maximum number of output items allowed for any block in the flowgraph. This passes through to the start function; see that function for more details.

max_noutput_items
void void gr::top_block::start (int max_noutput_items=100000000) start gr::top_block::start int max_noutput_items 100000000

Start the contained flowgraph. Creates one or more threads to execute the flow graph. Returns to the caller once the threads are created. Calling start() on a top_block that is already started IS an error.

max_noutput_items

the maximum number of output items allowed for any block in the flowgraph; the noutput_items can always be less than this, but this will cap it as a maximum. Use this to adjust the maximum latency a flowgraph can exhibit.

max_noutput_items
void void gr::top_block::stop () stop gr::top_block::stop

Stop the running flowgraph. Notifies each thread created by the scheduler to shutdown, then returns to caller. Calling stop() on a top_block that is already stopped IS NOT an error.

void void gr::top_block::wait () wait gr::top_block::wait

Wait for a flowgraph to complete. Flowgraphs complete when either (1) all blocks indicate that they are done (typically only when using blocks.file_source, or blocks.head, or (2) after stop() has been called to request shutdown. Calling wait on a top_block that is not running IS NOT an error (wait returns w/o blocking).

void void gr::top_block::lock () override lock gr::top_block::lock lock

Lock a flowgraph in preparation for reconfiguration. When an equal number of calls to lock() and unlock() have occurred, the flowgraph will be reconfigured.

N.B. lock() and unlock() may not be called from a flowgraph thread (E.g., block::work method) or deadlock will occur when reconfiguration happens.

void void gr::top_block::unlock () override unlock gr::top_block::unlock unlock

Unlock a flowgraph in preparation for reconfiguration. When an equal number of calls to lock() and unlock() have occurred, the flowgraph will be reconfigured.

N.B. lock() and unlock() may not be called from a flowgraph thread (E.g., block::work method) or deadlock will occur when reconfiguration happens.

std::string std::string gr::top_block::edge_list () edge_list gr::top_block::edge_list

Returns a string that lists the edge connections in the flattened flowgraph.

std::string std::string gr::top_block::msg_edge_list () msg_edge_list gr::top_block::msg_edge_list

Returns a string that lists the msg edge connections in the flattened flowgraph.

void void gr::top_block::dump () dump gr::top_block::dump

Displays flattened flowgraph edges and block connectivity

int int gr::top_block::max_noutput_items () max_noutput_items gr::top_block::max_noutput_items

Get the number of max noutput_items in the flowgraph.

run
start
void void gr::top_block::set_max_noutput_items (int nmax) set_max_noutput_items gr::top_block::set_max_noutput_items int nmax

Set the maximum number of noutput_items in the flowgraph.

top_block_sptr top_block_sptr gr::top_block::to_top_block () to_top_block gr::top_block::to_top_block
void void gr::top_block::setup_rpc () override setup_rpc gr::top_block::setup_rpc setup_rpc

Set up the RPC registered variables.

This must be overloaded by a block that wants to use controlport. This is where rpcbasic_register_{get,set} pointers are created, which then get wrapped as shared pointers (rpcbasic_sptr(...)) and stored using add_rpc_variable.

Top-level hierarchical block representing a flowgraph.

gr::basic_block
gr::hier_block2
gr::messages::msg_accepter
gr::msg_accepter
gr::top_block
std::enable_shared_from_this< basic_block >
gr::basic_block
d_name
d_symbol_alias
d_symbol_name
d_input_signature
d_output_signature
d_debug_logger
d_logger
msg_queue
d_rpc_vars
d_message_subscribers
gr::hier_block2
hier_message_ports_in
hier_message_ports_out
gr::messages::msg_accepter
gr::msg_accepter
gr::top_block
std::basic_string< Char >
std::enable_shared_from_this< basic_block >
std::map< pmt::pmt_t, msg_queue_t, msg_queue_comparator >
std::shared_ptr< io_signature >
std::shared_ptr< logger >
std::shared_ptr< pmt_base >
std::shared_ptr< rpcbasic_base >
std::string
std::vector< rpcbasic_sptr >
elements
p
- gr::top_block
  _post
- gr::top_block
  alias
- gr::top_block
  alias_pmt
- gr::top_block
  alias_set
- gr::top_block
  all_max_output_buffer_p
- gr::top_block
  all_min_output_buffer_p
- gr::top_block
  basic_block
- gr::top_block
  basic_block
- gr::top_block
  BLACK
- gr::top_block
  check_topology
- gr::top_block
  color
- gr::top_block
  connect
- gr::top_block
  connect
- gr::top_block
  d_color
- gr::top_block
  d_debug_logger
- gr::top_block
  d_impl
- gr::top_block
  d_input_signature
- gr::top_block
  d_logger
- gr::top_block
  d_message_subscribers
- gr::top_block
  d_name
- gr::top_block
  d_output_signature
- gr::top_block
  d_rpc_set
- gr::top_block
  d_rpc_vars
- gr::top_block
  d_symbol_alias
- gr::top_block
  d_symbol_name
- gr::top_block
  d_symbolic_id
- gr::top_block
  d_unique_id
- gr::top_block
  delete_head_nowait
- gr::top_block
  disconnect
- gr::top_block
  disconnect
- gr::top_block
  disconnect_all
- gr::top_block
  dispatch_msg
- gr::top_block
  dump
- gr::top_block
  edge_list
- gr::top_block
  empty_handled_p
- gr::top_block
  empty_handled_p
- gr::top_block
  empty_p
- gr::top_block
  empty_p
- gr::top_block
  erase_msg
- gr::top_block
  flatten
- gr::top_block
  get_iterator
- gr::top_block
  get_msg_map
- gr::top_block
  GREY
- gr::top_block
  has_msg_handler
- gr::top_block
  has_msg_port
- gr::top_block
  hier_block2
- gr::top_block
  hier_block2
- gr::top_block
  hier_message_ports_in
- gr::top_block
  hier_message_ports_out
- gr::top_block
  identifier
- gr::top_block
  input_signature
- gr::top_block
  insert_tail
- gr::top_block
  is_rpc_set
- gr::top_block
  lock
- gr::top_block
  log_level
- gr::top_block
  max_noutput_items
- gr::top_block
  max_output_buffer
- gr::top_block
  message_port_is_hier
- gr::top_block
  message_port_is_hier_in
- gr::top_block
  message_port_is_hier_out
- gr::top_block
  message_port_pub
- gr::top_block
  message_port_register_hier_in
- gr::top_block
  message_port_register_hier_out
- gr::top_block
  message_port_register_in
- gr::top_block
  message_port_register_out
- gr::top_block
  message_port_sub
- gr::top_block
  message_port_unsub
- gr::top_block
  message_ports_in
- gr::top_block
  message_ports_out
- gr::top_block
  message_subscribers
- gr::top_block
  min_output_buffer
- gr::top_block
  msg_accepter
- gr::top_block
  msg_connect
- gr::top_block
  msg_connect
- gr::top_block
  msg_disconnect
- gr::top_block
  msg_disconnect
- gr::top_block
  msg_edge_list
- gr::top_block
  msg_queue
- gr::top_block
  name
- gr::top_block
  nmsgs
- gr::top_block
  opaque_self
- gr::top_block
  output_signature
- gr::top_block
  post
- gr::top_block
  processor_affinity
- gr::top_block
  rpc_set
- gr::top_block
  run
- gr::top_block
  self
- gr::top_block
  set_block_alias
- gr::top_block
  set_color
- gr::top_block
  set_input_signature
- gr::top_block
  set_log_level
- gr::top_block
  set_max_noutput_items
- gr::top_block
  set_max_output_buffer
- gr::top_block
  set_max_output_buffer
- gr::top_block
  set_min_output_buffer
- gr::top_block
  set_min_output_buffer
- gr::top_block
  set_msg_handler
- gr::top_block
  set_output_signature
- gr::top_block
  set_processor_affinity
- gr::top_block
  setup_rpc
- gr::top_block
  shared_from_base
- gr::top_block
  start
- gr::top_block
  stop
- gr::top_block
  symbol_name
- gr::top_block
  symbolic_id
- gr::top_block
  to_basic_block
- gr::top_block
  to_hier_block2
- gr::top_block
  to_top_block
- gr::top_block
  top_block
- gr::top_block
  unique_id
- gr::top_block
  unlock
- gr::top_block
  unset_processor_affinity
- gr::top_block
  vcolor
- gr::top_block
  wait
- gr::top_block
  WHITE
- gr::top_block
  ~basic_block
- gr::top_block
  ~hier_block2
- gr::top_block
  ~msg_accepter
- gr::top_block
  ~top_block