| Class TComm (unit MyCom) |
TComponent
| Constructors |
constructor Create (AOwner: TComponent);| Functions |
procedure Connect;
destructor done;
function GetByte : byte;
function GetError : integer;
function GetEvent (var Event : integer) : boolean;
function GetFlags :string;
function GetIn : integer;
function GetOut : integer;CLRDTR Clears the DTR (data-terminal-ready) signal.
function GetString (Len : integer) : string;
procedure SendByte (byt : byte);
procedure SendString (str : string);
procedure SetError (ECode : integer);
procedure SetEscCode (EscCode : integer);
procedure SetEvent (Event : integer);| Properties |
property Baud : tBaud
property DataBits : tDataBit
property FlowControl : tFlowControl
property InQue : integer
property OutQue : integer
property Parity : tParitet
property Port : tport
property StopBits : tStopbits
property XOFF : char
property XON : char| Events |
event OnComError : TComError| Variables |
FBaud : tbaud;
fComPort : tport;
fconnected : boolean;
FDataBit : tdatabit;
FErrorCode : Integer;
fFlow : tFlowcontrol;
FOnError : TComError;
FParitet : tParitet;
Fport : integer;
FStat : pComStat;
FStopBit : tStopBits;
FXOFF : CHAR;
FXON : Char;| Constructors |
constructor Create (AOwner: TComponent);| Functions |
procedure Connect;
destructor done;
function GetByte : byte;
function GetError : integer;
function GetEvent (var Event : integer) : boolean;
function GetFlags :string;
function GetIn : integer;
function GetOut : integer;Set up connection
CLRDTR Clears the DTR (data-terminal-ready) signal. CLRRTS Clears the RTS (request-to-send) signal. SETDTR Sends the DTR (data-terminal-ready) signal. SETRTS Sends the RTS (request-to-send) signal. SETXOFF Causes transmission to act as if an XOFF character has been received. SETXON Causes transmission to act as if an XON character has been received.
function GetString (Len : integer) : string;
procedure SendByte (byt : byte);
procedure SendString (str : string);
procedure SetError (ECode : integer);
procedure SetEscCode (EscCode : integer);
procedure SetEvent (Event : integer);EV_BREAK A break was detected on input. EV_CTS the CTS (clear-to-send) signal changed state. EV_DSR The DSR (data-set-ready) signal changed state. EV_ERR A line-status error occurred. Line-status errors are CE_FRAME, CE_OVERRUN, and CE_RXPARITY. EV_EVENT1 An event of the first provider-specific type occured. EV_EVENT2 An event of the second provider-specific type occured. EV_RING A ring indicator was detected. EV_RLSD The RLSD (receive-line-signal-detect) signal changed state. EV_RX80FULL The receive buffer is 80 percent full. EV_RXCHAR A character was received and placed in the input buffer. EV_RXFLAG The event character was received and placed in the input buffer. The event character is specified in the device's DCB structure, which is applied to a serial port by using the SetCommState function. EV_TXEMPTY The last character in the output buffer was sent.
| Properties |
property Baud : tBaudproperties
property DataBits : tDataBit
property FlowControl : tFlowControl
property InQue : integerRuntime only
property OutQue : integer
property Parity : tParitet
property Port : tport
property StopBits : tStopbits
property XOFF : char
property XON : char| Events |
event OnComError : TComErrorEvents
| Variables |
FBaud : tbaud;
fComPort : tport;
fconnected : boolean;
FDataBit : tdatabit;
FErrorCode : Integer;
fFlow : tFlowcontrol;
FOnError : TComError;
FParitet : tParitet;
Fport : integer;
FStat : pComStat;
FStopBit : tStopBits;
FXOFF : CHAR;
FXON : Char;