Main Content

setFunctionDefault

Set default function customization template and memory section for model functions category

    Description

    example

    setFunctionDefault(myCodeMappingObj,category,Name,Value) sets the default function customization template and memory section for the specified category of model entry-point functions.

    Examples

    collapse all

    For model myConfigModel, configure the code generator to use memory section functionFastMem for generating code for model execution functions in the model code mappings.

    cm = coder.mapping.api.get('myConfigModel');
    setFunctionDefault(cm,'Execution','MemorySection','FunctionFastMem');
    

    Input Arguments

    collapse all

    Code mapping object (model code mappings) returned by a call to function coder.mapping.api.get.

    Example: myCM

    Category of model entry-point functions for which to set the function customization template and memory section.

    Example: 'Execution'

    Name-Value Pair Arguments

    Example: 'FunctionCustomizationTemplate' 'exFastFunction'

    Specify comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments as Name1,Value1,…,NameN,ValueN. The order of the name and value pair arguments does not matter.

    Name of a function customization template defined in the Embedded Coder Dictionary associated with the model. If you set the default function customization template for a category of functions to Default, you can specify a memory section for the category of functions.

    Data Types: char | string

    Name of a memory section that is defined in the Embedded Coder Dictionary associated with the model.

    Data Types: char | string

    Introduced in R2020b