libiio: iio_data_format Struct Reference

libiio 1.0 Library for interfacing with IIO devices

Loading...
Searching...
No Matches
Data Fields
iio_data_format Struct Reference
Buffer » Debug and low-level functions

Contains the format of a data sample. More...

`#include <include/iio/iio.h>`

## Data Fields
unsigned int | length
| Total length of the sample, in bits.
unsigned int | bits
| Length of valuable data in the sample, in bits.
unsigned int | shift
| Right-shift to apply when converting sample.
bool | is_signed
| Contains True if the sample is signed.
bool | is_fully_defined
| Contains True if the sample is fully defined, sign extended, etc.
bool | is_be
| Contains True if the sample is in big-endian format.
bool | with_scale
| Contains True if the sample should be scaled when converted.
double | scale
| Contains the scale to apply if with_scale is set.
unsigned int | repeat
| Number of times length repeats (added in v0.8)
double | offset
| Contains a value to be added to the raw sample before applying the scale.

## Detailed Description

Contains the format of a data sample.

The different fields inform about the correct way to convert one sample from its raw format (as read from / generated by the hardware) to its real-world value.

Examples
  dummy-iiostream.c.

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

- iio.h