Class TTnScript (unit TnScript) |
Inherits from
TTnEmulVT
constructor Create(AOwner : TComponent);
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure AddEvent(ID : Integer;
Search : String;
ToSend : String;
Flags : TEventFlags;
Handler : TEventHandler);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Add an event (a string to search for) to the list
destructor Destroy;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure RemoveAllEvents;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure RemoveEvent(ID : Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Remove an event from the list, given his ID
function FindEventString(S : String) : Integer;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Search for a string in the circular buffer.
procedure NextOne(var N : Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Advance char index in the circular buffer
procedure ProcessInputData(Buffer: PChar; Len: Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ScanEvents;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
function SearchEvent(ID : Integer) : Integer;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure SetInputBufferSize(newSize : Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Set the input buffer size.
procedure TriggerDataAvailable(Buffer: PChar; Len: Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure TriggerDisplay(Msg : String);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure TriggerStringMatch(ID : Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
property InputBufferSize : Integer
event OnDisplay : TDisplayEvent
event OnStringMatch : TStringMatch
FEventList : TList;
FInputBuffer : PChar;
FInputBufferCount : Integer;
FInputBufferSize : Integer;
FInputBufferStart : Integer;
FOnDisplay : TDisplayEvent;
FOnStringMatch : TStringMatch;
constructor Create(AOwner : TComponent);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure AddEvent(ID : Integer;
Search : String;
ToSend : String;
Flags : TEventFlags;
Handler : TEventHandler);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Add an event (a string to search for) to the list
destructor Destroy;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure RemoveAllEvents;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure RemoveEvent(ID : Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Remove an event from the list, given his ID
function FindEventString(S : String) : Integer;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Search for a string in the circular buffer. } { Returns the number of chars between the buffer start and the end of the } { event found, or -1 if not found.
procedure NextOne(var N : Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Advance char index in the circular buffer
procedure ProcessInputData(Buffer: PChar; Len: Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ScanEvents;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
function SearchEvent(ID : Integer) : Integer;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure SetInputBufferSize(newSize : Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Set the input buffer size. This will clear any data already in the buffer
procedure TriggerDataAvailable(Buffer: PChar; Len: Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure TriggerDisplay(Msg : String);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure TriggerStringMatch(ID : Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
property InputBufferSize : Integer
event OnDisplay : TDisplayEvent
event OnStringMatch : TStringMatch
FEventList : TList;
FInputBuffer : PChar;
FInputBufferCount : Integer;
FInputBufferSize : Integer;
FInputBufferStart : Integer;
FOnDisplay : TDisplayEvent;
FOnStringMatch : TStringMatch;