Channel
- class iio.Channel
iio.Channel class: Contains the representation of an input or output channel.
Public Types
- enum ChannelModifier
iio.Channel.ChannelModifier class: Contains the available channel modifiers.
Values:
- enum ChannelType
iio.Channel.ChannelType class: Contains the available channel types.
Values:
Public Functions
- void enable (ChannelsMask mask)
Enable the current channel, so that it can be used for I/O operations.
- void disable (ChannelsMask mask)
Disable the current channel.
- bool is_enabled (ChannelsMask mask)
Returns whether or not the channel has been enabled.
- byte[] read (Block block, bool raw = false)
Extract the samples corresponding to this channel from the given iio.Block object.
- Param block:
A valid instance of the iio.Block class.
- Param raw:
If set to
true, the samples are not converted from their hardware format to their host format.- Throws IioLib.IIOException:
The samples could not be read.
- Return:
A
bytearray containing the extracted samples.
- uint write (Block block, byte[] array, bool raw = false)
Write the specified array of samples corresponding to this channel into the given iio.Block object.
- Param block:
A valid instance of the iio.Block class.
- Param array:
A
bytearray containing the samples to write.- Param raw:
If set to
true, the samples are not converted from their host format to their native format.- Throws IioLib.IIOException:
The samples could not be written.
- Return:
The number of bytes written.
Public Members
- readonly Device dev
- readonly string id
An identifier of this channel.
It is possible that two channels have the same ID, if one is an input channel and the other is an output channel.
- readonly bool scan_element
Contains
trueif the channel is a scan element,falseotherwise.If a channel is a scan element, then it is possible to enable it and use it for I/O operations.
- readonly IReadOnlyDictionary<string, Attr> attrs
A
Dictionaryof all the attributes that this channel has. Key is the attribute name.
- readonly IReadOnlyDictionary<string, Attr> event_attrs
A
Dictionaryof all the event attributes that this channel has. Key is the attribute name.
Properties
- ChannelModifier modifier { get; set; }
The modifier of this channel.
- ChannelType type { get; set; }
The type of this channel.
- DataFormat format { get; set; }
Represents the format of a data sample.