Common functions

Base.closeMethod

Close the USRP device (Rx or Tx mode) and release all associated objects

–- Syntax

close(uhd)

–- Input parameters

  • uhd : UHD object [UHDRx,UHDTx]

–- Output parameters

  • []
source
Base.printMethod

Print the radio configuration

–- Syntax

printUHD(radio)

–- Input parameters

  • radio : UHD object (Tx or Rx)

–- Output parameters

  • []
source
UHD.openUHDFunction

Init 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}]
source

Receiver functions

UHD.getErrorMethod

Returns the Error flag of the current UHD burst

–- Syntax

flag = getError(radio)

–- Input parameters

  • radio : UHD object [UHDRx]

–- Output parameters

  • err : Error Flag [errorcodet]
source
UHD.getTimestampMethod

Return 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]
source
UHD.initRxUHDMethod

Initiate 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]
source
UHD.openUHDRxFunction

Init 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]
source
UHD.populateBuffer!Function

Calling 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]
source
UHD.recv!Method

Get 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]
source
UHD.recvMethod

Get 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]
source
UHD.updateCarrierFreq!Method

Update 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

source
UHD.updateGain!Method

Update 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
source
UHD.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 : UHD device [UHDRx]
  • samplingRate : New desired sampling rate

–- Output parameters

source

Transmitter functions

UHD.initTxUHDMethod

Initiate 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]
source
UHD.openUHDTxFunction

Init 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]
source
UHD.sendFunction

Send 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

source
UHD.updateCarrierFreq!Method

Update 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

source
UHD.updateGain!Method

Update 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]
source
UHD.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 : UHD device [UHDTx]
  • samplingRate : New desired sampling rate

–- Output parameters

source