slreq.outLinks

Get outgoing links for a block or other linkable item

Description

ks = slreq.outLinks(node), returns outgoing links ks, a Link or Link array, from node, a block or other linkable item.

Examples

collapse all

This example shows how to determine the incoming link for a requirement and outgoing link for a model object. Click the Open Live Script button to get copies of the example files.

Load Model and Requirement Set

load_system('reqs_validation_property_proving_original_model');
rqset = slreq.load('original_thrust_reverser_requirements.slreqx');

Get a Requirement from the Set

req = slreq.find('Type','Requirement','Summary','Maximum Throttle Threshold')

Determine Incoming Links for the Requirement

lkIn = slreq.inLinks(req)

Determine the Incoming Link Source

lkSrc = source(lkIn);

Convert Link Source to Model Object

mo = slreq.structToObj(lkSrc)

Determine Outgoing Link from the Model Object

lkOut = slreq.outLinks(mo)

Close requirements and links

slreq.clear;
close_system('reqs_validation_property_proving_original_model',0);

Input Arguments

collapse all

A linkable item that may have outgoing requirements links. Common examples include a block, function, or TestCase.

Example: Simulink.Gain

Example: TestCase with properties

Data Types: struct

Output Arguments

collapse all

A Link or Link array incoming to the linkable item.

Introduced in R2017b