instantiate

Create an analysis instance from a specification

Description

example

instance = instantiate(model,properties,name) creates an instance of a model for analysis.

Examples

collapse all

Instantiate all properties of a stereotype that will be applied to specific elements during instantiation.

 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>,properties, name)

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>,properties, name)

Input Arguments

collapse all

Model from which instance is generated, specified as a systemcomposer.arch.Model object.

Structure containing profile, stereotype, and property information through which the user can specify which stereotypes and properties need to be instantiated

Name given to the instance generated from the model.

Output Arguments

collapse all

This function is part of the instance API that you can use to analyze the model iteratively, element by element.instance refers to the element instance on which the iteration is being performed.

Data Types: systemcomposer.analysis.ArchitectureInstance

Introduced in R2019a