Common functions
AbstractSDRs.fullScale!
— MethodEnsure 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)
AbstractSDRs.getBufferSize
— MethodReturns 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
AbstractSDRs.getCarrierFreq
— MethodGet the current carrier frequency of the radio device The second parameter (optionnal) speicfies the Rx or Tx board (default : Rx)
AbstractSDRs.getGain
— MethodGet the current radio gain The second parameter (optionnal) specifies the Rx or Tx board (default : Rx)
AbstractSDRs.getSamplingRate
— MethodGet the current sampling rate of the radio device The second parameter (optionnal) speicfies the Rx or Tx board (default : Rx)
AbstractSDRs.getSupportedSDRs
— MethodReturns an array of symbol which lists the supported SDR backends
–- Syntax
l = getSupportedSDR()
–- Input parameters
–- Output parameters
- l : Array of symbols of supported SDRs
AbstractSDRs.isClosed
— MethodCheck 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
AbstractSDRs.openSDR
— MethodOpen 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
AbstractSDRs.recv!
— MethodReceive 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
AbstractSDRs.recv
— MethodReceive 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
AbstractSDRs.scan
— FunctionScan 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")
AbstractSDRs.updateCarrierFreq!
— MethodUpdate 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
AbstractSDRs.updateGain!
— MethodUpdate 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
AbstractSDRs.updateGainMode!
— MethodDefine Gain policy for the SDR radio. Only supported on AdalmPluto
AbstractSDRs.updateSamplingRate!
— MethodUpdate 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