libiio
Public Member Functions | Public Attributes | List of all members
iio.IOBuffer Class Reference

iio.IOBuffer class: The class used for all I/O operations. More...

Inheritance diagram for iio.IOBuffer:

Public Member Functions

 IOBuffer (Device dev, uint samples_count, bool circular=false)
 Initializes a new instance of the iio.IOBuffer class. More...
 
void refill ()
 Fetch a new set of samples from the hardware. More...
 
void push (uint samples_count)
 Submit the samples contained in this buffer to the hardware. More...
 
void push ()
 Submit all the samples contained in this buffer to the hardware. More...
 
void Dispose ()
 Releases all resource used by the iio.IOBuffer object. More...
 
void fill (byte[] array)
 Copy the given array of samples inside the iio.IOBuffer object. More...
 
void read (byte[] array)
 Extract the samples from the iio.IOBuffer object. More...
 

Public Attributes

readonly uint samples_count
 The size of this buffer, in samples. More...
 
readonly bool circular
 If true, the buffer is circular. More...
 

Detailed Description

iio.IOBuffer class: The class used for all I/O operations.

Constructor & Destructor Documentation

§ IOBuffer()

iio.IOBuffer.IOBuffer ( Device  dev,
uint  samples_count,
bool  circular = false 
)
inline

Initializes a new instance of the iio.IOBuffer class.

Parameters
devThe iio.Device object that represents the device where the I/O operations will be performed.
samples_countThe size of the buffer, in samples.
circularIf set to true, the buffer is circular.
Exceptions
System.ExceptionThe buffer could not be created.

Member Function Documentation

§ 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.

§ fill()

void iio.IOBuffer.fill ( byte []  array)
inline

Copy the given array of samples inside the iio.IOBuffer object.

Parameters
arrayA byte array containing the samples that should be written.

The number of samples written will not exceed the size of the buffer.

§ push() [1/2]

void iio.IOBuffer.push ( uint  samples_count)
inline

Submit the samples contained in this buffer to the hardware.

Exceptions
System.ExceptionThe buffer could not be pushed.

§ push() [2/2]

void iio.IOBuffer.push ( )
inline

Submit all the samples contained in this buffer to the hardware.

§ read()

void iio.IOBuffer.read ( byte []  array)
inline

Extract the samples from the iio.IOBuffer object.

Parameters
arrayA byte array containing the extracted samples.

§ refill()

void iio.IOBuffer.refill ( )
inline

Fetch a new set of samples from the hardware.

Exceptions
System.ExceptionThe buffer could not be refilled.

Member Data Documentation

§ circular

readonly bool iio.IOBuffer.circular

If true, the buffer is circular.

§ samples_count

readonly uint iio.IOBuffer.samples_count

The size of this buffer, in samples.


The documentation for this class was generated from the following file: