gr::blocks::vector_source
gr::sync_block
gnuradio/blocks/vector_source.h
class T
std::shared_ptr< vector_source< T > > std::shared_ptr<vector_source<T> > gr::blocks::vector_source< T >::sptr sptr gr::blocks::vector_source::sptr
sptr static sptr gr::blocks::vector_source< T >::make (const std::vector< T > &data, bool repeat=false, unsigned int vlen=1, const std::vector< tag_t > &tags=std::vector< tag_t >()) make gr::blocks::vector_source::make const std::vector< T > & data bool repeat false unsigned int vlen 1 const std::vector< tag_t > & tags std::vector< tag_t >()
void virtual void gr::blocks::vector_source< T >::rewind ()=0 rewind gr::blocks::vector_source::rewind
void virtual void gr::blocks::vector_source< T >::set_data (const std::vector< T > &data, const std::vector< tag_t > &tags=std::vector< tag_t >())=0 set_data gr::blocks::vector_source::set_data const std::vector< T > & data const std::vector< tag_t > & tags std::vector< tag_t >()
void virtual void gr::blocks::vector_source< T >::set_repeat (bool repeat)=0 set_repeat gr::blocks::vector_source::set_repeat bool repeat

Source that streams T items based on the input `data` vector.

This block produces a stream of samples based on an input vector. In C++, this is a std::vector<T>, and in Python, this is either a list or tuple. The data can repeat infinitely until the flowgraph is terminated by some other event or, the default, run the data once and stop.

The vector source can also produce stream tags with the data. Pass in a vector of gr::tag_t objects and they will be emitted based on the specified offset of the tag.

GNU Radio provides a utility Python module in gr.tag_utils to convert between tags and Python objects: gr.tag_utils.python_to_tag.

We can create tags as Python lists (or tuples) using the list structure [int offset, pmt key, pmt value, pmt srcid]. It is important to define the list/tuple with the values in the correct order and with the correct data type. A python dictionary can also be used using the keys: "offset", "key", "value", and "srcid" with the same data types as for the lists.

When given a list of tags, the vector source will emit the tags repeatedly by updating the offset relative to the vector stream length. That is, if the vector has 500 items and a tag has an offset of 0, that tag will be placed on item 0, 500, 1000, 1500, etc.

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