Simulink Verification and Validation

How to Include Linked Requirements Details in Generated Report

The requirements report is a feature in RMI that scans the Simulink model for links to external requirements documents and generates a report. When documents are available for reading during requirements report generation, you have an option to insert referenced document fragments into the generated content to produce a more detailed report.

Open Example Model and Load RMI Links Data.

This example uses the Power Window Controller model and relies on an externally stored set of links. See Managing Requirements Without Modifying Simulink Model FilesManaging Requirements Without Modifying Simulink Model Files example for a detailed demonstration of external storage feature in RMI.

Please run the following commands to

rmidata.default(true);
open_system('slvnvdemo_powerwindowController');
reqLinksFile = fullfile(matlabroot, 'toolbox', 'slvnv', 'rmidemos', 'powerwin_reqs', 'slvnvdemo_powerwindowOffice.req');
rmidata.map('slvnvdemo_powerwindowController', reqLinksFile);
Mapping /mathworks/devel/bat/BR2014bd/build/matlab/toolbox/slvnv/rmidemos/slvnvdemo_powerwindowController.slx to /mathworks/devel/bat/BR2014bd/build/matlab/toolbox/slvnv/rmidemos/powerwin_reqs/slvnvdemo_powerwindowOffice.req
Loading RMI data from /mathworks/devel/bat/BR2014bd/build/matlab/toolbox/slvnv/rmidemos/powerwin_reqs/slvnvdemo_powerwindowOffice.req

Navigate Links to See Target Content in Documents

Highlight the modelHighlight the model to locate objects with links and navigate to documents. Included links demonstrate several possible styles of linking with Microsoft Office documents:

rmi('highlightModel', 'slvnvdemo_powerwindowController');

Requirements Report without Document Fragments

  • Generate a reportGenerate a report. This may take a bit longer on the first run.

  • Note that the tables in the report include only short labels of links. These are the same string labels you see in the object context menus and in the Link Editor dialog box.

Requirements Report with Documents Content Inserted

  • When the target location in Microsoft Word is a subheader, child content is included in generated report. Use this feature with caution: linking to a major subheader in the document could mean large amounts of text are copied from the document into the report.

  • When the target location is a range of cells in Microsoft Excel, the target worksheet fragment is inserted in the report.

  • When the target location is a single cell in Microsoft Excel worksheet, the content of cells to the right of the target cell is also inserted into the report.

Include IBM Rational DOORS Attributes in RMI Report

For users linking with IBM Rational DOORS, RMI provides more control over which object attributes to include in the requirements tables.

  • The default configuration will include DOORS Object Heading, DOORS Object Text and all other attributes except: "Created Thru", all attributes with empty string values, and system attributes that are false.

  • The list of attribute names to include in generated report is stored as part of RMI settings under user prefdir.

  • Use the RptgenRMI.doorsAttribs utilityRptgenRMI.doorsAttribs utility to include/exclude certain attributes and/or groups of attributes.

current_settings = RptgenRMI.doorsAttribs('show')
help RptgenRMI.doorsAttribs
current_settings = 

    'Object Heading'
    'Object Text'
    '$AllAttributes$'
    '$NonEmpty$'
    '-Created Thru'

 RESULT = RptgenRMI.doorsAttribs(ACTION, ARG)
  API for selecting which DOORS attributes to include in generated
  requirements report when the "Include details from linked documents"
  option in the Requirements Settings is enabled.
 
  Returned RESULT indicates whether the current setting was modified,
  except for the 'show' action, where RESULT is a cell array of the
  currently configured items.
  
  'add' and 'remove' ACTIONS allow you to add or remove attribute named ARG
 
  Use TYPE actions to include/exclude groups of attributes. Valid ARG
  values are 'all', 'user' or 'none'.
 
  Attributes with empty string values are skipped by default to save space
  in generated requirements tables. Use the 'nonempty' ACTION to set the 
  empty value filter 'on' or 'off' for user-defined attributes only.
 
  Use 'show' to query the currently configured set of attributes. Use
  'default' to restore the default state.
 
  Examples:
 
     >> RptgenRMI.doorsAttribs('default');
     >> RptgenRMI.doorsAttribs('show')
  
  ans = 
  
      'Object Heading'
      'Object Text'
      '$AllAttributes$'
      '$NonEmpty$'
      '-Created Thru'
 
  where macro entries are labeled with '$', explicitly added attribute
  names are prefixed with '+' and explicitly excluded attribute names are
  prefixed with a '-'.  The default configuration will include DOORS Object
  Heading, DOORS Object Text, and all other attributes, except "Created
  Thru", attributes with empty string values, and system attributes that
  are false.
 
  To limit the list of attributes to a user-defined subset:
 
     >> RptgenRMI.doorsAttribs('type', 'user')
  
  To exclude "Last Modified By" attribute:
 
     >> RptgenRMI.doorsAttribs('remove', 'Last Modified By')
 
  To include "Last Modified On" attribute, even when system attributes are
  not included as a group:
 
     >> RptgenRMI.doorsAttribs('add', 'Last Modified On')
 
  To turn OFF the "empty value" filter for user-defined attributes:
 
     >> RptgenRMI.doorsAttribs('nonempty', 'off')
 
  If the link label is always the same as the Object Heading for the target
  DOORS object and you do not want to duplicate the information in the
  report, skip the Object Heading:
 
     >> RptgenRMI.doorsAttribs('remove', 'Object Heading')
 

Cleanup

Steps in this example might have created files inside the examples folder and modified your stored mapping of .req file names. Click to cleanupClick to cleanup.

close_system('slvnvdemo_powerwindowController', 0);  % close demo model, discard changes if any
tmpfilepath = fullfile(matlabroot, 'toolbox', 'slvnv', 'rmidemos', 'slvnvdemo_powerwindowController.mdl');
rmidata.map(tmpfilepath, 'clear');     % forget mdl-to-req mappings
clear tmpfilepath;
Nothing to clear for /mathworks/devel/bat/BR2014bd/build/matlab/toolbox/slvnv/rmidemos/slvnvdemo_powerwindowController.mdl