Class AsciiConfigTestHelper
Defined in File AsciiConfigTestHelper.h
Class Documentation
-
class AsciiConfigTestHelper
Main entry class that dispatches configuration commands.
Public Functions
-
AsciiConfigTestHelper(PstComponent pst_component, ArrayAssembly array_assembly, FrequencyBand frequency_band)
Construct a new Ascii Config Test Helper object.
- Parameters
pst_component – the PST component the headers are for
array_assembly – the array assembly the headers are for
frequency_band – the frequency band the headers are for
-
~AsciiConfigTestHelper()
Destroy the Ascii Config Test Helper object.
-
void configure(PstComponent pst_component, ArrayAssembly array_assembly, FrequencyBand frequency_band)
Configure the helper with sensible defaults for the specified configuration.
- Parameters
pst_component – the PST component the headers are for
array_assembly – the array assembly the headers are for
frequency_band – the frequency band the headers are for
-
void adjust(unsigned nbit, unsigned nchan, unsigned udp_nchan, unsigned udp_nsamp, unsigned wt_nsamp)
Adjust certain parameters of the headers set by configure.
- Parameters
nbit – number of bits per sample
nchan – total number of channels
udp_nchan – number of channels per udp packet
udp_nsamp – number of samples per udp packet
wt_nsamp – number of samples per relative weight
-
void recalculate()
Recompute the parameters of the headers that are affected by the adjust command.
-
void reset_generator_configuration()
Reset generator configurations.
-
AsciiHeader generate_configure_beam_ascii_header()
Generate configure_beam AsciiHeader consumed by PST.CORE applications.
-
AsciiHeader generate_configure_scan_ascii_header()
Generate configure_scan AsciiHeader consumed by PST.CORE applications.
-
AsciiHeader generate_start_scan_ascii_header()
Generate start_scan AsciiHeader consumed by PST.CORE applications.
-
AsciiHeader generate_scanning_data_header()
Generate data header AsciiHeader expected from SCANNING consumed by PST.CORE applications.
-
AsciiHeader generate_scanning_weights_header()
Generate weights header AsciiHeader expected from SCANNING consumed by PST.CORE applications.
-
AsciiHeader generate_scanning_data_config()
Generate data config AsciiHeader expected from SCANNING consumed by PST.CORE applications.
-
AsciiHeader generate_scanning_weights_config()
Generate weights config AsciiHeader expected from SCANNING consumed by PST.CORE applications.
-
AsciiHeader generate_stat_tfp_data_header(unsigned nbit, unsigned nchan, unsigned udp_nchan = 0, unsigned udp_nsamp = 0)
Generate a data header produced in FTP ordering from DSP.FT to be processed by STAT.
- Parameters
nbit – number of bits per sample
nchan – total number of channels
udp_nchan – number of channels per udp packet, providing 0 denotes
udp_nsamp – number of samples per udp packet
- Returns
AsciiHeader the header of the data ring buffer
-
AsciiHeader generate_stat_tfp_weights_header(unsigned nchan, unsigned udp_nchan = 0, unsigned udp_nsamp = 0)
Generate a weights header produced in FTP ordering from DSP.FT to be processed by STAT.
- Parameters
nchan – total number of channels
udp_nchan – number of channels per udp packet
udp_nsamp – number of samples per udp packet
- Returns
AsciiHeader the header of the data ring buffer
-
AsciiHeader generate_masked_channel_config()
Generate and return configuration parameters for RFI masks that span the bottom 50% of channels.
-
void write_configuration_to_file(const ska::pst::common::AsciiHeader &_config, const std::string &file_path)
Write configuration to file.
-
void delete_file()
delete file created by write_configuration_to_file
Public Members
-
std::string file_path
public file path
-
std::string DATA_KEY = "a000"
default SMRB data key
-
std::string WEIGHTS_KEY = "a002"
default SMRB weights key
-
std::string OUTPUT_DATA_KEY = "a004"
default SMRB output data key
-
std::string OUTPUT_WEIGHTS_KEY = "a006"
default SMRB output weights key
-
std::string EB_ID = "eb-m001-20230921-12345"
default Execution Block ID
-
std::string SCAN_ID = "12345"
default Scan ID
-
std::string BEAM_ID = "1"
default Beam ID
-
std::string UTC_START = "2023-08-07-15:41:00"
default UTC_START
-
std::string HB_VERSION = "1.0"
default header version
-
uint32_t HB_BUFSZ = 16384
default header size
-
uint32_t HB_NBUFS = 8
default number of header buffers
-
uint32_t DB_NBUFS = 8
default number of data buffers
-
uint32_t WB_NBUFS = 8
default number of weights buffers
-
std::string TELESCOPE
The telescope relating to the frequency band (SKALow or SKAMid)
-
std::string INSTRUMENT
The name of the instrument providing the input data stream for the frequency band (LowCBF or MidCBF)
-
std::string RECEIVER
The name of the receiver of the frequency band (LFAA or SPRX)
-
std::string BAND
The name of the frequency band (Low, Band1, Band2, Band5a)
-
std::string UDP_FORMAT
The name of the UDPFormat (LowPST, MidPSTBand1, MidPSTBand2, …)
-
const uint32_t WEIGHTS_NBIT = 16
The number of bits per sample for relative weights.
-
uint32_t PACKET_SCALES_SIZE = sizeof(float)
Size of the scales component in a packet in bytes.
-
uint32_t PACKET_WEIGHTS_SIZE = 0
Size of the weights component of a packet, in bytes.
-
uint32_t BLOCK_HEADER_BYTES = 0
Total size of the scales components of the packets in a heap, in bytes.
-
uint32_t BLOCK_DATA_BYTES = 0
Total size of the weights components of the packets in a heap, in bytes.
-
uint32_t DF_FREQ_INTEGRATION_FACTOR = 2
Frequency integration factor in Detected Filterbank.
Public Static Functions
-
static inline std::string get_pst_component_name(PstComponent p)
Return the name of PstComponent as a string.
-
static inline std::string get_array_assembly_name(ArrayAssembly a)
Return the name of ArrayAssembly as a string.
-
static inline std::string get_frequency_band_name(FrequencyBand f)
Return the name of FrequencyBand as a string.
-
AsciiConfigTestHelper(PstComponent pst_component, ArrayAssembly array_assembly, FrequencyBand frequency_band)