| Prototype | |
|
|
| Parameters | |
|
handle to open port |
|
Pointer to buffer to hold returned data |
|
Size of buffer in bytes |
|
Returned status |
| Return Value | |
|
a received frame or receive error has been returned in pBuffer and pStatus |
|
Handle is invalid |
|
Buf, Size, or Status is invalid. |
|
Buffer is too small to hold next available frame |
|
Receiver is disabled and no data is available. |
|
No received frames available or not enough receive data available to satisfy request |
Get received data from the API buffers.
STATUS_SUCCESS is returned when data is available. If the receiver is enabled and data is not available then STATUS_RETRY is returned. If the receiver is disabled and data is not available, STATUS_DEVICE_NOT_READY is returned.
When the receiver is disabled, existing receive data remains in the API receive buffers until retrieved with DiMgslReceive.
When more data becomes available, the ReceiveReady callback is called.
HDLC Mode
Prior to call, set *Size to the size of Buf in bytes. Buf must be large enough to hold the maximum size frame. If a complete frame is available, the frame is copied to Buf, *Size is set to the size of the frame, and *Status is set to the frame state. RxStatus_OK indicates the frame was received without error.
STATUS_BUFFER_TOO_SMALL is returned when Buf is too small to hold the next available frame. The frame remains in the API buffers until this call is made with a sufficiently large buffer.
Async Mode
Prior to call, set *Size to the number of bytes of data required. Buf must be large enough to contain the requested data. When the entire requested amount is available, the data is copied to Buf, *Status is set to RxStatus_OK, and STATUS_SUCCESS is returned.
| Previous | Contents | Next |