AlazarCreateStreamFile¶
AlazarCreateStreamFile()
is a define that points to
AlazarCreateStreamFileA()
on Linux and on Windows if UNICODE
is not
defined. If UNICODE
is defined on Windows, AlazarCreateStreamFile()
points to AlazarCreateStreamFileW()
. The two functions only vary by the
fact that they use narrow or wide string types.
Function Syntax¶
-
RETURN_CODE
AlazarCreateStreamFileA
(HANDLE handle, const char *filePath)¶ Creates a binary data file for this board, and enables saving AutoDMA data from thie board to disk.
If possible, select AlazarBeforeAsyncRead() parameters that result in DMA buffers whose length in bytes is evenly divisible into sectors of the volume selected by
filePath
. If the DMA buffer length is evenly divisible into records, AlazarCreateStreamFile() disables file caching to obtain the highest possible sequential write performance.An AutoDMA buffer is saved to disk when an application calls AlazarWaitNextAsyncBufferComplete(). For best performance, set the
bytesToCopy
parameter in AlazarWaitNextAsyncBufferComplete() to zero so that data is written to disk without copying it to the user-supplied buffer.This function must be called after AlazarBeforeAsyncRead() and before AlazarStartCapture(). File streaming is only active for the acquisition that is about to start when this function is called. You should call this function again for each acquisition with which you want file streaming.
- Return
ApiSuccess upon success, or an error code. See RETURN_CODE for more detailed information.
- Parameters
[in] handle
: Handle to board[in] filePath
: Pointer to a NULL-terminated string that specifies the name of the file.
-
RETURN_CODE
AlazarCreateStreamFileW
(HANDLE handle, const wchar_t *filePath)¶ Creates a binary data file for this board, and enables saving AutoDMA data from thie board to disk.
If possible, select AlazarBeforeAsyncRead() parameters that result in DMA buffers whose length in bytes is evenly divisible into sectors of the volume selected by
filePath
. If the DMA buffer length is evenly divisible into records, AlazarCreateStreamFile() disables file caching to obtain the highest possible sequential write performance.An AutoDMA buffer is saved to disk when an application calls AlazarWaitNextAsyncBufferComplete(). For best performance, set the
bytesToCopy
parameter in AlazarWaitNextAsyncBufferComplete() to zero so that data is written to disk without copying it to the user-supplied buffer.This function must be called after AlazarBeforeAsyncRead() and before AlazarStartCapture(). File streaming is only active for the acquisition that is about to start when this function is called. You should call this function again for each acquisition with which you want file streaming.
- Return
ApiSuccess upon success, or an error code. See RETURN_CODE for more detailed information.
- Parameters
[in] handle
: Handle to board[in] filePath
: Pointer to a NULL-terminated string that specifies the name of the file.