Main Content

verify

Validate ReqIF export options for requirement set

Since R2023a

    Description

    status = verify(myExportOptions,reqContent) validates the ReqIF™ export options, myExportOptions, for the requirement set, requirement, or referenced requirement specified by reqContent.

    example

    [status,rs] = verify(myExportOptions,reqContent) returns the requirement set for the requirement, or referenced requirement specified by reqContent.

    example

    Examples

    collapse all

    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

    collapse all

    Export options, specified as an ExportOptions 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

    collapse all

    Validation success status, returned as a 0 or 1 of data type logical.

    Data Types: logical

    Requirement set that the requirement or referenced requirement belongs to, returned as an slreq.ReqSet object.

    Version History

    Introduced in R2023a