主要内容

本页采用了机器翻译。点击此处可查看英文原文。

systemcomposer.profile.Profile.find

按名称查找配置文件

    说明

    profile = systemcomposer.profile.Profile.find 查找所有打开的配置文件。

    profile = systemcomposer.profile.Profile.find(profileName) 查找指定名称 profileName 的配置文件。

    示例

    示例

    全部折叠

    创建延迟特性配置文件并保存。

    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

    按名称查找配置文件。

    profileFound =  systemcomposer.profile.Profile.find("LatencyProfile")
    profileFound = 
    
      Profile with properties:
    
                Name: 'LatencyProfile'
        FriendlyName: ''
         Description: ''
         Stereotypes: [1×5 systemcomposer.profile.Stereotype]

    输入参数

    全部折叠

    配置文件的名称,指定为字符向量或字符串。配置文件必须在 MATLAB® 路径上可用,扩展名为 .xml

    示例: "LatencyProfile"

    数据类型: char | string

    输出参量

    全部折叠

    找到的一个或多个配置文件,以 systemcomposer.profile.Profile 对象或 systemcomposer.profile.Profile 对象数组的形式返回。

    详细信息

    全部折叠

    版本历史记录

    在 R2019a 中推出