The status bar shows the simulation's progress. It contains two rows, the second of which can be hidden using the View|Status Details menu item.
The first row contains the following items:
delete msg
statements, and needs to be debugged.
When the simulation is paused or runs with animation, the second row displays the next expected simulation event. Note the word expected: certain schedulers may insert new events before the displayed event in the last moment. Some schedulers that tend to do that are those that accept input from outside sources: real-time scheduler, hybrid or hardware-in-the-loop schedulers, parallel simulation schedulers, etc. Contents of the second row:
When the simulation is running, displaying the next event becomes meaningless, and second row is replaced by the following performance gauges:
The timeline displays the contents of the Future Events Set on a logarithmic time scale. Each dot represents a message (event).
Clicking an event will focus it in the Object Inspector, and double-clicking will open a floating inspector window. Right-clicking will bring up a context menu with further actions.
The timeline is often crowded, limiting its usefulness. To overcome this, you can hide uninteresting events from the timeline: right-click the event, and choose Exclude Messages Like 'x' from the Animation from the context menu. This will hide events with same name and C++ class name from the timeline, and also skip the animation when such messages are sent from one module to another. You can view and edit the list of excluded messages on the Filtering page of the Preferences dialog. (Tip: the timeline context menu provides a shortcut to that dialog).
The timeline can be hidden (and revealed again) using the View|Timeline menu item.
The Object Navigator displays inspectable objects reachable from two root objects (the network module and the FES) in a tree form.
Clicking an object will focus it in the Object Inspector, and double-clicking will open a floating inspector window. Right-clicking will bring up a context menu with further actions.
The Object Inspector is located below the Object Navigator, and lets you examine the contents of objects in detail. The Object Inspector always focuses on the object last clicked (or otherwise selected) on the Tkenv UI. It can be directly navigated as well, via the Back, Forward, and Go to Parent buttons, and also by double-clicking objects shown inside the inspector's area.
The inspector features a tabbed interface with two pages: Fields and Contents. The Fields page shows the fields (or data members) of the object, organized in categories. It uses meta-information generated by the message compiler to obtain the list of fields and their values. (This is true even for the built-in classes -- the simulation kernel contains their description of msg format.)
The Contents page lists the child objects of the currently inspected object.
The child list is obtained via the forEach()
method of the object.
The network view provides a graphical view of the network and in general, modules.
Graphical representation is based on display strings (@display
properties in the
NED file). You can go into any compound module by double-clicking its icon.
Message sending, method calls and certain other events are animated in the graphical view. You can customize animation in the Animation page of the Preferences dialog.
The context menu of submodules makes further actions available (see below).
There are several ways for zooming the canvas, both using the mouse and the keyboard:
Use Ctrl+M to zoom in, Ctrl+N to zoom out; the same functionality is also available in the canvas toolbar
To zoom in around a point, double-click the canvas; use Shift + double-click to zoom out
For marquee zoom, drag out a rectangle with the left mouse button while holding down Ctrl; you can cancel the operation with the right mouse button.
Panning: moving the mouse while holding down the left mouse button will move the canvas; this is often a more comfortable way to navigate the canvas than using the scroll bars.
When you run the simulation, Tkenv will remember the output from logging statements
(EV << "Hello World\n";
) and the messages sent between modules, and can present
it to you in a meaningful manner. Only the output from the last N events is preserved
(N being configurable in the Preferences dialog), and only in Step, Run and Fast Run
modes. (Express mode can be so fast because such overhead is turned off while it's active.)
The Log Viewer shows log related to one compound module and its subtree. It has two modes: Messages and Log mode, the default being Messages. You can switch between the two modes with tool icons on the inspector's local toolbar.
In Messages mode, the window displays messages sent between the (immediate) submodules of the inspected compound module, and messages sent out of, or into the compound module.
cMessagePrinter
class.
In Log mode, the window displays log lines that belong to submodules under the inspected compound module (i.e. the whole module subtree.)
You can filter the content of the window to only include messages from specific modules. Open the log window's context menu and select Filter Window Contents.
General logging behavior can be controlled in the Preferences dialog.
It is also possible to open separate log windows for individual modules. A log window for a compound module displays the log from all of its submodule tree. To open a log window, find the module in the module tree or the network display, right-click it and choose Open Component Log from the context menu.