LibIIO.ChannelType
Channel{T <: AbstractDeviceOrTrigger} <: AbstractChannel

Represents a channel of an IIO device.

source
LibIIO.ChannelMethod
Channel(dev::AbstractDeviceOrTrigger, channel::Ptr{iio_channel})

Initializes a new instance of the Channel type.

Parameters

  • dev::AbstractDeviceOrTrigger : The parent device handle (Device or Trigger)
  • channel::Ptr{iio_channel} : A valid pointer to an IIO channel.

Returns

  • A new instance of this type
source
LibIIO.ChannelAttrMethod
ChannelAttr(chn::Ptr{iio_channel}, name::String)

Initializes a new instance of a ChannelAttr.

Parameters

  • chn::Ptr{iio_channel} : A valid pointer to an iio_channel
  • name::String : The channel attribute's name

Returns

  • A new instance of this type
source
Base.readFunction
read(chn::AbstractChannel, buf::AbstractBuffer, raw=false)

Extract the samples corresponding to this channel from the given buffer.

Parameters

  • chn::Channel : The channel instance
  • buf::AbstractBuffer : A buffer instance
  • raw::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
source
Base.writeMethod
read(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 instance
  • buf::AbstractBuffer : A buffer instance
  • data::Vector{T} : A data vector containing the samples to copy
  • raw::Bool: If set to true, the samples are not converted from their host format to their native format

Returns

  • The number of bytes written
source
LibIIO.deviceMethod
device(chn)

Retrieves the corresponding AbstractDeviceOrTrigger for this channel.

source
LibIIO.enabled!Method
enabled!(chn, state)

Sets the channel state to enabled if true, disabled otherwise.

source
LibIIO.idMethod
id(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.

source
LibIIO.modifierMethod
modifier(chn)::iio_modifier

Returns the channel modifier as an enum value.

source
LibIIO.outputMethod
output(chn)

Contains true if the channel is an output channel, false otherwise.

source
LibIIO.typeMethod
type(chn)::iio_chan_type

Returns the channel type as an enum value.

source