Introduction

The package wraps all of the libiio C-functions in Julia functions with the same name. You can load them into your current namespace with

using LibIIO.CLibIIO

Usage of these low-level functions is recommended for advanced users who are familiar with the inner workings of iio/libiio. Please not that while the provided functions are almost identical to their C counterparts, they have been modified for some convenience. All functions working with char pointers, take Julia Strings as their inputs and also return Julia strings if the C function would require a modifiable C-pointer. Furthermore, most functions requiring pointers (e.g. buffers) to be passed to the C function will create them within the wrapper and return a Julia-type to the user with the value instead. This requires a bit more allocations but in turn you do not have to take care of pointers and garbage collection issues.

LibIIO.CLibIIO.iio_data_formatType
iio_data_format

Contains the format of a data sample.

Data Fields

  • length::Cuint : Total length of the sample in bits
  • bits::Cuint : Length of the valuable data in the samples, in bits
  • shift:Cuint : Right-shift to apply when converting sample
  • is_signed::Cuchar : Contains true if the sample is signed
  • is_fully_defined::Cuchar : Contains true if the sample is fully defoned, sign extended, etc.
  • is_be::Cuchar : Contains true if the sample is in big-endian format
  • with_scale::Cuchar : Contains true if the sample should be scaled or converted
  • scale::Cdouble : Contains the scale to apply if with_scale is set
  • repeat::Cuint : Numver of times length repeats

See libiio

source