Index
LibIIO.CLibIIO.iio_device_attr_read
LibIIO.CLibIIO.iio_device_attr_read_all
LibIIO.CLibIIO.iio_device_attr_read_bool
LibIIO.CLibIIO.iio_device_attr_read_double
LibIIO.CLibIIO.iio_device_attr_read_longlong
LibIIO.CLibIIO.iio_device_attr_write
LibIIO.CLibIIO.iio_device_attr_write_all
LibIIO.CLibIIO.iio_device_attr_write_bool
LibIIO.CLibIIO.iio_device_attr_write_double
LibIIO.CLibIIO.iio_device_attr_write_longlong
LibIIO.CLibIIO.iio_device_attr_write_raw
LibIIO.CLibIIO.iio_device_buffer_attr_read
LibIIO.CLibIIO.iio_device_buffer_attr_read_all
LibIIO.CLibIIO.iio_device_buffer_attr_read_bool
LibIIO.CLibIIO.iio_device_buffer_attr_read_double
LibIIO.CLibIIO.iio_device_buffer_attr_read_longlong
LibIIO.CLibIIO.iio_device_buffer_attr_write
LibIIO.CLibIIO.iio_device_buffer_attr_write_all
LibIIO.CLibIIO.iio_device_buffer_attr_write_bool
LibIIO.CLibIIO.iio_device_buffer_attr_write_double
LibIIO.CLibIIO.iio_device_buffer_attr_write_longlong
LibIIO.CLibIIO.iio_device_buffer_attr_write_raw
LibIIO.CLibIIO.iio_device_find_attr
LibIIO.CLibIIO.iio_device_find_buffer_attr
LibIIO.CLibIIO.iio_device_find_channel
LibIIO.CLibIIO.iio_device_get_attr
LibIIO.CLibIIO.iio_device_get_attrs_count
LibIIO.CLibIIO.iio_device_get_buffer_attr
LibIIO.CLibIIO.iio_device_get_buffer_attrs_count
LibIIO.CLibIIO.iio_device_get_channel
LibIIO.CLibIIO.iio_device_get_channels_count
LibIIO.CLibIIO.iio_device_get_context
LibIIO.CLibIIO.iio_device_get_data
LibIIO.CLibIIO.iio_device_get_id
LibIIO.CLibIIO.iio_device_get_label
LibIIO.CLibIIO.iio_device_get_name
LibIIO.CLibIIO.iio_device_get_trigger
LibIIO.CLibIIO.iio_device_is_trigger
LibIIO.CLibIIO.iio_device_set_data
LibIIO.CLibIIO.iio_device_set_kernel_buffers_count
LibIIO.CLibIIO.iio_device_set_trigger
Documentation
LibIIO.CLibIIO.iio_device_get_context
— Functioniio_device_get_context(dev)
Retrieve a pointer to the iio_context
structure.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- A pointer to an
iio_context
See libiio
LibIIO.CLibIIO.iio_device_get_id
— Functioniio_device_get_id(dev)
Retrieve the device ID (e.g. iio:device0)
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- A string containing the id
See libiio
LibIIO.CLibIIO.iio_device_get_name
— Functioniio_device_get_name(dev)
Retrieve the device name (e.g. xadc
)
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- A string containing the name
If the device has no name, an empty string is returned
See libiio
LibIIO.CLibIIO.iio_device_get_label
— Functioniio_device_get_label(dev)
Retrieve the device label (e.g. lo_pll0_rx_adf4351
)
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- A string containing the label
If the device has no label, an empty string is returned
See libiio
LibIIO.CLibIIO.iio_device_get_channels_count
— Functioniio_device_get_channels_count(dev)
Enumerate the channels of the given device.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- The number of channels found
See libiio
LibIIO.CLibIIO.iio_device_get_attrs_count
— Functioniio_device_get_attrs_count(dev)
Enumerate the device-specific attributes of the given device.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- The number of device-specific attributes found
See libiio
LibIIO.CLibIIO.iio_device_get_buffer_attrs_count
— Functioniio_device_get_buffer_attrs_count(dev)
Enumerate the buffer-specific attributes of the given device.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- The number of buffer-specific attributes found
See libiio
LibIIO.CLibIIO.iio_device_get_channel
— Functioniio_device_get_channel(dev, index)
Get the channel present at the given index.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structureindex::Cuint
: The index corresponding to the channel
Returns
- On success, a pointer to an
iio_channel
- If the index is invalid, an error is raised
See libiio
LibIIO.CLibIIO.iio_device_get_attr
— Functioniio_device_get_attr(dev, index)
Get the device-specific attribute present at the given index.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_get_buffer_attr
— Functioniio_device_get_buffer_attr(dev, index)
Get the buffer-specific attribute present at the given index.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_find_channel
— Functioniio_device_find_channel(dev, name, output)
Try to find a channel structure by its name or ID.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structurename::String
: A string corresponding to the name or ID of the channel to search foroutput::Bool
: True if the searched channel is output, false otherwise
Returns
- On success, a pointer to an
iio_channel
structure - If the name or ID does not correspond to any known channel of the given device, an error is raised
See libiio
LibIIO.CLibIIO.iio_device_find_attr
— Functioniio_device_find_attr(dev, name)
Try to find a device-specific attribute by its name.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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 aatribute of the device, an empty string is returned
This function is useful to detect the presence of an attribute.
See libiio
LibIIO.CLibIIO.iio_device_find_buffer_attr
— Functioniio_device_find_buffer_attr(dev, name)
Try to find a buffer-specific attribute by its name.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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 aatribute of the device, an empty string is returned
This function is useful to detect the presence of an attribute.
See libiio
LibIIO.CLibIIO.iio_device_attr_read
— Functioniio_device_attr_read(dev, attr)
Read the content of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_attr_read
. Instead of passing an empty string, call the function without the attr argument.
See libiio
iio_device_attr_read(dev)
Read the content of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_attr_read_all
— Functioniio_device_attr_read_all(dev, cb, data)
Read the content of all device-specific attributes.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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 device-specific attributes are read in one single command.
See libiio
LibIIO.CLibIIO.iio_device_attr_read_bool
— Functioniio_device_attr_read_bool(dev, attr)
Read the content of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_attr_read_longlong
— Functioniio_device_attr_read_longlong(dev, attr)
Read the content of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_attr_read_double
— Functioniio_device_attr_read_double(dev, attr)
Read the content of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_attr_write
— Functioniio_device_attr_write(dev, attr, src)
Set the value of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_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_device_attr_write_raw
— Functioniio_device_attr_write_raw(dev, attr, src, len)
Set the value of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_attr_write_all
— Functioniio_device_attr_write_all(dev, cb, data)
Set the values of all device-specifc attributes.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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 device-specific attributes are written in one single command.
See libiio
LibIIO.CLibIIO.iio_device_attr_write_bool
— Functioniio_device_attr_write_bool(dev, attr, val)
Set the value of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_attr_write_longlong
— Functioniio_device_attr_write_longlong(dev, attr, val)
Set the value of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_attr_write_double
— Functioniio_device_attr_write_double(dev, attr, val)
Set the value of the given device-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_buffer_attr_read
— Functioniio_device_buffer_attr_read(dev, attr)
Read the content of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structureattr::String
: A string corresponding to the name of the attribute
Returns
- On success, a Vector of Tuples of attribute index and value if
attr
is 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_buffer_attr_read
, it is now possible to read all of the buffer attributes of a device.
See libiio
LibIIO.CLibIIO.iio_device_buffer_attr_read_all
— Functioniio_device_buffer_attr_read_all(dev, cb, data)
Read the content of all buffer-specific attributes.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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 buffer-specific attributes are read in one single command.
See libiio
LibIIO.CLibIIO.iio_device_buffer_attr_read_bool
— Functioniio_device_buffer_attr_read_bool(dev, attr)
Read the content of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_buffer_attr_read_longlong
— Functioniio_device_buffer_attr_read_longlong(dev, attr)
Read the content of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_buffer_attr_read_double
— Functioniio_device_buffer_attr_read_double(dev, attr)
Read the content of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_buffer_attr_write
— Functioniio_device_buffer_attr_write(dev, attr, src)
Set the value of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_buffer_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_device_buffer_attr_write_raw
— Functioniio_device_buffer_attr_write_raw(dev, attr, src, len)
Set the value of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_buffer_attr_write_all
— Functioniio_device_buffer_attr_write_all(dev, cb, data)
Set the values of all buffer-specific attributes.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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 buffer-specific attributes are written in one single command.
See libiio
LibIIO.CLibIIO.iio_device_buffer_attr_write_bool
— Functioniio_device_buffer_attr_write_bool(dev, attr, val)
Set the value of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_buffer_attr_write_longlong
— Functioniio_device_buffer_attr_write_longlong(dev, attr, val)
Set the value of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_buffer_attr_write_double
— Functioniio_device_buffer_attr_write_double(dev, attr, val)
Set the value of the given buffer-specific attribute.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
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_device_set_data
— Functioniio_device_set_data(dev, data)
Associate a pointer to an iio_device
structure.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structuredata::Ptr{Cvoid}
: The pointer to be associated
See libiio
LibIIO.CLibIIO.iio_device_get_data
— Functioniio_device_get_data(dev)
Retrieve a previously associated pointer of an iio_device
structure.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- The pointer previously associated if present, or C_NULL
See libiio
LibIIO.CLibIIO.iio_device_get_trigger
— Functioniio_device_get_trigger(dev)
Retrieve the trigger of a given device.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structuretrigger::Ptr{iio_device}
: A pointer to an [iio_device
][@ref] structure. The pointer will be set to the address of theiio_device
structure corresponding to the associated trigger device.
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_set_trigger
— Functioniio_device_set_trigger(dev, trigger)
Associate a trigger to a given device.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structuretrigger::Ptr{iio_device
: A pointer to aniio_device
structure corresponding to the trigger that should be associated.
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
See libiio
LibIIO.CLibIIO.iio_device_is_trigger
— Functioniio_device_is_trigger(dev)
Returns true of the given device is a trigger.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structure
Returns
- True if the deivce is a trigger, false otherwise
See libiio
LibIIO.CLibIIO.iio_device_set_kernel_buffers_count
— Functioniio_device_set_kernel_buffers_count(dev, nb_buffers)
Configure the number of kernel buffers for a device.
This function allows to change the number of buffers on kernel side.
Parameters
dev::Ptr{iio_device}
: A pointer to aniio_device
structurenb_buffers::Cuint
: The number of buffers
Returns
- On success, 0 is returned
- On error, a negative errno code is returned
See libiio