Vous êtes sur la page 1sur 13

AsyncFree library

Document conventions (text formatting and colors):


Standard text
Important text (warnings etc.)
Component description
public methods and properties
published properties
published events

TAfComPort
Provides basic serial communication functions. It can be used as a data provider for a
data dispatcher.
procedure Close;

Closes the communication port


function ExecuteConfigDialog: Boolean;

Executes the standard communication device setup dialog


function InBufUsed: Integer;
Returns the number of bytes in device driver's input buffer
procedure Open;

Opens the communication port


function OutBufFree: Integer;

Returns the number of bytes free in output buffer


function OutBufUsed: Integer;

Returns then number of bytes in output buffer


procedure PurgeRX;

Clears device driver's input buffer


procedure PurgeTX;

Clears device driver's and internal output buffer


function ReadChar: Char;

Reads the character from the input buffer. If there isn't any character to read, an exception is
raised
procedure ReadData(var Buf; Size: Integer);

Reads the specified number of bytes from input buffer. If there aren't enough data to read, an
exception is raised
function ReadToString: String;

Reads all the data from the input buffer into string
procedure SynchronizeEvent(EventKind: TAfComPortEventKind;
Data: TAfComPortEventData; Timeout: Integer);

Performs normal synchronized events processing. This method should be called from
OnNonSyncEvent only.
procedure WriteChar(C: Char);

Writes the character to the output buffer. If there isn't enough space in the output buffer, an
exception is raised. See OutBufSize property
procedure WriteData(const Data; Size: Integer); override;

Writes the data to the output buffer. It there isn't enough space in the output buffer, an exception
is raised. See OutBufSize property
procedure WriteString(const S: String);

Writes the string to the output buffer. It there isn't enough space in the output buffer, an exception
is raised. See OutBufSize property
property Active: Boolean;

Indicates whether the communication port is open


property Core: TAfComPortCore; [ReadOnly]

Returns the instance of the core communication object


property DCB: TDCB;

Specifies the DCB port configuration.


property Handle: THandle; [ReadOnly]

Returns the handle of communication device for Windows API calls


property CTSHold: Boolean; [ReadOnly]

Returns whether transmission is waiting for the CTS signal to be sent


property DSRHold: Boolean; [ReadOnly]
Returns whether transmission is waiting for the DSR signal to be sent
property RLSDHold: Boolean;

[ReadOnly]

Returns whether transmission is waiting for the RLSD signal to be sent


property XOffHold: Boolean; [ReadOnly]

Returns whether transmission is waiting because the XOFF character was received
property XOffSent: Boolean; [ReadOnly]

Returns whether transmission is waiting because the XOFF character was transmitted
property CTS: Boolean; [ReadOnly]

Returns the state of CTS signal


property DSR: Boolean; [ReadOnly]

Returns the state of DSR signal


property RING: Boolean; [ReadOnly]

Returns the state of RING signal


property RLSD: Boolean; [ReadOnly]

Returns the state of RLSD signal


procedure SetDefaultParameters;

Sets the communication port parameters according system default setting


function SettingsStr: String;

Returns string that contains port number and current communication parameters
(e.g. COM1: 115200,N,8,1)
property AutoOpen: Boolean;

When it is True, the Open method is called after creating the component. Default is False.

property BaudRate: TAfBaudrate;


TAfBaudrate = (br110, br300, br600, br1200, br2400, br4800, br9600, br14400,
br19200, br38400, br56000, br57600, br115200, br128000, br256000, brUser);

Specifies the baud rate used by the communication port. Value brUser allows to specify nonstandard baud rate. See UserBaudRate property
property Databits: TAfDatabits;
TAfDatabits = (db4, db5, db6, db7, db8);

Specifies the number of data bits of the communication port


property DTR: Boolean;

Specifies the current state of the DTR signal


property EventThreadPriority: TThreadPriority;

Specifies the priority of the event thread in communication core object


property FlowControl: TAfFlowControl;
TAfFlowControl = (fwNone, fwXOnXOff, fwRtsCts, fwDtrDsr);

Specifies the flow control mode


property InBufSize: Integer;

Specifies the size of internal device's input buffer


property Options: TAfComOptions;
TAfComOption = (coParityCheck, coDsrSensitivity, coIgnoreXOff, coErrorChar,
coStripNull);
TAfComOptions = set of TAfComOption;

Specifies some special communication device flags


property OutBufSize: Integer;

Specifies the size of the output buffer


property Parity: TAfParity;
TAfParity = (paNone, paOdd, paEven, paMark, paSpace);

Specifies the parity checking mode of the communication port


property RTS: Boolean;

Specifies the current state of the RTS signal


property Stopbits: TAfStopbits;
TAfStopbits = (sbOne, sbOneAndHalf, sbTwo);

Specifies the number of stop bits of the communication port.


property UserBaudRate: Integer;

Specifies the user-defined baud rate of the communication port. Setting this property causes
setting BaudRate property to brUser
property WriteThreadPriority: TThreadPriority;

Specifies the priority of the write thread in communication core object


property XOnChar: Char;

Specifies the XON character when XON/XOFF control is used


property XOffChar: Char;

Specifies the XOFF character when XON/XOFF control is used


property XOnLim: Word;
property XOffLim: Word;
property OnCTSChanged: TNotifyEvent;

Occurs when the state of CTS signal is changed. To determine the state of CTS signal use CTS
property
property OnDataRecived: TAfCPTDataReceivedEvent;
TAfCPTDataReceivedEvent = procedure(Sender: TObject; Count: Integer) of object;

Occurs when a data is received by communication port. Count is the actual number of bytes
avaiable to read.
You should read the whole number of bytes given in Count parameter. If you read less than Count
number of bytes, the remained data is still kept in internal device's driver buffer, but this event
won't occur until any new data is received. So you would never see the unread data until new
data came to the communication port.There is an internal checking of the number of unread bytes
every 200ms, it can solve this situation. If there are any unread data, the "false" event will occur
to allow you read that data.
Remember, the OnDataReceived event however never occurs when a data dispatcher has
assigned this component as a data provider. In this case, this event is delegated to the data
dispatcher. See TDataDispatcher.OnDataReceived
property OnDSRChanged: TNotifyEvent;

Occurs when the state of DSR signal is changed. To determine the state of DSR signal use DSR
property
property OnRLSDChanged: TNotifyEvent;

Occurs when the state of RLSD signal is changed. To determine the state of RLSD signal use
RLSD property
property OnRINGDetected: TNotifyEvent;

Occurs when the state of RING signal is changed. To determine the state of RING signal use
RING property
property OnLineError: TAfCPTErrorEvent;
TAfCPTErrorEvent = procedure(Sender: TObject; Errors: DWORD) of object;

Occurs when the communication port detects line error or line break. Errors is a code that
indicates type of error. See ClearCommError function and its lpErrors parameter in Win32 API
Help for details.
property OnNonSyncEvent: TAfCPTCoreEvent;
TAfCPTCoreEvent = procedure(Sender: TObject; EventKind: TAfComPortEventKind;
Data: TAfComPortEventData) of object;
TAfComPortEventData = DWORD;
TAfComPortEventKind = TAfCoreEvent;

If assigned it allows you to handle communication event from the event thread directly instead
handling it within VCL main thread synchronized events (e.g. OnDataReceived, OnSyncEvent..).
This approach allows you to handle this event faster than in synchronized events, for example if
your application must respond very fast.
Because VCL is not thread-safe, you can NEVER call any VCL method here, but you can call
SynchronizeEvent method from here and continue with normal message processing or use any
other synchronizing mechanism. Refer to the Examples\NonsyncEventExample for details.
property OnOutBufFree: TNotifyEvent;

Occurs when all the data in output buffer was sent.


property OnPortClose: TNotifyEvent;

Occurs when communication port is closed


property OnPortOpen: TNotifyEvent;

Occurs when communication port is opened


property OnSyncEvent: TAfCPTCoreEvent;
TAfCPTCoreEvent = procedure(Sender: TObject; EventKind: TAfComPortEventKind;

Data: TAfComPortEventData) of object;


TAfComPortEventData = DWORD;
TAfComPortEventKind = TAfCoreEvent;

This is centralized event of all the communication port events described above.

TAfDataDispatcher
Provides dispatching of incoming data and events into one or more "data-aware"
components. It has its own dispatcher buffer. It can be used with any data provider
component (e.g. TAfComPort) or separately.
procedure AbortWriteStream;

Terminates sending data from the stream


function BufFree: Integer;

Returns the number of bytes free in dispatcher buffer


function BufUsed: Integer;

Returns the number of bytes currently in dispatcher buffer


procedure Clear;

Performs clear command to the all "data-aware" components linked to the dispatcher
procedure ClearBuffer;

Do not use, it isn't full implemented yet


procedure Dispatcher_WriteBufFree;
procedure Dispatcher_WriteTo(const Data; Size: Integer);
function ReadChar: Char;

Reads the character from dispatcher buffer. If there isn't any character to read, an exception is
raised.
If it is called within OnDataReceived event it doesn't remove any data from dispatcher buffer until
all linked components have seen them.
procedure ReadData(var Buf; Size: Integer);

Reads the specified number of bytes from dispatcher buffer. If there aren't enough data to read,
an exception is raised. If it is called within OnDataReceived event it doesn't remove any data from
dispatcher buffer until all linked
components have seen them.
function ReadString: String;

Reads all the data from dispatcher buffer to string. If it is called within OnDataReceived event it
doesn't remove any data from dispatcher buffer until all linked components have seen them.
procedure WriteChar(C: Char);

Writes the character to the specified data provider.


procedure WriteData(const Data; Size: Integer);

Writes the data to the specified data provider.


procedure WriteString(const S: String);

Writes the string to the specified data provider.


procedure WriteStream(Stream: TStream; FreeAtferWrite: Boolean);

Writes the stream to the specified data provider. If FreeAfterWrite is True, the stream will be
automatically destroyed after write finished or be aborted. The stream is sent by small blocks of
data which size is specified in StreamBlockSize property.

property LinksList: TList;


property ReceivedBytes: Integer; [ReadOnly]

Do not use, it isn't full implemented yet


property SentBytes: Integer; [ReadOnly]

Do not use, it isn't full implemented yet


property StreamWriting: Boolean; [ReadOnly]

Indicates whether writing stream is in progress.


property OnWriteToDevice: TAfDispWriteToEvent;
property BufferSize: Integer;

Specifies the size of the dispatcher buffer


property DataProvider: TAfDataDispConnComponent;

Specifies the data provider


property StreamBlockSize: Integer;

Specifies the maximum size of stream write data block


property OnDataReceived: TNotifyEvent;

Occurs when a data are received from data provider (written to the dispatcher's buffer)
property OnWriteBufFree: TNotifyEvent;

Occurs when data provider's output data was sent. This event however won't occurs when writing
stream is in progress.
property OnWriteStreamBlock: TAfDispStreamEvent;

Occurs when the block of stream data was written


property OnWriteStreamDone: TNotifyEvent;

Occurs when writing stream is done

TAfLineViewer
Represents a virtual text viewer that displays text rows. It also support text highlighting
and user painted area on the control's left side.
property FocusedPoint: TPoint;

Cursor coordinates. TPoint here doesn't mean screen coordinates, but row and col.
property SelectedText: String; [ReadOnly]

Returns the selected text, lines are terminated by #13#10


property SelStart: TPoint;

Coordinates of the first selected character


property SelEnd: TPoint;

Coordinates of the last selected character


property TopLeft: TPoint;

Coordinates of the top-left character


property UseScroll: Boolean;

When it is True (default), the control scrolls its context (if it is possible) instead repainting all
visible lines.

procedure CopyToClipboard;

Copies the selected text to the Clipboard


procedure DrawToCanvas(DrawCanvas: TCanvas; StartLine, EndLine: Integer; Rect:
TRect);

For future use, not full implemented yet.


procedure DrawLineToCanvas(DrawCanvas: TCanvas; LineNumber: Integer; Rect:
TRect;
TextMetric: TTextMetric);

For future use, not full implemented yet.


procedure InvalidateDataRect(R: TRect; FullLine: Boolean);

Invalidates the desired text area. R here doesn't mean screen coordinates. When FullLine
parameter is True and R.Top = R.Bottom, R.Left and R.Right values are ignored and full text line
is invalidated.
procedure InvalidateFocusedLine;

Invalidates the line which has focus (see FocusedPoint).


procedure InvalidateLeftSpace(StartLine, EndLine: Integer);

Invalidates the left "user painted area".


function MouseToPoint(X, Y: Integer): TPoint;

Converts screen coordinates to the text coordinates (TPoint here doesn't mean screen
coordinates).
procedure ScrollIntoView;

Use ScrollIntoView to ensure that a focused row and column is in the visible area.
property CharHeight: Integer; [ReadOnly]

The current font height in pixels


property CharWidth: Integer; [ReadOnly]

The current font width in pixels


property CaretBlinkTime: TAfCLVCaretBlinkTime;
TAfCLVCaretBlinkTime = 1..MaxInt;

Sets the caret blink time to the specified number of milliseconds


property CaretType: TAfCLVCaretType;
TAfCLVCaretType = (ctVertical, ctHorizontal, ctBlock);

Sets the shape of the caret


property LeftSpace: TAfCLVLeftSpace;
TAfCLVLeftSpace = 0..MaxInt;

Sets the size of left user-painted area. This area resides between left side of the control and text
area. See OnDrawLeftSpace for details.
property LineCount: Integer;

Sets the number of lines


property MaxLineLength: TAfCLVMaxLineLength;
TAfCLVMaxLineLength = 1..AfCLVMaxLineLength;

Sets the number of columns (max. 512)


property Options: TAfCLVOptions;
TAfCLVOptions = set of (loCanSelect, loSelectByShift, loDrawFocusSelect,
loThumbTracking, loScrollToRowCursor, loScrollToColCursor, loShowLineCursor,
loShowCaretCursor, loTabs);

Specifies various display and behavioral properties of the AfLineViewer:


loCanSelect
- users can select range of text
loSelectByShift
- users have to press Shift key for selecting text
loDrawFocusSelect
- if loShowLineCursor included, enables drawing focused line the same
way like TListBox
loThumbTracking
- the viewer image updates while the user is dragging the thumb of the
scrollbar.
loScrollToRowCursor - the viewer always try to scroll area to make focused row visible
loScrollToColCursor
- the viewer always try to scroll area to make focused column visible
loShowLineCursor
- focused line is drawn the same way like TListBox
loShowCaretCursor
- shows caret
loTabs
- Tab key doesn't cause selection next control
property SelectedColor: TColor;

Specifies the background color of selected text


property SelectedTextColor: TColor;

Specifies the foreground color of selected text


property SelectedStyle: TFontStyles;

Specifies the font style of selected text, see UsedFontStyles for details.
property UseFontCache: Boolean;

When True (default is False), the font style cache is used. It can speed up painting if different font
styles in each line are frequently used.
property UsedFontStyles: TFontStyles;

Specifies font styles for calculating global font height and width. This is important when different
font styles are used in painting.
For example, you would like to highlight some keywords in text by setting font style to Bold. If you
don't include [fsBold] in this property, the bold characters may not fit to calculated size.
property OnBof: TNotifyEvent;

Occurs when the first line is focused (FocusedPoint.Y = 0) and user presses UPARROW key.
property OnCursorChange: TAfCLVCursorEvent;
TAfCLVCursorEvent = procedure (Sender: TObject; CursorPos: TPoint) of object;

Occurs when the focused row or column is changed. CursorPos contains new coordinates.
property OnDrawLeftSpace: TAfCLVDrawLeftSpEvent;
TAfCLVDrawLeftSpEvent = procedure (Sender: TObject; const Line, LeftCharPos:
Integer;
Rect: TRect; State: TAfCLVLineState) of object;
TAfCLVLineState = (lsNormal, lsFocused, lsSelected);

Occurs when a left user-painted area needs to be drawn. Line indicates the row for that area
should be drawn. LeftCharPos indicates the first left visible position of text. State indicates state
of the row.
property OnEof: TNotifyEvent;

Occurs when the last line is focused (FocusedPoint.Y = LineCount - 1) and user presses
DOWNARROW key.
property OnFontChanged: TNotifyEvent;

Occurs after the Font property was changed.


property OnGetText: TAfCLVGetTextEvent;
TAfCLVGetTextEvent = procedure (Sender: TObject; Line: Integer; var Text:
String;
var ColorMode: TAfCLVColorMode; var CharColors: TAfCLVCharColors) of object;

TAfCLVColorMode = (cmDefault, cmLine, cmChars, cmCheckLength);


TAfCLVCharAttr = packed record
BColor, FColor: TColor;
Style: TFontStyles;
end;
TAfCLVCharColors = array[0..AfCLVMaxLineLength] of TAfCLVCharAttr;
TAfCLVFocusSource = (fsKey, fsMouse, fsHScroll, fsVScroll);

Occurs when the text of line is requested.


ColorMode specifies the ColorMode:
cmDefault
- default color is used
cmLine
- tells that the same color and style will be used for whole line. This color have to
be
specified in CharColors[0]
cmChars
- tells that the each character can have different color and style. You have to fill
CharColor
array with desired values.
cmCheckLength - used internally for checking the length of text
property OnLeftSpaceMouseDown: TMouseEvent;

Occurs when the user presses a mouse button with the mouse pointer over a left user-painted
area
property OnSelectionChange: TNotifyEvent;

Occurs when the current selection changes

TAfTerminal
Representes a terminal window with circular buffer and scroll back mode capability. It
doesn't support terminal emulation like ANSI or VT102, but it can highlight text with up to
16 different colors.
procedure ClearBuffer;

Clears terminal buffer


function DefaultTermColor: TAfTRMCharAttr;
TAfTRMCharAttr = packed record
FColor, BColor: TAfTRMCharColor;
end;

Returns default terminal colors


procedure DrawChangedBuffer;

Draws the buffer. This should be called after WriteChar or WriteColorChar methods was called
procedure WriteChar(C: Char);

Writes the character to buffer. The characters written by this method won't be visible until
DrawChangedBuffer method is called
procedure WriteColorChar(C: Char; BColor, FColor: TAfTRMCharColor);

Writes the character to buffer with specified color. The characters written by this method won't be
visible until DrawChangedBuffer method is called.
procedure WriteColorStringAndData(const S: String; BColor, FColor:
TAfTRMCharColor;
UserDataItem: Pointer);

Writes the text with specified color and userdata (when UserDataItem <> nil) to buffer. You don't
have to call DrawChangedBuffer method after calling this method. See UserDataSize property for
details.

procedure WriteString(const S: String);

Writes the text to buffer. You don't have to call DrawChangedBuffer method after calling this
method.
property BufferLine[Index: Integer]: String; [ReadOnly]

Returns the text of line in circular terminal buffer.


property BufferLineNumber: Integer; [ReadOnly]

Returns the number of last line in terminal buffer


property ColorTable: TAfTRMColorTable;
TAfTRMCharColor = 0..15;
TAfTRMColorTable = array[TAfTRMCharColor] of TColor;

ColorTable contains 16 colors which can be used in terminal. You can set another color palette by
this property.
property RelLineColors[Index: Integer]: TAfTRMCharAttrs;
TAfTRMCharAttrs = array[0..AfCLVMaxLineLength] of TAfTRMCharAttr;

This property is intended for use in OnGetColors event. You can set colors in any previous line
specified by offset from current line being processed. For example, RelLineColors[-1] returns or
set colors for the previous line.
property ScrollBackMode: Boolean;

When False (default), the terminal can show data written to it, users can't scroll back and read
older data.
When True, the terminal doesn't show new data, but users can scroll back and see whole context
of buffer. In this mode, new data are written to temporary buffer and after setting this property to
False are copied to terminal buffer and shown. See AutoScrollBack property.
property TermColor[Color: TColor]: Integer; [ReadOnly]

Returns terminal color index for the specified color. If the color exist, it raises an exception.
property UserData[Index: Integer]: Pointer;

Internal terminal buffer contains text and color information (depended on TermColor property).
Sometimes can be useful to have room for extra data in each line. The size of this room is
specified in UserDataSize property. You can read or write data using this property.
property AutoScrollBack: Boolean;

When True (default), the ScrollBackMode is automatically set by users action.


property BkSpcMode: TAfTRMBkSpcMode;
TAfTRMBkSpcMode = (bmBack, bmBackDel);

Specifies the behavior of terminal for #08 char processing:


bmBack
- moves the cursor back only
bmBackDel
- moves the cursor back and clears character at its position
property DisplayCols: Byte;

Specifies the number of columns. It also clears terminal buffer.


property Logging: TAfTRMLogging;
TAfTRMLogging = (lgOff, lgCreate, lgAppend);

Specifies logging mode:


lgOff
- no logging
lgCreate
- log file is always created, old file will be overwritten
lgAppend
- new data will be appended to existing log file. It file doesn't exist, it'll be created
property LogFlushTime: TAfTRMLogFlushTime;
TAfTRMLogFlushTime = 1..MaxInt;

Specifies the flushing time to the number in milliseconds.

property LogName: String;

Sets the name of log file.


property LogSize: TAfTRMLogSize;
TAfTRMLogSize = 1..MaxInt;

Do NOT use, it'll be removed in future versions


property Options: TAfCLVOptions;
property ScrollBackCaret: TAfCLVCaretType;

Specifies the shape of caret when ScrollBackMode is True


property ScrollBackKey: TShortCut;

Specifies the shortcut key which switches ScrollBackMode


property ScrollBackRows: Integer;

Specifies the number of rows in terminal buffer. It also clears terminal buffer.
property TerminalCaret: TAfCLVCaretType;

Specifies the shape of caret when ScrollBackMode is False


property TermColorMode: TAfTRMColorMode;
TAfTRMColorMode = (cmLDefault, cmL16_16, cmC16_16);

Specifies the color mode:


cmLDefault
- default colors are used only
cmL16_16
- each line can have different colors
cmC16_16
- each character can have different colors
property UserDataSize: Integer;

Specifies the size of user data room in terminal buffer. It also clears terminal buffer.
property OnBeepChar: TNotifyEvent;

Occurs when #07 character is written to the buffer


property OnDrawBuffer: TNotifyEvent;

Do NOT use, it is for debugging purposes only. It'll be removed in future versions
property OnFlushLog: TNotifyEvent;

Occurs when the log file's buffers were flushed.


property OnGetColors: TAfTRMGetColorsEvent;
TAfTRMGetColorsEvent = procedure (Sender: TObject; Line: Integer; var Colors:
TAfTRMCharAttrs) of object;

Occurs before DrawChangedBuffer method is called to get color information for newly inserted
data. If TermColorMode = cmL16_16 you have to specify the color information in Colors[0]
property OnLoggingChange: TNotifyEvent;

Occurs when Logging property is changed


property OnNewLine: TAfTRMLineEvent;
TAfTRMLineEvent = procedure (Sender:TObject; Line: Integer) of object;

Occurs when LF character is written into terminal buffer. Line contains line number of current line.
property OnProcessChar: TAfTRMProcessCharEvent;
TAfTRMProcessCharEvent = procedure (Sender: TObject; var C: Char) of object;

Occurs when new character is written into terminal buffer. You can replace it here or discard it by
setting C to #00.
property OnScrBckBufChange: TAfTRMScrBckBufChange;

TAfTRMScrBckBufChange = procedure (Sender: TObject; BufferSize: Integer) of


object;

Occurs when ScrollBackMode is True and new character is written to the temporary buffer. The
temporary buffer is theoretically unlimited, but you can limit its size here, by setting
ScrollBackMode to False when BufferSize exceeded some size.
property OnScrBckModeChange: TNotifyEvent;

Occurs when ScrollBackMode property is changed


property OnSendChar: TKeyPressEvent;

Occurs when user presses a character key and ScrollBackMode is False


property OnUserDataChange: TAfTRMLineEvent;
TAfTRMLineEvent = procedure (Sender: TObject; Line: Integer) of object;

Occurs when UserData is changed. Line contains number of line which use

TAfFileViewer
Represents a simple unlimited text file viewer. It can be used for displaying log files from
terminal window.
procedure CloseFile;

Closes the file


function FilePtrFromLine(Line: Integer): PChar;

Returns pointer to the text buffer for specified line


procedure OpenFile;

Opens the file specified in FileName property


procedure OpenData(const TextBuf: PChar; const TextSize: Integer);

Opens buffer specified by pointer and its size.


property FileName: String;

Specifies the filename, but doesn't open the file. See OpenFile method
property FileSize: DWORD; [ReadOnly]

Returns the size of text


property ScanPosition: Integer; [ReadOnly]

Returns the position in text during scanning the number of lines


property ScanBlockStep: TAfCVFScanStep;
TAfCVFScanStep = 1..MaxInt;

Specifies the size of block for OnScanBlock event


property UseThreadScan: Boolean;

When True (default) scanning the number of lines runs in separate thread
property OnScanBlock: TNotifyEvent;

Occurs when the next block (which size is specified in ScanBlockStep) has been scanned

TAfDataTerminal
Represents a "data-aware" terminal window. It is descendant of TAfTerminal and it allows
connect to a data dispatcher.

property Active: Boolean;

Specifies the state of terminal. When True (default), terminal can receive and send data through
assigned data dispatcher.
property Dispatcher: TAfCustomDataDispatcher;

Specifies the data dispatcher

TAfPortComboBox
This is a specialized combo box that allows users to select desired serial port.
property ComNumber: Word;

Specifies the number of serial port


property ComPort: TAfComPort;

Specifies the TAfComPort component


property Options: TAfPortCtlOptions;
TAfPortCtlOptions = set of (pcCheckExist, pcDisableOpen, pcHighlightOpen);

Specifies the behavior of this component:


pcCheckExist - removes non existing serial port from list
pcDisableOpen - removes currently opened serial port from list
pcHighlightOpen
- highlights currently opened serial port in drop down list
property MaxComPorts: SmallInt;

Specifies the maximum number of serial ports in combo box list

TAfPortRadioGroup
This is a specialized radio group that allows users to select desired serial port.
property ComNumber: Word;

Specifies the number of serial port


procedure UpdatePortList;

Updates the radio group


property ComPort: TAfComPort;

Specifies the TAfComPort component


property Options: TAfPortCtlOptions;
TAfPortCtlOptions = set of (pcCheckExist, pcDisableOpen, pcHighlightOpen);

Specifies the behavior of this component:


pcCheckExist - disables non existing serial port items
pcDisableOpen - disables currently opened serial port items
pcHighlightOpen
- highlights currently opened serial port items
property MaxComPorts: SmallInt;

Specifies the maximum number of serial ports in radio group

Vous aimerez peut-être aussi