Documentation

Traceability Tags

A traceability tag appears in a comment above the corresponding line of generated code. The format of the tags is<system>/block_name.

  • systemis one of the following:

    • The textRoot

    • A unique system number assigned by the Simulink®engine

  • block_nameis the name of the source block

The code generator documents the tags for a model in the comments section of the generated header filemodel.h. For example, the following comment appears in the header file for a model,foo, that has a subsystemOuterand a nested subsystemInner:

/* Here is the system hierarchy for this model. * *  : foo *  : foo/Outer *  : foo/Outer/Inner */

This code shows a tag comment next to a line of code. A Gain block at the root level of a source model generates this code:

/* Gain: '/UnDeadGain1' */ rtb_UnDeadGain1_h = dead_gain_U.In1 * dead_gain_P.UnDeadGain1_Gain;

The following code shows a tag comment next to a line of code. A Gain block within a subsystem one level below the root level of the source model generates this code:

/* Gain: '/Gain' */ dead_gain_B.temp0 *= (dead_gain_P.s1_Gain_Gain);
Was this topic helpful?