gr-baz Package
rtl2832.h File Reference
#include <stdio.h>
#include <stdarg.h>
#include <libusb/libusb.h>
#include <vector>
#include <map>
#include <string>

Go to the source code of this file.

Classes

class  RTL2832_NAMESPACE::log_sink
class  RTL2832_NAMESPACE::i2c_interface
class  RTL2832_NAMESPACE::named_interface
class  RTL2832_NAMESPACE::tuner
struct  RTL2832_NAMESPACE::tuner::params
class  RTL2832_NAMESPACE::tuner_skeleton
class  RTL2832_NAMESPACE::i2c_repeater_scope
struct  RTL2832_NAMESPACE::device_info
class  RTL2832_NAMESPACE::demod
struct  RTL2832_NAMESPACE::demod::params

Defines

#define RTL2832_API
#define RTL2832_TEMPLATE
#define CURRENT_FUNCTION   __PRETTY_FUNCTION__
#define DEBUG_TUNER_I2C(t, r)
#define RTL2832_NAMESPACE   rtl2832
#define TUNERS_NAMESPACE   tuners
#define TUNER_FACTORY_FN_NAME   Factory
#define TUNER_PROBE_FN_NAME   Probe
#define DECLARE_TUNER_FACTORY()
#define IMPLEMENT_TUNER_FACTORY(class_name)
#define IMPLEMENT_INLINE_TUNER_FACTORY(class_name)
#define I2C_REPEATER_SCOPE(p)   i2c_repeater_scope _i2c_repeater_scope(p, CURRENT_FUNCTION, __LINE__, p->name())
#define THIS_I2C_REPEATER_SCOPE()   I2C_REPEATER_SCOPE(this)
#define CHECK_LIBUSB_RESULT(r)   check_libusb_result(r, false, CURRENT_FUNCTION, __LINE__, #r)
#define CHECK_LIBUSB_NEG_RESULT(r)   check_libusb_result(r, true, CURRENT_FUNCTION, __LINE__, #r)
#define CHECK_LIBUSB_RESULT_EX(r, f, l, s)   check_libusb_result(r, false, f, l, s)
#define CHECK_LIBUSB_RESULT_RETURN_EX(d, r)
#define CHECK_LIBUSB_NEG_RESULT_RETURN_EX(d, r)
#define CHECK_LIBUSB_RESULT_RETURN(r)   CHECK_LIBUSB_RESULT_RETURN_EX(this,r)
#define CHECK_LIBUSB_NEG_RESULT_RETURN(d, r)   CHECK_LIBUSB_NEG_RESULT_RETURN_EX(this,r)
#define RTL2832_FIR_COEFF_COUNT   20
#define RTL2832_TUNER_NAME_LEN   (32+1)

Typedefs

typedef std::pair< double, double > RTL2832_NAMESPACE::range_t
typedef std::vector< double > RTL2832_NAMESPACE::values_t
typedef std::map< int,
std::string > 
RTL2832_NAMESPACE::num_name_map_t
typedef struct
RTL2832_NAMESPACE::device_info 
RTL2832_NAMESPACE::DEVICE_INFO
typedef struct
RTL2832_NAMESPACE::device_info * 
RTL2832_NAMESPACE::PDEVICE_INFO

Enumerations

enum  result_code { RTL2832_NAMESPACE::FAILURE = 0, RTL2832_NAMESPACE::SUCCESS = 1 }

Functions

RTL2832_API int get_map_index (int value, const int *map, int pair_count)
RTL2832_API const char * libusb_result_to_string (int res)
bool RTL2832_NAMESPACE::values_to_range (const values_t &v, range_t &r)
bool RTL2832_NAMESPACE::is_valid_range (const range_t &r)
bool RTL2832_NAMESPACE::in_range (const range_t &r, double d)
bool RTL2832_NAMESPACE::in_valid_range (const range_t &r, double d)
double RTL2832_NAMESPACE::calc_range (const range_t &r)

Define Documentation

#define CHECK_LIBUSB_NEG_RESULT (   r)    check_libusb_result(r, true, CURRENT_FUNCTION, __LINE__, #r)
#define CHECK_LIBUSB_NEG_RESULT_RETURN (   d,
  r 
)    CHECK_LIBUSB_NEG_RESULT_RETURN_EX(this,r)
#define CHECK_LIBUSB_NEG_RESULT_RETURN_EX (   d,
  r 
)
Value:
{ int res = d->CHECK_LIBUSB_NEG_RESULT(r); \
        if (res < 0) return res; }
#define CHECK_LIBUSB_RESULT (   r)    check_libusb_result(r, false, CURRENT_FUNCTION, __LINE__, #r)
#define CHECK_LIBUSB_RESULT_EX (   r,
  f,
  l,
  s 
)    check_libusb_result(r, false, f, l, s)
#define CHECK_LIBUSB_RESULT_RETURN_EX (   d,
  r 
)
Value:
{ int res = d->CHECK_LIBUSB_RESULT(r); \
        if (res <= 0) return res; }
#define CURRENT_FUNCTION   __PRETTY_FUNCTION__
#define DEBUG_TUNER_I2C (   t,
  r 
)
Value:
if (t->params().message_output && function && (line_number >= 0) && (line)) \
                t->params().message_output->on_log_message_ex(RTL2832_NAMESPACE::log_sink::LOG_LEVEL_ERROR, "%s: %s [%i] @ %s:%i \"%s\"\n", __FUNCTION__, libusb_result_to_string(r), r, function, line_number, line);
#define DECLARE_TUNER_FACTORY ( )
Value:
public: \
        static tuner* TUNER_FACTORY_FN_NAME(demod* p);  \
        static int TUNER_PROBE_FN_NAME(demod* d);
#define I2C_REPEATER_SCOPE (   p)    i2c_repeater_scope _i2c_repeater_scope(p, CURRENT_FUNCTION, __LINE__, p->name())
#define IMPLEMENT_INLINE_TUNER_FACTORY (   class_name)
Value:
public: \
        static tuner* TUNER_FACTORY_FN_NAME(demod* p) \
        { return new class_name(p); } \
        static int TUNER_PROBE_FN_NAME(demod* d);
#define IMPLEMENT_TUNER_FACTORY (   class_name)
Value:
tuner* class_name::TUNER_FACTORY_FN_NAME(demod* p) \
        { return new class_name(p); }
#define RTL2832_API
#define RTL2832_NAMESPACE   rtl2832
#define RTL2832_TUNER_NAME_LEN   (32+1)
#define TUNER_FACTORY_FN_NAME   Factory
#define TUNER_PROBE_FN_NAME   Probe
#define TUNERS_NAMESPACE   tuners

Function Documentation

RTL2832_API int get_map_index ( int  value,
const int *  map,
int  pair_count 
)
RTL2832_API const char* libusb_result_to_string ( int  res)