RETURN_CODE AlazarWaitAsyncBufferComplete(HANDLE handle, void *buffer, U32 timeout_ms)#
This function returns when a board has received sufficient triggers to fill the specified buffer, or when the timeout internal elapses.
Each call to AlazarPostAsyncBuffer() adds a buffer to the end of a list of buffers to be filled by the board. AlazarWaitAsyncBufferComplete() expects to wait on the buffer at the head of this list. As a result, you must wait for buffers in the same order than they were posted.
The arrangement of sample data in each buffer depends on the AutoDMA mode specified in the call to AlazarBeforeAsyncRead().
handle – [in] Handle to board
buffer – [out] Pointer to a buffer to receive sample data form the digitizer board
timeout_ms – [in] The time to wait for the buffer to be filled, in milliseconds.
If the board receives sufficient trigger events to fill this buffer before the timeout interval elapses, the function returns ApiSuccess.
If the timeout interval elapses before the board receives sufficient trigger events to fill the buffer, the function returns ApiWaitTimeout.
If the board overflows its on-board memory, the function returns ApiBufferOverflow. This happens if the rate at which data is acquired is faster than the rate at which data is being transferred from on-board memory to host memory across the host bus interface.
If this buffer was not found in the list of buffers available to be filled by the board, the function returns ApiBufferNotReady.
If this buffer is not the buffer at the head of the list of buffers to be filled by the board, this returns ApiDmaInProgress.
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.