Home |
Function RTUIOWait |
Function RTUIOWaitRTUIOWait waits for a transaction to complete on a given pipe: int RTUIOWait(RTUPipeHandle Pipe, void * * Data); ParametersPipeHandle to the pipe to wait on. DataPointer to a buffer pointer. *Data will be filled with the Data parameter passed to RTUStartIO when the transaction was created. This parameter may be NULL. return valueIf the function succeeds, the number of bytes transferred in the transaction is returned. For Isochronous endpoints with pipe option RTUIsoBufferList set, the return value is RTU_SUCCESS. For other Isochronous endpoints, the returned value reflects the Len parameters specified in the corresponding RTUStartIO call minus the maximum packet size plus the number of bytes received in the last [micro]frame. On error, a negative error code is returned. RTUIOWait can only be used on pipes in Asynch notification mode (which is the default mode). It implements a blocking wait. The calling thread consumes no CPU time during the wait. If the function is called after a transaction completes, the function returns immediately without waiting. Note that for Isochronous RTUInput endpoints without pipe option RTUIsoBufferList, RTUIOWait returns no information about how many bytes have been transferred in [micro]frames other than the last [micro]frame.
|