getFunctionDefault

Get default function customization template or memory section for model functions category

    Description

    example

    propertyValue = getFunctionDefault(myCodeMappingObj,category,property) returns the value of the specified property for the specified function category.

    Examples

    collapse all

    For model myConfigModel, get the default function customization template for execution functions from the model code mappings.

    cm = coder.mapping.api.get('myConfigModel');
    defaultFuncTemplateExe = getFunctionDefault(cm,'Execution','FunctionCustomizationTemplate');
    

    For model myConfigModel, get the default function customization template for initialize and terminate functions from the model code mappings.

    cm = coder.mapping.api.get('myConfigModel');
    defaultMemSecExe = getFunctionDefault(cm,'InitializeTerminate','MemorySection');
    

    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 return the default function customization template or memory section.

    Example: 'Execution'

    FunctionCustomizationTemplate or MemorySection for which to return a value.

    Example: 'FunctionCustomizationTemplate'

    Output Arguments

    collapse all

    Name of the function customization template or memory section.

    Data Types: char | string

    Introduced in R2020b