// MDSM entry point int main(int argc, char *argv[]) { // Create main QCoreApplication instance QCoreApplication app(argc, argv); SURVEY* survey = file_process_arguments(argc, argv); // Initialise Dedispersion code and survey struct initialise(survey); unsigned char *input_buffer; // Process current chunk unsigned int counter = 0, data_read = 0; while (TRUE) { // Get current buffer pointer input_buffer = get_buffer_pointer(); // Read data from file // data_read = readBinaryData(input_buffer, survey -> fp, survey -> nbits, // survey -> nsamp, survey -> nchans, survey -> nbeams); // Check if there is more processing to be done unsigned int x; next_chunk(survey -> nsamp, x, survey -> tsamp * survey -> nsamp * counter, survey -> tsamp); if (!start_processing(survey -> nsamp)) break; counter++; } // Tear down MDSM tearDown(); }
void EVAL_analyze_values (uint8_t b) { int c; uint16_t t; val_buff = get_buffer_pointer (b); /* 1. step: calculate min, max and average of all channels */ for (c = 0; c < MEASUREMENT_CHANNELS; c++) { EVAL_calc_min_max_avg (val_buff, c, 0, MEASUREMENT_BLOCK_LENGTH-1, &val_min[c], &val_max[c], &val_avg[c]); } /* 2. step: search one period of the wave */ for (c = 0; c < MEASUREMENT_CHANNELS; c++) { EVAL_search_periode (val_buff, c, 0, MEASUREMENT_BLOCK_LENGTH-1, &periode_start[c], &periode_end[c], val_avg[c]); } }