libbladeRF  1.7.2
Nuand bladeRF library
Macros | Enumerations | Functions
Miscellaneous

Description

This section contains various helper/utility functions that do not fall into one of the other API categories.

These functions are thread-safe.

Macros

#define LIBBLADERF_API_VERSION   (0x01070200)
 

Enumerations

enum  bladerf_log_level {
  BLADERF_LOG_LEVEL_VERBOSE, BLADERF_LOG_LEVEL_DEBUG, BLADERF_LOG_LEVEL_INFO, BLADERF_LOG_LEVEL_WARNING,
  BLADERF_LOG_LEVEL_ERROR, BLADERF_LOG_LEVEL_CRITICAL, BLADERF_LOG_LEVEL_SILENT
}
 

Functions

API_EXPORT const char *CALL_CONV bladerf_backend_str (bladerf_backend backend)
 
API_EXPORT void CALL_CONV bladerf_version (struct bladerf_version *version)
 
API_EXPORT void CALL_CONV bladerf_log_set_verbosity (bladerf_log_level level)
 
API_EXPORT int CALL_CONV bladerf_get_fw_log (struct bladerf *dev, const char *filename)
 

Macro Definition Documentation

#define LIBBLADERF_API_VERSION   (0x01070200)

libbladeRF API version

As of libbladeRF v1.5.0, this macro is defined to assist with feature detection. Generally, this will be used as follows:

1 #if defined(LIBBLADERF_API_VERSION) && (LIBBLADERF_API_VERSION >= 0x01050000)
2  // ... Use features added in libbladeRF v1.5.0 ...
3 #endif

This value is defined as follows: (major << 24) | (minor << 16) | (patch << 8) | (reserved << 0)

The reserved field may be used at a later date to denote additions between releases. It will be set to zero when not used.

This value is intended to track the values returned by bladerf_version(). Fields are updated per the scheme defined here:

https://github.com/Nuand/bladeRF/blob/master/doc/development/versioning.md

Definition at line 53 of file libbladeRF.h.

Enumeration Type Documentation

Severity levels for logging functions

Enumerator
BLADERF_LOG_LEVEL_VERBOSE 

Verbose level logging

BLADERF_LOG_LEVEL_DEBUG 

Debug level logging

BLADERF_LOG_LEVEL_INFO 

Information level logging

BLADERF_LOG_LEVEL_WARNING 

Warning level logging

BLADERF_LOG_LEVEL_ERROR 

Error level logging

BLADERF_LOG_LEVEL_CRITICAL 

Fatal error level logging

BLADERF_LOG_LEVEL_SILENT 

No output

Definition at line 2663 of file libbladeRF.h.

Function Documentation

API_EXPORT const char* CALL_CONV bladerf_backend_str ( bladerf_backend  backend)

Retrieve the backend string associated with the specified backend enumeration value.

Warning
Do not attempt to modify or free() the returned string.
Returns
A string that can used to specify the backend portion of a device identifier string. (See bladerf_open().)
API_EXPORT int CALL_CONV bladerf_get_fw_log ( struct bladerf *  dev,
const char *  filename 
)

Read firmware log data and write it to the specified file

Parameters
devDevice to read firmware log from
filenameFilename to write log information to. If set to NULL, log data will be printed to stdout.
Returns
0 upon success, or a value from Error codes list on failure
API_EXPORT void CALL_CONV bladerf_log_set_verbosity ( bladerf_log_level  level)

Sets the filter level for displayed log messages. Messages that are at or above the specified log level will be printed, while messages with a lower log level will be suppressed.

Parameters
levelThe new log level filter value

Get libbladeRF version information

Parameters
[out]versionlibbladeRF version information