LibIIO.Buffer
LibIIO.Buffer
Base.length
Base.read
Base.write
LibIIO.cancel
LibIIO.device
LibIIO.poll_fd
LibIIO.push
LibIIO.refill
LibIIO.set_blocking_mode
LibIIO.step
LibIIO.Buffer
— TypeThis class is used for all I/O operations of buffer capable devices.
LibIIO.Buffer
— MethodBuffer(device::T, samples_count, cyclic::Bool = false) where {T <: AbstractDeviceOrTrigger}
Initializes a new Buffer instance.
Parameters
Base.length
— Methodlength(buf::Buffer)
Size of this buffer, in bytes.
Base.read
— Methodread(buf::Buffer)
Retrieves the samples contained inside the Buffer.
Returns
- A
Vector{Cuchar}
containing the samples
Base.write
— Methodwrite(buf::Buffer, data::Vector{T}) where {T}
Copy the given vector of samples into the buffer
Parameters
data
: The data vector containing the samples to copy
Returns
- The number of bytes written into the buffer
LibIIO.cancel
— Methodcancel(buf::Buffer)
Cancel the current buffer.
LibIIO.device
— Methoddevice(buf::Buffer)
Device
for the buffer.
LibIIO.poll_fd
— Methodpoll_fd(buf::Buffer)
Poll_fd for the buffer.
LibIIO.push
— Methodpush(buf::Buffer [, samples_count])
Submit the samples contained in this buffer to the hardware.
Parameters
buf::Buffer
: The buffer structsamples_count
(optional) : The number of samples to submit, default = full buffer
LibIIO.refill
— Methodrefill(buf::Buffer)
Fetch a new set of samples from the hardware.
LibIIO.set_blocking_mode
— Methodset_blocking_mode(buf::Buffer, blocking)
Set the buffer's blocking mode.
Parameters:
blocking
: True if in blocking mode else false.
LibIIO.step
— Methodstep(buf::Buffer)
Step size for the buffer.