Contents

IBM Rational DOORS

Why Add Navigation Objects to DOORS Requirements?

IBM® Rational® DOORS® software is a requirements management application that you use to capture, track, and manage requirements. The Requirements Management Interface (RMI) allows you to link Simulink® objects to requirements managed by external applications, including the DOORS software.

When you create a link from a Simulink object to a DOORS requirement, the RMI stores the link data in Simulink. Using this link, you can navigate from the Simulink object to its associated requirement.

You can also configure the RMI to insert a navigation object in the DOORS database. This navigation object serves as a link from the DOORS requirement to its associated Simulink object.

To insert navigation objects into a DOORS database, you must have write access to the DOORS database.

Configure Requirements Management Interface for DOORS Software

Before You Begin

If you plan to use DOORS software with the RMI, make sure to install additional files to establish communication between the DOORS application and the Simulink software. Follow the instructions in Configure RMI for IBM Rational DOORS or Microsoft ActiveX Navigation.

Manually Install Additional Files for DOORS Software

The setup script automatically copies the required DOORS files to the installation folders. However, the script might fail because of file permissions in your DOORS installation. If the script fails, change the file permissions on the DOORS installation folders and rerun the script.

You can also manually install the required files into the specified folders, as described in the following steps:

  1. If the DOORS software is running, close the application.

  2. Copy the following files from matlabroot\toolbox\slvnv\reqmgt to the <doors_install_dir>\lib\dxl\addins folder.

    addins.idx
    addins.hlp

    If you have not modified the files, replace any existing versions of the files; otherwise, merge the contents of both files into a single file.

  3. Copy the following files from matlabroot\toolbox\slvnv\reqmgt to the <doors_install_dir>\lib\dxl\addins\dmi folder.

    dmi.hlp
    dmi.idx
    dmi.inc
    runsim.dxl
    selblk.dxl

    Replace any existing versions of these files.

  4. Open the <doors_install_dir>\lib\dxl\startup.dxl file. In the user-defined files section, add the following include statement:

    #include <addins/dmi/dmi.inc>

    If you upgrade from Version 7.1 to a later version of the DOORS software, perform these additional steps:

    1. In your DOORS installation folder, navigate to the ...\lib\dxl\startupFiles subfolder.

    2. In a text editor, open the copiedFromDoors7.dxl file.

    3. Add // before this line to comment it out:

      #include <addins/dmi/dmi.inc>

    4. Save and close the file.

  5. Start the DOORS and MATLAB® software.

  6. Run the setup script using the following MATLAB command.

    rmi setup

Enable Linking from DOORS Databases to Simulink Objects

By default, the RMI does not insert navigation objects into requirements documents. If you want to insert a navigation object into the requirements document when you create a link from a Simulink object to a requirement, you must change the RMI's settings. The following tutorial uses the sldemo_fuelsys example model to illustrate how to do this.

To enable linking from the DOORS database to the example model:

  1. Open the model:

    sldemo_fuelsys

      Note:   You can modify requirements settings in the Requirements Settings dialog box. These settings are global and not specific to open models. Changes you make apply not only to open models, but also persist for models you subsequently open. For more information about these settings, see Requirements Settings.

  2. Select Analysis > Requirements Traceability > Settings.

    The Requirements Settings dialog box opens.

  3. Click the Selection Linking tab.

  4. Select Modify destination for bi-directional linking.

    When you enable this option, every time you create a selection-based link from a Simulink object to a requirement, the RMI inserts navigation objects at the designated location. Using this option requires write access to the requirements document.

  5. Select Store absolute path to model file.

    For this exercise, you save a copy of the example model on the MATLAB path.

    If you add requirements to a model that is not on the MATLAB path, you must select this option to enable linking from your requirements document to your model.

  6. In the Apply this user tag to new links field, enter one or more user tags to apply to the links that you create.

    For more information about user tags, see User Tags and Requirements Filtering.

  7. Click Close to close the Requirements Settings dialog box. Keep the sldemo_fuelsys model open.

Insert Navigation Objects into DOORS Requirements

When you enable Modify destination for bi-directional linking as described in Enable Linking from DOORS Databases to Simulink Objects, the RMI can insert a navigation object into both the Simulink object and its associated DOORS requirement. This tutorial uses the sldemo_fuelsys example model to illustrate how to do this. For this tutorial, you also need a DOORS formal module that contains requirements.

  1. Rename the sldemo_fuelsys model and save it in a writable folder on the MATLAB path.

  2. Start the DOORS software and open a formal module that contains requirements.

  3. Select the requirement that you want to link to by left-clicking that requirement in the DOORS database.

  4. In the sldemo_fuelsys model, select an object in the model.

    This example creates a requirement from the fuel_rate_control subsystem.

  5. Right-click the Simulink object (in this case, the fuel_rate_control subsystem) and select Requirements Traceability > Link to Selection in DOORS.

    The RMI creates the link for the fuel_rate_control subsystem. It also inserts a navigation object into the DOORS formal module—a Simulink reference object ( ) that enables you to navigate from the requirement to the model.

  6. Close the model.

    Note:   When you navigate to a DOORS requirement from outside the software, the DOORS module opens in read-only mode. If you want to modify the DOORS module, open the module using DOORS software.

Insert Navigation Objects to Multiple Simulink Objects

If you have several Simulink objects that correspond to one requirement, you can link them all to that requirement with a single navigation object. This eliminates the need to insert multiple navigation objects for a single requirement. The Simulink objects must be available in the same model diagram or Stateflow® chart.

The workflow for linking multiple Simulink objects to one DOORS requirement is as follows:

  1. Make sure that you have enabled Modify destination for bi-directional linking.

  2. Select the DOORS requirement to link to.

  3. Select the Simulink objects that need to link to that requirement.

  4. Right-click one of the objects and select Requirements Traceability > Link to Selection in DOORS.

    A single navigation object is inserted at the selected requirement.

  5. Double-click the navigation object in DOORS to highlight the Simulink objects that are linked to that requirement.

Customize DOORS Navigation Objects

If the RMI is configured to modify destination for bi-directional linking as described in Enable Linking from DOORS Databases to Simulink Objects, the RMI can insert a navigation object into your requirements document. This object looks like the icon for the Simulink software:

    Note:   In IBM Rational DOORS requirements documents, clicking a navigation object does not navigate back to your Simulink object. Select MATLAB > Select object to find the Simulink object that contains the requirements link.

To use an icon of your choosing for the navigation object:

  1. Select Analysis > Requirements Traceability > Settings.

  2. Select the Selection Linking tab.

  3. Select Modify destination for bi-directional linking.

    Selecting this option enables the Use custom bitmap for navigation controls in documents option.

  4. Select Use custom bitmap for navigation controls in documents.

  5. Click Browse to locate the file you want to use for the navigation objects.

    For best results, use an icon file (.ico) or a small (16×16 or 32×32) bitmap image (.bmp) file for the navigation object. Other types of image files might give unpredictable results.

  6. Select the desired file to use for navigation objects and click Open.

  7. Close the Requirements Settings dialog box.

The next time you insert a navigation object into a requirements document, the RMI uses the file you selected.

    Tip   You can specify a custom template for labels of requirements links to DOORS objects. For more information, see the rmi command.

Navigate Between DOORS Requirement and Model Object

In Insert Navigation Objects into DOORS Requirements, you created a link between a DOORS requirement and the fuel_rate_control subsystem in the sldemo_fuelsys model. Navigate the links in both directions:

  1. With the sldemo_fuelsys model closed, go to the DOORS requirement in the formal module.

  2. Left-click the Simulink reference object that you inserted to select it.

  3. Select MATLAB > Select item.

    Your version of the sldemo_fuelsys model opens, with the fuel_rate_control subsystem highlighted.

  4. Log in to the DOORS software.

  5. Navigate from the model to the DOORS requirement. In the Model Editor, right-click the fuel_rate_control subsystem and select Requirements Traceability > 1. "<requirement name>" where <requirement name> is the name of the DOORS requirement that you created.

    The DOORS formal module opens with the requirement object and its child objects highlighted in red.

Diagnose and Fix DXL Errors

If you try to synchronize your Simulink model to a DOORS project, you might see the following errors:

-E- DXL: <Line:2> incorrectly concatenated tokens
-E- DXL: <Line:2> undeclared variable (dmiRefreshModule)
-I- DXL: all done with 2 errors and 0 warnings

If you see these errors, exit the DOORS software, rerun the rmi setup command at the MATLAB command prompt, and restart the DOORS software.

Was this topic helpful?