VIRTUTECH CONFIDENTIAL Previous - Up - Next
text-console
- Provided by
-
xterm-console
- Class Hierarchy
-
conf-object → conf-object → text-console
- Interfaces Implemented
-
event_poster, extended_serial, serial_device
- Description
-
The text-console class provides a text user interface to the simulated machine's console.
Attributes
- Attributes inherited from class conf-object
-
attributes, classname, component, iface, name, object_id, queue
- Attributes inherited from class conf-object
-
attributes, classname, component, iface, name, object_id, queue
- Attribute List
-
- abort
- Optional attribute; read/write access; type: unknown type.
Signal keyboard abort to connected device.
- add_title
- Pseudo attribute; read/write access; type: a.
This attribute is obsolete.
- application
- Optional attribute; read/write access; type: unknown type.
Module xterm-console only: application that is started in the target process. Default is "xterm".
- application_args
- Optional attribute; read/write access; type: unknown type.
Module xterm-console only: list of arguments to pass to the target process
- bg_color
- Optional attribute; read/write access; type: unknown type.
Default background color. Standard X11 color names may be used.
- break_string
- Pseudo attribute; read/write access; type: unknown type.
An output string causing Simics to trigger a Xterm_Break_String hap when the string is printed.
- break_string_id
- Pseudo attribute; read-only access; ; string indexed; indexed type: String.
Return an id for a string that is set to break on. The id can be used as index for the Xterm_Break_String hap.
- char_1c_is_abort
- Optional attribute; read/write access; type: unknown type.
Generate abort signal when <ctrl>-/ is pressed.
- console_trace
- Pseudo attribute; read/write access; type: Integer.
If set to non-zero, console output will be sent to stdout in a format that is easy to parse.
- device
- Optional attribute; read/write access; type: Object or Nil.
The device connected to the console, must implement one of the 'serial-device' or 'keyboard' interfaces.
- environment
- Optional attribute; read/write access; type: unknown type.
Module xterm-console only: list of strings that are added to the environment of the target process before the binary is executed.
- fg_color
- Optional attribute; read/write access; type: unknown type.
Default foreground color. Standard X11 color names may be used.
- height
- Optional attribute; read/write access; type: unknown type.
Default number of rows.
- history
- Optional attribute; read/write access; type: unknown type.
Text history of previously printed text to the window.
- history_length
- Pseudo attribute; read/write access; type: Integer.
History size in bytes.
- history_next
- Optional attribute; read/write access; type: unknown type.
Next insertion position in the history buffer.
- history_wrap
- Optional attribute; read/write access; type: unknown type.
Indicates if the history buffer ever has been wrapped, i.e. if the previous printouts have exceeded the history buffer size.
- input
- Pseudo attribute; read/write access; type: s|[di].
Keyboard input queue. This attribute appends characters to input queue.
- input_buf
- Optional attribute; read/write access; type: s|d.
Keyboard input buffer.
- input_delayed
- Pseudo attribute; write-only access; type: [sf].
(string, seconds) This attribute appends characters to the input queue, after the specified simulated time have elapsed.
- input_next
- Optional attribute; read/write access; type: unknown type.
Position in the keyboard input buffer where new input is stored.
- kbd_event_queue
- Optional attribute; read/write access; type: [[ii]*].
Keyboard event queue. Used when connected to a keyboard controller device, and not a serial device.
- link
- Optional attribute; read/write access; type: Object or Nil.
The serial link the console is connected to.
- next_char
- Optional attribute; read/write access; type: Integer.
Cached input character.
- no_window
- Optional attribute; read/write access; type: b.
If this flag is TRUE, no window will be opened. If it is FALSE, the output is redirected according to the output_file and quiet attributes.
- output_file
- Optional attribute; read/write access; type: unknown type.
If no-window is set, output will be directed to this file.
- output_timeout
- Optional attribute; read/write access; type: unknown type.
Maximum number of seconds the xterm-console allows an xterm to start on. Default is 10 seconds.
- quiet
- Optional attribute; read/write access; type: unknown type.
If the no-window is set, this flag controls whether or not the console output is redirected to Simics console. If set to 1, output is not redirected. If set to 0, output is redirected unless the output_file is set. If no-window is not set, this attribute has no effect.
- read_only
- Optional attribute; read/write access; type: unknown type.
Don't accept any input from the window. (For batch execution).
- recorded_string
- Session attribute; read/write access; type: String.
The characters that have been recorded when the attribute recording is true. Note that the recorded string will NOT be cleared when recording is reset.
- recording
- Session 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-string.
- scrollback
- Optional attribute; read/write access; type: unknown type.
Number of lines of output saved on screen.
- scrollbar
- Optional attribute; read/write access; type: unknown type.
Non-zero if the window should have a scrollbar.
- title
- Required attribute; read/write access; type: unknown type.
xterm window title.
- trace_file
- Pseudo attribute; read/write access; type: String.
Name of file where to send the console trace, if enabled. If an empty string is given standard output is used. No trace is written to file unless console_trace is also enabled.
- unbreak_id
- Pseudo attribute; write-only access; type: Integer.
Remove breakpoint based on breakpoint id.
- unbreak_string
- Pseudo attribute; write-only access; type: String.
Stop breaking on a specified string. Note that if a string is added several times, it also has to be removed the same number of times. I.e. if a hap callback is tied to a string and does not want to be called again, it should both remove the string and unregister the hap callback, since another hap callback may want to break on the same string again.
- use_xterm_args
- Optional attribute; read/write access; type: unknown type.
Module xterm-console only: if set to non-zero, the started application is assumed to accept xterm-style arguments. If this attribute is zero, attributes which map to xterm-arguments (such as "width" and "height") will have no effect. The default value of this attribute is zero if "application" is set to something other than "xterm", and non-zero otherwise.
- vt102_emulation
- Optional attribute; read/write access; type: b.
Specifies if the console should the emulate vt102 protocol or not. Default is true. By disabling vt102 emulation, the user may be allowed to change the window size interactively, with the side-effect that simulation may not be deterministic from one run to another. This could also cause problems when reversing with Hindsight.
- vt_contents
- Optional attribute; read/write access; type: [s*].
Visible contents of the emulated vt102 console.
- vt_demo
- Optional attribute; read/write access; type: Integer.
Add a microcheckpont at each CR.
- vt_height
- Optional attribute; read/write access; type: Integer.
Height of emulated vt102 console.
- vt_redraw
- Pseudo attribute; write-only access; type: Integer.
Force a redraw of the VT console.
- vt_state
- Optional attribute; read/write access; type: [i|s*].
VT100 state information.
- vt_width
- Optional attribute; read/write access; type: Integer.
Width of emulated vt102 console.
- width
- Optional attribute; read/write access; type: unknown type.
Default number of columns.
- win32_font
- Optional attribute; read/write access; type: unknown type.
Default font used for Windows hosts, on the format: "fontname:weight:pointsize".
- write_delayed
- Optional attribute; read/write access; type: Integer.
Flow control. Set if an attempt to send a char was blocked.
- x11_font
- Optional attribute; read/write access; type: unknown type.
Default font used for X11/Unix hosts. This is a regular X11 font specification string
- x11_fontbold
- Optional attribute; read/write access; type: unknown type.
Default bold-font used for X11/Unix hosts. This is a regular X11 font specification string
- xterm_args
- Pseudo attribute; read/write access; type: unknown type.
This attribute is obsolete.
Command List
- Commands
-
Command Descriptions
-
<text-console>.break
- Synopsis
-
<text-console>.break "string"
- Description
-
Set a string to break on for the console. The simulation will stop
when this string is written on the console. If text output is intermixed
with control sequences for colors/positioning, the break command may
fail breaking on the string.
- See Also
-
<text-console>.unbreak, <text-console>.list-break-strings
-
<text-console>.capture-start
- Synopsis
-
<text-console>.capture-start filename
- Description
-
Capture all output from the console to a file.
- See Also
-
<text-console>.capture-stop
-
<text-console>.capture-stop
- Synopsis
-
<text-console>.capture-stop
- Description
-
Stop capturing all output from the console.
- See Also
-
<text-console>.capture-start
-
<text-console>.close
- Synopsis
-
<text-console>.close
- Description
-
Close the console window. When the console window is
closed, any output is redirected to the main Simics window.
This can be suppressed with the <text-console>.quiet
command. To provide input to the target machine while the
console is closed, use the <text-console>.input command.
- See Also
-
<text-console>.quiet, <text-console>.open
-
<text-console>.disable-quiet
- Synopsis
-
<text-console>.disable-quiet
<text-console>.enable-quiet
<text-console>.quiet
- Description
-
This command toggles if text-console output is redirected to the Simics
console when the console window is closed. See also the
<text-console>.capture-start command.
- See Also
-
<text-console>.close, <text-console>.capture-start
-
<text-console>.disable-window — deprecated
- Synopsis
-
<text-console>.disable-window
<text-console>.enable-window
<text-console>.no-window
- Description
-
This command is deprecated, use <text-console>.close instead.
Show/hide the console window.
-
<text-console>.enable-quiet
- Synopsis
-
<text-console>.enable-quiet
<text-console>.disable-quiet
<text-console>.quiet
- Description
-
This command toggles if text-console output is redirected to the Simics
console when the console window is closed. See also the
<text-console>.capture-start command.
- See Also
-
<text-console>.close, <text-console>.capture-start
-
<text-console>.enable-window — deprecated
- Synopsis
-
<text-console>.enable-window
<text-console>.disable-window
<text-console>.no-window
- Description
-
This command is deprecated, use <text-console>.open instead.
Show/hide the console window.
-
<text-console>.info
- Synopsis
-
<text-console>.info
- Description
-
Print detailed information about the configuration of the device.
-
<text-console>.input
- Synopsis
-
<text-console>.input "string" [delay]
- Description
-
Send string to a text console. The text is delayed by default, to wait
for the simulated software to be ready after a previous break on string.
To input the string immediately, specify delay = 0
-
<text-console>.input-file
- Synopsis
-
<text-console>.input-file file [-binary]
- Description
-
Inputs the contents of file into the text console. If the -binary
flag is specified, the file is treated as a binary file.
-
<text-console>.kbd-abort
- Synopsis
-
<text-console>.kbd-abort
- Description
-
Send a serial line abort signal to the attached device.
This is only useful when the text-console is connected
to a serial device.
-
<text-console>.list-break-strings
- Synopsis
-
<text-console>.list-break-strings
- Description
-
Print a listing of all strings that the console will break on.
- See Also
-
<text-console>.break, <text-console>.unbreak
-
<text-console>.no-window — deprecated
- Synopsis
-
<text-console>.no-window
<text-console>.disable-window
<text-console>.enable-window
- Description
-
This command is deprecated, use <text-console>.close instead.
Show/hide the console window.
-
<text-console>.open
- Synopsis
-
<text-console>.open
- Description
-
Open the console window
- See Also
-
<text-console>.quiet, <text-console>.close
-
<text-console>.playback-start
- Synopsis
-
<text-console>.playback-start filename
- Description
-
Starts generating bus traffic from a specified file. The file should consist of data and delay specifications in a "command: data" format. Examples:
Delay: 0.345 will delay 345 milliseconds
Hexdata: 72 6f 6f 74 0a will send the string "root\n" to the connected device. Unrecognised lines are ignored.
- See Also
-
<text-console>.playback-stop
-
<text-console>.playback-stop
- Synopsis
-
<text-console>.playback-stop
- Description
-
Stop bus traffic generation previously started with playback-start.
- See Also
-
<text-console>.playback-start
-
<text-console>.quiet
- Synopsis
-
<text-console>.quiet
<text-console>.disable-quiet
<text-console>.enable-quiet
- Description
-
This command toggles if text-console output is redirected to the Simics
console when the console window is closed. See also the
<text-console>.capture-start command.
- See Also
-
<text-console>.close, <text-console>.capture-start
-
<text-console>.read-only
- Synopsis
-
<text-console>.read-only
- Description
-
Toggle the read-only mode in the console. Console input is only accepted if the
console is in read/write mode. If the console is in read-only mode, all input
is discarded, except input generated by the <text-console>.insert command.
- See Also
-
<text-console>.input
-
<text-console>.record-start
- Synopsis
-
<text-console>.record-start
- Description
-
Start recording of output on the console. All previously
recorded output will be discarded. The recorded string can
be read with the record-stop command.
- See Also
-
<text-console>.record-stop
-
<text-console>.record-stop
- Synopsis
-
<text-console>.record-stop
- Description
-
Stop recording of output on the console, and return the recorded string.
- See Also
-
<text-console>.record-start
-
<text-console>.status
- Synopsis
-
<text-console>.status
- Description
-
Print detailed information about the current status of the device.
-
<text-console>.switch-to-serial-link
- Synopsis
-
<text-console>.switch-to-serial-link "linkname"
- Description
-
Replace the text-console with a serial link. Another serial port, possibly
in another Simics session can connect to the other end of the link.
-
<text-console>.switch-to-server-console
- Synopsis
-
<text-console>.switch-to-server-console port
- Description
-
Replace the text console with a server console used for
telnet connections. The argument port is
the port number that a telnet client can connect to.
-
<text-console>.unbreak
- Synopsis
-
<text-console>.unbreak "string"
- Description
-
Stop breaking on specified string.
- See Also
-
<text-console>.break, <text-console>.list-break-strings
-
<text-console>.unbreak-id
- Synopsis
-
<text-console>.unbreak-id id
- Description
-
Remove the breakpoint with specified id.
- See Also
-
<text-console>.break, <text-console>.list-break-strings
-
<text-console>.wait-for-string
- Synopsis
-
<text-console>.wait-for-string "string"
- Description
-
Wait for the output of the text string on the
console. This command can only be run from a script branch
where it suspends the branch until the string has been
found in the output.
- See Also
-
<text-console>.break, script-branch, wait-for-variable, wait-for-hap, <text-console>.wait-for-string, <processor>.wait-for-cycle, <processor>.wait-for-step
VIRTUTECH CONFIDENTIAL Previous - Up - Next