
ControlLogix Platform ♦ "C" Programmable CIP API Functions
Linux Application Development Module Developer's Manual
ProSoft Technology, Inc. Page 105 of 264
March 12, 2014
OCXcip_WaitForRxData
Syntax
int OCXcip_WaitForRxData(OCXHANDLE apihandle,
OCXHANDLE connHandle,
Int timeout );
Parameters
handle returned by previous call to OCXcip_Open
handle of open connection
Number of milliseconds to wait for the read to complete
Description
This function will block the calling thread until data is received on the open
connection specified by connHandle. If the timeout expires before data is
received, the function returns OCX_ERR_TIMEOUT.
apiHandle must be a valid handle return from OCXcip_Open. connHandle must be a
handle passed by the connect_proc callback function.
timeout is used to specify the amount of time in milliseconds the application
should wait for a response from the Logix processor.
Return Value
data was read successfully
apihandle does not have access
connHandle or offset/dataSize is invalid
The timeout expired before data was received
Example
OCXHANDLE apihandle;
OCXHANDLE connHandle;
// Synchronize with the controller scan
OCXcip_WaitForRxData (apiHandle, connHandle, 1000);
See Also
OCXcip_WriteConnected
Comentarios a estos manuales