@ -28,7 +28,7 @@ The existing receiving flow is represented with green boxes. The future Tx flow
@@ -28,7 +28,7 @@ The existing receiving flow is represented with green boxes. The future Tx flow
- The `DownChannelizer`class downsamples further down (or not) the baseband I/Q samples depending on the requirements of the Rx plugin. It cascades the downsampling from the center, left or right half of the baseband in order to fit the Rx plugin bandwidth. It contains the NCO to adjust to the Rx plugin center frequency.
- The special `FileSource` plugin reads a file that was recorded using the `FileRecord` class directly into the baseband as there is no downsampling from the sample rate at which the file was recorded.
- The baseband I/Q samples can be recorded to a file using the `FileRecord` class
<h3>Device sample source plugins</h3>
At present the following plugins are available:
@ -90,7 +90,7 @@ The `plugins` subdirectory contains the associated plugins used to manage device
@@ -90,7 +90,7 @@ The `plugins` subdirectory contains the associated plugins used to manage device
- `xxxplugin.h/cpp` : Plugin interface
- `xxxsettings.h/cpp` : Configuration manager
- `xxxthread.h/cpp` : Reading samples
- `xxx.pro` : Qt .pro file for Windows/Android build
- `xxx.pro` : Qt .pro file for Windows/Android build
@ -116,7 +116,7 @@ The `plugins` subdirectory contains the associated plugins used to manage device
@@ -116,7 +116,7 @@ The `plugins` subdirectory contains the associated plugins used to manage device
- `xxxsinkplugin.h/cpp` : Plugin interface
- `xxxsinksettings.h/cpp` : Configuration manager
- `xxxsinkthread.h/cpp` : Writing samples
- `xxxsink.pro` : Qt .pro file for Windows/Android build
- `xxxsink.pro` : Qt .pro file for Windows/Android build
@ -133,7 +133,7 @@ The `plugins` subdirectory contains the associated plugins used to manage device
@@ -133,7 +133,7 @@ The `plugins` subdirectory contains the associated plugins used to manage device
- `xxxsource.pro` : Qt .pro file for Windows/Android build
<h2>Device interface and GUI lifecycle</h2>
<h3>Overview</h3>
@ -149,7 +149,7 @@ The lifecycle of the GUI is controlled from the "Sampling Device Control" device
@@ -149,7 +149,7 @@ The lifecycle of the GUI is controlled from the "Sampling Device Control" device
- Stop streaming
- Delete the current GUI this will in turn delete the device interface and always close the physical device unless the physical device has a SISO or MIMO architecture (more on that later)
- Remove the current device API from the relevant buddies lists. Buddies list are effective only for physical devices with SISO or MIMO architecture (more on that later)
- Create the new device API
- Create the new device API
- Add the new device API to the relevant devices APIs buddies list
- Creates the new GUI and hence new device interface. This will always open the physical device unless the physical device has a SISO or MIMO architecture
@ -167,7 +167,7 @@ Here is the relevant part of the code (source side) in the `MainWindow::on_sampl
@@ -167,7 +167,7 @@ Here is the relevant part of the code (source side) in the `MainWindow::on_sampl
Some SDR hardware have Rx/Tx capabilities in a SISO or MIMO configuration. That is a physical device can handle more than one I/Q sample flow in either direction. Such devices supported by SDRangel are the following:
@ -175,12 +175,12 @@ Some SDR hardware have Rx/Tx capabilities in a SISO or MIMO configuration. That
@@ -175,12 +175,12 @@ Some SDR hardware have Rx/Tx capabilities in a SISO or MIMO configuration. That
- SISO full duplex: BladeRF
- SISO half duplex: HackRF
- MIMO: LimeSDR
Note that the following would also work for multiple sample channels Rx or Tx only devices but none exists or is supported at this moment.
In SDRangel there is a complete receiver or transmitter per I/Q sample flow. These transmitters and receivers are visually represented by the Rn and Tn tabs in the main window. They are created and disposed in the way explained in the previous paragraph using the source or sink selection confirmation button. In fact it acts as if each receiver or transmitter was controlled independently. In single input or single output (none at the moment) devices this is a true independence but with SISO or MIMO devices this cannot be the case and although each receiver or transmitter looks like it was handled independently there are things in common that have to be taken into account. For example in all cases the device handle should be unique and opening and closing the device has to be done only once per physical device usage cycle.
This is where the "buddies list" come into play. Receivers exhibit a generic interface in the form of the DeviceSourceAPI class and transmitter have the DeviceSinkAPI with the same role. Through these APIs some information and control can flow between receivers and transmitters. The point is that all receivers and/or transmitters pertaining to the same physical device must "know" each other in order to be able to exchange information or control each other. For this purpose the DeviceSourceAPI or DeviceSinkAPI maintain a list of DeviceSourceAPI siblings and a list of DeviceSinkAPI siblings called "buddies". Thus any multi flow Rx/Tx configuration can be handled.
This is where the "buddies list" come into play. Devices exhibit a generic interface in the form of the DeviceAPI class. Through this API some information and control can flow between receivers and transmitters. The point is that all receivers and/or transmitters pertaining to the same physical device must "know" each other in order to be able to exchange information or control each other. For this purpose the DeviceAPI maintain a list of DeviceAPI siblings called "buddies". Thus any multi flow Rx/Tx configuration can be handled.
The exact behaviour of these coupled receivers and/or transmitters is dependent on the hardware therefore a generic pointer attached to the API can be used to convey any kind of class or structure tailored for the exact hardware use case. Through this structure the state of the receiver or transmitter can be exposed therefore there is one structure per receiver and transmitter in the device interface. This structure may contain pointers to common areas (dynamically allocated) related to the physical device. One such "area" is the device handle which is present in all cases.
@ -193,24 +193,24 @@ The degree of entanglement between the different coupled flows in a single hardw
@@ -193,24 +193,24 @@ The degree of entanglement between the different coupled flows in a single hardw
- independent Rx and Tx center frequencies
- independent Gain, bandwidth, ...
- only the device handle and indication of the presence of the XB200 accessory board is common
- HackRF: this is a half duplex device. Rx and Tx might appear as tightly coupled but since you can use only one or the other then in fact you can control them differently as this is done in sequence. In fact only the common device handle has to be taken care of
- LimeSDR: dual Rx and dual Tx in MIMO configuration. This implies tightly coupling between receivers on one part and transmitter on the other. But in the case of the LimeSDR (LMS7002M chip) there is even a tight coupling between Rx and Tx parts since the ADC/DAC clock is in common which means both have the same base sample rate that can only be varied by the mean of the hardware decimators and interpolators. This means:
- Rx share the same sample rate, hardware decimation factor and center frequency
- Tx share the same sample rate, hardware interpolation factor and center frequency
- Rx and Tx share the same base sample rate (decimation/interpolation apart)
- Independent Rx and Tx center frequencies
- Independent gains, bandwidths, etc... per Rx or Tx channel
The openDevice and closeDevice methods of the device interface are designed specifically for each physical device type in order to manage the common resources appropriately at receiver or transmitter construction and destruction. For example opening and closing the device and the related device handle is always done this way:
- openDevice:
- check if there is any "buddy" present in one of the lists
- if there is a buddy then grab the device handle and use it for next operations
- if there is no buddy open the device and store the handle in the common area so it will be visible for future buddies
- closeDevice:
- if there are no buddies then effectively close the device else just zero out the own copy of the device handle
Exchange of dynamic information when necessary such as sample rate or center frequency is done by message passing between buddies.
@ -129,7 +129,7 @@ class DATVDemod : public BasebandSampleSink, public ChannelSinkAPI
@@ -129,7 +129,7 @@ class DATVDemod : public BasebandSampleSink, public ChannelSinkAPI