4. The Reactis for C Top-Level Window#

The next several chapters of this manual contain detailed descriptions of different components of Reactis for C. This chapter concentrates on the functionality available in the top-level window when Simulator is turned off, or disabled. Simulator is disabled when Reactis for C is first invoked; it may also be explicitly turned off by clicking button simOffBtn (window item 11 in Figure 4.1. Clicking button simOnBtn (window item 12) turns Simulator on; the functionality of the Simulator-on mode is described in the Reactis Simulator chapter.

_images/topWin.png

Fig. 4.1 The Reactis for C top-level window.#

4.1. Labeled Window Items#

An annotated screen shot of the Reactis for C top-level window may be found in Figure 4.1. This section describes the functionality of the numbered items in this figure, while the section following discusses the workings of the pull-down menus.

The numbers below refer to the labels in Figure 4.1.

  1. The hierarchy panel shows the C files in the project and how they are related. Clicking on the openSubtreeBtn to the left of an item expands the tree to display the subcomponents of the item. Clicking on the closeSubtreeBtn to the left of an item shrinks the tree by hiding the subcomponents of the item. Clicking on the name of a file displays the file contents in the main panel (window item 2). Pressing the [F2] key causes the parent of the currently displayed item to be displayed.

    Right-clicking on an item in the hierarchy panel opens a pop-up menu from which the item can be edited. Note that editing is only allowed when Simulator is disabled.

  1. The main panel displays the currently selected C code or build file. You may interact with the main panel in a number of different ways using the mouse including hovering, double-clicking on items, or right-clicking in various parts of the panel. Some operations in the main panel are only available when Simulator is enabled (see the Reactis Simulator chapter for a description of those operations). The following mouse operations are available when Simulator is disabled:

    When a build file is displayed in the main panel, clicking…
    • on the Edit link in the project heading will open the Reactis Build File Editor to modify the .h file which defines the project.

    • on a C file name will display the file contents in the main panel.

    • on the Edit link next to a file name will open the file in the editor of your choice. See the General Settings section for instructions on how to specify which editor to use.

    When a C source file is displayed in the main panel, left-clicking…
    When a C source file is displayed in the main panel, right-clicking…
    • on a line number will open a pop-up menu which lists options for adding and editing instrumentation code. See the Editing Instrumentation Code section for more details.

    • on a line of source code containing a #include directive allows the included file to opened. See the Viewing Header Files section for more details.

    When a C source file is displayed in the main panel, double-clicking…
    • on a line of source code containing a #include directive opens the included file. See the Viewing Header Files section for more details.

    • on a line of code which does not contain a #include directive opens a window which contains a copy of the text which is displayed when hovering.

    When the C source code is too big to display completely in the main panel, scroll bars appear for repositioning. Alternatively, the diagram may be repositioned by left-clicking and dragging in the panel or by using the cursor keys. If your mouse includes a scroll wheel, then you may scroll vertically by clicking in the main panel and then using the scroll wheel.

    One final note: pressing the [F2] key within this panel causes the parent of the currently displayed item to be displayed.

  2. Create a new Reactis build file.

  3. Open an existing Reactis build file.

  4. Edit the currently selected Reactis build file or C file.

  1. Undo the most recent change to the instrumentation code.

  2. Redo the most recent change to the instrumentation code.

  3. Go back in the history of displayed items.

  4. Go forward in the history of displayed items.

  5. Display the parent of the currently displayed item.

  1. Disable Simulator.

  1. Enable Simulator.

4.3. Reactis for C Global Settings#

Selecting File > Global Settings… opens the Reactis for C Global Settings dialog, from which the behavior of Reactis for C can be adjusted. The settings are partitioned into four groups: General, C Code, User Info, and License. Each group is displayed in a separate tabbed pane as described below.

4.3.1. General Global Settings#

The General pane, shown in Figure 4.2 includes the following items.

_images/settingsGeneralTab.png

Fig. 4.2 The General pane of the Global Settings dialog.#

GUI Language.

Language used in the Reactis for C GUI.

Source file encoding.

Character set encoding used by source files.

When creating a test suite, also create a parameters file (extension .rtp).

Instructs Reactis Tester to store launch parameters and the .rsh file used for a given run in a Reactis Tester Parameter file (.rtp file ). Subsequently:

  • the .rsh file may be extracted from the .rtp file by selecting File > Extract Harness Library…;

  • the Tester parameters may be loaded into the Tester launch dialog by clicking the Load button.

Re-running Tester with the same .rsh file and same parameters on the same project will regenerate the test suite produced by the original Tester run.

Allow connections between Reactis and Reactis for C.

If enabled, Reactis for C will show the File > Connect to Reactis for Simulink and File > Disconnect from Reactis for Simulink menu items. See the Linking with Reactis for Simulink chapter for more information on this functionality.

Automatically check for updates (once a day).

Instructs Reactis for C to check once per day whether updates to Reactis for C are available for download. If updates are found you will be asked if you would like to download and install the patch. To the right of this check box, the Proxy button summons a dialog from which a proxy server for Reactis updates is specified, and the Check Now button performs an immediate check for updates. Note: this feature can be disabled at install time; in which case this check box, the Proxy button, and Check Now button will not appear in the dialog.

Use z3 solver

Checking this setting improves the coverage of Tester-generated tests for some models and also improves the static analysis that identifies unreachable coverage targets.

Enable logging

Enables logging, specify a log level, and indicate the file to which the log should be written. Note that logging degrades performance and can create very large log files; therefore, it is typically only used to diagnose problems. The log level string will by provided by the Reactis support team if you are asked to create a log file.

4.3.2. C Code Global Settings#

_images/settingsCCodeTab.png

Fig. 4.3 The C Code pane of the Global Settings dialog.#

Figure 4.3 shows the C Code pane of the Reactis for C settings dialog. The numbered items in this figure configure the behavior of Reactis for C as follows:

  1. Display line numbers. Toggle the display of line numbers in the main Reactis panel when displaying C source files. The Background Color button allows you to select the background color of screen region where the line numbers are displayed.

  2. Display line grid. Toggle the highlighting of every other line with a contrasting background color. The Background Color button allows you to select which color is used.

  3. Highlight instrumentation line numbers. Enables the highlighting of the line numbers of source code lines which contain instrumentation code with a contrasting background color. The Text Color button allows you to select which color is used.

  4. Highlight instrumentation code. Toggle the highlighting of source lines which contain instrumentation code with a contrasting background color. The Text Color button allows you to select which color is used.

  5. Highlight comments. Toggle the highlighting of comments in the source code with a contrasting text color. The Text Color button allows you to select which color is used.

  6. Highlight inactive code. Toggle the highlighting of code which was disabled by a conditional compilation directive such as #ifdef with a contrasting text color. The Text Color button allows you to select which color is used.

  7. Source File Editor. The editor which will be used to edit C source files.

  8. Default Target Architecture. The default architecture to be used when executing C code. Possible values are 32-Bit Little Endian or 32-Bit Big Endian. See the Target Architecture section for details.

4.3.3. User Info Global Settings#

The User Info pane is shown in Figure 4.4. When Reactis for C is configured to use a remote license server as described in the next section, info contained in this panel is submitted to the server when Reactis for C is started, and available to all users who have access to the server.

_images/settingsUser.png

Fig. 4.4 The User Info pane of the Global Settings dialog.#

The following items are labeled in Figure 4.4:

  1. Name. The name of the person who is using the currently running instance of Reactis for C.

  2. Phone. The phone number of the person who is using the currently running instance of Reactis for C.

4.3.4. License Global Settings#

The list of users occupying licenses at a given time may be obtained using the License pane of the Global Settings dialog as described below, or using the standalone License Monitor utility included in the Reactis License Manager distribution. This utility may be invoked from the Windows Start menu.

The License pane, shown in Figure 4.5, enables you to query and specify license configuration information. The first two sections display the MAC address of the machine on which Reactis is running and the location of a local license file if one is in use.

The third section of the pane displays a list of servers running the Reactis License Manager. When Reactis is invoked, this list will be searched from top to bottom for an available license. The lowest portion of the pane displays a list of users currently using licenses for the License Manager/product currently selected License servers list.

_images/settingsLicenseTab.png

Fig. 4.5 The License pane of the Global Settings dialog.#

Each of the window items labeled in Figure 4.5 is interpreted and used as follows.

  1. The MAC address of the computer on which the Reactis for C is running.

  2. Information about the contents of the local license file. If there is a problem with the license file, then a description of the error condition is listed here. If no problem exists, then a list of licensed products and their expiration dates is given.

  3. This is the list of servers running the Reactis License Manager. Each entry in the list includes the following:

    Host

    The name or IP address of the server running the License Manager.

    Status

    The status of the connection to the License Manager.

    For each product managed by the server:

    Product

    Name of the product (Reactis, Reactis for C Plugin, or Reactis for C).

    Total

    The total number of licenses for the product.

    In Use

    The number of currently occupied licenses for the product.

  4. Add a new License Manager to the list.

  5. Remove the currently selected License Manager from the list.

  6. Log in to the License Manager.

  7. Log out of the License Manager.

  8. Change the password of the current user that is logged in.

  9. Clear the saved password for the current user, requiring the user to enter password on next attempt to login.

  10. Move the currently selected License Manager up one spot in the list, down one spot in the list, to the top of the list, or to the bottom of the list. These buttons are only enabled when the list contains more than one License Manager.

  11. Information regarding the currently selected License Manager is displayed here. If there is a problem with the connection to the License Manager, then a description of the error condition is listed here. If no problem exists, then for each license currently occupied, this section lists:

    IP Address

    The IP address of the computer on which the Reactis application occupying the license is running.

    Name

    The contents of the Name field in the User Info pane of the person occupying the license.

    Phone

    The contents of the Phone field in the User Info pane of the person occupying the license.

    Duration

    The length of the time this computer has been holding the license.

  12. The username for the user that is logged in.

  13. Check box to activate the release of a floating license that is idle for a predetermined number of minutes.

  14. View the Reactis License Manager documentation.

  15. Close the window and save changes made to the list of monitored servers.

  16. Close the window without saving any changes made to the list of monitored servers.

4.4. Default Harness Library Settings#

The Default Harness Library Settings dialog lets you specify default settings to be used when creating new .rsh files. Whenever a new .rsh file is created, these settings are imported into the new .rsh file. Subsequently the settings for a harness library are modified using the Reactis Harness Editor. The dialog includes the following tabbed panes:

General

settings which control how a program is executed.

Error Checking

settings which specify when errors should be flagged (overflows, NaN values, etc.)

Coverage

settings that specify which coverage metrics are collected for a program under test and how the coverage metrics are configured.

See The Reactis Harness Editor chapter for a description of each setting.

4.5. Viewing Header Files#

In C development, definitions which are shared between multiple .c files are kept in _ header files. A header file traditionally ends has a extension of .h. During a Reactis Session, there will likely be times where you wish to view the contents of a header file. For example, you might wish to check a type definition or the compiler might report an error which occurred at a particular spot within a header file. There are several ways to open a header file in Reactis:

  • Double-clicking on a line of code containing a #include directive.

  • Highlighting an error or warning which occurs within a header file.

  • Selecting View > Open Header File… from the Reactis menu.

_images/headers.png

Fig. 4.6 Viewing currently open header files in Reactis for C.#

All open header files are listed under an item named ** Headers ** in the hierarchy panel, as shown in Figure 4.6. A header file may be closed by right-clicking on its name in the hierarchy panel and selecting ** Close Header File **. To close all open header files, you can either right-click on ** Headers ** in the hierarchy panel and select ** Close All Header Files **, or you can select ** View ** / ** Close All Header Files ** from the Reactis menu.