GNU Radio's TEST Package
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 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)    boost::str(boost::format(func "(%1%)") % arg) + " has failed"
 

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 
)     boost::str(boost::format(func "(%1%)") % arg) + " has failed"

◆ 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) ); \
}
#define HACKRF_FORMAT_ERROR(ret, msg)
Definition: hackrf_common.h:39