02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Tornado</strong> 2.0<br />

User’s Guide<br />

w() – print a summary of each task’s pending information, task by task (*)<br />

wdShow( ) – show information about a watchdog<br />

SYNOPSIS<br />

DESCRIPTION<br />

C Interpreter<br />

Tcl Interpreter<br />

Built-in Routines<br />

windsh [-c.plus C++_library] [-e.xecute expression] [-h.elp]<br />

[-n.oinit] [-p.oll value] [-q.uiet] [-s.tartup file]<br />

[-T.clmode] [-v.ersion] serverIdentifier<br />

WindSh is the <strong>Tornado</strong> shell. The shell provides remote interactive access to the target<br />

run-time system through both a C interpreter and a Tcl interpreter.<br />

The shell attaches to the target server specified by serverIdentifier (see tgtsvr).<br />

To execute a list of commands when the shell starts, collect these commands in a file<br />

(startup script) and identify the file with the -s option.<br />

The shell has vi-like editing capabilities and a history mechanism. The ESC key acts as a<br />

toggle between input mode and edit mode. History and editing capabilities are available<br />

regardless of which interpreter is in use.<br />

The shell’s C interpreter (prompt: > ) can execute almost any expression using C<br />

operators, and can invoke compiled C functions on the target. Symbols are created as<br />

needed for shell expressions, and are added incrementally to the target symbol table.<br />

Interactive sessions use the C interpreter by default.<br />

The shell’s Tcl interpreter (prompt: tcl> ) executes Tcl functions, including both functions<br />

based on the WTX protocol and user-provided Tcl procedures. To enter the Tcl interpreter<br />

directly for an interactive session, start windsh with the option -T.<br />

The Tcl interpreter can also call C functions in the target; however, to establish the proper<br />

C environment for such calls you must use the shParse Tcl command. For example:<br />

tcl> shParse sysClkRateGet()<br />

60<br />

When the Tcl interpreter does not recognize a command, it passes it to the UNIX shell or<br />

the Windows command processor.<br />

The <strong>Tornado</strong> shell includes a set of built-in routines. These routines are executed on the<br />

host, not in the context of the remote run-time. They are available from both the C<br />

interpreter and the Tcl interpreter. The most important built-in routines are i( ), ti( ), d( ),<br />

l(), ts(), tr( ), td( ), ld( ). In Tcl mode, type:<br />

tcl> set shellProcList<br />

to get the complete list of built-in functions.<br />

Non-interactive Sessions<br />

windsh can be used in non-interactive sessions, by simply providing input on its standard<br />

input stream. For example:<br />

370

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!