Main Content

inspectAttribute

Class: slreq.ReqSet
Package: slreq

Get information about requirement set custom attribute

Syntax

atrb = inspectAttribute(rs,name)

Description

atrb = inspectAttribute(rs,name) returns a structure with information about the custom attribute name specified by name in the requirement set rs.

Input Arguments

expand all

Requirement set, specified as an slreq.ReqSet object.

Custom attribute name, specified as a character array.

Output Arguments

expand all

Custom attribute information, returned as a struct.

Examples

expand all

This example shows how to get information about a requirement set custom attribute.

Load crs_req_func_spec, which describes a cruise control system. Find a requirement set and assign it to a variable.

slreq.load('crs_req_func_spec');
rs = slreq.find('Type','ReqSet');

Add a Checkbox custom attribute to the requirement set with a description. Use inspectAttribute to get information about the custom attribute.

addAttribute(rs,'MyCheckbox','Checkbox','Description',...
    'This checkbox atrribute can be true or false.');
atrb = inspectAttribute(rs,'MyCheckbox')
atrb = struct with fields:
           name: 'MyCheckbox'
           type: Checkbox
    description: 'This checkbox atrribute can be true or false.'
        default: 0

Cleanup

Clear the open requirement sets and close the open models without saving changes.

slreq.clear;
bdclose all;
Introduced in R2020b