1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-27 02:09:14 -05:00
sdrangel/plugins/samplesink/sdrdaemonsink
2018-09-01 10:44:12 +02:00
..
CMakeLists.txt SDRDaemonSink: refactoring (1) 2018-08-29 18:39:40 +02:00
readme.md force 24h time format 2018-05-11 11:00:08 +02:00
sdrdaemonsinkgui.cpp SDRdaemonSink: added compatibility with SDRangel and SDRdaemon server types 2018-09-01 10:44:12 +02:00
sdrdaemonsinkgui.h SDRdaemonSink: added compatibility with SDRangel and SDRdaemon server types 2018-09-01 10:44:12 +02:00
sdrdaemonsinkgui.ui SDRdaemonSink: added compatibility with SDRangel and SDRdaemon server types 2018-09-01 10:44:12 +02:00
sdrdaemonsinkoutput.cpp SDRdaemonSink: added compatibility with SDRangel and SDRdaemon server types 2018-09-01 10:44:12 +02:00
sdrdaemonsinkoutput.h SDRDaemonSink GUI: sample rate active feedback 2018-08-31 07:38:30 +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: added compatibility with SDRangel and SDRdaemon server types 2018-09-01 10:44:12 +02:00
sdrdaemonsinksettings.h SDRdaemonSink: added compatibility with SDRangel and SDRdaemon server types 2018-09-01 10:44:12 +02:00
sdrdaemonsinkthread.cpp SDRDaemonSink: refactoring (2) 2018-08-29 22:08:58 +02:00
sdrdaemonsinkthread.h SDRDaemonSink GUI: sample rate active feedback 2018-08-31 07:38:30 +02:00
udpsinkfec.cpp PVS studio static analyzer fixes (1) 2018-06-21 19:28:11 +02:00
udpsinkfec.h PVS-Studio static analysis corrections (4) 2018-04-04 23:39:31 +02:00
UDPSocket.cpp SDRdaemon sink: removed throw lists as they are dprecated in c++11 (gcc7 warning) 2017-12-31 02:46:03 +01: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 SDRdaemon transmitter server using UDP connection. SDRdaemon refers to the SDRdaemon utility sdrdaemontxfound in this Github repository.

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.

Build

The plugin will be built only if libnanomsg and the CM256cc library is installed in your system. libnanomasg is present in most distributions and the dev version can be installed using the package manager. 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

Stream I/Q sample rate in kS/s over the network.

3: Frequency

This is the center frequency in kHz sent to the remote device.

4: Sample rate

SDR Daemon sink output sample rate GUI

4.1: Network stream sample rate

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

4.2: Remote interpolation factor

This is the interpolation set in the remote sdrdaemontx server instance.

5: 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 4 bytes header (1 sample) thus there are 127 samples remaining effectively. This gives the constant 127*127 = 16219 samples per frame in the formula

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

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: Distant transmitter queue length

This is the samples queue length reported from the distant transmitter. This is a number of vectors of 127 ✕ 127 ✕ I samples where I is the interpolation factor. This corresponds to a block of 127 ✕ 127 samples sent over the network. This numbers serves to throttle the sample generator so that the queue length is close to 8 vectors.

6.3: 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)

6.4: Frames recovery status

These are two numbers separated by a slash (/):

  • first: minimum total number of blocks per frame during the last polling period. If all blocks were received for all frames then this number is the nominal number of original blocks plus FEC blocks (Green lock icon). In our example this is 128+6 = 134.
  • second: maximum number of FEC blocks used for original blocks recovery during the last polling timeframe. Ideally this should be 0 when no blocks are lost but the system is able to correct lost blocks up to the nominal number of FEC blocks (Neutral lock icon).

6.5: 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.6: 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.7: 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.8: events counters timer

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

7: Network parameters

SDR Daemon sink output network GUI

7.1: Distant interface IP address

Address of the network interface on the distance (server) machine where the SDRdaemon Tx server runs and receives samples.

7.2: Distant data port

UDP port on the distant (server) machine where the SDRdaemon Tx server runs and receives samples.

7.3 Distant configuration port

TCP port on the distant machine hosting the SDRdaemon Tx instance to send control messages to and receive status messages from.

7.4: Validation button

When the return key is hit within the address (7.1), data port (7.2) or configuration port (7.3) boxes the changes are effective immediately. You can also use this button to set again these values.

8: Other parameters hardware specific

These are the parameters that are specific to the hardware attached to the distant SDRdaemon instance. You have to know which device is attached to send the proper parameters. Please refer to the SDRdaemon documentation or its line help to get information on these parameters.

9: Send data to the distant SDRdaemon Rx instance

When any of the parameters change they get immediately transmitted to the distant server over the TCP link. You can however use this button to send again the complete configuration. This is handy if for some reason you are unsure of the parameters set in the distant server.