1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 08:28:36 -05:00
sdrangel/plugins/samplesink/sdrdaemonsink
2018-09-17 09:24:05 +02:00
..
CMakeLists.txt SDRDaemonSink: use QUdpSocket: cleanup 2018-09-17 03:53:46 +02:00
readme.md SDRDaemonSink: updated documentation 2018-09-15 11:42:28 +02:00
sdrdaemonsink.pro Windows build: remove SDRDaemon plugins 2018-09-17 09:24:05 +02:00
sdrdaemonsinkgui.cpp SDRDaemon: cleanup on UDP Tx side to use sdrdaemondatablock.h definitions and Rx sample size 2018-09-13 00:31:49 +02:00
sdrdaemonsinkgui.h Fixed Debian build 2018-09-16 01:30:43 +02:00
sdrdaemonsinkgui.ui SDRDaemonSink: ananonymize protected bloc in UDPSinkFEC also 2018-09-11 00:24:18 +02:00
sdrdaemonsinkoutput.cpp SDRDaemonSink: calculate Tx delay in UDP sink 2018-09-11 01:01:43 +02:00
sdrdaemonsinkoutput.h SDRDaemonSink: wait for queue stabilization to start rate control 2018-09-07 09:22:17 +02:00
sdrdaemonsinkplugin.cpp SDRDaemonSink: refactoring (1) 2018-08-29 18:39:40 +02:00
sdrdaemonsinkplugin.h Removed direct reference to the DeviceSinkAPI in the sink GUIs. Removed DeviceSourceAPI forward declaration in source GUI headers 2017-10-30 02:54:22 +01:00
sdrdaemonsinksettings.cpp SDRDaemonSink: use QUdpSocket: cleanup 2018-09-17 03:53:46 +02:00
sdrdaemonsinksettings.h SDRDaemonSink: refactored rate control and removed server type from GUI and REST API 2018-09-04 08:43:07 +02:00
sdrdaemonsinkthread.cpp SDRDaemonSink: make UDP worker a QThread 2018-09-17 03:33:18 +02:00
sdrdaemonsinkthread.h SDRDaemonSink: calculate Tx delay in UDP sink 2018-09-11 01:01:43 +02:00
udpsinkfec.cpp SDRDaemonSink: make UDP worker a QThread 2018-09-17 03:33:18 +02:00
udpsinkfec.h SDRDaemonSink: make UDP worker a QThread 2018-09-17 03:33:18 +02:00
udpsinkfecworker.cpp SDRDaemonSink: use QUdpSocket: cleanup 2018-09-17 03:53:46 +02:00
udpsinkfecworker.h SDRDaemonSink: use QUdpSocket: cleanup 2018-09-17 03:53:46 +02:00
UDPSocket.cpp SDRdaemon: code cleanup 2018-09-15 21:50:12 +02:00
UDPSocket.h SDRdaemon sink: removed throw lists as they are dprecated in c++11 (gcc7 warning) 2017-12-31 02:46:03 +01:00

SDRdaemon sink plugin

Introduction

This output sample sink plugin sends its samples over tbe network to a SDRangel instance's Daemon source channel using UDP connection.

Forward Error Correction with a Cauchy MDS block erasure codec is used to prevent block loss. This can make the UDP transmission more robust particularly over WiFi links.

The distant SDRangel instance to which the data stream is sent is controlled via its REST API using a separate control software for example SDRangelcli

The sample size used in the I/Q stream is the Rx sample size of the local instance. Possible conversion takes place in the distant Daemon source channel plugin to match the Rx sample size of the distant instance. Best performace is obtained when both instances use the same sample size.

Build

The plugin will be built only if the CM256cc library is installed in your system. For CM256cc library you will have to specify the include and library paths on the cmake command line. Say if you install cm256cc in /opt/install/cm256cc you will have to add -DCM256CC_INCLUDE_DIR=/opt/install/cm256cc/include/cm256cc -DCM256CC_LIBRARIES=/opt/install/cm256cc/lib/libcm256cc.so to the cmake commands.

Interface

SDR Daemon sink output plugin GUI

1: Start/Stop

Device start / stop button.

  • Blue triangle icon: device is ready and can be started
  • Green square icon: device is running and can be stopped

2: Stream sample rate

I/Q sample rate in kS/s of the stream that is sent over the network.

3: Frequency

This is the center frequency in kHz of the remote instance device.

4: Remote baseband sample rate

This is the remote instance baseband sample rate. It can be a power of two multiple of the stream sample rate (2) but it will not work for other values.

5: Stream controls and API destination

SDR Daemon sink output sample rate GUI

5.1: Network stream sample rate

This is the I/Q stream sample rate transmitted via UDP over the network

5.2: Delay between UDP blocks transmission

This sets the minimum delay between transmission of an UDP block (send datagram) and the next. This allows throttling of the UDP transmission that is otherwise uncontrolled and causes network congestion.

The value is a percentage of the nominal time it takes to process a block of samples corresponding to one UDP block (512 bytes). This is calculated as follows:

  • Sample rate on the network: SR
  • Delay percentage: d
  • Number of FEC blocks: F
  • There are 127 blocks of I/Q data per frame (1 meta block for 128 blocks) and each I/Q data block of 512 bytes (128 samples) has a 8 bytes header (2 samples) thus there are 126 samples remaining effectively. This gives the constant 127*126 = 16002 samples per frame in the formula

Formula: ((127 ✕ 126 ✕ d) / SR) / (128 + F)

5.3: remote instance device set index

This is the device set index in the remote instance to which the stream is connected to. Use this value to properly address the API to get status.

5.4: remote instance channel index

This is the channel index of the Daemon source in the remote instance to which the stream is connected to. Use this value to properly address the API to get status.

6: Forward Error Correction setting and status

SDR Daemon sink output FEC GUI

6.1: Desired number of FEC blocks per frame

This sets the number of FEC blocks per frame. A frame consists of 128 data blocks (1 meta data block followed by 127 I/Q data blocks) and a variable number of FEC blocks used to protect the UDP transmission with a Cauchy MDS block erasure correction. The two numbers next are the total number of blocks and the number of FEC blocks separated by a slash (/).

6.2: Stream status

The color of the icon indicates stream status:

  • Green: all original blocks have been received for all frames during the last polling timeframe (ex: 134)
  • No color: some original blocks were reconstructed from FEC blocks for some frames during the last polling timeframe (ex: between 128 and 133)
  • Red: some original blocks were definitely lost for some frames during the last polling timeframe (ex: less than 128)
  • Blue: stream is idle

6.3: Remote stream rate

This is the remote stream rate calculated from the samples counter between two consecutive API polls. It is normal for it to oscillate moderately around the nominal stream rate (2).

6.4: Reset events counters

This push button can be used to reset the events counters (6.6 and 6.7) and reset the event counts timer (6.8)

6.5: Unrecoverable error events counter

This counter counts the unrecoverable error conditions found (i.e. 6.4 lower than 128) since the last counters reset.

6.6: Recoverable error events counter

This counter counts the unrecoverable error conditions found (i.e. 6.4 between 128 and 128 plus the number of FEC blocks) since the last counters reset.

6.7: events counters timer

This HH:mm:ss time display shows the time since the reset events counters button (4.6) was pushed.

7: Distant transmitter queue length gauge

This is ratio of the reported number of data frame blocks in the remote queue over the total number of blocks in the queue.

8: Distant transmitter queue length status

This is the detail of the ratio shown in the gauge. Each frame block is a block of 127 ✕ 126 samples (16 bit I or Q samples) or 127 ✕ 63 samples (24 bit I or Q samples).

9: Distant server API address and port

SDR Daemon source input stream GUI

9.1: API connection indicator

The "API" label is lit in green when the connection is successful

9.2: API IP address

IP address of the distant SDRangel instance REST API

9.3: API port

Port of the distant SDRangel instance REST API

9.4: Validation button

When the return key is hit within the address (9.2) or port (9.3) the changes are effective immediately. You can also use this button to set again these values. Clicking on this button will send a request to the API to get the distant SDRangel instance information that is displayed in the API message box (8)

10: Local data address and port

SDR Daemon source input stream GUI

10.1: Data IP address

IP address of the local network interface the distant SDRangel instance sends the data to

10.2: Data port

Local port the distant SDRangel instance sends the data to

10.3: Validation button

When the return key is hit within the address (10.2) or port (10.3) the changes are effective immediately. You can also use this button to set again these values.

11: Status message

The API status is displayed in this box. It shows "API OK" when the connection is successful and reply is OK

12: API information

This is the information returned by the API and is the distance SDRangel instance information if transaction is successful