id = Simulink.ID.getSID('slcoverage_lct_bus/slCounter/And');
bl = slcoverage.BlockSelector(slcoverage.BlockSelectorType.BlockInstance,id);
rule = slcoverage.FilterRule(bl,'Value is never greater than 0');
filt.addRule(rule);
rules を使用してフィルター規則を返します。配列内の最初の規則を表示します。
fi = filt.rules
fi(1)
fi =
1×2 FilterRule array with properties:
Selector
Mode
Rationale
ans =
FilterRule with properties:
Selector: [1×1 slcoverage.BlockSelector]
Mode: Exclude
Rationale: 'Tested elsewhere'
rules を使用して And ブロックの規則のみを返します。
filt.rules(id)
ans =
FilterRule with properties:
Selector: [1×1 slcoverage.BlockSelector]
Mode: Justify
Rationale: 'Value is never greater than 0'