主要内容

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

getReporter

类: systemcomposer.rptgen.finder.AllocationListResult
命名空间: systemcomposer.rptgen.finder

获取分配列表报告器

自 R2022b 起

语法

reporter = getReporter(result)

说明

reporter = getReporter(result) 返回一个报告器,可用于在组件中包含有关分配的信息。您可以使用该报告器自定义包含哪些信息以及信息格式。有关如何自定义报告器的更多信息,请参阅 systemcomposer.rptgen.report.AllocationList

输入参数

全部展开

分配列表结果,指定为 systemcomposer.rptgen.finder.AllocationListResult 对象。

输出参量

全部展开

分配列表报告器,以 systemcomposer.rptgen.report.AllocationList 对象的形式返回。

示例

全部展开

使用 AllocationListFinderAllocationListResult 类生成报告。

import mlreportgen.report.*
import slreportgen.report.*
import systemcomposer.rptgen.finder.*

rpt = slreportgen.report.Report(output="AllocationListResultReport",...
CompileModelBeforeReporting=false);
add(rpt,TitlePage("Title","Allocations"));
add(rpt,TableOfContents);

allocationListFinder = AllocationListFinder("AllocationSet.mldatx");
allocationListFinder.ComponentName = "mTestModel/Component1";
chapter = Chapter("Title",allocationListFinder.ComponentName);
result = find(allocationListFinder);
reporter = getReporter(result);

add(rpt,chapter);
append(rpt,reporter);
close(rpt);
rptview(rpt)

版本历史记录

在 R2022b 中推出