setReservedIdentifiers - Register specified reserved identifiers to be associated with TFL table

Syntax

void setReservedIdentifiers(hTable, ids)

Arguments

hTable

Handle to a TFL table previously returned by hTable = RTW.TflTable.

ids

Structure specifying reserved keywords to be registered in the TFL table. The structure must contain the following:

For example,

d{1}.LibraryName = 'ANSI';
d{1}.HeaderInfos{1}.HeaderName = 'math.h';
d{1}.HeaderInfos{1}.ReservedIds = {'y0', 'y1'};

Description

In a TFL table, each function implementation name defined by a table entry will be registered as a reserved identifier. You can register additional reserved identifiers for the table on a per-header-file basis. Providing additional reserved identifiers can help prevent duplicate symbols and other identifier-related compile and link issues.

The setReservedIdentifiers function allows you to register up to four reserved identifier structures in a TFL table. One set of reserved identifiers can be associated with an arbitrary TFL, wile the other three (if present) must be associated with ANSI®[1] , ISO®[2] , or GNU®[3] libraries.

Example

In the following example, setReservedIdentifiers is used to register four reserved identifier structures, for 'ANSI', 'ISO','GNU', and 'My Custom TFL', respectively.

hLib = RTW.TflTable;

% Create and register TFL entries here

.
.
.

% Create and register reserved identifiers
d{1}.LibraryName = 'ANSI';
d{1}.HeaderInfos{1}.HeaderName = 'math.h';
d{1}.HeaderInfos{1}.ReservedIds = {'a', 'b'}; 
d{1}.HeaderInfos{2}.HeaderName = 'foo.h';
d{1}.HeaderInfos{2}.ReservedIds = {'c', 'd'};

d{2}.LibraryName = 'ISO';
d{2}.HeaderInfos{1}.HeaderName = 'math.h';
d{2}.HeaderInfos{1}.ReservedIds = {'a', 'b'}; 
d{2}.HeaderInfos{2}.HeaderName = 'foo.h';
d{2}.HeaderInfos{2}.ReservedIds = {'c', 'd'};

d{3}.LibraryName = 'GNU';
d{3}.HeaderInfos{1}.HeaderName = 'math.h';
d{3}.HeaderInfos{1}.ReservedIds = {'a', 'b'}; 
d{3}.HeaderInfos{2}.HeaderName = 'foo.h';
d{3}.HeaderInfos{2}.ReservedIds = {'c', 'd'};

d{4}.LibraryName = 'My Custom TFL';
d{4}.HeaderInfos{1}.HeaderName = 'my_math_lib.h';
d{4}.HeaderInfos{1}.ReservedIds = {'y1', 'u1'}; 
d{4}.HeaderInfos{2}.HeaderName = 'my_oper_lib.h';
d{4}.HeaderInfos{2}.ReservedIds = {'foo', 'bar'};

setReservedIdentifiers(hLib, d);

See Also

Adding Target Function Library Reserved Identifiers in the Real-Time Workshop Embedded Coder documentation

Target Function Libraries in the Real-Time Workshop Embedded Coder documentation


[1] ANSI is a registered trademark of the American National Standards Institute, Inc.

[2] ISO is a registered trademark of the International Organization for Standardization.

[3] GNU is a registered trademark of the Free Software Foundation.

  


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