|
HARDT - The Ham Radio DSP Toolkit
|
#include <hrtl2832reader.h>


Public Member Functions | |
| HRtl2832Reader (int device, H_SAMPLE_RATE rate, HRtl2832::MODE mode, int gain, int32_t frequency, int blocksize, bool offset=0, int correction=0, HProbe< T > *probe=nullptr) | |
| ~HRtl2832Reader () | |
| int | Read (T *dest, size_t blocksize) |
| bool | Command (HCommand *command) |
| bool | EnableBiasTee (int gpio=0) |
| bool | DisableBiasTee (int gpio=0) |
| bool | SetCenterFrequency (uint32_t frequency) |
| uint32_t | GetCenterFrequency () |
| bool | SetGain (int gain) |
| int | GetGain () |
Public Member Functions inherited from HReader< T > | |
| virtual | ~HReader ()=default |
| HReader< T > * | Reader () |
Public Member Functions inherited from HObject | |
| HObject () | |
Static Public Member Functions | |
| static void | callback (unsigned char *buffer, uint32_t length, void *context) |
Read samples from an RTL-2832 device
| HRtl2832Reader< T >::HRtl2832Reader | ( | int | device, |
| H_SAMPLE_RATE | rate, | ||
| HRtl2832::MODE | mode, | ||
| int | gain, | ||
| int32_t | frequency, | ||
| int | blocksize, | ||
| bool | offset = 0, |
||
| int | correction = 0, |
||
| HProbe< T > * | probe = nullptr |
||
| ) |
Construct a new HRtl2832Reader
| device | The device id of the selected RTL-2832 device (usually 0-indexed) |
| rate | The samplerate to set on the RTL-2832 device |
| mode | The reader mode (IQ, I, Q, REAL). I or Q enables direct sampling. |
| gain | The device gain (0 to use automatic) |
| frequency | Initial center- or if frequency |
| blocksize | Number of samples to read from the device in a single read operation If mode is set to 'IQ', then the returned amount of samples will be 'blocksize/2' since you will get multiplexed IQ samples. The buffer must however still be of length 'blocksize' due to the multiplexing |
| offset | Set to true to use tuner offset mode (only E4000 tuners) |
| correction | Frequency correction in ppm |
| probe | Probe |
| HRtl2832Reader< T >::~HRtl2832Reader |
Default destructor
|
static |
Callback method, should only be called by librtl
| buffer | Buffer containing samples (actually a pointer to the area in the internal buffer where the newest samples has been stored.) |
| length | Number of samples in the buffer |
| context | Pointer to the context object provided at construction |
|
inlinevirtual |
Execute and/or pass on a command
Implements HReader< T >.
| bool HRtl2832Reader< T >::DisableBiasTee | ( | int | gpio = 0 | ) |
Disable the 5 volt bias-tee output voltage on the antenna connector
| gpio | Gpio pin. Use 0 (zero) to use default gpio pin |
| bool HRtl2832Reader< T >::EnableBiasTee | ( | int | gpio = 0 | ) |
Enable the 5 volt bias-tee output voltage on the antenna connector Warning: Enabling bias tee voltage if you have a DC shorted antenna connected will damage your rtl-sdr dongle (over time)
| gpio | Gpio pin. Use 0 (zero) to use default gpio pin |
| uint32_t HRtl2832Reader< T >::GetCenterFrequency |
Get current centerfrequency
| int HRtl2832Reader< T >::GetGain |
Get current gain. 0 (zero) means 'automatic'
|
virtual |
Read a block of samples from the soundcard
| dest | Destination buffer |
| blocksize | Number of samples to read |
Implements HReader< T >.
| bool HRtl2832Reader< T >::SetCenterFrequency | ( | uint32_t | frequency | ) |
Set center frequency
| frequency | The frequency to tune to |
| bool HRtl2832Reader< T >::SetGain | ( | int | gain | ) |
Set gain. Setting gain to 0 (zero) enables automatic gain
| gain | Gain value |
1.8.17