The Preferences Dialog

Select File | Preferences... from the menu to display the runtime environment's configuration dialog. The dialog lets you adjust various display, network layouting and animation options.

General

Figure 8.25. General settings

General settings

The General tab can be used to set the default display and logging behavior. It is possible to set how often the user interface will be updated during the simulation run.

Configuring the Layouting Algorithm

Figure 8.26. Layouting settings

Layouting settings

Tkenv provides automatic layouting for submodules that do not have their locations specified in the NED files. The layouting algorithm can be fine-tuned on the Layouting page of this dialog.

Configuring Animation

Figure 8.27. Animation settings

Animation settings

Tkenv provides automatic animation when you run the simulation. You can fine-tune the animation settings using the Animation page of the settings dialog. If you do not need all visual feedback Tkenv provides, you can selectively turn off some of the features:

  • Animate messages: Turns on/off the visualization of messages passing between modules.
  • Broadcast animation: Handles message broadcasts in a special way (messages sent within the same event will be animated concurrently).
  • Show next event marker: Highlights the module which will receive the next event.
  • Show a dotted arrow when a sendDirect() method call is executed.
  • Show a flashing arrow when a method call occurs from one module to another. The call is only animated if the called method contains the Enter_Method() macro.
  • The display of message names and classes can also be turned off.

Timeline and Animation Filtering

Figure 8.28. Filtering

Filtering

The Filtering page of the dialog serves two purposes. First, it lets you filter the contents of the Timeline. You can hide all self-messages (timers), or all non-self messages, and you can further reduce the number of messages shown on the timeline by also hiding the non-animated messages, explained below.

Second, you can suppress the animation of certain messages. For example, when your focus is routing protocol messages, you can suppress the animation of data traffic.

The text box lets you specify several filters, one per line. You can filter messages by name, class name, or by any other property that appears in the Fields page of the Object Inspector when you focus it on the given message object.

Note

When you select Exclude from Animation from the context menu of a message object somewhere in the UI, it will add a new filter on this dialog page.

For object names, wildcards ("?", "*") are allowed. "{a-exz}" matches any character in the range "a".."e" plus "x" and "z". You can match numbers: "job{128..191}" will match "job128", "job129", ..., "job191". "job{128..}" and "job{..191}" are also understood. You can combine patterns with AND, OR and NOT and parentheses (lowercase and, or, not are also acceptable). You can match against other object fields such as message length, message kind, etc. with the syntax "fieldname(pattern)". Put quotation marks around a pattern if it contains parentheses.

Some examples:

  • m* : matches any object whose name begins with "m"
  • m* AND *-{0..250} : matches any object whose name begins with "m" and ends with a dash and a number between 0 and 250
  • not *timer* : matches any object whose name does not contain the substring "timer"
  • not (*timer* or *timeout*) : matches any object whose name contains neither "timer" nor "timeout"
  • kind(3) or kind({7..9}) : matches messages with message kind equal to 3, 7, 8 or 9
  • className(IP*) and data-* : matches objects whose class name begins with "IP" and name begins with "data-"
  • not className(cMessage) and byteLength({1500..}) : matches objects whose class is not cMessage and whose byteLength is at least 1500
  • "or" or "and" or "not" or "*(*" or "msg(ACK)" : quotation marks needed when pattern is a reserved word or contains parentheses (note: msg(ACK) without parentheses would be interpreted as an object having an "msg" attribute with the value "ACK"!).

Configuring Fonts

Figure 8.29. Font selection

Font selection

The Fonts page of the settings dialog lets you select the typeface and font size for various user interface elements.

The .tkenvrc File

Settings are stored in .tkenvrc files. There are two .tkenvrc files: one is stored in the current directory and contains project-specific settings like the list of open inspectors; the other is saved into the user's home directory and contains global settings.

Note

Inspectors are identified by their object names. If you have several components that share the same name (this is especially common for messages), you may end up with a lot of inspector windows when you start the simulation. In such cases, you may simply delete the .tkenvrc file.

Note

Error messages generated by the Tkenv runtime environment are logged to the .tkenvlog file.