hackrf_common.h File Reference
`#include <map>`
`#include <memory>`
`#include <mutex>`
`#include <string>`
`#include <vector>`
`#include <boost/format.hpp>`
`#include <osmosdr/ranges.h>`
`#include <libhackrf/hackrf.h>`

Go to the source code of this file.

## Classes

class | hackrf_common

## Macros

#define | BUF_LEN (16 * 32 * 512) /* must be multiple of 512 */
#define | BUF_NUM 15
#define | HACKRF_OC_PORT_COUNT 8
#define | HACKRF_OC_PORTS_PER_SIDE 4
#define | HACKRF_OC_PORT_INVALID -1
#define | BYTES_PER_SAMPLE 2 /* HackRF device produces/consumes 8 bit signed IQ data */
#define | HACKRF_FORMAT_ERROR(ret, msg)
#define | HACKRF_THROW_ON_ERROR(ret, msg)
#define | HACKRF_FUNC_STR(func, arg)

## Macro Definition Documentation

## BUF_LEN

#define BUF_LEN (16 * 32 * 512) /* must be multiple of 512 */

## BUF_NUM

#define BUF_NUM 15

## BYTES_PER_SAMPLE

#define BYTES_PER_SAMPLE 2 /* HackRF device produces/consumes 8 bit signed IQ data */

## HACKRF_FORMAT_ERROR

#define HACKRF_FORMAT_ERROR | ( |  | ret,
|  |  | msg )

Value:
boost::str( boost::format(msg " (%1%) %2%") \
% ret % hackrf_error_name((enum hackrf_error)ret) )

## HACKRF_FUNC_STR

#define HACKRF_FUNC_STR | ( |  | func,
|  |  | arg )

Value:
boost::str(boost::format(func "(%1%)") % arg) + " has failed"

## HACKRF_OC_PORT_COUNT

#define HACKRF_OC_PORT_COUNT 8

## HACKRF_OC_PORT_INVALID

#define HACKRF_OC_PORT_INVALID -1

## HACKRF_OC_PORTS_PER_SIDE

#define HACKRF_OC_PORTS_PER_SIDE 4

## HACKRF_THROW_ON_ERROR

#define HACKRF_THROW_ON_ERROR | ( |  | ret,
|  |  | msg )

Value:
if ( ret != HACKRF_SUCCESS ) \
{ \
throw std::runtime_error( HACKRF_FORMAT_ERROR(ret, msg) ); \
}
HACKRF_FORMAT_ERROR
#define HACKRF_FORMAT_ERROR(ret, msg)
Definition hackrf_common.h:43