Main Content

slreq.createLink

Create traceable links

Description

myLink = slreq.createLink(src, dest) creates an slreq.Link object myLink that serves as a link between the source artifact src and the destination artifact dest.

Examples

Create Links

% Create a link between the current Simulink Object and a requirement
link1 = slreq.createLink(gcb, REQ)

link1 = 

  Link with properties:

           Type: 'Implement'
    Description: 'Plant Specs'
       Keywords: [0×0 char]
      Rationale: ''
      CreatedOn: 02-Sep-2017 15:49:28
      CreatedBy: 'Jane Doe'
     ModifiedOn: 21-Oct-2017 11:34:12
     ModifiedBy: 'John Doe'
       Comments: [0×0 struct]

% Create a link between a requirement and the current Stateflow object
link2 = slreq.createLink(REQ, sfgco);

Input Arguments

collapse all

The link source artifact, specified as a MATLAB® structure.

The link destination artifact, specified as a MATLAB structure.

Output Arguments

collapse all

The link between src and dest, specified as an slreq.Link object.

Introduced in R2018a