verify
Description
validates the ReqIF™ export options, status
= verify(myExportOptions
,reqContent
)myExportOptions
, for the requirement set,
requirement, or referenced requirement specified by reqContent
.
[
returns the requirement set for the requirement, or referenced requirement specified by
status
,rs
] = verify(myExportOptions
,reqContent
)reqContent
.
Examples
Create and Validate Export Options
This example shows how to create ReqIF export options, get the available properties and custom attributes, specify which properties and attributes to export, and validate the generated export options.
Open the ShortestPath
project.
openProject("ShortestPath");
Load the shortest_path_func_reqs
requirement set.
rs = slreq.open("shortest_path_func_reqs");
Create Export Options
Create an export options object that specifies the output file as shortest_path_func_reqif.reqif
, exports links, and uses a generic export mapping.
myExportOptions = slreq.export.ExportOptions( ... OutputFile="shortest_path_func_reqif.reqif",IncludeLinks=true,Template="Generic")
myExportOptions = ExportOptions with properties: OutputFile: "shortest_path_func_reqif.reqif" Template: "Generic" IncludeLinks: 1 View: '' Attributes: {} MappingFile: '' TemplateFile: ''
Specify Attributes to Export
Get the available attributes to export by using the getFilterableAttributes
function.
attributes = getFilterableAttributes(myExportOptions,rs)
attributes = 1x11 cell
{'Summary'} {'Type'} {'Keywords'} {'CreatedOn'} {'CreatedBy'} {'ModifiedOn'} {'ModifiedBy'} {'Revision'} {'Description'} {'Rationale'} {'Priority'}
Export only the Summary
and Description
properties and the Priority
custom attribute by setting the value for the Attributes
export option property.
myExportOptions.Attributes = ["Summary","Description","Priority"]
myExportOptions = ExportOptions with properties: OutputFile: "shortest_path_func_reqif.reqif" Template: "Generic" IncludeLinks: 1 View: '' Attributes: ["Summary" "Description" "Priority"] MappingFile: '' TemplateFile: ''
Validate Export Options and Export Requirements
Validate the export options object for the shortest_path_func_reqs
requirement set.
status = verify(myExportOptions,rs)
status = logical
1
Export the requirement set to a ReqIF file.
dir = slreq.export(rs,myExportOptions)
dir = 'shortest_path_func_reqif.reqif'
Validate Export Options Object
This example shows how to validate an export options object for a single requirement and return the requirement set for the requirement.
Open the ShortestPath
project.
openProject("ShortestPath");
Load the shortest_path_func_reqs
requirement set.
rs = slreq.load("shortest_path_func_reqs");
Get a handle to the requirement with the summary Functional behavior
.
req = find(rs,Summary="Functional behavior");
Create an export options object that specifies the output file as shortest_path_func_reqif.reqif
, exports links, and uses a generic export mapping.
myExportOptions = slreq.export.ExportOptions(OutputFile="shortest_path_func_reqif.reqif",IncludeLinks=true,Template="Generic")
myExportOptions = ExportOptions with properties: OutputFile: "shortest_path_func_reqif.reqif" Template: "Generic" IncludeLinks: 1 View: '' Attributes: {} MappingFile: '' TemplateFile: ''
Validate the export options object for the requirement. Return the requirement set that the requirement belongs to.
[status,rs] = verify(myExportOptions,req);
Input Arguments
myExportOptions
— Export options
slreq.export.ExportOptions
object
Export options, specified as an ExportOptions
object.
reqContent
— Requirements to export
string scalar | character vector | slreq.ReqSet
object | slreq.Reference
object | slreq.Requirement
object
Requirements to export, specified as a string scalar, character vector, a slreq.ReqSet
object, a slreq.Reference
object, or a slreq.Requirement
object. Use a string scalar or character vector to specify
the file name of a requirement set.
Output Arguments
status
— Validation success status
0
| 1
Validation success status, returned as a
0
or 1
of data type
logical
.
Data Types: logical
rs
— Requirement set
slreq.ReqSet
object
Requirement set that the
requirement or referenced requirement belongs to, returned as an slreq.ReqSet
object.
Version History
Introduced in R2023a
See Also
Classes
Objects
Functions
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)