| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop Embedded Coder |
| Contents | Index |
| Learn more about Real-Time Workshop Embedded Coder |
void setTflCFunctionEntryParameters(hEntry, varargin)
Handle to a TFL table entry previously returned by hEntry = RTW.TflCFunctionEntry.
Parameter/value pairs for the function entry. See varargin Parameters.
The following function entry parameters can be specified to the setTflCFunctionEntryParameters function using parameter/value argument pairs. For example,
setTflCFunctionEntryParameters(..., 'Key', 'sqrt', ...);
String specifying the name of the function to be replaced. The name must match one of the functions supported for replacement:
| Floating-Point Math Functions | |||
| abs | cos | log10 | tan |
| acos | cosh | pow (Simulink)/power (Embedded MATLAB) | tanh |
| asin | exp | sin | |
| atan | floor | sinh | |
| ceil | log | sqrt | |
| Copy Utility Function | |||
| memcpy | |||
| Nonfinite Support Utility Functions | |||
| getInf | getMinusInf | getNaN | |
String specifying '' or 'RTW.copyFileToBuildDir'. The default is ''. If you specify 'RTW.copyFileToBuildDir', and if this function entry is matched and used, the function RTW.copyFileToBuildDir will be called after code generation to copy additional header, source, or object files that you have specified for this function entry to the build directory. For more information, see Specifying Build Information for Function Replacements in the Real-Time Workshop Embedded Coder documentation.
Positive integer specifying the function entry's search priority, 0-100, relative to other entries of the same function name and conceptual argument list within this table. Highest priority is 0, and lowest priority is 100. The default is 100. If the table provides two implementations for a function, the implementation with the higher priority will shadow the one with the lower priority.
Specifies the type of entry: FCN_IMPL_FUNCT for function or FCN_IMPL_MACRO for macro. The default is FCN_IMPL_FUNCT.
String specifying the name of the implementation function, for example, 'sqrt', which can match or differ from the Key name. The default is ''.
String specifying the name of the header file that declares the implementation function, for example, '<math.h>'. The default is ''.
String specifying the full path to the implementation header file. The default is ''.
String specifying the name of the implementation source file. The default is ''.
String specifying the full path to the implementation source file. The default is ''.
Boolean value used to flag the code generator that the implementation function described by this entry should accept expression inputs. The default value is true if ImplType equals FCN_IMPL_FUNCT and false if ImplType equals FCN_IMPL_MACRO.
If the value is true, expression inputs are integrated into the generated code in a form similar to the following:
rtY.Out1 = mySin(rtU.In1 + rtU.In2);
If the value is false, a temporary variable is generated for the expression input, as follows:
real_T rtb_Sum; rtb_Sum = rtU.In1 + rtU.In2; rtY.Out1 = mySin(rtb_Sum);
Boolean value used to flag the code generator that the implementation function described by this entry should not be optimized away. This parameter applies to implementation functions that return void but should not be optimized away, such as a memcpy implementation or an implementation function that accesses global memory values. For those implementation functions only, you must include this parameter and specify the value true. The default is false.
The setTflCFunctionEntryParameters function sets specified parameters for a function entry in a TFL table.
In the following example, the setTflCFunctionEntryParameters function is used to set specified parameters for a TFL function entry for sqrt.
fcn_entry = RTW.TflCFunctionEntry;
fcn_entry.setTflCFunctionEntryParameters( ...
'Key', 'sqrt', ...
'Priority', 100, ...
'ImplementationName', 'sqrt', ...
'ImplementationHeaderFile', '<math.h>' );Example: Mapping Math Functions to Target-Specific Implementations in the Real-Time Workshop Embedded Coder documentation
Creating Function Replacement Tables in the Real-Time Workshop Embedded Coder documentation
Replacing Math Functions and Operators Using Target Function Libraries in the Real-Time Workshop Embedded Coder documentation
![]() | setStepMethodName (RTW.ModelCPPClass) | setTflCOperationEntryParameters | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |