text_panel_frontend time-server
Simics Reference Manual  /  5 Classes  / 

textcon

Description

The textcon class provides a text user interface to a simulated machine. The console is typically connected to a simulated serial device.

Interfaces Implemented

conf_object, log_object, serial_device, serial_console_frontend, recorded, con_input, text_console_backend, telnet_connection, telnet_connection_v2, external_connection_events, host_serial, break_strings, break_strings_v2

Notifiers

cell-change
Notifier that is triggered after the object's cell was changed.
object-delete
Notifier that is triggered just before Simics object is deleted.
queue-change
Notifier that is triggered after the object's clock was changed. New clock can be obtained with the SIM_object_clock function.
textcon-close
Notifier that is triggered when a text console is closed.
textcon-open
Notifier that is triggered when a text console is opened.

Port Objects

tcp
tcp-server – Telnet TCP server
unix_socket
unix-socket-server – Telnet Unix domain socket server

Commands for this class

Commands for interface break_strings_v2

Attributes

device
Optional attribute; read/write access; type: o|n
The serial device that the console is attached to, must implement the 'serial_device' interface.
serial_frontends
Optional attribute; read/write access; type: [o*]
Serial frontends connected to the console. These must implement the serial_console_frontend interface and will receive all output to the console.
pending_input
Optional attribute; read/write access; type: d
Queued input waiting to be sent to the attached device.
output_file
Pseudo attribute; read/write access; type: s
If set to a non-empty string, output will be directed to and appended to this file. Set to an empty string to stop file output.
cmd_line_output
Optional attribute; read/write access; type: b
If set to TRUE, the Simics command line will receive console output, which will also be logged at level 3. Command line and log output will also happen automatically when the console is started in invisible mode, until it is explicitly displayed, or until this flag is set to FALSE.
output_line
Optional attribute; read/write access; type: s
The current output line of printable characters from the attached device.
log_line
Optional attribute; read/write access; type: s
The current pending log output line.
convert_crlf
Optional attribute; read/write access; type: b
If TRUE, LF characters received from the attached device are converted to CRLF.
filter_esc
Optional attribute; read/write access; type: [bbbb]
Determines if ANSI escape sequences sent from the attached device will be filtered out in different circumstances: [for breakpoint matching, for command line, for log output, elsewhere]. The default is [TRUE, TRUE, FALSE, FALSE].
esc_state
Optional attribute; read/write access; type: [[bbs][bbs][bbs][bbs]]
ANSI escape sequence parser state.
recorder
Required attribute; read/write access; type: o
Associated recorder object. Used for recording console input.
output_recording
Pseudo attribute; read/write access; type: b
When enabled, all characters written to the console will be recorded. The record can be read from the attribute recorded_output.
recorded_output
Pseudo attribute; read/write access; type: s
The characters that have been recorded when the attribute output_recording is TRUE. Note that the recorded string will NOT be cleared when output_recording is reset.
window_title
Optional attribute; read/write access; type: s
Console GUI window title.
screen_size
Optional attribute; read/write access; type: [ii]
Console visible screen size (columns, rows).
max_scrollback_size
Optional attribute; read/write access; type: i
Maximum number of scrollback lines. Set to 0 for no maximum. Default is 10000.
screen_data
Optional attribute; read/write access; type: [[i*][[iii]*][[ib]*]]
Console screen contents (characters, attributes, line_info). Characters and attributes lists have length width * height. Attributes list contains (attribute, fg colour, bg colour) for every screen character. line_info is a list with meta data for every line: (line length, line wrap).
scrollback_data
Optional attribute; read/write access; type: [ddd[[ib]*]]
Console scrollback contents (characters, attributes, colours, line_info). line_info has the same format as for the screen_data attribute. The character data also has the same format but is given as binary for faster checkpointing. The attribute data is a list of text_console_attrib_t.attrib values for each scrollback character, and the colour data is a list of text_console_colour_t values, alternating foreground and background colours (hence the colour data is 4 times long as the character data).
default_colours
Optional attribute; read/write access; type: [ii]
Default text colours (foreground, background) in 0xRRGGBB format.
visible
Optional attribute; read/write access; type: b|n
Show/hide console GUI window. Setting to NIL only has effect before instantiation, in which case it leads to the default visibility behaviour of showing the console window if it is the unique console in the configuration.
cursor_data
Optional attribute; read/write access; type: [iibb]
Current cursor data (column, row, pending wrap, relative coordinates).
saved_cursor_data
Optional attribute; read/write access; type: [iibb]
Saved cursor data (column, row, pending wrap, relative coordinates).
DECAWM
Optional attribute; read/write access; type: b
Auto-wrap mode.
scrolling_region
Optional attribute; read/write access; type: [ii]
Scrolling region line numbers (top, bottom), 0-based.
text_attributes
Optional attribute; read/write access; type: [iiib]
Current text attributes (attribute, fg col, bg col, reverse).
modes
Optional attribute; read/write access; type: [bbb]
Current terminal modes (cursor, keypad, insert).
tab_stops
Optional attribute; read/write access; type: [i*]
Current tab stop positions (1-based).
parser_state
Optional attribute; read/write access; type: [ib[i*]]
VT parser state
backspace_sends_del
Optional attribute; read/write access; type: b
If TRUE, the backspace key sends DEL (127), otherwise BS (8). Default is TRUE.
input_mode
Optional attribute; read/write access; type: s
What terminal type to emulate for keyboard inputs. Possible values are "standard" (VT220/XTerm), which is the default, and "microsoft" (Microsoft's "VT100+").
telnet_unix_socket
Pseudo attribute; read/write access; type: s|n
Filename of UNIX socket used by the telnet console server.
buffer_until_telnet_connection
Optional attribute; read/write access; type: b
If TRUE, the console will buffer any output until a client connects. If FALSE, such output will be discarded. This cannot be set if telnet_send_data_on_connect is set.
telnet_output_buffer
Optional attribute; read/write access; type: [i*]
Characters transmitted by the simulated serial port, but not yet written out by the console.
telnet_raw
Optional attribute; read/write access; type: b
If TRUE, will not interpret telnet control codes or otherwise change the bytes transmitted in either direction.
telnet_send_data_on_connect
Optional attribute; read/write access; type: b
If TRUE, the currently visible console screen will be sent to the telnet client upon connection. This cannot be set if the buffer_until_telnet_connection attribute is set. The data sent includes formatting control characters
pty
Pseudo attribute; read-only access; type: s|n
Name of the allocated host serial device, or NIL.
break_strings
Pseudo attribute; read-only access; type: [[sbbiib]*]
List of console break strings (string, active, oneshot, hap ID, unused, regexp)

Provided By

textcon
text_panel_frontend time-server