invalidateVDIFframes

class invalidateVDIFframes : public kotekan::Stage

Invalidate VDIF frames in the out_buf based on flags in the lost_samples_buf.

Note the synchronization is a little non-standard here. We wait for the buffer which contains the flags to be full and register as a consumer on that buffer. Because we know that will only happen once the data buffer is full, we can use that as the synchronization on the data, and so can start zeroing data in the data buffer (which we operate on as a producer).

Buffers

  • out_buf Kotekan buffer with VDIF frame data already filled

    • Format: Array with blocks of sample_size byte time samples

    • Metadata: chimeMetadata

  • lost_samples_buf Array of flags which indicate if a sample in a given location is lost

    • Format: Array of flags uint8_t flags which are either 0 (unset) or 1 (set)

    • Metadata: chimeMetadata

Metrics

  • kotekan_vdif_lost_frames_total The number of VDIF frames invalidated because of lost packets.

Author

Andre Renard

Public Functions

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

Standard constructor.

~invalidateVDIFframes()

Destructor.

virtual void main_thread() override

Main thead which zeros the data from the lost_samples_buf.