OnCommEvent Event

The OnCommEvent event is triggered everytime a communication event occurs. The Event parameter holds the event.  

OnCommEvent(
  Long Events  
);

Parameters
  Events     [out] This parameter can be one of the following values:    

Value Meaning
EV_BREAK A break was detected on input (See OnBreak)
EV_DSR The DSR (data-set-ready) signal changed state (See OnDsr )
EV_CTS The CTS (clear-to-send) signal changed state (See OnCts)
EV_ERR A line-status error occurred (See OnCommError)
EV_RING A ring indicator was detected (See OnRing)
EV_RLSD The RLSD (receive-line-signal-detect) signal changed state (See OnDcd)
EV_RXCHAR A character was received and placed in the input buffer (See OnRxChar)
EV_RXFLAG The event character was received and placed in the input buffer (See OnRxFlag)
EV_TXEMPTY The last character in the output buffer was sent (See OnTxEmpty)