setFunctionDefault
Set default function customization template and memory section for model functions category
Since R2021a
Description
setFunctionDefault(
sets the default function customization template and memory section for the specified
category of model entry-point functions.myCoderDictionaryObj
,category
,Name,Value
)
Examples
Configure the default memory section for a data category
Use the coder.mapping.api.get
function to access the
CoderDictionary
object associated with the data dictionary.
cm = coder.mapping.api.get('codeDefinitions.sldd');
To see the memory section for Execution
functions in the
dictionary, use the getFunctionDefault
function.
value = getFunctionDefault(cm, 'Execution', 'MemorySection')
value = 'None'
To configure the memory section for the category, use the
setFunctionDefault
function.
setFunctionDefault(cm, 'Execution', 'MemorySection', 'functionFastMem')
To verify that the memory section for the Execution
category is
now set to functionFastMem
, use the
getFunctionDefault
function.
value = getFunctionDefault(cm, 'Execution', 'MemorySection')
value = 'functionFastMem'
Input Arguments
myCoderDictionaryObj
— Coder dictionary object
CoderDictionary
object
Coder dictionary object returned by a call to function
coder.mapping.api.get
.
category
— Model function category
InitializeTerminate
| Execution
| SharedUtility
Category of model entry-point functions for which to set the function customization template and memory section.
Example: 'Execution'
Name-Value 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.
FunctionCustomizationTemplate
— Name of function customization template
character vector | string scalar
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
MemorySection
— Name of memory section
None
| MemConst
| MemVolatile
| MemConstVolatile
| internalDataMem
| functionFastMem
| functionSlowMem
Name of a memory section that is defined in the Embedded Coder Dictionary associated with the model.
Data Types: char
| string
Version History
Introduced in R2021a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)