libbladeRF  2.2.1
Nuand bladeRF library
Data Structures | Macros
Metadata structure and flags


Data Structures

struct  bladerf_metadata


#define BLADERF_META_FLAG_TX_NOW   (1 << 2)
#define BLADERF_META_FLAG_RX_NOW   (1 << 31)
#define BLADERF_META_FLAG_RX_HW_MINIEXP1   (1 << 16)
#define BLADERF_META_FLAG_RX_HW_MINIEXP2   (1 << 17)

Macro Definition Documentation


#define BLADERF_META_FLAG_RX_HW_MINIEXP1   (1 << 16)

This flag is asserted in bladerf_metadata.status by the hardware if mini expansion IO pin 1 is asserted.

Definition at line 2264 of file libbladeRF.h.


#define BLADERF_META_FLAG_RX_HW_MINIEXP2   (1 << 17)

This flag is asserted in bladerf_metadata.status by the hardware if mini expansion IO pin 2 is asserted.

Definition at line 2270 of file libbladeRF.h.



This flag is asserted in bladerf_metadata.status by the hardware when an underflow is detected in the sample buffering system on the device.

Definition at line 2258 of file libbladeRF.h.


#define BLADERF_META_FLAG_RX_NOW   (1 << 31)

This flag indicates that calls to bladerf_sync_rx should return any available samples, rather than wait until the timestamp indicated in the bladerf_metadata timestamp field.

Definition at line 2252 of file libbladeRF.h.



Mark the associated buffer as the end of a burst transmission. This will flush the remainder of the sync interface's current working buffer and enqueue samples into the hardware's transmit FIFO.

As of libbladeRF v1.3.0, it is no longer necessary for the API user to ensure that the final 3 samples of a burst are \(0 + 0 j\). libbladeRF now ensures this hardware requirement is upheld.

Specifying this flag and flushing the sync interface's working buffer implies that the next timestamp that can be transmitted is the current timestamp plus the duration of the burst that this flag is ending and the remaining length of the remaining buffer that is flushed. (The buffer size, in this case, is the buffer_size value passed to the previous bladerf_sync_config() call.)

Rather than attempting to keep track of the number of samples sent with respect to buffer sizes, it is easiest to always assume 1 buffer's worth of time is required between bursts. In this case "buffer" refers to the buffer_size parameter provided to bladerf_sync_config().) If this is too much time, consider using the BLADERF_META_FLAG_TX_UPDATE_TIMESTAMP flag.

This is only used for the bladerf_sync_tx() call. It is ignored by the bladerf_sync_rx() call.

Definition at line 2215 of file libbladeRF.h.



Mark the associated buffer as the start of a burst transmission.

This is only used for the bladerf_sync_tx() call.

When using this flag, the bladerf_metadata::timestamp field should contain the timestamp at which samples should be sent.

Between specifying the BLADERF_META_FLAG_TX_BURST_START and BLADERF_META_FLAG_TX_BURST_END flags, there is no need for the user to the bladerf_metadata::timestamp field because the library will ensure the correct value is used, based upon the timestamp initially provided and the number of samples that have been sent.

Definition at line 2187 of file libbladeRF.h.


#define BLADERF_META_FLAG_TX_NOW   (1 << 2)

Use this flag in conjunction with BLADERF_META_FLAG_TX_BURST_START to indicate that the burst should be transmitted as soon as possible, as opposed to waiting for a specific timestamp.

When this flag is used, there is no need to set the bladerf_metadata::timestamp field.

Definition at line 2225 of file libbladeRF.h.



Use this flag within a burst (i.e., between the use of BLADERF_META_FLAG_TX_BURST_START and BLADERF_META_FLAG_TX_BURST_END) to specify that bladerf_sync_tx() should read the bladerf_metadata::timestamp field and zero-pad samples up to the specified timestamp. The provided samples will then be transmitted at that timestamp.

Use this flag when potentially flushing an entire buffer via the BLADERF_META_FLAG_TX_BURST_END would yield an unacceptably large gap in the transmitted samples.

In some applications where a transmitter is constantly transmitting with extremely small gaps (less than a buffer), users may end up using a single BLADERF_META_FLAG_TX_BURST_START, and then numerous calls to bladerf_sync_tx() with the BLADERF_META_FLAG_TX_UPDATE_TIMESTAMP flag set. The BLADERF_META_FLAG_TX_BURST_END would only be used to end the stream when shutting down.

Definition at line 2245 of file libbladeRF.h.



A sample overrun has occurred.

This indicates that either the host (more likely) or the FPGA is not keeping up with the incoming samples.

Definition at line 2154 of file libbladeRF.h.



A sample underrun has occurred.

This generally only occurs on the TX channel when the FPGA is starved of samples.

libbladeRF does not report this status. It is here for future use.

Definition at line 2164 of file libbladeRF.h.