FP_ReadCache
IAStatus FP_ReadCache | (IAHandle serverHandle, IATaskID taskID, IAByte buffer[], unsigned long bufferSize, SYSTEMTIME *timestamp); |
Purpose
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 0x8484 IA_MGR_SERVER_NOT_LOADED 0x8485 IA_MGR_DLL_NOT_MAPPED 0x8487 IA_MGR_INVALID_SERVER_HND 0x8488 IA_MGR_INVALID_TASK_ID 0x848A IA_MGR_BUFFER_TOO_SMALL |
FieldPoint Server-Level Standard Error Codes | 0x8000 to 0x83FF |
Refer to the error section in your server help file for more information.