zeroSamples

class zeroSamples : public kotekan::Stage

Zeros samples 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 network 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

Author

Andre Renard

Param sample_size:

Int. Default 2048. The size of the time samples in out_buf

Param duplicate_ls_buffer:

Bool. Default False. Whether or not to dupliate the lost samples buf

Param out_lost_sample_buffers:

Buffers to hold the duplicated lost samples buffer. For example: out_lost_sample_buffers:

  • lost_samples_buffer_0

  • lost_samples_buffer_1

  • lost_samples_buffer_2

  • lost_samples_buffer_3

Param zero_value:

Int Default 0x88 The 8-bit value to write overtop of bad data For offset encoded post PFB data this is 0x88

Public Functions

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

Standard constructor.

~zeroSamples()

Destructor.

virtual void main_thread() override

Main thead which zeros the data from the lost_samples_buf.