1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-03 15:31:15 -05:00
sdrangel/plugins/samplesink/sdrdaemonsink
2017-12-26 02:19:03 +01:00
..
CMakeLists.txt Web API: implemented device run APIs for File Sink and SDRdaeon output sink i.e. the rest of sink device plugins 2017-12-14 18:22:45 +01:00
readme.md SDRdaemonSink documentation 2017-06-10 22:59:45 +02:00
sdrdaemonsinkgui.cpp Web API: use message passing to start/stop device for all the rest of device plugins 2017-12-14 18:02:49 +01:00
sdrdaemonsinkgui.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
sdrdaemonsinkgui.ui Code re-organization in two libraries sdrbase and sdrgui in view of core / GUI split 2017-10-22 19:12:43 +02:00
sdrdaemonsinkoutput.cpp Device sink plugins: implemented an init method for initializations to be done when all collaborating objects are created and possibly connected 2017-12-25 12:59:44 +01:00
sdrdaemonsinkoutput.h Device sink plugins: implemented an init method for initializations to be done when all collaborating objects are created and possibly connected 2017-12-25 12:59:44 +01:00
sdrdaemonsinkplugin.cpp Bumped all plugins version to 3.9.0 2017-12-26 02:19:03 +01: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: fixed deserialization 2017-06-08 00:21:46 +02:00
sdrdaemonsinksettings.h SDRDaemonSink: set the Tx delay as a percentage of the nominal UDP block transmission time 2017-06-08 00:01:56 +02:00
sdrdaemonsinkthread.cpp SDRdaemonSink: implemented Tx queue stabilization 2017-06-05 01:18:35 +02:00
sdrdaemonsinkthread.h SDRdaemonSink: implemented Tx queue stabilization 2017-06-05 01:18:35 +02:00
udpsinkfec.cpp SDRdaemonSink: fixed remote address in case FEC is activated 2017-06-05 18:52:32 +02:00
udpsinkfec.h SDRdaemonSink: fixed basic UDP sending 2017-05-23 01:41:30 +02:00
UDPSocket.cpp activated compiler warnings 2017-05-25 20:13:34 +02:00
UDPSocket.h SDRdaemonSink: fixed basic UDP sending 2017-05-23 01:41:30 +02: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 repostory.

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 numnber 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 thottle 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 evetnts 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.