public class VT100Emulator extends MasterPty implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
private int |
attribute
Cell attributes and colors
|
private AttributeStorage |
attrStorage
attribute storage
|
private int |
color
Cell attributes and colors
|
private static byte[] |
DA_RESPONSE
DA response
|
private static byte |
ESC
Escape code
|
private static byte[] |
IDENT_RESPONSE
Identify terminal response
|
protected VT100Keyboard |
keyboard
VT-100 keyboard
|
private static CentralLogger |
LOG
Logger
|
private TerminalMode |
mode
Terminal mode
|
protected VT100Renderer |
pty
Master PTY interface
|
private boolean |
running
Main loop is running
|
private java.util.Set<java.lang.Integer> |
tabStops
Tab stops
|
private boolean |
terminate
Request terminate
|
private static java.lang.String |
VT_100
Terminal type
|
| Constructor and Description |
|---|
VT100Emulator(VT100Renderer pty,
VT100Keyboard keyboard,
java.lang.String[] cmdLine,
int overlay)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private char |
convertUTF8toUTF16(java.io.ByteArrayOutputStream utf8)
Convert a UTF-8 sequence to a UTF-16 character.
|
private void |
doAnsi()
Process ANSI mode
|
private void |
doEscSequence()
Process ESC sequences
|
private void |
doVT52()
Process VT52 mode
|
void |
doWork()
Main loop.
|
private void |
goNextTabstop()
Go to the next tab stop position.
|
private boolean |
isDigit(byte b)
Test if byte is a ASCII decimal digit.
|
private void |
processCSI()
process ESC [ Pn;...Pn x
|
private void |
putUtf8Stream(int v0)
Read an UTF-8 byte sequence transform to UTF-16 and store on a cell structure.
|
void |
run() |
void |
stopRunning()
Request terminate.
|
private static final CentralLogger LOG
private static final java.lang.String VT_100
private static final byte ESC
private static final byte[] DA_RESPONSE
private static final byte[] IDENT_RESPONSE
private TerminalMode mode
private int attribute
private int color
private AttributeStorage attrStorage
private java.util.Set<java.lang.Integer> tabStops
private volatile boolean running
private volatile boolean terminate
protected VT100Keyboard keyboard
protected VT100Renderer pty
public VT100Emulator(VT100Renderer pty, VT100Keyboard keyboard, java.lang.String[] cmdLine, int overlay)
pty - A VT-100 renderer.keyboard - A VT-100 keyboard handler.cmdLine - Command line arguments.overlay - Overlapped mode.public void doWork()
private void doEscSequence()
private void doAnsi()
private void processCSI()
private void doVT52()
public void run()
run in interface java.lang.Runnableprivate void goNextTabstop()
private void putUtf8Stream(int v0)
v0 - First value in stream;private char convertUTF8toUTF16(java.io.ByteArrayOutputStream utf8)
utf8 - UTF-8 byte sequence.private boolean isDigit(byte b)
b - Input byte.true if is a digit false otherwise.public void stopRunning()