Common functions

AbstractSDRs.fullScale!Method

Ensure that the input buffer has full scale, i.e the input is between -1 and + 1 This function is inplace. This is usefull for radio that uses Int format, with input that should be normalized. 2 different policies

  • :same : A common scaling factor is used for both I anbd Q path
  • :independant : One scaling is used for real and one scaling is used for imag (default policy: :independent)
source
AbstractSDRs.getBufferSizeMethod

Returns the radio packet size. Each radio backend encapsulates the IQ samples into chunks of data. The recv command can be used with any size but it can be more efficient to match the desired size with the one provided by the radio

–- Syntax

bufferSize = getBufferSize(radio)

–- Input parameters

  • radio : SDR device

–- Output parameters

bufferSize : Size of radio internal buffer

source
AbstractSDRs.getCarrierFreqMethod

Get the current carrier frequency of the radio device The second parameter (optionnal) speicfies the Rx or Tx board (default : Rx)

source
AbstractSDRs.getGainMethod

Get the current radio gain The second parameter (optionnal) specifies the Rx or Tx board (default : Rx)

source
AbstractSDRs.getSamplingRateMethod

Get the current sampling rate of the radio device The second parameter (optionnal) speicfies the Rx or Tx board (default : Rx)

source
AbstractSDRs.getSupportedSDRsMethod

Returns an array of symbol which lists the supported SDR backends

–- Syntax

l = getSupportedSDR()

–- Input parameters

–- Output parameters

  • l : Array of symbols of supported SDRs
source
AbstractSDRs.isClosedMethod

Check if a SDR has already been closed. The falg is true is the SDR ressources have been released and false otherwise.

–- Syntax

flag = isClosed(radio)

–- Input parameters

  • radio : SDR device

–- Output parameters

  • flag : True is SDR is already closed, false otherwise
source
AbstractSDRs.openSDRMethod

Open a Software Defined Radio of backend 'type', tune accordingly based on input parameters and use the supported keywords. It returns a radio object, depending on the type of SDR that can be used with all AbstractSDRs supported functions

–- Syntax

radio = openSDR(type,carrierFreq,samplingRate,gain,antenna;key)

–- Input parameters

  • type : Desired SDR type. The different supported radio format can be obtained with getSupportedSDR();
  • carrierFreq : Carrier frequency [Hz]
  • samplingRate : Sampling frequency (Hz)
  • gain : Analog Rx gain (dB)

–- Output parameters

  • radio : Defined SDR object
source
AbstractSDRs.recv!Method

Receive from the SDR and fill them in the input buffer.

–- Syntax

  • nbSamples = recv!(sig,radio);

–- Input parameters

  • sig : Buffer to be filled
  • radio : SDR device

–- Output parameters

  • nbSamples : Number of samples filled
source
AbstractSDRs.recvMethod

Receive nbSamples from the SDR and fill them in the output buffer. The buffer format depends on the SDR backend

–- Syntax

  • buffer = recv(radio, nbSamples)

–- Input parameters

  • radio : SDR object
  • nbSamples : Desired number of samples

–- Output parameters

  • buffer : Output buffer from the radio filled with nbSamples samples
source
AbstractSDRs.scanFunction

Scan interface and returns the founded SDR

–- Syntax

sdr = scan() sdr = scan(backend;key...)

Input parameter

If the function is called without parameters il will search for all available backends such as UHDBindings and AdalmPluto. Otherwise the search will be limited to the desired backend The optionnal arguments are the one supported by UHDBindings and AdalmPluto. See uhd_find_devices() in UHDBindings and scan function in AdalmPluto

Keywords

  • args : String used in UHD backend to specify USRP IP address. Example: scan(:uhd;args="addr=192.168.10.16")
  • backend : Sring used in Pluto backend to specify the interface used ("local", "xml", "ip", "usb")
source
AbstractSDRs.updateCarrierFreq!Method

Update carrier frequency of current radio device, and update radio object with the new obtained sampling frequency.

–- Syntax

updateCarrierFreq!(radio,carrierFreq)

–- Input parameters

  • radio : SDR device
  • carrierFreq : New desired carrier frequency

–- Output parameters

  • carrierFreq : Effective carrier frequency
source
AbstractSDRs.updateGain!Method

Update gain of current radio device, and update radio object with the new obtained gain. If the input is a [UHDRx] or a [UHDTx] object, it updates only the Rx or Tx gain

–- Syntax

updateGain!(radio,gain)

–- Input parameters

  • radio : SDR device
  • gain : New desired gain

–- Output parameters

  • gain : New gain value
source
AbstractSDRs.updateSamplingRate!Method

Update sampling rate of current radio device, and update radio object with the new obtained sampling frequency.

–- Syntax

updateSamplingRate!(radio,samplingRate)

–- Input parameters

  • radio : SDR device
  • samplingRate : New desired sampling rate

–- Output parameters

  • samplingRate : Effective sampling rate
source