1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 13:21:50 -05:00
sdrangel/plugins/samplesource/fileinput
Kacper Michajłow f2d01b61d3 Avoid global QString init in plugins
This workarounds issue with LTO with GCC #716
2020-11-22 04:06:32 +01:00
..
CMakeLists.txt File Input: refactored FileInputThread to FileInputWorker object moved to thread (contribution from Vort). Fixes #562 2020-07-11 06:45:16 +02:00
fileinput.cpp FileInput: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:12:30 +02:00
fileinput.h Removed handleMessage virtual method from PluginInstanceGUI 2020-10-04 22:16:09 +02:00
fileinputgui.cpp Morph PluginInstanceGUI in DeviceGUI and single line inheritance from QWidget 2020-10-05 19:48:05 +02:00
fileinputgui.h Morph PluginInstanceGUI in DeviceGUI and single line inheritance from QWidget 2020-10-05 19:48:05 +02:00
fileinputgui.ui FileInput: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:12:30 +02:00
fileinputplugin.cpp Avoid global QString init in plugins 2020-11-22 04:06:32 +01:00
fileinputplugin.h Avoid global QString init in plugins 2020-11-22 04:06:32 +01:00
fileinputsettings.cpp FileInput: removed center frequency and sample rate from the settings since it should come from the file header 2020-07-11 11:09:58 +02:00
fileinputsettings.h FileInput: removed center frequency and sample rate from the settings since it should come from the file header 2020-07-11 11:09:58 +02:00
fileinputwebapiadapter.cpp Fixed -Wunused-parameter warnings 2020-11-14 11:13:32 +01:00
fileinputwebapiadapter.h REST API: config: GET (11). Support of the rest of devices 2019-08-04 20:24:44 +02:00
fileinputworker.cpp removed asserts 2020-11-04 21:51:55 +01:00
fileinputworker.h File Input: refactored FileInputThread to FileInputWorker object moved to thread (contribution from Vort). Fixes #562 2020-07-11 06:45:16 +02:00
readme.md Full renaming of FileSource device to FileInput 2019-07-08 00:59:04 +02:00

File input plugin

Introduction

This plugin reads a file of I/Q samples that have been previously saved with the file record button of other sampling source devices. The file starts with a 32 byte header of all unsigned integer of various sizes containing meta data:

Displ. Bytes Description
0 4 Sample rate in S/s
4 8 Center frequency in Hz
12 8 Unix epoch (timestamp) of start
20 4 Sample size (16 or 24 bits)
24 4 Filler with zeroes
28 4 CRC32 of the previous 28 bytes

The header takes an integer number of 16 (4 bytes) or 24 (8 bytes) bits samples. To calculate CRC it is assumed that bytes are in little endian order.

Interface

File input plugin GUI

1: Start/Stop

Device start / stop button.

  • Blue triangle icon: ready to be started
  • Green square icon: currently running and can be stopped
  • Magenta (or pink) square icon: an error occurred. The file may not be found or this can be a header CRC error or the file is too small (less than the header length). You may stop and choose another file.

2: Stream sample rate

Baseband I/Q sample rate in kS/s. This is the sample rate present in the header.

3: Frequency

This is the center frequency of reception in kHz when the record was taken and written in the header.

4: Open file

Opens a file dialog to select the input file. It expects a default extension of .sdriq. This button is disabled when the stream is running. You need to pause (button 11) to make it active and thus be able to select another file.

5: File path

Absolute path of the file being read

6: File recorded sample rate

Sample rate of the record in kS/s as written in the header. The reading process is based on this sample rate.

7: Sample size

This is the sample size in bits as written in the header. The reading process is based on this sample size.

8: CRC indicator

Indicates if the header block CRC check has succeeded (green) or failed (red) or undetermined yet (grey). If the header is corrupted you may try to reconstruct a valid header using the rescuesdriq utility in the folder with the same name. See the readme for details.

9: Current timestamp

This is the timestamp of the current pointer in the file based on the start time, number of samples read and sample rate.

10: Loop

Use this button to read in a loop or read only once

11: Play/pause

This is the play/pause button

12: Playback acceleration

Use this combo to select play back acceleration to values of 1 (no acceleration), 2, 5, 10, 20, 50, 100, 200, 500, 1k (1000) times. This is useful on long recordings used in conjunction with the spectrum "Max" averaging mode in order to see the waterfall over a long period. Thus the waterfall will be filled much faster.

☞ Note that this control is enabled only in paused mode.

⚠ The result when using channel plugins with acceleration is unpredictable. Use this tool to locate your signal of interest then play at normal speed to get proper demodulation or decoding.

13: Relative timestamp and record length

Left is the relative timestamp of the current pointer from the start of the record. Right is the total record time.

14: Current pointer gauge

This represents the position of the current pointer position in the complete recording. It can be used it paused mode to position the current pointer by moving the slider.