Requirements Management Interface |
 |
Adding Requirements
After opening an object in the Navigator, you can associate a node in the hierarchical tree with requirements documents. Then you can go from the Navigator to a requirement. You can associate multiple requirements documents with a single node in the tree.
Note
You must have write permission for an object in order to add requirements. Adding a requirement automatically saves the model or M-file.
|
Note
Stateflow allows for multiple transitions at the same level to have the same name. However, the Requirements Management Interface does not support associating requirements documents with transition peers that have the same name. For example, Stateflow, by default, assigns `?' as the transition name. If you add two transitions at the same level you will have two transitions named `?'. Using the Navigator to associate requirements documents to these nodes will result in improper tracking of the requirements documents.
|
- Select the node you want to associate with a requirement. You can add a requirement to any node in the hierarchical tree.
- If a node contains other nodes, click the
button next to the node to expand it. You can then select one of the nodes in the expanded hierarchical tree.
- From the Edit menu, select Add, or click the
button on the toolbar.
- The cursor moves to the right pane, allowing you to type in the requirement information. This example shows adding a requirement for the N node of the valve timing subsystem in the
engine
model.

- Click in the Document field in the right pane, type the full path for the requirements document, and then click Enter.
- Here are examples of full pathnames.
Pathname
|
For Document Type
|
c:\Requirements\Car Requirements.doc
|
Word
|
d:\car_files\car_reqts.xls
|
Excel
|
http://www-internal.com/carreqts.html
|
HTML
|
file:///bserver/car/requirements.html
|
HTML
|
- If the requirement is at a specific location within the document, you can add the location. Otherwise, skip this step.
- To add the location, double-click in the Location in document field, type the location, and then press Enter. An example location for any document type is
valve_timing
.
- Repeat this process to add additional requirements for the same node or for other nodes.
Note
If your Stateflow chart contains transitions that are not unique, do not associate requirements with them.
|
About the Requirements Documents
The requirements document can be in Microsoft Word, Microsoft Excel, or HTML:
- You can specify just the requirements document name. Then when you go to it from the Navigator, you will go to the top of that document.
- You can specify a specific location within the requirements document.
- For Word and Excel, the specific location is simply the first instance of a given word in the requirements document.
- For HTML, the specific location is a named anchor, for example,
<A href="valve_timing.html">
.
This example shows three requirements for the N node of the valve timing subsystem in the engine
model.

Saved Requirements
Adding a requirement automatically saves the model or M-file:
- For a Simulink or Stateflow node, the Requirements Management Interface stores information about the requirements document with the object's data structure.
- For an M-file node, the Requirements Management Interface writes a commented line to the M-file. Do not modify this line. For example,
| Opening an Object in the Navigator | | Viewing Requirements in the Navigator |  |