Programming with Reflection

image\rwnprg32.gif GetSerialStatistics method

 

Syntax Statistic = object.GetSerialStatistics(WhichStatistic)

 

Description

Returns a statistic for a serial connection. If the connection is not a serial connection, or if there is not connection, GetSerialStatistics returns -1. Statistics are maintained from the time a connection is established, from when the terminal session is reset (with the ResetTerminal method), or from when the Reset button is clicked in the Serial Connection Statistics dialog box.

Arguments

WhichStatistic Argument Type: Enumeration
Required
Specifies which statistic to return. The possible values are:

 rcReceiverOverruns

 Each time the host computer transmits a character, the datacomm hardware notifies the processor, saying, in effect, "I just received a character." Reflection must read that character before another one is received; if it doesn't, a receiver overrun error occurs.

 rcParityErrors

 Returns the number of parity errors that have occurred.

 rcFramingErrors

 Framing errors often indicate that the baud rate is incorrect, that the cable is bad or too long, or that the UART received a character with the wrong number of stop bits.

 rcReceiveBufferOverflow

 Reflection has a buffer where characters received from the host computer are held until they can be processed. If Reflection can't keep up with the incoming data, the buffer fills up and an overflow occurs.

 rcBreakDetect

 A break is an interruption in the transmitting signal. Whenever the UART detects a break (a 200-millisecond signal), it increments this statistic.

Return

Statistic Return type: Integer
The requested statistic if the ConnectionType is a serial connection, or -1 if it is not.

 

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command