coder.Dictionary 类
命名空间: coder
配置 Embedded Coder 字典
描述
coder.Dictionary 类的对象表示 Embedded Coder 字典。使用该对象对 Embedded Coder 字典执行操作,例如加载定义包和访问字典的分区。
一个 coder.Dictionary 对象包含若干 coder.dictionary.Section 对象,后者表示 Embedded Coder 字典的类别。一个 coder.dictionary.Section 对象包含若干 coder.dictionary.Entry 对象,这些对象表示存储在 Embedded Coder 字典该分区中的定义。分区的名称标识该节包含的代码定义的类型。要访问 Embedded Coder 字典的各个分区,请使用 coder.Dictionary 对象。要访问该分区中的字典条目,请使用 coder.dictionary.Section 对象。
创建对象
函数 coder.dictionary.create 和 coder.dictionary.open 可创建一个 coder.Dictionary 对象。
方法
getCodeInterfaceType | Determine whether coder.Dictionary object represents a service
interface configuration or data interface configuration |
getSection | Return coder.dictionary.Section object that represents Embedded
Coder Dictionary section |
getSections | Return coder.dictionary.Section objects of an Embedded Coder
Dictionary |
getDictionaryDefault | Return default service for service interface section or default property value for data interface category |
setDictionaryDefault | Set default service for service interface section or default property value for data interface category |
loadPackage | 将代码定义包加载到 Embedded Coder 字典中 |
unloadPackage | Unload package of code definitions from Embedded Coder Dictionary |
getLoadedPackages | Return code definition packages loaded into Embedded Coder Dictionary |
refreshPackage | Refresh package definitions in Embedded Coder Dictionary |
resetToDefault | Restore Embedded Coder Dictionary to default state |
get | Get property value of Embedded Coder Dictionary with service interface configuration |
set | Set property value for Embedded Coder Dictionary with service interface configuration |
valid | 确定 coder.Dictionary 对象是否表示有效的 Embedded Coder 字典 |
empty | 确定 Embedded Coder 字典是否为空 |
示例
创建包含 Embedded Coder 字典的数据字典。
dataDictionary = Simulink.data.dictionary.create("DataDictionary.sldd");在数据字典中创建一个 Embedded Coder 字典,并使用 coder.Dictionary 对象来表示 Embedded Coder 字典。
coderDictionary = coder.dictionary.create(dataDictionary)
coderDictionary =
Dictionary with Sections:
StorageClasses: [1×1 coder.dictionary.Section]
MemorySections: [1×1 coder.dictionary.Section]
FunctionCustomizationTemplates: [1×1 coder.dictionary.Section]Embedded Coder 字典包含三个 coder.dictionary.Section 对象,每个对象表示字典的一个分区。
创建一个数据字典来包含 Embedded Coder 字典。
dataDictionary = Simulink.data.dictionary.create("DataDictionary.sldd");在数据字典中创建一个 Embedded Coder 字典,并使用 coder.Dictionary 对象来表示 Embedded Coder 字典。指定接口配置类型为服务接口。
coderDictionary = coder.dictionary.create(dataDictionary,"ServiceInterface")coderDictionary =
Dictionary with properties and Sections:
ServicesHeaderFileName: 'services.h'
InitTermFunctions: [1×1 coder.dictionary.Section]
PeriodicAperiodicFunctions: [1×1 coder.dictionary.Section]
DataReceiverInterfaces: [1×1 coder.dictionary.Section]
DataSenderInterfaces: [1×1 coder.dictionary.Section]
DataTransferInterfaces: [1×1 coder.dictionary.Section]
TimerInterfaces: [1×1 coder.dictionary.Section]
ParameterTuningInterfaces: [1×1 coder.dictionary.Section]
ParameterArgumentTuningInterfaces: [1×1 coder.dictionary.Section]
MeasurementInterfaces: [1×1 coder.dictionary.Section]
SubcomponentInitTermFunctions: [1×1 coder.dictionary.Section]
SubcomponentPeriodicAperiodicFunctions: [1×1 coder.dictionary.Section]
SharedUtilityFunctions: [1×1 coder.dictionary.Section]
InternalData: [1×1 coder.dictionary.Section]
Constants: [1×1 coder.dictionary.Section]
StorageClasses: [1×1 coder.dictionary.Section]
DataMemorySections: [1×1 coder.dictionary.Section]
FunctionMemorySections: [1×1 coder.dictionary.Section]Embedded Coder 字典包含 coder.dictionary.Section 对象,其中每个对象表示字典中一个类别的服务接口、函数或代码定义。
版本历史记录
在 R2019b 中推出您现在可以将 "Not measured" 指定为代码生成器字典中 MeasurementInterfaces 分区的默认值,并且可以将 "Not tunable" 指定为字典中 ParameterTuningInterfaces 和 ParameterArgumentTuningInterfaces 分区的默认值。"Not measured" 和 "Not tunable" 条目包含在字典中,并在新创建的字典中预先选择为默认值。您可以选择其他条目作为这些分区的字典默认值,但无法从字典中删除这些条目。
Constants和InternalData是新字典分区。字典的
SubcomponentInitTermFunctions和SubcomponentPeriodicAperiodicFunctions分区取代了SubcomponentEntryFunctions分区。
访问使用服务接口配置的 Embedded Coder 字典的 coder.Dictionary 对象。以前,您只能访问使用数据接口配置的 Embedded Coder 字典的 coder.Dictionary 对象。现在,coder.Dictionary 类支持这两种接口配置类型的字典。
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)