slreq.Requirement class

Package: slreq
Superclasses:

Work with Requirement objects

Description

Instances of slreq.Requirement are Requirement objects that you manage solely inside Simulink® Requirements™ and that do not have a persistent association with artifacts managed by external applications. Requirement objects can exist only within a requirements set.

Construction

req = find(rs, 'PropertyName', PropertyValue) finds and returns a requirement req in the requirements set rs with additional requirement properties specified by PropertyName and PropertyValue.

req = add(rs, 'PropertyName', PropertyValue) adds a requirement req to the requirement set rs with additional requirement properties specified by PropertyName and PropertyValue.

Input Arguments

expand all

Requirements set, specified as an slreq.ReqSet object.

Output Arguments

expand all

Handle to a requirement, returned as an slreq.Requirement object.

Properties

expand all

Requirement type. For more information, see Requirement Types.

Custom ID of the requirement, returned as a character vector. You cannot use spaces and '#' in custom IDs.

Requirement summary text, specified as a one-line, plain text character vector.

Requirement keywords, specified as character array.

Requirement description text, specified as a multiline character vector.

Requirement rationale text, specified as a multiline character vector.

The Session Independent Identifier corresponding to the requirement.

The date on which the requirement was created, specified as a datetime value. The software populates this property.

The name of the individual or organization who created the requirement.

The date on which the requirement was last modified, specified as a datetime value. The software populates this property.

The name of the individual or organization who last modified the requirement.

Requirement revision number, specified as a scalar.

Indicates if the requirement has unsaved changes. 0 for no unsaved changes and 1 for unsaved changes.

The comments that are attached with the requirement, returned as a structure.

Methods

addAdd requirement to requirements set
childrenFind child requirements of a requirement
demoteDemote requirements
findFind requirements that have matching attribute values
getAttributeGet requirement custom attributes
getImplementationStatus Query requirement implementation status summary
getVerificationStatus Query requirement verification status summary
isJustifiedForCheck if requirement is justified
justifyImplementation Justify requirements for implementation
justifyVerification Justify requirements for verification
parentFind parent item of requirement
promotePromote requirements
reqSetReturn parent requirements set
setAttributeSet requirement custom attributes

Examples

Find a Requirement in a Requirements Set

% Find a requirement with ID 77 in a requirements set rs
req = find(rs, 'Type', 'Requirement', 'ID', '77');

req = 

  Requirement with properties:

             Id: '77'
        Summary: 'Test Spec'
       Keywords: [0×0 char]
    Description: ''
      Rationale: ''
            SID: 80
      CreatedBy: 'John Doe'
      CreatedOn: 05-Oct-2007 16:09:38
     ModifiedBy: 'Jane Doe'
     ModifiedOn: 21-Dec-2016 11:10:05
       Comments: [0×0 struct]

Introduced in R2018a