主要内容

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

systemcomposer.profile.Profile.load

从文件加载配置文件

    说明

    profile = systemcomposer.profile.Profile.load(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

    将配置文件加载到另一个变量中。

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

    输入参数

    全部折叠

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

    示例: "LatencyProfile"

    数据类型: char | string

    输出参量

    全部折叠

    配置文件,以 systemcomposer.profile.Profile 对象的形式返回。

    详细信息

    全部折叠

    版本历史记录

    在 R2019a 中推出