RTL2832 Sourcertl2832_sourceSourcesimport bazbaz.rtl_source_c(defer_creation=True, output_size=$type.size)
self.$(id).set_verbose($verbose)
self.$(id).set_vid($usb_vid)
self.$(id).set_pid($usb_pid)
self.$(id).set_tuner_name($tuner_name)
self.$(id).set_default_timeout($xfer_timeout)
self.$(id).set_use_buffer($use_buffer)
self.$(id).set_fir_coefficients($fir_coeffs)
##if $read_length() > 0
self.$(id).set_read_length($read_length)
##end if
#if $buf_mul() > 0
self.$(id).set_buffer_multiplier($buf_mul)
#end if
#if $buf_level() > 0
self.$(id).set_buffer_level(float($buf_level) / 100.0)
#end if
#if $xtal_freq() > 0
self.$(id).set_crystal_frequency($xtal_freq)
#end if
if self.$(id).create() == False: raise Exception("Failed to create RTL2832 Source: $(id)")
#if $bandwidth() > 0
self.$(id).set_bandwidth($bandwidth)
#end if
self.$(id).set_sample_rate($sample_rate)
self.$(id).set_frequency($frequency)
#if $gain_mode() != ''
self.$(id).set_gain_mode($gain_mode)
#end if
#if $status_out()
self.$(id).set_status_msgq($(id)_msgq_out)
#end if
self.$(id).set_auto_gain_mode($auto_gain_mode)
self.$(id).set_relative_gain($relative_gain)
self.$(id).set_gain($gain)
set_sample_rate($sample_rate)set_frequency($frequency)set_gain($gain)set_bandwidth($bandwidth)set_gain_mode($gain_mode)set_auto_gain_mode($auto_gain_mode)set_relative_gain($relative_gain)Verbose outputverboseTruebool#if str($verbose) == 'False' then 'part' else 'none'#Output Typetypecomplexenum#if str($type) == 'complex' then 'part' else 'none'#Sample ratesample_ratesamp_raterealFrequency (Hz)frequencyrealBandwidth (Hz)bandwidth0real#if $bandwidth() == 0 then 'part' else 'none'#Relative gainrelative_gainTrueboolGaingain0realGain modegain_modestring#if $gain_mode() == '' then 'part' else 'none'#Auto gain modeauto_gain_modeFalsebool#if str($auto_gain_mode) == 'False' then 'part' else 'none'#Custom USB VIDusb_vid0x0int#if $usb_vid() == 0 then 'part' else 'none'#Custom USB PIDusb_pid0x0int#if $usb_pid() == 0 then 'part' else 'none'#Custom Tunertuner_namestring#if $tuner_name() == '' then 'part' else 'none'#Xfer read length (bytes)read_length0int#if $read_length() == 0 then 'part' else 'none'#Xfer timeout (ms)xfer_timeout0int#if $xfer_timeout() == 0 then 'part' else 'none'#Use bufferuse_bufferTruebool#if str($use_buffer) == 'True' then 'part' else 'none'#Buffer multiplierbuf_mul0int#if $buf_mul() == 0 then 'part' else 'none'#Buffer levelbuf_level0int#if $buf_level() == 0 then 'part' else 'none'#FIR coefficients [20]fir_coeffs[]int_vector#if len($fir_coeffs()) == 0 then 'part' else 'none'#Crystal frequency (Hz)xtal_freq0int#if $xtal_freq() == 0 then 'part' else 'none'#Output statusstatus_outFalsebool#if str($status_out) == 'False' then 'part' else 'none'#RTL2832U-compatible USB receiver
A default value of 0 above indicates that the default value should be assumed when creating the device (except for gain).
* Verbose output: additional information to stderr
* Relative gain: Gain will accept values [0,1] and map to tuner's internal range
* Gain mode: tuner-specific string (e.g. (e.g. nominal/sensitive/linear)
* Auto gain mode (if supported by tuner): automatically select appropriate gain mode when setting gain value
* Custom VID/PID: override if your adapter isn't recognised automatically (can set one or both if device is in known table, but must be both for an unknown device)
* Custom tuner: override auto-probed tuner
* Xfer read length: size of one USB bulk read (suggested value = 512 * (2^n), where n >= 0; a larger value increases delay until new settings appear realised in output signal)
* Xfer timeout: USB bulk read timeout
* Use buffer: use internally buffering (should improve streaming performance)
* Buffer multiplier: total buffer size = (Buffer multiplier * Xfer Read length)
* Buffer level: % of buffer to fill before beginning streaming
* FIR coefficients: 20 coefficients for demodulator (leave empty for defaults)
* Crystal frequency: override crystal oscillator frequency