Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
|
TerminalLine manages the terminal lines, virtual terminal lines, and console lines. More...
Public Member Functions | |
string | getName () |
Returns the name of this terminal line. More... | |
Device | getOwnerDevice () |
Returns the owner device of this terminal line. More... | |
string | getMode () |
Returns the mode this terminal line is in. More... | |
string | getPrompt () |
Returns the prompt of this terminal line. More... | |
CommandHistory | getUserHistory () |
Returns the user history of this terminal line. More... | |
CommandHistory | getConfigHistory () |
Returns the config history of this terminal line. More... | |
CommandHistory | getCurrentHistory () |
Returns the current history of this terminal line. More... | |
int | getHistorySize () |
Returns the history size. More... | |
string | getCommandInput () |
Returns the command input. More... | |
int | getTelnetClientCount () |
Returns the number of telnet clients. More... | |
TelnetClientProcess | getTelnetClientAt (int) |
Returns the telnet client at the specified index. More... | |
void | enterCommand (string) |
Enters a command to the terminal line. More... | |
void | terminalUpdated (string) |
IPC event. More... | |
void | moreDisplayed () |
Event happens when a –More– display is generated. More... | |
void | enterChar (byte, SpecialChar) |
Enters the specified ascii or special character into the terminal. More... | |
void | outputWritten (string, bool, int) |
This event is emitted when output is written to the terminal line. More... | |
void | cursorPositionChanged (int) |
This event is emitted when the cursor position has moved to the specified position from the end of the terminal. More... | |
void | directiveSent (DirectiveCommand, int) |
This event is emitted when a directive command is sent. More... | |
void | commandStarted (string, string, string, string) |
This event is emitted when a command has started. More... | |
void | commandEnded (string, CommandStatus) |
This event is emitted when a command has ended. More... | |
void | commandAutoCompleted (string, string) |
This event is emitted when a command has been auto completed. More... | |
void | modeChanged (string, string, string) |
This event is emitted when the mode has changed. More... | |
void | promptChanged (string) |
This event is emitted when the prompt has changed. More... | |
void | commandSelectedFromHistory (string) |
This event is emitted when a command from the history has been selected. More... | |
void | setSettings (int, string, Parity, string, FlowControl) |
Sets the connection settings to this terminal. More... | |
int | getSpeed () const |
byte | getDataBits () const |
Parity | getParity () const |
string | getStopBits () const |
FlowControl | getFlowControl () const |
void | println (string) |
This function gets the flow control. More... | |
void | flush (int) |
This function remove the first number of lines in the buffer. More... | |
TerminalLine manages the terminal lines, virtual terminal lines, and console lines.
void TerminalLine::commandAutoCompleted | ( | string | , |
string | |||
) |
This event is emitted when a command has been auto completed.
IPC event.
void TerminalLine::commandEnded | ( | string | , |
CommandStatus | |||
) |
This event is emitted when a command has ended.
IPC event.
void TerminalLine::commandSelectedFromHistory | ( | string | ) |
This event is emitted when a command from the history has been selected.
IPC event.
void TerminalLine::commandStarted | ( | string | , |
string | , | ||
string | , | ||
string | |||
) |
This event is emitted when a command has started.
IPC event.
void TerminalLine::cursorPositionChanged | ( | int | ) |
This event is emitted when the cursor position has moved to the specified position from the end of the terminal.
IPC event.
void TerminalLine::directiveSent | ( | DirectiveCommand | , |
int | |||
) |
This event is emitted when a directive command is sent.
IPC event.
void TerminalLine::enterChar | ( | byte | , |
SpecialChar | |||
) |
Enters the specified ascii or special character into the terminal.
ascii,any | ASCII character. Includes: Backspace = 8 Ctrl+C = 3 Ctrl+Z = 26 Ctrl+Shift+6 = 30 Enter = 13 Line Feed = 10 Tab = 9 Question = '?' Space = ' ' Ctrl+B = 2 Ctrl+F = 6 Ctrl+P = 16 Ctrl+N = 14 Ctrl+A = 1 Ctrl+E = 5 Ctrl+U = 21 |
enum<SpecialChar>,a | special character key. Special characters: eNoChar = 0, eArrowRight = 1, eArrowLeft, eArrowUp, eArrowDown |
void TerminalLine::enterCommand | ( | string | ) |
Enters a command to the terminal line.
void TerminalLine::flush | ( | int | ) |
This function remove the first number of lines in the buffer.
lineCount,the | number of lines to be removed |
string TerminalLine::getCommandInput | ( | ) |
Returns the command input.
CommandHistory TerminalLine::getConfigHistory | ( | ) |
Returns the config history of this terminal line.
CommandHistory TerminalLine::getCurrentHistory | ( | ) |
Returns the current history of this terminal line.
byte TerminalLine::getDataBits | ( | ) | const |
This function gets the data bits.
FlowControl TerminalLine::getFlowControl | ( | ) | const |
This function gets the flow control.
int TerminalLine::getHistorySize | ( | ) |
Returns the history size.
string TerminalLine::getMode | ( | ) |
Returns the mode this terminal line is in.
string TerminalLine::getName | ( | ) |
Returns the name of this terminal line.
Device TerminalLine::getOwnerDevice | ( | ) |
Returns the owner device of this terminal line.
Parity TerminalLine::getParity | ( | ) | const |
[in] | parity | a parity bit value This function sets the parity bit. |
string TerminalLine::getPrompt | ( | ) |
Returns the prompt of this terminal line.
int TerminalLine::getSpeed | ( | ) | const |
This function gets the baud rate.
string TerminalLine::getStopBits | ( | ) | const |
This function gets the stop bits.
TelnetClientProcess TerminalLine::getTelnetClientAt | ( | int | ) |
Returns the telnet client at the specified index.
index,the | index of the telnet client of interest. |
int TerminalLine::getTelnetClientCount | ( | ) |
Returns the number of telnet clients.
CommandHistory TerminalLine::getUserHistory | ( | ) |
Returns the user history of this terminal line.
void TerminalLine::modeChanged | ( | string | , |
string | , | ||
string | |||
) |
This event is emitted when the mode has changed.
IPC event.
void TerminalLine::moreDisplayed | ( | ) |
Event happens when a –More– display is generated.
IPC event.
void TerminalLine::outputWritten | ( | string | , |
bool | , | ||
int | |||
) |
This event is emitted when output is written to the terminal line.
IPC event.
void TerminalLine::println | ( | string | ) |
This function gets the flow control.
output,the | output string to be printed to terminal line |
void TerminalLine::promptChanged | ( | string | ) |
void TerminalLine::setSettings | ( | int | , |
string | , | ||
Parity | , | ||
string | , | ||
FlowControl | |||
) |
Sets the connection settings to this terminal.
int | speed, any Speed setting of either: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 |
char | bits, The number of data bits, from 5 to 8, inclusive |
enum<Parity> | parity, The parity mode, even, odd, none, mark, space |
string | stopbits, The stop bits, 1, 1.5, or 2 |
enum<FlowControl> | flowcontrol, The flow control method, Xon/Xoff, Hardware, None |
void TerminalLine::terminalUpdated | ( | string | ) |
IPC event.