National Instruments 320682C Musical Toy Instrument User Manual


 
RS-232 Library Chapter 5
LabWindows/CVI Standard Libraries 5-20 © National Instruments Corporation
Table 5-5. Bit Definitions for the GetComStat Function
Hex
Value
Mnemonic Description
0001 INPUT LOST Input queue filled and input characters lost (characters
were not removed fast enough).
0002 ASYNCH ERROR Problem determining number of characters in input queue.
This is an internal error and normally should not occur.
0010 PARITY Parity error detected.
0020 OVERRUN Overrun error detected; a character was received before
the receiver data register was emptied.
0040 FRAMING Framing error detected; stop bits were not received when
expected.
0080 BREAK Break signal detected.
1000 REMOTE XOFF XOFF character received. If XON/XOFF was enabled (see
the SetXMode function description), no characters are
removed from the output queue and sent to the other device
until that device sends an XON character.
4000 LOCAL XOFF XOFF character sent to the other device. If XON/XOFF
was enabled (see the SetXMode function description),
XOFF is transmitted when the input queue is 50%, 75%
and 90% full. If the other device is sensitive to
XON/XOFF protocol, it transmits no further characters
until it receives an XON character. You use this process to
avoid the INPUT LOST error.
Notice the ambiguity in this status information. If an error occurs on the indicated port, the
application program knows that one or more bytes are invalid. The program cannot know from
the status word which byte read since the last call to GetComStat is invalid.
The function returns a negative error code if the port is not open or if COMPort is invalid.
GetInQLen
int len = GetInQLen (int COMPort);
Purpose
Returns the number of characters in the input queue of the specified port. This function does not
change the input queue.