testDataGen

class testDataGen : public kotekan::Stage

Generate test data as a standin for DPDK.

Buffers

  • out_buf Buffer to fill

    • Format: any format

    • Metadata: chimeMetadata

Author

Andre Renard, Kiyoshi Masui

Param type:

String. “const”, “random”, “random_signed”, “ramp”, or “tpluse”.

Param value:

Int. Required for type “const” and “ramp”.

Param values:

Vector of ints. Only used for type “onehot” - sets the array element to a different value for each frame; loops through the values.

Param seed:

Int. For type “random”, “random_signed”, and “onehot”. If non-zero, seeds the random number generator on startup for reproducible results.

Param reuse_random:

Bool, default False. For “random” types, only generate each random block once, then keep re-using it.

Param wait:

Bool, default True. Produce data a set cadence. Otherwise just as fast as possible.

Param samples_per_data_set:

Int. How often to produce data.

Param stream_id:

Int.

Param num_frames:

Int. How many frames to produce. Default inf.

Param num_freq_in_frame:

Int. Number of frequencies in each GPU frame.

Param rest_mode:

String. “none” (default), “start”, or “step.

How to interact with rest commands to trigger

data production.

@param num_links Int. How many links are being simulated, impacts

the rate of data generated in the wait = true mode.

@param simulate_fpga_restart_at_frame Int. If >= 0, resets seq_num to 0

at this frame index (for testing countCheck). Default is -1.

@param end_interrupt Bool. Interrupt the kotekan process after num_frames

instead of exiting normally. Default is False.

@par REST Endpoints

- @c /\<unique_name\>/generate_test_data

<tt>POST</tt> Triggers the generation of data.

Requires json values <tt>num_frames</tt> (integer)

If <tt>rest_mode</tt> is “start” or “step”, data generation will not start right away

but will wait for a rest trigger providing <tt>num_frames</tt>. In “start” mode this

will initiate the stream of data. In “step” mode this will trigger

num_frames frames to be generated.

Public Functions

testDataGen(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)
~testDataGen()
virtual void main_thread() override