addEntry
将表条目添加到代码替换表中注册的表条目集合中
说明
示例
将运算符条目添加到代码替换表
此示例说明如何使用 addEntry
函数在构造运算符条目后将该条目添加到代码替换表中。
hLib = RTW.TflTable; % Create an entry for addition of built-in uint8 data type op_entry = RTW.TflCOperationEntry; op_entry.setTflCOperationEntryParameters( ... 'Key', 'RTW_OP_ADD', ... 'Priority', 90, ... 'SaturationMode', 'RTW_SATURATE_ON_OVERFLOW', ... 'RoundingModes', {'RTW_ROUND_UNSPECIFIED'}, ... 'ImplementationName', 'u8_add_u8_u8', ... 'ImplementationHeaderFile', 'u8_add_u8_u8.h', ... 'ImplementationSourceFile', 'u8_add_u8_u8.c' ); arg = hLib.getTflArgFromString('y1','uint8'); arg.IOType = 'RTW_IO_OUTPUT'; op_entry.addConceptualArg( arg ); arg = hLib.getTflArgFromString('u1','uint8'); op_entry.addConceptualArg( arg ); arg = hLib.getTflArgFromString('u2','uint8'); op_entry.addConceptualArg( arg ); op_entry.copyConceptualArgsToImplementation(); addEntry(hLib, op_entry);
输入参数
hTable
— 代码替换表的句柄
句柄
hTable
是先前由
返回的代码替换表的句柄。hTable
= RTW.TflTable
示例: hLib
entry
— 函数或运算符条目的句柄
句柄
entry
是您在调用
或 hEntry
= RTW.TflCFunctionEntry
后构造的函数或运算符条目的句柄。hEntry
= RTW.TflCOperationEntry
示例: op_entry
版本历史记录
在 R2007b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)