nDiskFileWrite

class nDiskFileWrite : public kotekan::Stage

Consumer kotekan::Stage which writes VDIF-formatted input data on multiple drives.

This is a consumer which initiates n threads to write to n disks. Each drive will receive data from every nth buffer, stored within a common-named subfolder. Within each folder the data files will be numbered incrementally across the disks.

Todo:

Make more general, to support more than just ICEboard-generated data.

Buffers

  • in_buf The kotkean buffer holing the data to be written

    • Format: Array of VDIF frames.

    • Metadata: none

Worked Example with n = 3:

kotekan::Config Parameters:

  • num_disk: 3

  • disk_base: /drives/

  • disk_set: /D/

  • instrument_name: aro

This will output data in files like:

Drive 0:

  • /drives/D/0/20170805T155218Z_aro_vdif/settings.txt

  • /drives/D/0/20170805T155218Z_aro_vdif/0000000.vdif

  • /drives/D/0/20170805T155218Z_aro_vdif/0000003.vdif

  • /drives/D/0/20170805T155218Z_aro_vdif/0000006.vdif

Drive 1:

  • /drives/D/1/20170805T155218Z_aro_vdif/settings.txt

  • /drives/D/1/20170805T155218Z_aro_vdif/0000001.vdif

  • /drives/D/1/20170805T155218Z_aro_vdif/0000004.vdif

  • /drives/D/1/20170805T155218Z_aro_vdif/0000007.vdif

Drive 2:

  • /drives/D/2/20170805T155218Z_aro_vdif/settings.txt

  • /drives/D/2/20170805T155218Z_aro_vdif/0000002.vdif

  • /drives/D/2/20170805T155218Z_aro_vdif/0000005.vdif

  • /drives/D/2/20170805T155218Z_aro_vdif/0000008.vdif

Author

Andre Renard

Param num_disks:

Int , the number of drives to read from

Param disk_base:

String, the path to the mounted drives

Param disk_set:

String, the disk name.

Param write_to_disk:

Bool, whether to actually save, alternately operating in dummy mode

Param instrument_name:

String, used in filenames and stored to metadata text file.

Param write_metadata_and_gains:

Bool, Default true. Flag to control if VDIF/ARO style gains and metadata are copied to the acquisition folder.

Public Functions

nDiskFileWrite(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_containter)

Constructor.

virtual ~nDiskFileWrite()

Destructor, currently does nothing.

virtual void main_thread() override

Creates n safe instances of the file_read_thread thread.