|
libiio
|


Public Member Functions | |
| Block (IOBuffer buf, uint size) | |
| int | enqueue (uint bytes_used=0, bool cyclic=false) |
| int | dequeue (bool nonblock=false) |
| 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... | |
| IntPtr | first (Channel ch) |
| Gets a pointer to the first sample from the current buffer for a specific channel. More... | |
| def | __init__ (self, buffer, size, _block=None) |
| def | __del__ (self) |
| def | __len__ (self) |
| def | enqueue (self, size=None, cyclic=False) |
| def | dequeue (self, nonblock=False) |
| def | read (self) |
| def | write (self, array) |
| def | buffer (self) |
Public Member Functions inherited from iio._IIO_Object | |
| def | __init__ (self, hdl, parent) |
| def | __eq__ (self, other) |
Public Member Functions inherited from iio.IIOObject | |
| void | Dispose () |
| Releases all resource used by the iio.IIOObject object. More... | |
Public Attributes | |
| readonly uint | size |
| readonly IOBuffer | buf |
| enqueued | |
Protected Member Functions | |
| override void | Destroy () |
Protected Member Functions inherited from iio.IIOObject | |
| IIOObject (IntPtr hdl) | |
Represents a contiguous block of samples.
| def iio.Block.__init__ | ( | self, | |
| buffer, | |||
| size, | |||
_block = None |
|||
| ) |
Initialize a new instance of the Block class.
:param buffer: type=iio.Buffer
The iio.Buffer object that represents the hardware buffer where
the samples will be enqueued to or dequeued from
:param size: type=int
The size of the block, in bytes
| def iio.Block.__del__ | ( | self | ) |
Destroy this block.
| def iio.Block.__len__ | ( | self | ) |
Size of this buffer, in bytes.
| def iio.Block.buffer | ( | self | ) |
Buffer corresponding to this block object. type: iio.Buffer
|
inline |
Copy the given array of samples inside the iio.IOBuffer object.
| array | A byte array containing the samples that should be written. |
The number of samples written will not exceed the size of the buffer.
|
inline |
Gets a pointer to the first sample from the current buffer for a specific channel.
| ch | The channel for which to find the first sample. |
|
inline |
Extract the samples from the iio.IOBuffer object.
| array | A byte array containing the extracted samples. |
| def iio.Block.read | ( | self | ) |
Retrieve the samples contained inside the Block object.
returns: type=bytearray
An array containing the samples
| def iio.Block.write | ( | self, | |
| array | |||
| ) |
Copy the given array of samples inside the Block object.
:param array: type=bytearray
The array containing the samples to copy
returns: type=int
The number of bytes written into the buffer
1.8.13