Skip to content

Data Writer Operator#

Authors: John Moon john.moon@vts-i.com (Valley Tech Systems, Inc.), Eric Ferrara eric.ferrara@vts-i.com (Valley Tech Systems, Inc.), Matthew Luckenbihl matthew.luckenbihl@vts-i.com (Valley Tech Systems, Inc.)
Supported platforms: x86_64
Language: C++
Last modified: May 13, 2025
Latest version: 1.0.0
Minimum Holoscan SDK version: 2.5.0
Tested Holoscan SDK versions: 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 3.0.0, 3.1.0
Contribution metric: Level 4 - Experimental

Overview#

Writes binary data from its input to an output file. This operator is intened for use as a debugging aid.

Description#

The data writer operator takes in a std::tuple<tensor_t<complex, 2>, cuda_stream_t>, copies the data to a host tensor, then writes the data out to a binary file.

The file path is determined based on input metadata with the following keys:

  1. channel_number (default 0)
  2. bandwidth_hz (default 0.0)
  3. rf_ref_freq_hz (default 0.0)

With this, it creates: data_writer_out_ch{channel_number}_bw{bandwidth_hz}_freq{rf_ref_freq_hz}.dat.

Requirements#

  • MatX (dependency - assumed to be installed on system)

Configuration#

The data writer operator takes in a few parameters:

data_writer:
  burst_size: 1280
  num_bursts: 625
  • burst_size: Number of samples contained in each burst
  • num_bursts: Number of bursts to process at once

Example Usage#

For an example of how to use this operator, see the psd_pipeline application.

Usually, you'd just want to write one burst of data to a file. To do that, you could use a CountCondition to limit the number of times this operator runs:

auto dataWriterOp = make_operator<ops::DataWriter>(
    "dataWriterOp",
    make_condition<CountCondition>(1));