MgslEnableTransmitter


Prototype  
ULONG MgslEnableTransmitter( HANDLE hDevice,
                             BOOL EnableFlag );
Parameters  
hDevice
handle to open port
EnableFlag
Zero disables transmitter, non-zero enables transmitter
Return Value  
ERROR_SUCCESS (0)
Success
ERROR_INVALID_HANDLE
hDevice is invalid

Enable or disable the transmitter. Calling MgslTransmit automatically enables the transmitter. When not sending data, the transmitter stays active, sending the idle character until calling MgslEnableTransmitter with the enable flag set to FALSE. Disabling the transmitter immediately cancels any pending call to MgslTransmit, without sending HDLC abort.

A call to this function with the TRUE flag while the transmitter is enabled is ignored. A call to this function with the FALSE flag while the transmitter is disabled is ignored. In both of these cases, ERROR_SUCCESS is returned.

When operating in HDLC/SDLC Loop Mode, enabling the transmitter automatically inserts the workstation into the loop. An application configured to run in Loop Mode should not disable the transmitter or close the port until necessary. Disabling the transmitter while in HDLC/SDLC Loop Mode stops the adapter from repeating receive data to the transmit pin for downstream secondary stations on the loop.

Note: Buffered Transmit Mode

Disabling the transmitter discards any buffered transmit requests.

See also: Sending Data, Using Buffered Transmits, HDLC/SDLC Loop Mode


Previous Contents Next