libhackrf: hackrf_transfer Struct Reference

libhackrf HackRF SDR platform library

Loading...
Searching...
No Matches
Data Fields
hackrf_transfer Struct Reference
Transmit & receive operation

USB transfer information passed to RX or TX callback. More...

`#include <hackrf.h>`

## Data Fields
hackrf_device * | device
| HackRF USB device for this transfer.
uint8_t * | buffer
| transfer data buffer (interleaved 8 bit I/Q samples)
int | buffer_length
| length of data buffer in bytes
int | valid_length
| number of buffer bytes that were transferred
void * | rx_ctx
| User provided RX context.
void * | tx_ctx
| User provided TX context.

## Detailed Description

A callback should treat all these fields as read-only except that a TX callback should write to the data buffer and may write to valid_length to indicate that a smaller number of bytes is to be transmitted.

## Field Documentation

## ◆ buffer

uint8_t* hackrf_transfer::buffer

## ◆ buffer_length

int hackrf_transfer::buffer_length

## ◆ device

hackrf_device* hackrf_transfer::device

## ◆ rx_ctx

void* hackrf_transfer::rx_ctx

Not used by the library, but available to transfer callbacks for use. Set along with the transfer callback using hackrf_start_rx or hackrf_start_rx_sweep

## ◆ tx_ctx

void* hackrf_transfer::tx_ctx

Not used by the library, but available to transfer callbacks for use. Set along with the transfer callback using hackrf_start_tx

## ◆ valid_length

int hackrf_transfer::valid_length

The documentation for this struct was generated from the following file:

- /tmp/release.6358/host/libhackrf/src/hackrf.h