usrp Namespace Reference


Classes

class  tune_result
 Container for intermediate tuning information. More...
class  usrp_common
class  sink_c
class  sink_s
class  source_c
class  source_s

Functions

def tune
 Set the center frequency we're interested in.
def determine_rx_mux_value
 Determine appropriate Rx mux value as a function of the subdevice choosen and the characteristics of the respective daughterboard.
def determine_tx_mux_value
 Determine appropriate Tx mux value as a function of the subdevice choosen.
def selected_subdev
 Return the user specified daughterboard subdevice.
def calc_dxc_freq
 Calculate the frequency to use for setting the digital up or down converter.
def pick_tx_subdevice
 The user didn't specify a tx subdevice on the command line.
def pick_rx_subdevice
 The user didn't specify an rx subdevice on the command line.
def pick_subdev

Variables

 FPGA_MODE_NORMAL = usrp1.FPGA_MODE_NORMAL
 FPGA_MODE_LOOPBACK = usrp1.FPGA_MODE_LOOPBACK
 FPGA_MODE_COUNTING = usrp1.FPGA_MODE_COUNTING
 SPI_FMT_xSB_MASK = usrp1.SPI_FMT_xSB_MASK
 SPI_FMT_LSB = usrp1.SPI_FMT_LSB
 SPI_FMT_MSB = usrp1.SPI_FMT_MSB
 SPI_FMT_HDR_MASK = usrp1.SPI_FMT_HDR_MASK
 SPI_FMT_HDR_0 = usrp1.SPI_FMT_HDR_0
 SPI_FMT_HDR_1 = usrp1.SPI_FMT_HDR_1
 SPI_FMT_HDR_2 = usrp1.SPI_FMT_HDR_2
 SPI_ENABLE_FPGA = usrp1.SPI_ENABLE_FPGA
 SPI_ENABLE_CODEC_A = usrp1.SPI_ENABLE_CODEC_A
 SPI_ENABLE_CODEC_B = usrp1.SPI_ENABLE_CODEC_B
 SPI_ENABLE_reserved = usrp1.SPI_ENABLE_reserved
 SPI_ENABLE_TX_A = usrp1.SPI_ENABLE_TX_A
 SPI_ENABLE_RX_A = usrp1.SPI_ENABLE_RX_A
 SPI_ENABLE_TX_B = usrp1.SPI_ENABLE_TX_B
 SPI_ENABLE_RX_B = usrp1.SPI_ENABLE_RX_B

Function Documentation

def usrp::calc_dxc_freq (   target_freq,
  baseband_freq,
  fs 
)

Calculate the frequency to use for setting the digital up or down converter.

Parameters:
target_freq,: desired RF frequency (Hz) target_freq: number
baseband_freq,: the RF frequency that corresponds to DC in the IF. baseband_freq: number
fs,: converter sample rate fs: number
Returns:
: 2-tuple (ddc_freq, inverted) where ddc_freq is the value for the ddc and inverted is True if we're operating in an inverted Nyquist zone.

def usrp::determine_rx_mux_value (   u,
  subdev_spec 
)

Determine appropriate Rx mux value as a function of the subdevice choosen and the characteristics of the respective daughterboard.

Parameters:
u,: instance of USRP source
subdev_spec,: return value from subdev option parser. subdev_spec: (side, subdev), where side is 0 or 1 and subdev is 0 or 1
Returns:
: the Rx mux value

def usrp::determine_tx_mux_value (   u,
  subdev_spec 
)

Determine appropriate Tx mux value as a function of the subdevice choosen.

Parameters:
u,: instance of USRP source
subdev_spec,: return value from subdev option parser. subdev_spec: (side, subdev), where side is 0 or 1 and subdev is 0
Returns:
: the Rx mux value

def usrp::pick_rx_subdevice (   u  ) 

The user didn't specify an rx subdevice on the command line.

Try for one of these, in order: FLEX_400, FLEX_900, FLEX_1200, FLEX_2400, TV_RX, DBS_RX, BASIC_RX, whatever's on side A.

Returns:
a subdev_spec

def usrp::pick_subdev (   u,
  candidates 
)

Parameters:
u,: usrp instance
candidates,: list of dbids
Returns:
: subdev specification

def usrp::pick_tx_subdevice (   u  ) 

The user didn't specify a tx subdevice on the command line.

Try for one of these, in order: FLEX_400, FLEX_900, FLEX_1200, FLEX_2400, BASIC_TX, whatever's on side A.

Returns:
a subdev_spec

def usrp::selected_subdev (   u,
  subdev_spec 
)

Return the user specified daughterboard subdevice.

Parameters:
u,: an instance of usrp.source_* or usrp.sink_*
subdev_spec,: return value from subdev option parser. subdev_spec: (side, subdev), where side is 0 or 1 and subdev is 0 or 1
Returns:
: an weakref to an instance derived from db_base

def usrp::tune (   u,
  chan,
  subdev,
  target_freq 
)

Set the center frequency we're interested in.

Parameters:
u,: instance of usrp.source_* or usrp.sink_*
chan,: DDC/DUC channel chan: int
subdev,: daughterboard subdevice
target_freq,: frequency in Hz
Returns:
False if failure else tune_result
Tuning is a two step process. First we ask the front-end to tune as close to the desired frequency as it can. Then we use the result of that operation and our target_frequency to determine the value for the digital down converter.


Variable Documentation

usrp::FPGA_MODE_COUNTING = usrp1.FPGA_MODE_COUNTING

usrp::FPGA_MODE_LOOPBACK = usrp1.FPGA_MODE_LOOPBACK

usrp::FPGA_MODE_NORMAL = usrp1.FPGA_MODE_NORMAL

usrp::SPI_ENABLE_CODEC_A = usrp1.SPI_ENABLE_CODEC_A

usrp::SPI_ENABLE_CODEC_B = usrp1.SPI_ENABLE_CODEC_B

usrp::SPI_ENABLE_FPGA = usrp1.SPI_ENABLE_FPGA

usrp::SPI_ENABLE_reserved = usrp1.SPI_ENABLE_reserved

usrp::SPI_ENABLE_RX_A = usrp1.SPI_ENABLE_RX_A

usrp::SPI_ENABLE_RX_B = usrp1.SPI_ENABLE_RX_B

usrp::SPI_ENABLE_TX_A = usrp1.SPI_ENABLE_TX_A

usrp::SPI_ENABLE_TX_B = usrp1.SPI_ENABLE_TX_B

usrp::SPI_FMT_HDR_0 = usrp1.SPI_FMT_HDR_0

usrp::SPI_FMT_HDR_1 = usrp1.SPI_FMT_HDR_1

usrp::SPI_FMT_HDR_2 = usrp1.SPI_FMT_HDR_2

usrp::SPI_FMT_HDR_MASK = usrp1.SPI_FMT_HDR_MASK

usrp::SPI_FMT_LSB = usrp1.SPI_FMT_LSB

usrp::SPI_FMT_MSB = usrp1.SPI_FMT_MSB

usrp::SPI_FMT_xSB_MASK = usrp1.SPI_FMT_xSB_MASK


Generated on Thu Mar 5 09:04:03 2009 for GNU Radio 3.1.3 by  doxygen 1.5.8