FieldPoint LabWindows/CVI Interface


IAStatus FP_ReadCache (IAHandle serverHandle, IATaskID taskID, IAByte buffer[], unsigned long bufferSize, SYSTEMTIME *timestamp);


This function reads the last known value returned during an advise poll cycle. A valid task ID is necessary to invoke this function. You can call FP_ReadCache on a stopped advise operation or on one with suspended callbacks. For a stopped advise operation, this function returns the last valid value before the operation was stopped.

FP_ReadCache is useful for reading data and updating UIR controls when using the asynchronous callback mechanism.

Parameter List

Name Type Description
serverHandle IAHandle Handle to a specific server session. You create the handle with FP_Open.
taskID IATaskID Task ID of the advise operation for which to read the cache. FP_Advise returns the task ID.
buffer IAByte[ ] Memory that you allocate. The server copies data into this buffer.
bufferSize unsigned long Number of bytes allocated for the buffer. If the buffer size is too small, an error returns.
timestamp SYSTEMTIME (passed by reference) Time the data was retrieved from the physical device. The timestamp is returned in the Windows SYSTEMTIME format.

Caution  Entering a constant or literal value may cause unpredictable results.

Return Value

The LabWindows/CVI manager or the server can return the following status codes. FP_ErrorMsg converts the status codes into descriptive strings.

LabWindows/CVI Manager-Level Error Codes 0x8480 IA_MGR_ERROR
FieldPoint Server-Level Standard Error Codes 0x8000 to 0x83FF

Refer to the error section in your server help file for more information.