The attributes appear in an AttributeList, which is a comma separated list of pairs, as defined in the MATLAB® class system grammar. Simscape™ language distinguishes between two types of attributes: model attributes and member attributes.
Model attributes are applicable only to model type
Defines the domain data propagation of the component. By default,
components propagate domain data, such as domain parameter values. If your model
requires different values of a domain parameter in different segments of the same
Defines the visibility of the entire component. This dictates whether the component shows up in a generated library or report.
Component model attributes apply to the entire model. For example:
component (Propagation = blocks) Separator % component model goes here end
Propagation is a model attribute.
Member attributes apply to a whole declaration block.
Defines the read and write access of members. Public (the default) is the most permissive access level. There are no restrictions on accessing public members. Private members are only accessible to the instance of the component model and not to external clients. Protected members of a base class are accessible only to subclasses.
Depends on the value of
Sets the visibility of the member in the user interface, that is, in block dialog boxes, simulation logs, variable viewer, and so on:
If set to
If set to
Defines how the parameter or variable units are converted for use in equations, intermediates, and other sections. See Parameter Units.
If a member declaration contains a declaration function that does not
support code generation, set this attribute to
The attribute list for the declaration block appears after MemberClass keyword. For example:
parameters (Access = public,ExternalAccess = observe) % parameters go here end
Here, all parameters in the declaration block are externally writable in language, but they will not appear in the block dialog box.
The two attributes defining member accessibility act in conjunction. The default value
ExternalAccess attribute for a member depends on the value of
Access attribute for that member.
You can modify the values of the two attributes independently from each other. However, certain combinations are prohibited. The compiler enforces the following rules:
Members in the base class with
Access=private are forced to
ExternalAccess=none, to avoid potential collision of names
between the base class and the derived class.
Access is explicitly set to
protected, it does not make sense to explicitly set
ExternalAccess=modify . In this situation, the compiler issues a
warning and remaps