LibIIO.Channel
LibIIO.Channel
LibIIO.ChannelAttr
LibIIO.ChannelAttr
Base.read
Base.write
LibIIO.attrs
LibIIO.data_format
LibIIO.device
LibIIO.enabled
LibIIO.enabled!
LibIIO.id
LibIIO.index
LibIIO.modifier
LibIIO.output
LibIIO.scan_element
LibIIO.type
LibIIO.Channel
— TypeChannel{T <: AbstractDeviceOrTrigger} <: AbstractChannel
Represents a channel of an IIO device.
LibIIO.Channel
— MethodChannel(dev::AbstractDeviceOrTrigger, channel::Ptr{iio_channel})
Initializes a new instance of the Channel type.
Parameters
dev::AbstractDeviceOrTrigger
: The parent device handle (Device
orTrigger
)channel::Ptr{iio_channel}
: A valid pointer to an IIO channel.
Returns
- A new instance of this type
LibIIO.ChannelAttr
— TypeChannelAttr <: Attr
Represents an attribute of a IIO channel
LibIIO.ChannelAttr
— MethodChannelAttr(chn::Ptr{iio_channel}, name::String)
Initializes a new instance of a ChannelAttr.
Parameters
chn::Ptr{iio_channel}
: A valid pointer to aniio_channel
name::String
: The channel attribute's name
Returns
- A new instance of this type
Base.read
— Functionread(chn::AbstractChannel, buf::AbstractBuffer, raw=false)
Extract the samples corresponding to this channel from the given buffer.
Parameters
chn::Channel
: The channel instancebuf::AbstractBuffer
: A buffer instanceraw::Bool
: If set to true, the samples are not converted from their native format to their host format
Returns
- A
Vector{Cuchar}
containing the samples for this channel
Base.write
— Methodread(chn::AbstractChannel, buf::AbstractBuffer, data::Vector{T}, raw=false) where {T}
Write the specified vector of samples into the buffer the specified channel.
Parameters
chn::Channel
: The channel instancebuf::AbstractBuffer
: A buffer instancedata::Vector{T}
: A data vector containing the samples to copyraw::Bool
: If set to true, the samples are not converted from their host format to their native format
Returns
- The number of bytes written
LibIIO.attrs
— Methodattrs(chn)
List of attributes for the given channel.
LibIIO.data_format
— Methoddata_format(chn)
Returns the channel data format as a C-struct. See iio_data_format
.
LibIIO.device
— Methoddevice(chn)
Retrieves the corresponding AbstractDeviceOrTrigger
for this channel.
LibIIO.enabled!
— Methodenabled!(chn, state)
Sets the channel state to enabled if true, disabled otherwise.
LibIIO.enabled
— Methodenabled(chn)
Returns true if the channel is enabled, false otherwise.
LibIIO.id
— Methodid(chn)
An identifier of this channel. Note that it is possible that two channels have the same ID, if one is an input channel and the other is an output channel.
LibIIO.index
— Methodindex(chn)
Returns the index of the channel.
LibIIO.modifier
— Methodmodifier(chn)::iio_modifier
Returns the channel modifier as an enum value.
LibIIO.output
— Methodoutput(chn)
Contains true if the channel is an output channel, false otherwise.
LibIIO.scan_element
— Methodscan_element(chn)
Contains true if the channel is a scan element, false otherwise.
LibIIO.type
— Methodtype(chn)::iio_chan_type
Returns the channel type as an enum value.