| Prototype | |
|
|
| Parameters | |
|
handle to open port |
|
pointer to buffer containing transmit data |
|
size of transmit data in bytes. This must be at least 2 for HDLC mode (address and control field) and no larger than the max frame size. Must be no larger than MAX_ASYNC_TRANSMIT for asynchronous mode. |
| Return Value | |
|
Handle is invalid |
|
Buffer or Size is invalid. |
|
All transmit buffers are full |
|
Loop Mode Only: port is not OnLoop |
Transmit data on the specified port. This function automatically enables the transmitter. In HDLC mode, the data is a single HDLC frame. In Asynchronous mode the data is a stream of bytes.
When a transmission completes (one frame or all asynchronous data), the API driver calls the TransmitComplete callback with the transmit status.
To determine the outcome of each transmission, wait until TransmitComplete is called before calling this function to send more data. If completion status is not important, this call can be made repeatedly until STATUS_DEVICE_BUSY is returned. In the latter case, frames are buffered in the API.
DiMgslCancelTransmit aborts a pending transmission. In HDLC mode, the frame terminates with the HDLC abort sequence. In asynchronous mode the transmit buffer will be cleared. A pending transmission may complete normally during this call, but before the transmission is actually canceled.
Loop Mode Only
The port must be inserted into the loop before transmitting data. If this function is called when the port is not inserted into the loop, STATUS_DEVICE_NOT_READY is returned.
| Previous | Contents | Next |