iio.IOBuffer class: The class used for all I/O operations.
More...
|
| | IOBuffer (Device dev, uint samples_count, bool circular=false) |
| | Initializes a new instance of the iio.IOBuffer class.
|
| void | refill () |
| | Fetch a new set of samples from the hardware.
|
| void | push (uint samples_count) |
| | Submit the samples contained in this buffer to the hardware.
|
|
void | push () |
| | Submit all the samples contained in this buffer to the hardware.
|
| void | Dispose () |
| | Releases all resource used by the iio.IOBuffer object.
|
| void | fill (byte[] array) |
| | Copy the given array of samples inside the iio.IOBuffer object.
|
| void | read (byte[] array) |
| | Extract the samples from the iio.IOBuffer object.
|
|
int | get_poll_fd () |
| | Returns poll file descriptor for the current buffer.
|
| int | set_blocking_mode (bool blocking) |
| | Sets the blocking behavior of the current buffer.
|
|
void | cancel () |
| | Cancels the current buffer.
|
| Device | get_device () |
| | Gets the device of the current buffer.
|
| IntPtr | first (Channel ch) |
| | Gets a pointer to the first sample from the current buffer for a specific channel.
|
|
long | step () |
| | Gets the step size of the current buffer.
|
|
|
readonly uint | samples_count |
| | The size of this buffer, in samples.
|
|
readonly bool | circular |
| | If true, the buffer is circular.
|
iio.IOBuffer class: The class used for all I/O operations.
- Examples
- ExampleProgram.cs.
◆ IOBuffer()
| iio.IOBuffer.IOBuffer |
( |
Device | dev, |
|
|
uint | samples_count, |
|
|
bool | circular = false ) |
|
inline |
Initializes a new instance of the iio.IOBuffer class.
- Parameters
-
| dev | The iio.Device object that represents the device where the I/O operations will be performed. |
| samples_count | The size of the buffer, in samples. |
| circular | If set to true, the buffer is circular. |
- Exceptions
-
| System.Exception | The buffer could not be created. |
◆ Dispose()
| void iio.IOBuffer.Dispose |
( |
| ) |
|
|
inline |
Releases all resource used by the iio.IOBuffer object.
Call Dispose when you are finished using the iio.IOBuffer. The Dispose method leaves the iio.IOBuffer in an unusable state. After calling Dispose, you must release all references to the iio.IOBuffer so the garbage collector can reclaim the memory that the iio.IOBuffer was occupying.
- Examples
- ExampleProgram.cs.
◆ fill()
| void iio.IOBuffer.fill |
( |
byte[] | array | ) |
|
|
inline |
Copy the given array of samples inside the iio.IOBuffer object.
- Parameters
-
| array | A byte array containing the samples that should be written. |
The number of samples written will not exceed the size of the buffer.
◆ first()
| IntPtr iio.IOBuffer.first |
( |
Channel | ch | ) |
|
|
inline |
Gets a pointer to the first sample from the current buffer for a specific channel.
- Parameters
-
| ch | The channel for which to find the first sample. |
◆ get_device()
| Device iio.IOBuffer.get_device |
( |
| ) |
|
|
inline |
Gets the device of the current buffer.
- Returns
- The device of the current buffer.
◆ push()
| void iio.IOBuffer.push |
( |
uint | samples_count | ) |
|
|
inline |
Submit the samples contained in this buffer to the hardware.
- Exceptions
-
| System.Exception | The buffer could not be pushed. |
◆ read()
| void iio.IOBuffer.read |
( |
byte[] | array | ) |
|
|
inline |
Extract the samples from the iio.IOBuffer object.
- Parameters
-
| array | A byte array containing the extracted samples. |
◆ refill()
| void iio.IOBuffer.refill |
( |
| ) |
|
|
inline |
Fetch a new set of samples from the hardware.
- Exceptions
-
| System.Exception | The buffer could not be refilled. |
- Examples
- ExampleProgram.cs.
◆ set_blocking_mode()
| int iio.IOBuffer.set_blocking_mode |
( |
bool | blocking | ) |
|
|
inline |
Sets the blocking behavior of the current buffer.
- Parameters
-
| blocking | true if blocking buffer, otherwise false |
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/libiio-0.26-build/libiio-0.26/bindings/csharp/IOBuffer.cs