property DCD : Boolean
Returns True if the port's "data carrier detect" (DCD) line is set.
DCD is usually set only for serial connections made through a modem. Your modem sets DCD to indicate that it has a connection with another modem. If either modem hangs up or the connection is lost for another reason, your modem clears DCD (assuming it is configured to do so.) Hence, if your application uses a modem connection, you might want to check DCD periodically to assure that the connection is still valid or, better yet, use a modem status trigger for the same purpose.
The following example detects carrier loss and handles the error:
if not ApxComPort.DCD then
{handle unexpected disconnect}
See also: DeltaDCD