Main Content

addConceptualArg

Add conceptual argument to array of conceptual arguments for code replacement table entry

Description

example

addConceptualArg(hEntry,arg) adds a specified conceptual argument to the array of conceptual arguments for a code replacement table entry.

Examples

collapse all

This example shows how the addConceptualArg function adds conceptual arguments for the output operand and the two input operands for an addition operation.

hLib = RTW.TflTable;

% Create 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 hEntry is a handle to a code replacement table entry previously returned by instantiating a code replacement entry class, such as hEntry = RTW.TflCFunctionEntry or hEntry = RTW.TflCOperationEntry.

Example: op_entry

The arg is the argument, such as returned by arg = getTflArgFromString(name, datatype), added to the array of conceptual arguments for the code replacement table entry.

Example: 'hLib.getTflArgFromString('y1','uint8')'

Version History

Introduced in R2007b