Skip to Main Content Skip to Search
Product Documentation

addConceptualArg - Add conceptual argument to array of conceptual arguments for CRL table entry

Syntax

addConceptualArg(hEntry, arg)

Arguments

hEntry

Handle to a CRL table entry previously returned by instantiating a CRL entry class, such as hEntry = RTW.TflCFunctionEntry or hEntry = RTW.TflCOperationEntry.

arg

Argument, such as returned by arg = getTflArgFromString(name, datatype), to be added to the array of conceptual arguments for the CRL table entry.

Description

The addConceptualArg function adds a specified conceptual argument to the array of conceptual arguments for a CRL table entry.

Examples

In the following example, the addConceptualArg function is used to add conceptual arguments for the output port and the two input ports 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', ...
                    'RoundingMode',             '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();

hLib.addEntry( op_entry );

See Also

getTflArgFromString

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS