libbladeRF  1.1.0
Nuand bladeRF library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Fields
bladerf_image Struct Reference

#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
 

Detailed 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 2144 of file libbladeRF.h.

Field Documentation

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 2195 of file libbladeRF.h.

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 2159 of file libbladeRF.h.

uint8_t* data

Image data

Definition at line 2201 of file libbladeRF.h.

uint32_t length

Length of the data contained in the image

Definition at line 2198 of file libbladeRF.h.

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 2153 of file libbladeRF.h.

Reserved for future metadata. Should be 0's.

Definition at line 2184 of file libbladeRF.h.

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.

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 2179 of file libbladeRF.h.

uint64_t timestamp

UTC image timestamp, in seconds since the Unix Epoch

Definition at line 2169 of file libbladeRF.h.

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

Definition at line 2189 of file libbladeRF.h.

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 2166 of file libbladeRF.h.


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