getStereotype - Find stereotype in profile by name - MATLAB (original) (raw)
Find stereotype in profile by name
Syntax
Description
[stereotype](#mw%5F66bbb258-5ff0-45fe-bdf8-e00dce263544) = getStereotype([profile](#mw%5F6e5bcff8-10c4-4e7b-ae2f-a0b58ee05963%5Fsep%5Fmw%5F73d78862-b7e6-40f6-94d5-96768f6c6121),[name](#mw%5F6e5bcff8-10c4-4e7b-ae2f-a0b58ee05963%5Fsep%5Fmw%5F6d0bb099-02ea-424a-88b3-7bc51c4a973a))
finds a stereotype in a profile by name.
Examples
Create a profile for latency characteristics.
profile = systemcomposer.profile.Profile.createProfile("LatencyProfileB");
connLatency = profile.addStereotype("ConnectorLatency",AppliesTo="Connector"); connLatency.addProperty("secure",Type="boolean"); connLatency.addProperty("linkDistance",Type="double");
nodeLatency = profile.addStereotype("NodeLatency",AppliesTo="Component"); nodeLatency.addProperty("resources",Type="double",DefaultValue="1");
portLatency = profile.addStereotype("PortLatency",AppliesTo="Port"); portLatency.addProperty("queueDepth",Type="double"); portLatency.addProperty("dummy",Type="int32");
Get the stereotype ConnectorLatency
in the profile.
stereotype = getStereotype(profile,"ConnectorLatency")
stereotype = Stereotype with properties:
Name: 'ConnectorLatency'
Description: ''
Parent: [0×0 systemcomposer.profile.Stereotype]
AppliesTo: 'Connector'
Abstract: 0
Icon: ''
ComponentHeaderColor: [210 210 210]
ConnectorLineColor: [168 168 168]
ConnectorLineStyle: 'Default'
FullyQualifiedName: 'LatencyProfileB.ConnectorLatency'
Profile: [1×1 systemcomposer.profile.Profile]
OwnedProperties: [1×2 systemcomposer.profile.Property]
Properties: [1×2 systemcomposer.profile.Property]
Close the profile to rerun this example.
Input Arguments
Stereotype name, specified as a character vector or string. The name of the stereotype must be unique within the profile.
Example: "electricalComponent"
Data Types: char
| string
Output Arguments
More About
Version History
Introduced in R2019a
See Also
Tools
Blocks
Objects
- systemcomposer.profile.Profile | systemcomposer.profile.Stereotype | systemcomposer.profile.Property
Functions
- systemcomposer.profile.Profile.createProfile | systemcomposer.loadProfile | applyProfile | removeProfile | renameProfile | systemcomposer.profile.editor | systemcomposer.profile.Profile.find | systemcomposer.profile.Profile.load | save | open | close | systemcomposer.profile.Profile.closeAll | systemcomposer.profile.Stereotype.find | getDefaultStereotype | setDefaultStereotype | getDefaultElementStereotype | setDefaultElementStereotype | addStereotype | removeStereotype | applyStereotype | batchApplyStereotype | getStereotypes | changeStereotype | removeStereotype | hasStereotype | addProperty | removeProperty | hasProperty | setProperty | getProperty | getPropertyValue | getEvaluatedPropertyValue | getStereotypeProperties | applyStereotypeOrder | getStereotypeNamesByOrder | increaseStereotypeOrder | decreaseStereotypeOrder