Section: Constraints
This special section allows to check if each module instance is referenced at least once.
SEC Constraints //optional: yes, modifier: [UPDATE] Referenced_By := <interface name>; //optional: yes, type: QID) Referenced_Cardinality := [<minimum> .. <maximum>]; //optional: no, type: Cardinality END_SEC
Details regarding the syntax of definition types are described in the section Module Declaration.
. Specification:
The parameter
Referenced_By
serves to check if the module instances are referenced from other module instances. The value ofReferencedBy
must be an interface that derives fromIModule
. If it doesn't matter what type the referencing instance is,IModule
can be specified here.Referenced_Cardinality
defines how often this module has to be referenced. If the number of references is not in this range, an error is produced on scan of the standard generator.
Example 27. Example
SEC Constraints Referenced_By := ISpecificModule; Referenced_Cardinality := [1 .. 3]; END_SEC