Create analysis instance from specification
Instantiate all properties of a stereotype that will be applied to specific elements during instantiation.
Create a profile for latency characteristics.
profile = systemcomposer.profile.Profile.createProfile('LatencyProfile'); latencybase = profile.addStereotype('LatencyBase'); latencybase.addProperty('latency','Type','double'); latencybase.addProperty('dataRate','Type','double','DefaultValue','10'); connLatency = profile.addStereotype('ConnectorLatency','Parent',... 'LatencyProfile.LatencyBase'); connLatency.addProperty('secure','Type','boolean'); connLatency.addProperty('linkDistance','Type','double'); nodeLatency = profile.addStereotype('NodeLatency','Parent',... 'LatencyProfile.LatencyBase'); nodeLatency.addProperty('resources','Type','double','DefaultValue','1'); portLatency = profile.addStereotype('PortLatency','Parent',... 'LatencyProfile.LatencyBase'); portLatency.addProperty('queueDepth','Type','double'); portLatency.addProperty('dummy','Type','int32'); profile.save;
Instantiate all properties of a stereotype.
model = systemcomposer.createModel('archModel'); NodeLatency = struct('elementKinds',['Component']); ConnectorLatency = struct('elementKinds',['Connector']); LatencyBase = struct('elementKinds',['Connector','Port','Component']); PortLatency = struct('elementKinds',['Port']); LatencyAnalysis = struct('NodeLatency',NodeLatency, ... 'ConnectorLatency',ConnectorLatency, ... 'PortLatency',PortLatency, ... 'LatencyBase',LatencyBase); properties = struct('LatencyProfile',LatencyAnalysis); instantiate(model.Architecture,properties,'NewInstance')
Instantiate specific properties of a stereotype that will be applied to specific elements during instantiation.
NodeLatency = struct('elementKinds',["Component"], ... 'properties',struct('resources',true)); ConnectorLatency = struct('elementKinds',["Connector"], ... 'properties',struct('secure',true,'linkDistance',true)); LatencyBase = struct('elementKinds',[], ... 'properties',struct('dataRate',true,'latency',false)); PortLatency = struct('elementKinds',["Port"], ... 'properties',struct('queueDepth',true)); LatencyAnalysis = struct('NodeLatency',NodeLatency, ... 'ConnectorLatency',ConnectorLatency, ... 'PortLatency',PortLatency, ... 'LatencyBase',LatencyBase); properties = struct('LatencyProfile',LatencyAnalysis); instantiate(model.Architecture,properties,'NewInstance')
Instantiate all stereotypes already in a profile that will be applied to elements during instantiation.
instantiate(model.Architecture,'LatencyProfile','NewInstance')
model
— Model architectureModel architecture from which instance is generated, specified as a systemcomposer.arch.Architecture
object.
Example: model.Architecture
properties
— Stereotype propertiesstruct
Structure containing profile, stereotype, and property information through which the user can specify which stereotypes and properties need to be instantiated.
name
— Name of instanceName of instance generated from the model, specified as a character vector.
Example: 'NewInstance'
Data Types: char
profile
— Profile nameProfile name, specified as a character vector.
Example: 'LatencyProfile'
Data Types: char
instance
— Element instanceElement instance, returned as a
systemcomposer.analysis.ArchitectureInstance
,
systemcomposer.analysis.ComponentInstance
,
systemcomposer.analysis.PortInstance
, or
systemcomposer.analysis.ConnectorInstance
object. This function is
part of the instance API that you can use to analyze the model iteratively, element by
element. The value refers to the element instance on which the iteration is being
performed.