GNU Radio 3.3.0 C++ API
usrp2_types.h File Reference
#include <usrp2_cdefs.h>
#include <stdint.h>
Include dependency graph for usrp2_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define U2_FPF_RP   20
#define U2_DOUBLE_TO_FXPT_FREQ(f)   (int64_t)((f) * (1LL << U2_FPF_RP))
#define U2_FPG_RP   7
#define U2_DOUBLE_TO_FXPT_GAIN(g)   (int16_t)((g) * (1 << U2_FPG_RP))

Typedefs

typedef int16_t u2_fxpt_gain_t
 Fixed point representation of a gain in dB (VITA-49 compatible)

Functions

static u2_fxpt_freq_t u2_double_to_fxpt_freq (double f)
static int u2_fxpt_freq_round_to_int (u2_fxpt_freq_t fx)
static unsigned int u2_fxpt_freq_round_to_uint (u2_fxpt_freq_t fx)
static double u2_fxpt_freq_to_double (u2_fxpt_freq_t fx)
static uint32_t u2_fxpt_freq_hi (u2_fxpt_freq_t f)
static uint32_t u2_fxpt_freq_lo (u2_fxpt_freq_t f)
static u2_fxpt_freq_t u2_fxpt_freq_from_hilo (uint32_t hi, uint32_t lo)
static u2_fxpt_gain_t u2_double_to_fxpt_gain (double g)
static float u2_fxpt_gain_to_double (u2_fxpt_gain_t fx)
static int u2_fxpt_gain_round_to_int (u2_fxpt_gain_t fx)

Variables

__U2_BEGIN_DECLS typedef int64_t u2_fxpt_freq_t
 Fixed point representation of a frequency in Hertz (VITA-49 compatible)

Define Documentation

#define U2_DOUBLE_TO_FXPT_FREQ (   f)    (int64_t)((f) * (1LL << U2_FPF_RP))

Referenced by u2_double_to_fxpt_freq().

#define U2_DOUBLE_TO_FXPT_GAIN (   g)    (int16_t)((g) * (1 << U2_FPG_RP))

Referenced by u2_double_to_fxpt_gain().

#define U2_FPG_RP   7

Typedef Documentation

Fixed point representation of a gain in dB (VITA-49 compatible)

16-bit two's complement, with the radix point 7 bits up from the bottom. Q9.7 format (7 bits to the right of the radix point)


Function Documentation

static u2_fxpt_freq_t u2_double_to_fxpt_freq ( double  f) [inline, static]
static u2_fxpt_gain_t u2_double_to_fxpt_gain ( double  g) [inline, static]
static u2_fxpt_freq_t u2_fxpt_freq_from_hilo ( uint32_t  hi,
uint32_t  lo 
) [inline, static]

References u2_fxpt_freq_t.

static uint32_t u2_fxpt_freq_hi ( u2_fxpt_freq_t  f) [inline, static]
static uint32_t u2_fxpt_freq_lo ( u2_fxpt_freq_t  f) [inline, static]
static int u2_fxpt_freq_round_to_int ( u2_fxpt_freq_t  fx) [inline, static]

References U2_FPF_RP.

static unsigned int u2_fxpt_freq_round_to_uint ( u2_fxpt_freq_t  fx) [inline, static]

References U2_FPF_RP.

static double u2_fxpt_freq_to_double ( u2_fxpt_freq_t  fx) [inline, static]

References U2_FPF_RP.

static int u2_fxpt_gain_round_to_int ( u2_fxpt_gain_t  fx) [inline, static]

References U2_FPG_RP.

static float u2_fxpt_gain_to_double ( u2_fxpt_gain_t  fx) [inline, static]

References U2_FPG_RP.


Variable Documentation

__U2_BEGIN_DECLS typedef int64_t u2_fxpt_freq_t

Fixed point representation of a frequency in Hertz (VITA-49 compatible)

64-bit two's complement, with the radix point 20 bits up from the bottom. Q44.20 format (20 bits to the right of the radix point)

Values range from +/- 8.79 terahertz with a resolution of 0.95 microhertz.

Referenced by u2_fxpt_freq_from_hilo().