| libbladeRF 2.6.0-git-fcf94233-dirty Nuand bladeRF library

Loading...
Searching...
No Matches
Data Fields
bladerf_image Struct Reference
Flash image format

## Description

Image format for backing up and restoring bladeRF flash contents

The on disk format generated by the bladerf_image_write function is a serialized version of this structure and its contents. When written to disk, values are converted to big-endian byte order, for ease of reading in a hex editor.

When creating and using a bladerf_image of type BLADERF_IMAGE_TYPE_RAW, the address and length fields must be erase-block aligned.

Definition at line 3349 of file libbladeRF.h.

`#include <libbladeRF.h>`

## Data Fields
char | magic [BLADERF_IMAGE_MAGIC_LEN+1]
uint8_t | checksum [BLADERF_IMAGE_CHECKSUM_LEN]
struct bladerf_version | version
uint64_t | timestamp
char | serial [BLADERF_SERIAL_LENGTH+1]
char | reserved [BLADERF_IMAGE_RESERVED_LEN]
bladerf_image_type | type
uint32_t | address
uint32_t | length
uint8_t * | data

## Field Documentation

## ◆ address

uint32_t address

Address of the flash data in this image. A value of 0xffffffff implies that this field is left unspecified (i.e., "don't care").

Definition at line 3399 of file libbladeRF.h.

## ◆ checksum

uint8_t checksum[BLADERF_IMAGE_CHECKSUM_LEN]

SHA256 checksum of the flash image. This is computed over the entire image, with this field filled with 0's.

Definition at line 3363 of file libbladeRF.h.

## ◆ data

uint8_t* data

Image data

Definition at line 3405 of file libbladeRF.h.

## ◆ length

uint32_t length

Length of the data contained in the image

Definition at line 3402 of file libbladeRF.h.

## ◆ magic

char magic[BLADERF_IMAGE_MAGIC_LEN+1]

Magic value used to identify image file format.

Note that an extra character is added to store a NUL-terminator, to allow this field to be printed. This NUL-terminator is NOT written in the serialized image.

Definition at line 3357 of file libbladeRF.h.

## ◆ reserved

char reserved[BLADERF_IMAGE_RESERVED_LEN]

Reserved for future metadata. Should be 0's.

Definition at line 3388 of file libbladeRF.h.

## ◆ serial

char serial[BLADERF_SERIAL_LENGTH+1]

Serial number of the device that the image was obtained from. This field should be all '\0' if irrelevant.

The +1 here is actually extraneous; BLADERF_SERIAL_LENGTH already accounts for a NUL terminator. However, this is left here to avoid breaking backwards compatibility.

Definition at line 3383 of file libbladeRF.h.

## ◆ timestamp

uint64_t timestamp

UTC image timestamp, in seconds since the Unix Epoch

Definition at line 3373 of file libbladeRF.h.

## ◆ type

bladerf_image_type type

Type of data contained in the image. Serialized as a uint32_t.

Definition at line 3393 of file libbladeRF.h.

## ◆ version

struct bladerf_version version

Image format version. Only the major, minor, and patch fields are written to the disk; the describe field is not used. The version is serialized as: [major | minor | patch]

Definition at line 3370 of file libbladeRF.h.

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

- libbladeRF.h