gr::blocks::file_meta_sink
gr::sync_block
gnuradio/blocks/file_meta_sink.h
std::shared_ptr< file_meta_sink > typedef std::shared_ptr<file_meta_sink> gr::blocks::file_meta_sink::sptr sptr gr::blocks::file_meta_sink::sptr
sptr static sptr gr::blocks::file_meta_sink::make (size_t itemsize, const std::string &filename, double samp_rate=1, double relative_rate=1, gr_file_types type=GR_FILE_FLOAT, bool complex=true, size_t max_segment_size=1000000, pmt::pmt_t extra_dict=pmt::make_dict(), bool detached_header=false) make gr::blocks::file_meta_sink::make size_t itemsize const std::string & filename double samp_rate 1 double relative_rate 1 gr_file_types type GR_FILE_FLOAT bool complex true size_t max_segment_size 1000000 pmt::pmt_t extra_dict pmt::make_dict() bool detached_header false

Create a meta-data file sink.

itemsize

(size_t): Size of data type.

filename

(string): Name of file to write data to.

samp_rate

(double): Sample rate of data. If sample rate will be set by a tag, such as rx_tag from a UHD source, this is basically ignored.

relative_rate

(double): Rate chance from source of sample rate tag to sink.

type

(gr_file_types): Data type (int, float, etc.)

complex

(bool): If data stream is complex

max_segment_size

(size_t): Length of a single segment before the header is repeated (in items).

extra_dict

a PMT dictionary of extra information.

detached_header

(bool): Set to true to store the header info in a separate file (named filename.hdr)

gr::blocks::GR_FILE_FLOAT
pmt::make_dict
gr::block::relative_rate
bool virtual bool gr::blocks::file_meta_sink::open (const std::string &filename)=0 open gr::blocks::file_meta_sink::open const std::string & filename
void virtual void gr::blocks::file_meta_sink::close ()=0 close gr::blocks::file_meta_sink::close
void virtual void gr::blocks::file_meta_sink::do_update ()=0 do_update gr::blocks::file_meta_sink::do_update
void virtual void gr::blocks::file_meta_sink::set_unbuffered (bool unbuffered)=0 set_unbuffered gr::blocks::file_meta_sink::set_unbuffered bool unbuffered

Write stream to file with meta-data headers.

These files represent data as binary information in between meta-data headers. The headers contain information about the type of data and properties of the data in the next segment of samples. The information includes:

- rx_rate (double): sample rate of data.

- rx_time (uint64_t, double): time stamp of first sample in segment.

- size (uint32_t): item size in bytes.

- type (::gr_file_types as int32_t): data type.

- cplx (bool): Is data complex?

- strt (uint64_t): Starting byte of data in this segment.

- bytes (uint64_t): Size in bytes of data in this segment.

Tags can be sent to the file to update the information, which will create a new header. Headers are found by searching from the first header (at position 0 in the file) and reading where the data segment starts plus the data segment size. Following will either be a new header or EOF.
gr::basic_block
gr::block
gr::blocks::file_meta_sink
gr::messages::msg_accepter
gr::msg_accepter
gr::sync_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::block
d_max_output_buffer
d_min_output_buffer
d_pmt_done
d_system_port
gr::blocks::file_meta_sink
gr::messages::msg_accepter
gr::msg_accepter
gr::sync_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< long >
std::vector< rpcbasic_sptr >
elements
p
- gr::blocks::file_meta_sink
  _post
- gr::blocks::file_meta_sink
  active_thread_priority
- gr::blocks::file_meta_sink
  add_item_tag
- gr::blocks::file_meta_sink
  add_item_tag
- gr::blocks::file_meta_sink
  alias
- gr::blocks::file_meta_sink
  alias_pmt
- gr::blocks::file_meta_sink
  alias_set
- gr::blocks::file_meta_sink
  alignment
- gr::blocks::file_meta_sink
  allocate_buffer
- gr::blocks::file_meta_sink
  allocate_detail
- gr::blocks::file_meta_sink
  basic_block
- gr::blocks::file_meta_sink
  basic_block
- gr::blocks::file_meta_sink
  BLACK
- gr::blocks::file_meta_sink
  blkd_input_timer_value
- gr::blocks::file_meta_sink
  block
- gr::blocks::file_meta_sink
  block
- gr::blocks::file_meta_sink
  check_topology
- gr::blocks::file_meta_sink
  clear_finished
- gr::blocks::file_meta_sink
  close
- gr::blocks::file_meta_sink
  color
- gr::blocks::file_meta_sink
  consume
- gr::blocks::file_meta_sink
  consume_each
- gr::blocks::file_meta_sink
  d_blkd_input_timer_value
- gr::blocks::file_meta_sink
  d_color
- gr::blocks::file_meta_sink
  d_debug_logger
- gr::blocks::file_meta_sink
  d_input_signature
- gr::blocks::file_meta_sink
  d_logger
- gr::blocks::file_meta_sink
  d_max_output_buffer
- gr::blocks::file_meta_sink
  d_message_subscribers
- gr::blocks::file_meta_sink
  d_min_output_buffer
- gr::blocks::file_meta_sink
  d_name
- gr::blocks::file_meta_sink
  d_output_signature
- gr::blocks::file_meta_sink
  d_pmt_done
- gr::blocks::file_meta_sink
  d_rpc_set
- gr::blocks::file_meta_sink
  d_rpc_vars
- gr::blocks::file_meta_sink
  d_setlock
- gr::blocks::file_meta_sink
  d_symbol_alias
- gr::blocks::file_meta_sink
  d_symbol_name
- gr::blocks::file_meta_sink
  d_symbolic_id
- gr::blocks::file_meta_sink
  d_system_port
- gr::blocks::file_meta_sink
  d_unique_id
- gr::blocks::file_meta_sink
  declare_sample_delay
- gr::blocks::file_meta_sink
  declare_sample_delay
- gr::blocks::file_meta_sink
  delete_head_nowait
- gr::blocks::file_meta_sink
  detail
- gr::blocks::file_meta_sink
  dispatch_msg
- gr::blocks::file_meta_sink
  do_update
- gr::blocks::file_meta_sink
  empty_handled_p
- gr::blocks::file_meta_sink
  empty_handled_p
- gr::blocks::file_meta_sink
  empty_p
- gr::blocks::file_meta_sink
  empty_p
- gr::blocks::file_meta_sink
  enable_update_rate
- gr::blocks::file_meta_sink
  erase_msg
- gr::blocks::file_meta_sink
  expand_minmax_buffer
- gr::blocks::file_meta_sink
  finished
- gr::blocks::file_meta_sink
  fixed_rate
- gr::blocks::file_meta_sink
  fixed_rate_ninput_to_noutput
- gr::blocks::file_meta_sink
  fixed_rate_noutput_to_ninput
- gr::blocks::file_meta_sink
  forecast
- gr::blocks::file_meta_sink
  general_work
- gr::blocks::file_meta_sink
  get_iterator
- gr::blocks::file_meta_sink
  get_msg_map
- gr::blocks::file_meta_sink
  get_tags_in_range
- gr::blocks::file_meta_sink
  get_tags_in_range
- gr::blocks::file_meta_sink
  get_tags_in_window
- gr::blocks::file_meta_sink
  get_tags_in_window
- gr::blocks::file_meta_sink
  GREY
- gr::blocks::file_meta_sink
  has_msg_handler
- gr::blocks::file_meta_sink
  has_msg_port
- gr::blocks::file_meta_sink
  history
- gr::blocks::file_meta_sink
  identifier
- gr::blocks::file_meta_sink
  input_signature
- gr::blocks::file_meta_sink
  insert_tail
- gr::blocks::file_meta_sink
  is_pc_rpc_set
- gr::blocks::file_meta_sink
  is_rpc_set
- gr::blocks::file_meta_sink
  is_set_max_noutput_items
- gr::blocks::file_meta_sink
  is_unaligned
- gr::blocks::file_meta_sink
  log_level
- gr::blocks::file_meta_sink
  make
- gr::blocks::file_meta_sink
  max_noutput_items
- gr::blocks::file_meta_sink
  max_output_buffer
- gr::blocks::file_meta_sink
  message_port_is_hier
- gr::blocks::file_meta_sink
  message_port_is_hier_in
- gr::blocks::file_meta_sink
  message_port_is_hier_out
- gr::blocks::file_meta_sink
  message_port_pub
- gr::blocks::file_meta_sink
  message_port_register_in
- gr::blocks::file_meta_sink
  message_port_register_out
- gr::blocks::file_meta_sink
  message_port_sub
- gr::blocks::file_meta_sink
  message_port_unsub
- gr::blocks::file_meta_sink
  message_ports_in
- gr::blocks::file_meta_sink
  message_ports_out
- gr::blocks::file_meta_sink
  message_subscribers
- gr::blocks::file_meta_sink
  min_noutput_items
- gr::blocks::file_meta_sink
  min_output_buffer
- gr::blocks::file_meta_sink
  mp_relative_rate
- gr::blocks::file_meta_sink
  msg_accepter
- gr::blocks::file_meta_sink
  msg_queue
- gr::blocks::file_meta_sink
  name
- gr::blocks::file_meta_sink
  nitems_read
- gr::blocks::file_meta_sink
  nitems_written
- gr::blocks::file_meta_sink
  nmsgs
- gr::blocks::file_meta_sink
  no_pc_rpc
- gr::blocks::file_meta_sink
  notify_msg_neighbors
- gr::blocks::file_meta_sink
  open
- gr::blocks::file_meta_sink
  output_multiple
- gr::blocks::file_meta_sink
  output_multiple_set
- gr::blocks::file_meta_sink
  output_signature
- gr::blocks::file_meta_sink
  pc_input_buffers_full
- gr::blocks::file_meta_sink
  pc_input_buffers_full
- gr::blocks::file_meta_sink
  pc_input_buffers_full_avg
- gr::blocks::file_meta_sink
  pc_input_buffers_full_avg
- gr::blocks::file_meta_sink
  pc_input_buffers_full_var
- gr::blocks::file_meta_sink
  pc_input_buffers_full_var
- gr::blocks::file_meta_sink
  pc_noutput_items
- gr::blocks::file_meta_sink
  pc_noutput_items_avg
- gr::blocks::file_meta_sink
  pc_noutput_items_var
- gr::blocks::file_meta_sink
  pc_nproduced
- gr::blocks::file_meta_sink
  pc_nproduced_avg
- gr::blocks::file_meta_sink
  pc_nproduced_var
- gr::blocks::file_meta_sink
  pc_output_buffers_full
- gr::blocks::file_meta_sink
  pc_output_buffers_full
- gr::blocks::file_meta_sink
  pc_output_buffers_full_avg
- gr::blocks::file_meta_sink
  pc_output_buffers_full_avg
- gr::blocks::file_meta_sink
  pc_output_buffers_full_var
- gr::blocks::file_meta_sink
  pc_output_buffers_full_var
- gr::blocks::file_meta_sink
  pc_throughput_avg
- gr::blocks::file_meta_sink
  pc_work_time
- gr::blocks::file_meta_sink
  pc_work_time_avg
- gr::blocks::file_meta_sink
  pc_work_time_total
- gr::blocks::file_meta_sink
  pc_work_time_var
- gr::blocks::file_meta_sink
  post
- gr::blocks::file_meta_sink
  processor_affinity
- gr::blocks::file_meta_sink
  produce
- gr::blocks::file_meta_sink
  relative_rate
- gr::blocks::file_meta_sink
  relative_rate_d
- gr::blocks::file_meta_sink
  relative_rate_i
- gr::blocks::file_meta_sink
  remove_item_tag
- gr::blocks::file_meta_sink
  remove_item_tag
- gr::blocks::file_meta_sink
  replace_buffer
- gr::blocks::file_meta_sink
  reset_perf_counters
- gr::blocks::file_meta_sink
  rpc_set
- gr::blocks::file_meta_sink
  sample_delay
- gr::blocks::file_meta_sink
  set_alignment
- gr::blocks::file_meta_sink
  set_blkd_input_timer_value
- gr::blocks::file_meta_sink
  set_block_alias
- gr::blocks::file_meta_sink
  set_color
- gr::blocks::file_meta_sink
  set_detail
- gr::blocks::file_meta_sink
  set_fixed_rate
- gr::blocks::file_meta_sink
  set_history
- gr::blocks::file_meta_sink
  set_input_signature
- gr::blocks::file_meta_sink
  set_inverse_relative_rate
- gr::blocks::file_meta_sink
  set_is_unaligned
- gr::blocks::file_meta_sink
  set_log_level
- gr::blocks::file_meta_sink
  set_max_noutput_items
- gr::blocks::file_meta_sink
  set_max_output_buffer
- gr::blocks::file_meta_sink
  set_max_output_buffer
- gr::blocks::file_meta_sink
  set_min_noutput_items
- gr::blocks::file_meta_sink
  set_min_output_buffer
- gr::blocks::file_meta_sink
  set_min_output_buffer
- gr::blocks::file_meta_sink
  set_msg_handler
- gr::blocks::file_meta_sink
  set_output_multiple
- gr::blocks::file_meta_sink
  set_output_signature
- gr::blocks::file_meta_sink
  set_processor_affinity
- gr::blocks::file_meta_sink
  set_relative_rate
- gr::blocks::file_meta_sink
  set_relative_rate
- gr::blocks::file_meta_sink
  set_tag_propagation_policy
- gr::blocks::file_meta_sink
  set_thread_priority
- gr::blocks::file_meta_sink
  set_unaligned
- gr::blocks::file_meta_sink
  set_unbuffered
- gr::blocks::file_meta_sink
  setup_pc_rpc
- gr::blocks::file_meta_sink
  setup_rpc
- gr::blocks::file_meta_sink
  shared_from_base
- gr::blocks::file_meta_sink
  sptr
- gr::blocks::file_meta_sink
  start
- gr::blocks::file_meta_sink
  stop
- gr::blocks::file_meta_sink
  symbol_name
- gr::blocks::file_meta_sink
  symbolic_id
- gr::blocks::file_meta_sink
  sync_block
- gr::blocks::file_meta_sink
  sync_block
- gr::blocks::file_meta_sink
  system_handler
- gr::blocks::file_meta_sink
  tag_propagation_policy
- gr::blocks::file_meta_sink
  tag_propagation_policy_t
- gr::blocks::file_meta_sink
  thread_priority
- gr::blocks::file_meta_sink
  to_basic_block
- gr::blocks::file_meta_sink
  TPP_ALL_TO_ALL
- gr::blocks::file_meta_sink
  TPP_CUSTOM
- gr::blocks::file_meta_sink
  TPP_DONT
- gr::blocks::file_meta_sink
  TPP_ONE_TO_ONE
- gr::blocks::file_meta_sink
  unaligned
- gr::blocks::file_meta_sink
  unique_id
- gr::blocks::file_meta_sink
  unset_max_noutput_items
- gr::blocks::file_meta_sink
  unset_processor_affinity
- gr::blocks::file_meta_sink
  update_rate
- gr::blocks::file_meta_sink
  vcolor
- gr::blocks::file_meta_sink
  WHITE
- gr::blocks::file_meta_sink
  work
- gr::blocks::file_meta_sink
  WORK_CALLED_PRODUCE
- gr::blocks::file_meta_sink
  WORK_DONE
- gr::blocks::file_meta_sink
  work_return_t
- gr::blocks::file_meta_sink
  ~basic_block
- gr::blocks::file_meta_sink
  ~block
- gr::blocks::file_meta_sink
  ~msg_accepter