Index
LibIIO.CLibIIO.iio_channel_convertLibIIO.CLibIIO.iio_channel_convert_inverseLibIIO.CLibIIO.iio_channel_get_data_formatLibIIO.CLibIIO.iio_channel_get_indexLibIIO.CLibIIO.iio_device_debug_attr_readLibIIO.CLibIIO.iio_device_debug_attr_read_allLibIIO.CLibIIO.iio_device_debug_attr_read_boolLibIIO.CLibIIO.iio_device_debug_attr_read_doubleLibIIO.CLibIIO.iio_device_debug_attr_read_longlongLibIIO.CLibIIO.iio_device_debug_attr_writeLibIIO.CLibIIO.iio_device_debug_attr_write_allLibIIO.CLibIIO.iio_device_debug_attr_write_boolLibIIO.CLibIIO.iio_device_debug_attr_write_doubleLibIIO.CLibIIO.iio_device_debug_attr_write_longlongLibIIO.CLibIIO.iio_device_debug_attr_write_rawLibIIO.CLibIIO.iio_device_find_debug_attrLibIIO.CLibIIO.iio_device_get_debug_attrLibIIO.CLibIIO.iio_device_get_debug_attrs_countLibIIO.CLibIIO.iio_device_get_sample_sizeLibIIO.CLibIIO.iio_device_identify_filenameLibIIO.CLibIIO.iio_device_reg_readLibIIO.CLibIIO.iio_device_reg_write
Documentation
LibIIO.CLibIIO.iio_device_get_sample_size — Functioniio_device_get_sample_size(dev)Get the current sample size.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructure
Returns
- On success, the sample size in bytes
- On error, a negative errno code is returned
The sample size is not constant and will change when channels get enabled or disabled.
See libiio
LibIIO.CLibIIO.iio_channel_get_index — Functioniio_channel_get_index(chn)Get the index of the given channel.
Parameters
chn::Ptr{iio_channel}: A pointer to aniio_channelstructure
Returns
- On success, a the index of the specified channel
- On error, an negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_channel_get_data_format — Functioniio_channel_get_data_format(chn)Get a pointer to a channel's data format structure.
Parameters
chn::Ptr{iio_channel}: A pointer to aniio_channelstructure
Returns
- A pointer to the channel's
iio_data_formatstructure
See libiio
LibIIO.CLibIIO.iio_channel_convert — Functioniio_channel_convert(chn, dst, src)Convert the sample from hardware format to host format.
Parameters
chn::Ptr{iio_channel}: A pointer to aniio_channelstructuredst::Ptr{Cvoid}: A pointer to the destination buffer where the converted sample should be writtensrc::Ptr{Cvoid}: A pointer to the source buffer containing the sample
See libiio
LibIIO.CLibIIO.iio_channel_convert_inverse — Functioniio_channel_convert_inverse(chn, dst, src)Convert the sample from host format to hardware format.
Parameters
chn::Ptr{iio_channel}: A pointer to aniio_channelstructuredst::Ptr{Cvoid}: A pointer to the destination buffer where the converted sample should be writtensrc::Ptr{Cvoid}: A pointer to the source buffer containing the sample
See libiio
LibIIO.CLibIIO.iio_device_get_debug_attrs_count — Functioniio_device_get_debug_attrs_count(dev)Enumerate the debug attributes of the given deivce.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructure
Returns
- The number of debug attributes found
See libiio
LibIIO.CLibIIO.iio_device_get_debug_attr — Functioniio_device_get_debug_attr(dev, index)Get the debug attribute present at the given index.
Parameters
dev::Ptr{iio_device}: A pointer to an [iio_device] structureindex::Cuint: The index corresponding to the debug attribute
Returns
- On succes, a string containing the attribute value
- If the index is invalid, an empty string is returned
See libiio
LibIIO.CLibIIO.iio_device_find_debug_attr — Functioniio_device_find_debug_attr(dev, name)Try to find a debug attribute by its name.
Parameters
dev::Ptr{iio_device}: A pointer to an [iio_device] structure
Returns
- On success, a string with the attribute name
- If the name does not correspond to any known debug attribute of the given device, an empty string is returned
This function is useful to detect the presence of a debug attribute.
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_read — Functioniio_device_debug_attr_read(dev, attr)Read the content of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attribute
Returns
- On success, a Vector of Tuples of attribute index and value if
attris an empty string, otherwise a string with the attribute value. - On error, a negative errno code is returned
By an empty string as the "attr" argument to iio_device_debug_attr_read, it is now possible to read all of the buffer attributes of a device.
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_read_all — Functioniio_device_debug_attr_read_all(dev, cb, data)Read the content of all debug attributes.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructurecb::Ptr{Cvoid}: A pointer to a callback functiondata::Ptr{Cvoid}: A pointer that will be passed to the callback function
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
This function is especially useful when used with the network backend, as all the debug attributes are read in one single command.
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_write — Functioniio_device_debug_attr_write(dev, attr, src)Set the value of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attributesrc::StringA string to set the attribute to
Returns
- On success, the number of bytes written
- On error, a negative errno code is returned
By passing C_NULL as the "attr" argument to iio_device_debug_attr_write, it is now possible to write all of the debug attributes of a device.
The buffer must contain one block of data per attribute of the device, by the order they appear in the iio_device structure.
The first four bytes of one block correspond to a 32-bit signed value in network order. If negative, the attribute is not written; if positive, it corresponds to the length of the data to write. In that case, the rest of the block must contain the data.
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_write_raw — Functioniio_device_debug_attr_write_raw(dev, attr, src, len)Set the value of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attributesrc::Ptr{Cvoid}: A pointer to the data to be writtenlen::Csize_t: The number of bytes that should be written
Returns
- On success, the number of bytes written
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_write_all — Functioniio_device_debug_attr_write_all(dev, cb, data)Set the values of all debug attributes.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructurecb::Ptr{Cvoid}: A pointer to a callback functiondata::Ptr{Cvoid}: A pointer that will be passed to the callback function
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
This function is especially useful when used with the network backend, as all the debug attributes are written in one single command.
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_read_bool — Functioniio_device_debug_attr_read_bool(dev, attr)Read the content of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attribute
Returns
- On success, 0 and the bool value is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_read_longlong — Functioniio_device_debug_attr_read_longlong(dev, attr)Read the content of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attribute
Returns
- On success, 0 and the Clonglong value is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_read_double — Functioniio_device_debug_attr_read_double(dev, attr)Read the content of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attribute
Returns
- On success, 0 and the Cdouble value is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_write_bool — Functioniio_device_debug_attr_write_bool(dev, attr, val)Set the value of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attributeval::Bool: A bool value to set the attribute to
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_write_longlong — Functioniio_device_debug_attr_write_longlong(dev, attr, val)Set the value of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attributeval::Clonglong: A Clonglong value to set the attribute to
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_debug_attr_write_double — Functioniio_device_debug_attr_write_double(dev, attr, val)Set the value of the given debug attribute.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureattr::String: A string corresponding to the name of the attributeval::Cdouble: A Cdouble value to set the attribute to
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_identify_filename — Functioniio_device_identify_filename(dev, filename, chn, attr)Identify the channel or debug attribute corresponding to a filename.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructurefilename::String: A string corresponding to the filenamechn::Ptr{Ptr{iio_channel}}: A pointer to a pointer of aniio_channel. The pointed pointer will be set to the address of theiio_channelstructure if the filename correspond to the attribute of a channel, orC_NULLotherwise.attr::String: A string field. The string will be set to the name of the attribute corresponding to the filename.
Returns
- On success, 0 is returned, and chn and attr are modified
- On error, a negative errno code is returned. chn and attr are not modified.
See libiio
LibIIO.CLibIIO.iio_device_reg_write — Functioniio_device_reg_write(dev, address, value)Set the value of a hardware register.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureaddress::Cuint: The address of the registervalue::Cuint: The value to set the register to
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_reg_read — Functioniio_device_reg_read(dev, address)Get the value of a hardware register.
Parameters
dev::Ptr{iio_device}: A pointer to aniio_devicestructureaddress::Cuint: The address of the register
Returns
- On success, 0 and the register value is returned
- On error, a negative errno code is returned
See libiio