rmi
Work programmatically with Requirements Toolbox
Syntax
Description
Get Link Information
returns the link destinations for the outgoing links from the model or model element
specified by linkedDest
= rmi("get",modelOrBlock
)modelOrBlock
.
returns the number of outgoing links from the top-level model or model element
specified by numLinks
= rmi("count",modelOrBlock
)modelOrBlock
.
returns the descriptions of the link destinations for the model or model element
specified by descriptions
= rmi("descriptions",modelOrBlock
)modelOrBlock
.
returns the code comments that correspond to the requirements linked from the model
or model element specified by codeComments
= rmi("codeComment",modelOrBlock
)modelOrBlock
. Requirements Toolbox™ inserts these comments in the generated code when you generate code
from the model. For more information, see Trace Requirements to Code Generated from Models.
returns the link destinations that Requirements Toolbox includes in the generated code for links to requirements from the model
or model element specified by linkedDest
= rmi("codeReqs",modelOrBlock
)modelOrBlock
. If the model element
is a referenced instance of a block from a Simulink® library, the link destinations include links from the library block as
well as the reference block. If the model element is not a reference instance of a
block from a Simulink library, the output of this function is the same as the output of
rmi("get",
. For more
information about referenced instances of library blocks, see Linked Blocks (Simulink)modelOrBlock
)
Delete Links
rmi("clearAll",
opens a
dialog box that prompts you to delete the outgoing links from the top-level model or
model element.modelOrBlock
)
rmi("clearAll",
opens a
dialog box that prompts you to delete the outgoing links from the model.model
,"deep")
rmi(___,"noPrompt")
deletes the outgoing links
without opening a dialog box. Use one of the previous two syntaxes, followed by the
argument noPrompt
.
Work with Models
rmi("highlightModel",
highlights
the model elements that have outgoing links in the model specified by
model
)model
.
[
returns the block handles, blockHandles
,modelIndices
,isSf
,objSIDs
] = rmi("getObjectsInModel",model
)blockHandles
, the model hierarchy
indices, parentIndices
, indicators for whether or not the model
element belongs to a Stateflow® chart, isSf
, and the model element SIDs,
objSIDs
, for each model element in the model specified by
model
.
[
returns the name and type for the model or model element specified by
modelOrBlockName
,modelOrBlockType
] = rmi("getObjLabel",modelOrBlock
)modelOrBlock
.
returns the globally unique identifier for the model or model element specified by
guidChar
= rmi("guidGet",modelOrBlock
)modelOrBlock
. If modelOrBlock
does not
have a globally unique identifier, the function creates one. Only REQ files use
globally unique identifiers.
Report Traceability
rmi("report",
generates
a traceability report in HTML format for the artifact specified by
artifactToReport
)artifactToReport
. For more information about traceability
reports, see Create and Customize Requirements Traceability Reports.
rmi projectReport
generates a traceability report in HTML
format for the files in the current project. The top-level page of this report has
links to reports for each project file that has outgoing links. For more information,
see Create Requirements Traceability Report for Projects.
Integrate with Third-Party Tools
rmi register
registers the custom document interface specified by the registration function
myCustomDocInterface
myCustomDocInterface
, which enables you to create direct
links to requirements in a third-party application that Requirements Toolbox does not provide built-in support for. For more information, see Define Custom Document Interface for Direct Linking to Requirements.
rmi unregister
unregisters the custom document interface specified by the registration function
myCustomDocInterface
myCustomDocInterface
. For more information, see Define Custom Document Interface for Direct Linking to Requirements.
rmi httpLink
activates an internal HTTP server that you can
use to navigate to linked items in MATLAB® or Simulink from backlinks in a browser-based third-party requirements tool that
uses HTTP protocol. Backlink navigation on the HTTPS server is enabled by
default.
Note
Alternatively, you can active the internal HTTP server by using the
rmipref
function and setting the UnsecureHttpRequests
preference to true
. When
the UnsecureHttpRequests
preference is
true
, MATLAB activates the internal HTTP server on startup.
returns the port numbers for the internal HTTP server. If the port number is
connectorStatus
= rmi("httpLink","status")0
, the server is not active.
rmi setup
prompts you at the command line to configure
Requirements Toolbox for interaction with Microsoft® Office and IBM®
DOORS®. For more information, see Configure Requirements Toolbox for Interaction with Microsoft Office and IBM DOORS.
rmi setup doors
prompts you at the command line to configure
Requirements Toolbox for interaction with IBM
DOORS. For more information, see Configure Requirements Toolbox for Interaction with Microsoft Office and IBM DOORS.
rmi("doorsSync",
opens the
IBM
DOORS synchronization settings dialog box for the Simulink model specified by model
)model
. For more information
about IBM
DOORS synchronization, see Synchronize Requirements Traceability in IBM DOORS by Using Surrogate Modules.
returns the current IBM
DOORS synchronization settings for the Simulink model specified by currentSettings
= rmi("doorsSync",model
,"settings")model
. To change the settings,
use the IBM
DOORS synchronization settings dialog box to make changes, then click
Save settings.
Tip
To return the default settings, specify model
as
[]
.
rmi("doorsSync",
uses the synchronization settings specified by model
,syncSettings
)syncSettings
to
create an IBM
DOORS surrogate module from the Simulink model specified by model
. If an IBM
DOORS surrogate module already exists, this function re-synchronizes the
model and module and updates the surrogate module. For more information about
IBM
DOORS synchronization, see Synchronize Requirements Traceability in IBM DOORS by Using Surrogate Modules.
adds screenshots to the surrogate module of each model element that corresponds to an
object in the surrogate module and returns the number of screenshots added. If the
surrogate module already has screenshots, the function updates the
screenshots.numScreenshots
= rmi("surrogateUpdateScreenshots",model
)
returns the current template for labels of links to requirements in IBM
DOORS.currentTemplate
= rmi("getDoorsLabelTemplate")
sets the current IBM
DOORS template for link labels to requirements to the format specified by
tf
= rmi("setDoorsLabelTemplate",customTemplate
)customTemplate
and returns the
success status. The default label template contains
the section number and object heading for the DOORS requirement link target.
Tip
To revert the link label template to the default template, enter this code at the MATLAB command prompt:
tf = rmi("setDoorsLabelTemplate","")
returns the link label that Requirements Toolbox uses when it creates a link to the IBM
DOORS requirement specified by label
= rmi("doorsLabel",moduleID
,doorsReqID
)doorsReqID
in the module
specified by moduleID
.
updates the link labels for the outgoing links to requirements in IBM
DOORS from the model specified by numUpdatedLinkLabels
= rmi("updateDoorsLabels",model
)model
and outputs the
number of link labels updated. The function uses the current link label template,
currentTemplate
.
Check Links for Validity and Consistency
checks the validity of the links from requirements in Microsoft Word, Microsoft
Excel®, or IBM
DOORS. The function prompts you at the command line for the document type,
the document name, returns the number of problems detected, and opens a report that
contains information about the validity of the links. For more information, see Validate Requirements Links in a Requirements Document.validationProblems
= rmi("checkDoc")
checks the validity of the links to requirements in the document specified by
validationProblems
= rmi("checkDoc",docName
)docName
, returns the number of link validation problems
detected, and opens a link validation report for the document. For more information,
see Validate Requirements Links in a Requirements Document.
checks the consistency of the links from the artifact specified by
consistencyProblems
= rmi("check",artifactToCheck
)artifactToCheck
and opens a link consistency report for the
file. For more information, see Check Direct Links for Validity.
Examples
Input Arguments
Output Arguments
Alternatives
The
getSimulinkBlockHandle
(Simulink) function returns numeric handles for blocks and does not require the globally unique identifier that is required by this syntax:handle = rmi("guidLookup",model,guid)
To generate a report for requirement sets, you can use the
slreq.generateReport
function. For more information, see Report Requirements Information. This report is an alternative to the traceability report generated byrmi("report",artifactToReport)
andrmi projectReport
.