VIRTUTECH CONFIDENTIAL Previous - Up - Next
server-console
- Provided by
-
server-console-c
- Class Hierarchy
-
conf-object → log-object → server-console
- Interfaces Implemented
-
log_object, serial_device, event_poster
- Description
-
Class allowing telnet access to a simulated serial port.
Attributes
- Attributes inherited from class conf-object
-
attributes, classname, component, iface, name, object_id, queue
- Attributes inherited from class log-object
-
access_count, log_buffer, log_buffer_last, log_buffer_size, log_group_mask, log_groups, log_level, log_type_mask
- Attribute List
-
- break_string
- Pseudo attribute; read/write access; type: s|[[s[i]+]*].
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: Integer.
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.
- buffer_until_connection
- Optional attribute; read/write access; type: Integer.
If non-zero, the console will buffer any output until a client connects. If zero, such output will be discarded.
- data_in
- Optional attribute; read/write access; type: [i*].
Characters received by the server but not yet delivered to the simulated serial port.
- device
- Required attribute; read/write access; type: Object or Nil.
Serial device the server is connected to.
- input
- Optional attribute; read/write access; type: s|[di].
Keyboard input queue.
- 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: Integer.
Position in the keyboard input queue where new input is stored.
- output_buffer
- Optional attribute; read/write access; type: [i*].
Characters transmitted by the simulated serial port, but not yet written out by the server. If buffer_until_connection is non-zero, then this attribute contains everything written out on the simulated serial port.
- port
- Required attribute; read/write access; type: Integer.
TCP port for server.
- raw
- Optional attribute; read/write access; type: Integer.
If set to nonzero, will not interpret telnet escapes or otherwise change the bytes transmitted in either direction.
- 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.
Command List
- Commands defined by interface log_object
-
log, log-group, log-level, log-size, log-type
- Commands
-
Command Descriptions
-
<server-console>.break
- Synopsis
-
<server-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
-
<server-console>.capture-start
- Synopsis
-
<server-console>.capture-start filename
- Description
-
Capture all output from the console to a file.
- See Also
-
<text-console>.capture-stop
-
<server-console>.capture-stop
- Synopsis
-
<server-console>.capture-stop
- Description
-
Stop capturing all output from the console.
- See Also
-
<text-console>.capture-start
-
<server-console>.info
- Synopsis
-
<server-console>.info
- Description
-
Print detailed information about the configuration of the device.
-
<server-console>.input
- Synopsis
-
<server-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
-
<server-console>.input-file
- Synopsis
-
<server-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.
-
<server-console>.kbd-abort
- Synopsis
-
<server-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.
-
<server-console>.list-break-strings
- Synopsis
-
<server-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
-
<server-console>.playback-start
- Synopsis
-
<server-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
-
<server-console>.playback-stop
-
<server-console>.playback-stop
- Synopsis
-
<server-console>.playback-stop
- Description
-
Stop bus traffic generation previously started with playback-start.
- See Also
-
<server-console>.playback-start
-
<server-console>.record-start
- Synopsis
-
<server-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
-
<server-console>.record-stop
- Synopsis
-
<server-console>.record-stop
- Description
-
Stop recording of output on the console, and return the recorded string.
- See Also
-
<text-console>.record-start
-
<server-console>.status
- Synopsis
-
<server-console>.status
- Description
-
Print detailed information about the current status of the device.
-
<server-console>.switch-to-serial-link
- Synopsis
-
<server-console>.switch-to-serial-link "linkname"
- Description
-
Replace the server-console with a serial link. Another serial port, possibly
in another Simics session can connect to the other end of the link.
-
<server-console>.switch-to-text-console
- Synopsis
-
<server-console>.switch-to-text-console
- Description
-
Replace the server console with a standard text console.
-
<server-console>.unbreak
- Synopsis
-
<server-console>.unbreak "string"
- Description
-
Stop breaking on specified string.
- See Also
-
<text-console>.break, <text-console>.list-break-strings
-
<server-console>.unbreak-id
- Synopsis
-
<server-console>.unbreak-id id
- Description
-
Remove the breakpoint with specified id.
- See Also
-
<text-console>.break, <text-console>.list-break-strings
-
<server-console>.wait-for-string
- Synopsis
-
<server-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