cwbDQ_CheckData

Purpose

Check if data was returned from a previously issued AsyncRead API. This API can be issued multiple times for a single AsyncRead call. It will return 0 when the data actually has been returned.

Syntax

 
unsigned int CWB_ENTRY cwbDQ_CheckData(
                             cwbDQ_ReadHandle    readHandle,
                             cwbSV_ErrHandle     errorHandle);

Parameters

cwbDQ_ReadHandle readHandle - input
The handle that was returned by the AsyncRead API.
cwbSV_ErrHandle errorHandle - output
Any returned messages will be written to this object. It is created with the cwbSV_CreateErrHandle API. The messages may be retrieved through the cwbSV_GetErrText API. If the parameter is set to zero, no messages will be retrieved.

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWBDQ_INVALID_READ_HANDLE
Invalid read handle.
CWBDQ_DATA_TRUNCATED
Data truncated.
CWBDQ_TIMED_OUT
Wait time expired and no data returned.
CWBDQ_REJECTED_USER_EXIT
Command rejected by user exit program.
CWBDQ_QUEUE_DESTROYED
Queue was destroyed.
CWBDQ_NO_DATA
No data.
CWBDQ_CANNOT_CONVERT
Unable to convert data.

Usage

This function requires that you have previously issued the following APIs:

If a time limit was specified on the AsyncRead, this API will return CWBDQ_NO_DATA until data is returned (return code will be CWB_OK), or the time limit expires (return code will be CWBDQ_TIMED_OUT).