gr::blocks::throttle
gr::sync_block
gnuradio/blocks/throttle.h
std::shared_ptr< throttle > std::shared_ptr<throttle> gr::blocks::throttle::sptr sptr gr::blocks::throttle::sptr
sptr static sptr gr::blocks::throttle::make (size_t itemsize, double samples_per_sec, bool ignore_tags=true, unsigned int maximum_items_per_chunk=0) make gr::blocks::throttle::make size_t itemsize double samples_per_sec bool ignore_tags true unsigned int maximum_items_per_chunk 0

Make a sptr to a Throttle block

itemsize

Size of each item, e.g. 8 for gr_complex

samples_per_sec

Number of items to be passed per second. Waiting time is calculated based on this.

ignore_tags

Whether or not to react to "rx_rate" tags with a double value specifying a new rate.

maximum_items_per_chunk

Limit the amount of items that are produced/consumed between waiting. Set to 0 (or leave at default) to always wait for the full duration dictated by the current size of workload items, divided by the samples_per_sec.

void virtual void gr::blocks::throttle::set_sample_rate (double rate)=0 set_sample_rate gr::blocks::throttle::set_sample_rate double rate

Sets the sample rate in samples per second.

double virtual double gr::blocks::throttle::sample_rate () const =0 sample_rate gr::blocks::throttle::sample_rate

Get the sample rate in samples per second.

void virtual void gr::blocks::throttle::set_maximum_items_per_chunk (unsigned int maximum_items_per_chunk)=0 set_maximum_items_per_chunk gr::blocks::throttle::set_maximum_items_per_chunk unsigned int maximum_items_per_chunk

Set the maximum items that will be produced per waiting period.

unsigned int virtual unsigned int gr::blocks::throttle::maximum_items_per_chunk () const =0 maximum_items_per_chunk gr::blocks::throttle::maximum_items_per_chunk

Get the maximum items that will be produced per waiting period.

throttle flow of samples such that the average rate does not exceed samples_per_sec.

input: one stream of itemsize; output: one stream of itemsize

N.B. this should only be used in GUI apps where there is no other rate limiting block. It is not intended nor effective at precisely controlling the rate of samples. That should be controlled by a source or sink tied to sample clock. E.g., a USRP or audio card.

You can insert this block "in series" with your sample flow, in which case it does a throttled copy of input to output. Alternatively, you can not connect its output and just connect this block's input in parallel to an existing block in your flow graph. In that case, Throttle will limit the rate at which samples are consumed; especially at higher rates, where the copying overhead might be significant, this is functionally not different to copying at a limited rate.

gr::basic_block
gr::block
gr::blocks::throttle
gr::messages::msg_accepter
gr::msg_accepter
gr::sync_block
std::enable_shared_from_this< basic_block >
T
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::block
d_max_output_buffer
d_min_output_buffer
d_pmt_done
d_system_port
gr::blocks::throttle
gr::io_signature
gr::messages::msg_accepter
gr::msg_accepter
gr::sync_block
std::basic_string< Char >
std::deque< T >
elements
std::enable_shared_from_this< basic_block >
std::map< pmt::pmt_t, msg_queue_t, msg_queue_comparator >
keys
elements
std::shared_ptr< T >
ptr
std::shared_ptr< io_signature >
ptr
std::shared_ptr< logger >
std::shared_ptr< pmt_base >
std::string
std::vector< long >
std::vector< rpcbasic_sptr >
elements
p
- gr::blocks::throttle
  _post
- gr::blocks::throttle
  active_thread_priority
- gr::blocks::throttle
  add_item_tag
- gr::blocks::throttle
  add_item_tag
- gr::blocks::throttle
  alias
- gr::blocks::throttle
  alias_pmt
- gr::blocks::throttle
  alias_set
- gr::blocks::throttle
  alignment
- gr::blocks::throttle
  allocate_buffer
- gr::blocks::throttle
  allocate_detail
- gr::blocks::throttle
  basic_block
- gr::blocks::throttle
  basic_block
- gr::blocks::throttle
  BLACK
- gr::blocks::throttle
  blkd_input_timer_value
- gr::blocks::throttle
  block
- gr::blocks::throttle
  block
- gr::blocks::throttle
  check_topology
- gr::blocks::throttle
  clear_finished
- gr::blocks::throttle
  color
- gr::blocks::throttle
  consume
- gr::blocks::throttle
  consume_each
- gr::blocks::throttle
  d_blkd_input_timer_value
- gr::blocks::throttle
  d_color
- gr::blocks::throttle
  d_debug_logger
- gr::blocks::throttle
  d_input_signature
- gr::blocks::throttle
  d_logger
- gr::blocks::throttle
  d_max_output_buffer
- gr::blocks::throttle
  d_message_subscribers
- gr::blocks::throttle
  d_min_output_buffer
- gr::blocks::throttle
  d_name
- gr::blocks::throttle
  d_output_signature
- gr::blocks::throttle
  d_pmt_done
- gr::blocks::throttle
  d_rpc_set
- gr::blocks::throttle
  d_rpc_vars
- gr::blocks::throttle
  d_setlock
- gr::blocks::throttle
  d_symbol_alias
- gr::blocks::throttle
  d_symbol_name
- gr::blocks::throttle
  d_symbolic_id
- gr::blocks::throttle
  d_system_port
- gr::blocks::throttle
  d_unique_id
- gr::blocks::throttle
  declare_sample_delay
- gr::blocks::throttle
  declare_sample_delay
- gr::blocks::throttle
  delete_head_nowait
- gr::blocks::throttle
  detail
- gr::blocks::throttle
  dispatch_msg
- gr::blocks::throttle
  empty_handled_p
- gr::blocks::throttle
  empty_handled_p
- gr::blocks::throttle
  empty_p
- gr::blocks::throttle
  empty_p
- gr::blocks::throttle
  enable_update_rate
- gr::blocks::throttle
  erase_msg
- gr::blocks::throttle
  expand_minmax_buffer
- gr::blocks::throttle
  finished
- gr::blocks::throttle
  fixed_rate
- gr::blocks::throttle
  fixed_rate_ninput_to_noutput
- gr::blocks::throttle
  fixed_rate_noutput_to_ninput
- gr::blocks::throttle
  forecast
- gr::blocks::throttle
  general_work
- gr::blocks::throttle
  get_iterator
- gr::blocks::throttle
  get_msg_map
- gr::blocks::throttle
  get_tags_in_range
- gr::blocks::throttle
  get_tags_in_range
- gr::blocks::throttle
  get_tags_in_window
- gr::blocks::throttle
  get_tags_in_window
- gr::blocks::throttle
  GREY
- gr::blocks::throttle
  has_msg_handler
- gr::blocks::throttle
  has_msg_port
- gr::blocks::throttle
  history
- gr::blocks::throttle
  identifier
- gr::blocks::throttle
  input_signature
- gr::blocks::throttle
  insert_tail
- gr::blocks::throttle
  is_pc_rpc_set
- gr::blocks::throttle
  is_rpc_set
- gr::blocks::throttle
  is_set_max_noutput_items
- gr::blocks::throttle
  is_unaligned
- gr::blocks::throttle
  log_level
- gr::blocks::throttle
  make
- gr::blocks::throttle
  max_noutput_items
- gr::blocks::throttle
  max_output_buffer
- gr::blocks::throttle
  maximum_items_per_chunk
- gr::blocks::throttle
  message_port_is_hier
- gr::blocks::throttle
  message_port_is_hier_in
- gr::blocks::throttle
  message_port_is_hier_out
- gr::blocks::throttle
  message_port_pub
- gr::blocks::throttle
  message_port_register_in
- gr::blocks::throttle
  message_port_register_out
- gr::blocks::throttle
  message_port_sub
- gr::blocks::throttle
  message_port_unsub
- gr::blocks::throttle
  message_ports_in
- gr::blocks::throttle
  message_ports_out
- gr::blocks::throttle
  message_subscribers
- gr::blocks::throttle
  min_noutput_items
- gr::blocks::throttle
  min_output_buffer
- gr::blocks::throttle
  mp_relative_rate
- gr::blocks::throttle
  msg_accepter
- gr::blocks::throttle
  msg_queue
- gr::blocks::throttle
  name
- gr::blocks::throttle
  nitems_read
- gr::blocks::throttle
  nitems_written
- gr::blocks::throttle
  nmsgs
- gr::blocks::throttle
  no_pc_rpc
- gr::blocks::throttle
  notify_msg_neighbors
- gr::blocks::throttle
  output_multiple
- gr::blocks::throttle
  output_multiple_set
- gr::blocks::throttle
  output_signature
- gr::blocks::throttle
  pc_input_buffers_full
- gr::blocks::throttle
  pc_input_buffers_full
- gr::blocks::throttle
  pc_input_buffers_full_avg
- gr::blocks::throttle
  pc_input_buffers_full_avg
- gr::blocks::throttle
  pc_input_buffers_full_var
- gr::blocks::throttle
  pc_input_buffers_full_var
- gr::blocks::throttle
  pc_noutput_items
- gr::blocks::throttle
  pc_noutput_items_avg
- gr::blocks::throttle
  pc_noutput_items_var
- gr::blocks::throttle
  pc_nproduced
- gr::blocks::throttle
  pc_nproduced_avg
- gr::blocks::throttle
  pc_nproduced_var
- gr::blocks::throttle
  pc_output_buffers_full
- gr::blocks::throttle
  pc_output_buffers_full
- gr::blocks::throttle
  pc_output_buffers_full_avg
- gr::blocks::throttle
  pc_output_buffers_full_avg
- gr::blocks::throttle
  pc_output_buffers_full_var
- gr::blocks::throttle
  pc_output_buffers_full_var
- gr::blocks::throttle
  pc_throughput_avg
- gr::blocks::throttle
  pc_work_time
- gr::blocks::throttle
  pc_work_time_avg
- gr::blocks::throttle
  pc_work_time_total
- gr::blocks::throttle
  pc_work_time_var
- gr::blocks::throttle
  post
- gr::blocks::throttle
  processor_affinity
- gr::blocks::throttle
  produce
- gr::blocks::throttle
  relative_rate
- gr::blocks::throttle
  relative_rate_d
- gr::blocks::throttle
  relative_rate_i
- gr::blocks::throttle
  remove_item_tag
- gr::blocks::throttle
  remove_item_tag
- gr::blocks::throttle
  replace_buffer
- gr::blocks::throttle
  reset_perf_counters
- gr::blocks::throttle
  rpc_set
- gr::blocks::throttle
  sample_delay
- gr::blocks::throttle
  sample_rate
- gr::blocks::throttle
  set_alignment
- gr::blocks::throttle
  set_blkd_input_timer_value
- gr::blocks::throttle
  set_block_alias
- gr::blocks::throttle
  set_color
- gr::blocks::throttle
  set_detail
- gr::blocks::throttle
  set_fixed_rate
- gr::blocks::throttle
  set_history
- gr::blocks::throttle
  set_input_signature
- gr::blocks::throttle
  set_inverse_relative_rate
- gr::blocks::throttle
  set_is_unaligned
- gr::blocks::throttle
  set_log_level
- gr::blocks::throttle
  set_max_noutput_items
- gr::blocks::throttle
  set_max_output_buffer
- gr::blocks::throttle
  set_max_output_buffer
- gr::blocks::throttle
  set_maximum_items_per_chunk
- gr::blocks::throttle
  set_min_noutput_items
- gr::blocks::throttle
  set_min_output_buffer
- gr::blocks::throttle
  set_min_output_buffer
- gr::blocks::throttle
  set_msg_handler
- gr::blocks::throttle
  set_output_multiple
- gr::blocks::throttle
  set_output_signature
- gr::blocks::throttle
  set_processor_affinity
- gr::blocks::throttle
  set_relative_rate
- gr::blocks::throttle
  set_relative_rate
- gr::blocks::throttle
  set_sample_rate
- gr::blocks::throttle
  set_tag_propagation_policy
- gr::blocks::throttle
  set_thread_priority
- gr::blocks::throttle
  set_unaligned
- gr::blocks::throttle
  setup_pc_rpc
- gr::blocks::throttle
  setup_rpc
- gr::blocks::throttle
  shared_from_base
- gr::blocks::throttle
  sptr
- gr::blocks::throttle
  start
- gr::blocks::throttle
  stop
- gr::blocks::throttle
  symbol_name
- gr::blocks::throttle
  symbolic_id
- gr::blocks::throttle
  sync_block
- gr::blocks::throttle
  sync_block
- gr::blocks::throttle
  system_handler
- gr::blocks::throttle
  tag_propagation_policy
- gr::blocks::throttle
  tag_propagation_policy_t
- gr::blocks::throttle
  thread_priority
- gr::blocks::throttle
  to_basic_block
- gr::blocks::throttle
  TPP_ALL_TO_ALL
- gr::blocks::throttle
  TPP_CUSTOM
- gr::blocks::throttle
  TPP_DONT
- gr::blocks::throttle
  TPP_ONE_TO_ONE
- gr::blocks::throttle
  unaligned
- gr::blocks::throttle
  unique_id
- gr::blocks::throttle
  unset_max_noutput_items
- gr::blocks::throttle
  unset_processor_affinity
- gr::blocks::throttle
  update_rate
- gr::blocks::throttle
  vcolor
- gr::blocks::throttle
  WHITE
- gr::blocks::throttle
  work
- gr::blocks::throttle
  WORK_CALLED_PRODUCE
- gr::blocks::throttle
  WORK_DONE
- gr::blocks::throttle
  work_return_t
- gr::blocks::throttle
  ~basic_block
- gr::blocks::throttle
  ~block
- gr::blocks::throttle
  ~msg_accepter