AlazarAsyncRead(HANDLE handle, void *buffer, U32 bytesToRead, OVERLAPPED *overlapped)¶
Adds a buffer to the end of a list of available buffers to be filled by the board. When the board receives sufficient trigger events to fill the buffer, the event in the
OVERLAPPEDwill be set to the signaled state.
bytesToReadparameter must be equal to the product of the number of bytes per record, the number of recods per buffer and the number of enabled channels. If record headers are enabled, the number of bytes per record must include the size of the record header (16 bytes).
If the function succeeds in adding the buffer to end of the list of buffers available to be filled by the board, it returns ApiDmaPending. When the board fills the buffer, the event in the OVERLAPPED structure is set to the signaled state.
If the function fails because the board overflowed its on board memory, it returns ApiBufferOverflow. The board may overflow its on board memory because the rate at which it is acquiring data is faster than the rate at which it is transferring data from on-board memory to host memory. If this is the case, try reducing the sample rate, number of enabled channels, or amount of time spent processing each buffer.
If the function fails because the buffer is too large for the driver or operating system to prepare for scatter-gather DMA transfer, it returns ApiLockAndProbePagesFailed. Try reducing the size of each buffer, or reducing the number of buffers queued by the application.
If the function fails for some other reason, it returns an error code that indicates the reason that it failed. See RETURN_CODE for more information.
AlazarAsyncRead() is only available under Windows
[in] handle: Handle to board
[in] buffer: Pointer to a buffer to receive sample data from the digitizer board
[in] bytesToRead: Number of bytes to read from the board
[in] overlapped: Pointer to an
OVERLAPPEDstructure. The event in thestructure is set to the signaled state when the read operation completes.