iio.Channel class: Contains the representation of an input or output channel.
More...
|
void | enable () |
| Enable the current channel, so that it can be used for I/O operations.
|
|
void | disable () |
| Disable the current channel.
|
|
bool | is_enabled () |
| Returns whether or not the channel has been enabled.
|
|
byte[] | read (IOBuffer buffer, bool raw=false) |
| Extract the samples corresponding to this channel from the given iio.IOBuffer object. More...
|
|
uint | write (IOBuffer buffer, byte[] array, bool raw=false) |
| Write the specified array of samples corresponding to this channel into the given iio.IOBuffer object. More...
|
|
long | get_index () |
| Get the index of this channel.
|
|
Attr | find_attribute (string attribute) |
| Finds the attribute of the current channel with the given name. More...
|
|
Device | get_device () |
| Finds the device of the current channel. More...
|
|
void | convert (IntPtr dst, IntPtr src) |
| Converts the data from the hardware format to the format of the arhitecture on which libiio is running.
|
|
void | convert_inverse (IntPtr dst, IntPtr src) |
| Converts the data from the arhitecture on which libiio is running to the hardware format.
|
|
|
readonly string | name |
| The name of this channel.
|
|
readonly string | id |
| An identifier of this channel. More...
|
|
readonly bool | output |
| Contains true if the channel is an output channel, false otherwise.
|
|
readonly bool | scan_element |
| Contains true if the channel is a scan element, false otherwise. More...
|
|
readonly List< Attr > | attrs |
| A list of all the attributes that this channel has.
|
|
|
ChannelModifier | modifier [get] |
| The modifier of this channel.
|
|
ChannelType | type [get] |
| The type of this channel.
|
|
DataFormat | format [get] |
| Represents the format of a data sample.
|
|
iio.Channel class: Contains the representation of an input or output channel.
- Examples
- ExampleProgram.cs.
◆ find_attribute()
Attr iio.Channel.find_attribute |
( |
string |
attribute | ) |
|
|
inline |
Finds the attribute of the current channel with the given name.
- Returns
- iio.Channel.ChannelAttr
- Exceptions
-
System.Exception | There is no attribute with the given name. |
◆ get_device()
Device iio.Channel.get_device |
( |
| ) |
|
|
inline |
Finds the device of the current channel.
- Returns
- iio.Device
◆ read()
byte[] iio.Channel.read |
( |
IOBuffer |
buffer, |
|
|
bool |
raw = false |
|
) |
| |
|
inline |
Extract the samples corresponding to this channel from the given iio.IOBuffer object.
- Parameters
-
buffer | A valid instance of the iio.IOBuffer class. |
raw | If set to true , the samples are not converted from their hardware format to their host format. |
- Returns
- A
byte
array containing the extracted samples.
- Exceptions
-
System.Exception | The samples could not be read. |
- Examples
- ExampleProgram.cs.
◆ write()
uint iio.Channel.write |
( |
IOBuffer |
buffer, |
|
|
byte[] |
array, |
|
|
bool |
raw = false |
|
) |
| |
|
inline |
Write the specified array of samples corresponding to this channel into the given iio.IOBuffer object.
- Parameters
-
buffer | A valid instance of the iio.IOBuffer class. |
array | A byte array containing the samples to write. |
raw | If set to true , the samples are not converted from their host format to their native format. |
- Returns
- The number of bytes written.
- Exceptions
-
System.Exception | The samples could not be written. |
◆ id
readonly string iio.Channel.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.
- Examples
- ExampleProgram.cs.
◆ scan_element
readonly bool iio.Channel.scan_element |
Contains true
if the channel is a scan element, false
otherwise.
If a channel is a scan element, then it is possible to enable it and use it for I/O operations.
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/libiio-0.24/bindings/csharp/Channel.cs