Index
LibIIO.CLibIIO.iio_channel_attr_get_filename
LibIIO.CLibIIO.iio_channel_attr_read
LibIIO.CLibIIO.iio_channel_attr_read_all
LibIIO.CLibIIO.iio_channel_attr_read_bool
LibIIO.CLibIIO.iio_channel_attr_read_double
LibIIO.CLibIIO.iio_channel_attr_read_longlong
LibIIO.CLibIIO.iio_channel_attr_write
LibIIO.CLibIIO.iio_channel_attr_write_all
LibIIO.CLibIIO.iio_channel_attr_write_bool
LibIIO.CLibIIO.iio_channel_attr_write_double
LibIIO.CLibIIO.iio_channel_attr_write_longlong
LibIIO.CLibIIO.iio_channel_attr_write_raw
LibIIO.CLibIIO.iio_channel_disable
LibIIO.CLibIIO.iio_channel_enable
LibIIO.CLibIIO.iio_channel_find_attr
LibIIO.CLibIIO.iio_channel_get_attr
LibIIO.CLibIIO.iio_channel_get_attrs_count
LibIIO.CLibIIO.iio_channel_get_data
LibIIO.CLibIIO.iio_channel_get_device
LibIIO.CLibIIO.iio_channel_get_id
LibIIO.CLibIIO.iio_channel_get_modifier
LibIIO.CLibIIO.iio_channel_get_name
LibIIO.CLibIIO.iio_channel_get_type
LibIIO.CLibIIO.iio_channel_is_enabled
LibIIO.CLibIIO.iio_channel_is_output
LibIIO.CLibIIO.iio_channel_is_scan_element
LibIIO.CLibIIO.iio_channel_read
LibIIO.CLibIIO.iio_channel_read_raw
LibIIO.CLibIIO.iio_channel_set_data
LibIIO.CLibIIO.iio_channel_write
LibIIO.CLibIIO.iio_channel_write_raw
Documentation
LibIIO.CLibIIO.iio_channel_get_device
— Functioniio_channel_get_device(chn)
Retrieve a pointer to the iio_device
structure.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- A pointer to a
iio_device
structure
See libiio
LibIIO.CLibIIO.iio_channel_get_id
— Functioniio_channel_get_id(chn)
Retrieve the channel ID (e.g. voltage0
)
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- A string with the channel ID
See libiio
LibIIO.CLibIIO.iio_channel_get_name
— Functioniio_channel_get_name(chn)
Retrieve the channel name (e.g. vccint
)
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- A string with the channel name
If the channel has no name, an empty string is returned.
See libiio
LibIIO.CLibIIO.iio_channel_is_output
— Functioniio_channel_is_output(chn)
Return true if the given channel is an output channel
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- True if the channel is an output channel, false otherweise
See libiio
LibIIO.CLibIIO.iio_channel_is_scan_element
— Functioniio_channel_is_scan_element(chn)
Return true of the given channel is a scan element.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- True if the channel is a scan element, false otherweise
A channel that is a scan element is a channel that can generate samples (for an input channel) or receive samples (for an output channel) after being enabled.
See libiio
LibIIO.CLibIIO.iio_channel_get_attrs_count
— Functioniio_channel_get_attrs_count(chn)
Enumerate the channel-specific attributes of the given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- The number of channel-specific attributes found
See libiio
LibIIO.CLibIIO.iio_channel_get_attr
— Functioniio_channel_get_attr(chn, index)
Get the channel-specific attribute present at the given index.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureindex::Cuint
: The index corresponding to the attribute
Returns
- On success, a string containing the attribute name
- If the index is invalid, an empty string will be returned
See libiio
LibIIO.CLibIIO.iio_channel_find_attr
— Functioniio_channel_find_attr(chn, name)
Try to find a channel-specific attribute by its name.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structurename::String
: A string corresponding to the name of the attribute
Returns
- On succes, a string containing the attribute name
- If the name does not correspond to any know atribute of the channel, an empty string is returned
This function is useful to detect the presence of an attribute.
See libiio
LibIIO.CLibIIO.iio_channel_attr_get_filename
— Functioniio_channel_attr_get_filename(chn, attr)
Retrieve the filename of an attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::String
; A string corresponding to the name of the attribute
Returns
- On success, a string with the filename
- If the attribute is unknown, an empty string is returned
See libiio
LibIIO.CLibIIO.iio_channel_attr_read
— Functioniio_channel_attr_read(dev, attr)
Read the content of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::String
: A string corresponding to the name of the attribute
Returns
- On success, a string with the attribute value.
- On error, a negative errno code is returned
This function deviates from the C library iio_channel_attr_read
. Instead of passing an empty string, call the function without the attr argument.
See libiio
iio_channel_attr_read(dev)
Read the content of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- On success, a Vector of Tuples of attribute index and value.
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_channel_attr_read_all
— Functioniio_channel_attr_read_all(dev, cb, data)
Read the content of all channel-specific attributes.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structurecb::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 channel-specific attributes are read in one single command.
See libiio
LibIIO.CLibIIO.iio_channel_attr_read_bool
— Functioniio_channel_attr_read_bool(dev, attr)
Read the content of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::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_channel_attr_read_longlong
— Functioniio_channel_attr_read_longlong(dev, attr)
Read the content of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::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_channel_attr_read_double
— Functioniio_channel_attr_read_double(dev, attr)
Read the content of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::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_channel_attr_write
— Functioniio_channel_attr_write(dev, attr, src)
Set the value of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::String
: A string corresponding to the name of the attributesrc::String
A 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_channel_attr_write
, it is now possible to write all of the 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_channel_attr_write_raw
— Functioniio_channel_attr_write_raw(dev, attr, src, len)
Set the value of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::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_channel_attr_write_all
— Functioniio_channel_attr_write_all(dev, cb, data)
Set the values of all channel-specifc attributes.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structurecb::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 chsnnel-specific attributes are written in one single command.
See libiio
LibIIO.CLibIIO.iio_channel_attr_write_bool
— Functioniio_channel_attr_write_bool(dev, attr, val)
Set the value of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::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_channel_attr_write_longlong
— Functioniio_channel_attr_write_longlong(dev, attr, val)
Set the value of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::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_channel_attr_write_double
— Functioniio_channel_attr_write_double(dev, attr, val)
Set the value of the given channel-specific attribute.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structureattr::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_channel_enable
— Functioniio_channel_enable(chn)
Enable the given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Before creating an iio_buffer
structure with iio_device_create_buffer
, it is required to enable at least one channel of the device to read from.
See libiio
LibIIO.CLibIIO.iio_channel_disable
— Functioniio_channel_disable(chn)
Disable the given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
See libiio
LibIIO.CLibIIO.iio_channel_is_enabled
— Functioniio_channel_is_enabled(chn)
Returns true of the channel is enabled.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- True if the channel is enabled, false otherwise
See libiio
LibIIO.CLibIIO.iio_channel_read_raw
— Functioniio_channel_read_raw(chn, buffer, dst)
Demultiplex the samples of a given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structurebuffer::Ptr{iio_buffer}
: A pointer to aniio_buffer
structuredst::Vector{Cuchar}
: A destination memory area where the demultiplexed data will be stored
Returns
- The size of the demultiplexed data, in bytes
See libiio
LibIIO.CLibIIO.iio_channel_read
— Functioniio_channel_read(chn, buffer, dst)
Demultiplex and convert the samples of a given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structurebuffer::Ptr{iio_buffer}
: A pointer to aniio_buffer
structuredst::Vector{Cuchar}
: A destination memory area where the converted data will be stored
Returns
- The size of the converted data, in bytes
See libiio
LibIIO.CLibIIO.iio_channel_write_raw
— Functioniio_channel_write_raw(chn, buffer, dst)
Multiplex the samples of a given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structurebuffer::Ptr{iio_buffer}
: A pointer to aniio_buffer
structuresrc::Vector{Cuchar}
: A source memory area where the sequential data will be read from
Returns
- The number of bytes actually multiplexed
See libiio
LibIIO.CLibIIO.iio_channel_write
— Functioniio_channel_write(chn, buffer, dst)
Convert and multiplex the samples of a given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structurebuffer::Ptr{iio_buffer}
: A pointer to aniio_buffer
structuresrc::Vector{Cuchar}
: A source memory area where the sequential data will be read from
Returns
- The number of bytes actually converted and multiplexed
See libiio
LibIIO.CLibIIO.iio_channel_set_data
— Functioniio_channel_set_data(dev, data)
Associate a pointer to an iio_channel
structure.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structuredata::Ptr{Cvoid}
: The pointer to be associated
See libiio
LibIIO.CLibIIO.iio_channel_get_data
— Functioniio_channel_get_data(dev)
Retrieve a previously associated pointer of an iio_channel
structure.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- The pointer previously associated if present, or C_NULL
See libiio
LibIIO.CLibIIO.iio_channel_get_type
— Functioniio_channel_get_type(chn)
Get the type of the given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- The type of the channel
See libiio
LibIIO.CLibIIO.iio_channel_get_modifier
— Functioniio_channel_get_modifier(chn)
Get the modifier type of the given channel.
Parameters
chn::Ptr{iio_channel}
: A pointer to aniio_channel
structure
Returns
- The modifier type of the channel
See libiio