FakeHFB

class FakeHFB : public kotekan::Stage

Generate fake absorber data into a hfbBuffer.

This stage produces fake absorber data that can be used to feed downstream kotekan stages for testing. It fills its buffer with frames in the HFBFrameView format. Frames are generated for a set of frequencies and a cadence specified in the config.

Buffers

  • out_buf The kotekan buffer which will be fed, can be any size.

    • Format: hfbBuffer structured

    • Metadata: HFBMetadata

Author

James Willis

Param num_beams:

Int. The number of beams in the absorber data.

Param num_subfreq:

Int. The number of sub-frequencies in the absorber data..

Param freq_ids:

List of int. The frequency IDs to generate frames for.

Param start_time:

Double. The start time of the range of data (as a Unix time in seconds). This simply changes the time the frames are labelled with. Default is the current time.

Param cadence:

Float. The interval of time (in seconds) between frames.

Param mode:

String. How to fill the absorber array. See the set of FakeHFBPattern implementations for details.

Param wait:

Bool. Sleep to try and output data at roughly the correct cadence.

Param num_frames:

Exit after num_frames have been produced. If less than zero, no limit is applied. Default is -1.

Param zero_weight:

Bool. Set all weights to zero, if this is True. Default is False.

Param freq:

Array of UInt32. Definition of frequency IDs for mode ‘test_pattern_freq’.

Param sleep_before:

Float. Sleep for this number of seconds before starting. Useful for allowing other processes to send REST commands. Default is 0s.

Param sleep_after:

Float. Sleep for this number of seconds after running and before shutting down. Useful for allowing other processes to finish. Default is 1s.

Param simulate_fpga_restart_at_frame:

Int. If >= 0, resets fpga_seq 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 calling exit. Default is False.

Public Functions

FakeHFB(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)

Constructor. Loads config options.

virtual void main_thread() override

Primary loop to wait for buffers, stuff in data, mark full, lather, rinse and repeat.