The target-server architecture of Tornado permits great flexibility, but also introduces a number of housekeeping details to manage situations like the following:
The Target menu in the Tornado Launcher offers commands that allow you to manage these chores and related details to do with target servers. The small buttons immediately below the menu bar provide quick access to the same commands.
The following list describes each button and Target menu command:
|
|||||||||||||||||||
Define and start up a new target server. See 3.5.1 Configuring a Target Server. |
|||||||||||||||||||
Remove the selected target server from the Tornado registry's list of available servers. Do not use this command routinely. Under most circumstances, the registry automatically removes the entry for any target server that has been killed (for example, due to a host system crash). This command can also be used to do so. The registry honors the Unregister command only if the server does not respond to the registry. CAUTION: Even if a target server is not responsive, it is not always appropriate to unregister it; the server may simply be too busy to respond, or a heavy network load may be interfering. The Unregister command reminds you of this possibility and requests confirmation before it takes effect. Make sure the server is really gone before you unregister it. |
|||||||||||||||||||
Reconnect the selected target server to the underlying target. This command is rarely necessary, because target servers attempt to reconnect automatically when required. Use this command after turning on or connecting a target that has been unavailable, if you want to reattach a running server explicitly (rather than by running a tool). |
|||||||||||||||||||
Restrict a target to your own use, or share it with others. See 3.5.2 Sharing and Reserving Target Servers. |
|||||||||||||||||||
Share a target with others. See 3.5.2 Sharing and Reserving Target Servers. |
|||||||||||||||||||
Kill the currently selected target server. CAUTION: Close any tool sessions that use a particular target before you kill that target server. Killing a target server does not immediately destroy any attached tools, but the tools lose the ability to interact with the target. There is no way to reconnect a new target server to such orphaned tool sessions. |
|||||||||||||||||||
Re-initialize the selected target server and reboot its target. |
|||||||||||||||||||
|
|||||||||||||||||||
To use a new target, you must first ensure the host and target are connected properly. The details are unique to each target, but 2.4.2 Networking the Host and Target discusses some of the issues that are frequently involved. Your BSP also contains a target-information reference that describes what to do for that particular target. See Help>Manuals contents>BSP Reference.
To configure and launch a target server, select Create from the Target menu, or press the launcher's button. The launcher displays the form shown in Figure 3-4. Many configuration options are available, but you can often skip all the optional parameters, specifying only the target name (and perhaps the serial device, if your target agent is configured for the WDB serial protocol).
Each time you specify a configuration option, the Target server launch command box near the bottom of the form is updated automatically to show the tgtsvr command options that capture your chosen configuration. (For text fields, the command line is updated when you select another field or press RETURN.) The tgtsvr command is the underlying command that runs in the background for each target server as a UNIX daemon. The text in the Target server launch command box can be edited. Its display has the following uses:
To start a target server and save your server configuration, press the Launch button at the bottom of the Create Target Server form.
If a server does not respond when you select it, kill it ( ) and try turning on the Verbose toggle near the middle of the Create Target Server form to display diagnostic messages when you start it again.
For targets with network connectivity, only one field is required. Fill in the IP address or network name for the target, in the box headed Target name or IP address. After filling this in, you can launch a server immediately. The launcher saves each configuration automatically (identified with the target-server name); thus, you can retrieve a server's configuration later to add more options.
If your target agent is configured for the WDB serial protocol, you must specify what UNIX device name is connected to the target, in the Serial line device box (entering the device name automatically selects wdbserial as the back end in the Backend list field). You must also fill in a name for the target server in the Target name or IP address box; in this case, the name is completely arbitrary, and is used only to identify your target server.
Specifying the serial line speed is not required if you use the default speed of 9600 bps. However, it is best to use the fastest possible line speed when controlling your target over serial lines. Select the fastest speed your target hardware supports from the scrolling list headed Serial line speed. (The target agent must be compiled with the same speed selected; see Configuration for Serial Connection.)
Each time you press the Launch button, the launcher saves the server configuration. The configuration name is the same name used to register the target server: the contents of the Target name or IP address box, or the name specified under Target server name, if you use this box to define a different name for your server.1
The following controls are available to manage saved configurations:
The command buttons at the bottom of the Create Target Server form perform the following functions (see Figure 3-4):
This section describes all the configuration options you can specify in the Create Target Server form(Figure 3-4), in the order they appear (left to right and top to bottom).
/usr/windview/logfiles
When a target server is available to anyone, its status (shown in the Information panel of the main launcher window; see Figure 3-3) is unreserved. Any user can attach a tool to the target, and any user can also restrict its use.
When you configure a target server, you can arrange for the server to be exclusively available to your user ID every time you launch it, by clicking the Lock toggle in the Create Target Server form. See 3.5.1 Configuring a Target Server. Target servers launched this way have the status locked.
If a target server is not locked by its creator, and if no one else has reserved it, you can reserve the target server for your own use: click on Target>Reserve, or on the launcher button. The target status becomes reserved until you release the target with the Unreserve command ( ). Unreserve on a target that is not reserved has no effect, nor does Unreserve on a target reserved or locked by someone else.
This simple reserve/unreserve locking mechanism is sufficient for many development environments. In some organizations, however, it may be necessary to further restrict some targets to a particular group of users. For example, a Q/A organization may need to ensure certain targets are used only for testing, while still using the reserve/unreserve mechanism to manage contention within the group of testers.
To restrict a target server to a list of users, create a list of authorized users in a file. The format for the file is the simplest possible: one user name per line. The user names are host sign-on names, as used by system files like /etc/passwd (or its network-wide equivalent). You can also use one special entry in the authorization file: a plus sign + to explicitly authorize any user to connect to the target server. (This might be useful to preserve the link between a target server and an authorization file when access to that target need only be restricted from time to time.)
To link an authorization file to a target server, specify the file's full pathname in the Authorized users file box of the Create Target Server screen (see Figure 3-4).
1: Data for each saved configuration is stored in a file with the same name as the configuration, in the directory .wind/tgtsvr under your home directory.
2:
You can also create a virtual console from any Tornado tool using Tcl, with
wtxConsoleCreate. See Tornado API Guide: WTX TCL API.
3: To disable the automatic display of log files by the launcher, insert "set noViewers 1" in your ~/.wind/launch.tcl initialization file.
4: Strictly speaking, there is another layer of authorization defining who is meant by "any user". The file $WIND_BASE/.wind/userlock is a Tornado-wide authorization file, used as the default list of authorized users for any target server without its own authorized-users file. The format of this file is the same format described below for individual target-server authorization files.