Common functions
Base.close
— MethodClose the USRP device (Rx or Tx mode) and release all associated objects
–- Syntax
close(uhd)
–- Input parameters
- uhd : UHD object [UHDRx,UHDTx]
–- Output parameters
- []
Base.print
— MethodPrint the radio configuration
–- Syntax
printUHD(radio)
–- Input parameters
- radio : UHD object (Tx or Rx)
–- Output parameters
- []
UHD.openUHD
— FunctionInit the core parameter of the radio in Tx or in Rx mode and initiate RF parameters
–- Syntax
openUHD(mode,sysImage,carrierFreq,samplingRate,txGain,antenna="RX2")
–- Input parameters
- mode : String to open radio in "Tx" (transmitter) or in "Rx" (receive) mode
- carrierFreq : Desired Carrier frequency [Union{Int,Float64}]
- samplingRate : Desired bandwidth [Union{Int,Float64}]
- txGain : Desired Tx Gain [Union{Int,Float64}]
- antenna : Desired Antenna alias [String]
Keywords=
- args : String with the additionnal load parameters (for instance, path to the FPHGA image) [String]
–- Output parameters
- UHDTx : UHD Tx or Rx object with PHY parameters [Union{UHDTx,UHDRx}]
Receiver functions
UHD.getError
— MethodReturns the Error flag of the current UHD burst
–- Syntax
flag = getError(radio)
–- Input parameters
- radio : UHD object [UHDRx]
–- Output parameters
- err : Error Flag [errorcodet]
UHD.getTimestamp
— MethodReturn the timestamp of the last UHD burst
–- Syntax
(second,fracSecond) = getTimestamp(radio)
–- Input parameters
- radio : UHD UHD object [UHDRx]
–- Output parameters
- second : Second value for the flag [Int]
- fracSecond : Fractional second value [Float64]
UHD.initRxUHD
— MethodInitiate all structures to instantiate and pilot a USRP device into Receiver mode (Rx).
–- Syntax
uhd = initRxUHD(sysImage)
–- Input parameters
- sysImage : String with the additionnal load parameters (for instance, path to the FPHGA image) [String]
–- Output parameters
- uhd = UHD Rx object [UHDRxWrapper]
UHD.openUHDRx
— FunctionInit the core parameter of the radio (Rx mode) and initiate RF parameters
–- Syntax
openUHDRx(sysImage,carrierFreq,samplingRate,gain,antenna="TX-RX")
–- Input parameters
- carrierFreq : Desired Carrier frequency [Union{Int,Float64}]
- samplingRate : Desired bandwidth [Union{Int,Float64}]
- gain : Desired Rx Gain [Union{Int,Float64}]
- antenna : Desired Antenna alias (default "TX-RX") [String]
Keywords
- args : String with the additionnal load parameters (for instance, path to the FPHGA image) [String]
–- Output parameters
- UHDRx : UHD Rx object with PHY parameters [UHDRx]
UHD.populateBuffer!
— FunctionCalling UHD function wrapper to fill a buffer
–- Syntax
recv!(sig,radio,nbSamples)
–- Input parameters
- radio : UHD object [UHDRx]
- ptr : Writable memory position [Ref{Ptr{Cvoid}}]
- nbSamples : Number of samples to acquire
–- Output parameters
- nbSamp : Number of samples fill in buffer [Csize_t]
UHD.recv!
— MethodGet a single buffer from the USRP device, using the Buffer structure
–- Syntax
recv!(sig,radio,nbSamples)
–- Input parameters
- sig : Complex signal to populate [Array{Complex{Cfloat}}]
- radio : UHD object [UHDRx]
- buffer : Buffer object (obtained with setBuffer(radio)) [Buffer]
–- Output parameters
- sig : baseband signal from radio [Array{Complex{Cfloat}},radio.packetSize]
UHD.recv
— MethodGet a single buffer from the USRP device, and create all the necessary ressources
–- Syntax
sig = recv(radio,nbSamples)
–- Input parameters
- radio : UHD object [UHDRx]
- nbSamples : Desired number of samples [Int]
–- Output parameters
- sig : baseband signal from radio [Array{Complex{CFloat}},radio.packetSize]
UHD.updateCarrierFreq!
— MethodUpdate carrier frequency of current radio device, and update radio object with the new obtained carrier frequency
–- Syntax
updateCarrierFreq!(radio,carrierFreq)
–- Input parameters
- radio : UHD device [UHDRx]
- carrierFreq : New desired carrier freq
–- Output parameters
- carrierFreq : Current radio carrier frequency
–-
v 1.0
UHD.updateGain!
— MethodUpdate gain of current radio device, and update radio object with the new obtained gain
–- Syntax
updateGain!(radio,gain)
–- Input parameters
- radio : UHD device [UHDRx]
- gain : New desired gain
–- Output parameters
- gain : Current radio gain
UHD.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 : UHD device [UHDRx]
- samplingRate : New desired sampling rate
–- Output parameters
Transmitter functions
UHD.initTxUHD
— MethodInitiate all structures to instantiate and pilot a USRP device in Transmitter (Tx) mode.
–- Syntax
uhd = initTxUHD(sysImage)
–- Input parameters
- sysImage : String with the additionnal load parameters (for instance, path to the FPHGA image) [String]
–- Output parameters
- uhd = UHD Tx object [UHDTxWrapper]
UHD.openUHDTx
— FunctionInit the core parameter of the radio in Tx mode and initiate RF parameters
–- Syntax
openUHDTx(carrierFreq,samplingRate,gain,antenna="TX-RX";args="")
–- Input parameters
- carrierFreq : Desired Carrier frequency [Union{Int,Float64}]
- samplingRate : Desired bandwidth [Union{Int,Float64}]
- gain : Desired Tx Gain [Union{Int,Float64}]
- antenna : Desired Antenna alias (default "TX-RX") [String]
Keywords:
- args : String with the additionnal load parameters (for instance, path to the FPHGA image) [String]
–- Output parameters
- UHDTx : UHD Tx object with PHY parameters [UHDTx]
UHD.send
— FunctionSend a buffer though the radio device. It is possible to force a cyclic buffer send (the radio uninterruply send the same buffer) by setting the cyclic parameter to true
–- Syntax
send(radio,buffer,cyclic=false)
–- Input parameters
- radio : UHD device [UHDRx]
- buffer : Buffer to be send [Union{Array{Complex{Cfloat}},Array{Cfloat}}]
- cyclic : Send same buffer multiple times (default false) [Bool]
–- Output parameters
- nbEch : Number of samples effectively send [Csize_t]. It corresponds to the number of complex samples sent.
–-
v 1.0
UHD.updateCarrierFreq!
— MethodUpdate carrier frequency of current radio device, and update radio object with the new obtained carrier frequency
–- Syntax
updateCarrierFreq!(radio,carrierFreq)
–- Input parameters
- radio : UHD device [UHDRx]
- carrierFreq : New desired carrier freq
–- Output parameters
- carrierFreq : Current radio carrier frequency
–-
v 1.0
UHD.updateGain!
— MethodUpdate gain of current radio device, and update radio object with the new obtained gain
–- Syntax
updateGain!(radio,gain)
–- Input parameters
- radio : UHD device [UHDTx]
- gain : New desired gain
–- Output parameters
- updateGain : Current Radio gain [Float64]
UHD.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 : UHD device [UHDTx]
- samplingRate : New desired sampling rate
–- Output parameters