Main Content

addEntry

Add table entry to collection of table entries registered in code replacement table

Description

addEntry(hTable,entry) adds a code replacement entry that you have constructed to the collection of table entries registered in a code replacement table.

example

Examples

collapse all

This example shows how to use the addEntry function to add an operator entry to a code replacement table after the entry is constructed.

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);

Input Arguments

collapse all

The hTable is a handle to a code replacement table previously returned by hTable = RTW.TflTable.

Example: hLib

The entry is a handle to a function, operator, or block entry that you have constructed by calling hEntry = RTW.TflCFunctionEntry, hEntry = RTW.TflCOperationEntry, or hEntry = RTW.TflBlockEntry.

Example: op_entry

Version History

Introduced in R2007b