coder.mapping.api.CoderDictionary
Query and set the code settings of dictionary defaults in an Embedded Coder dictionary within a Simulink data dictionary
Since R2021a
Description
A coder dictionary code mappings object and its related functions enable you to configure C code generation settings for dictionary defaults in an Embedded Coder® dictionary within a Simulink® data dictionary. For model data categories, code mappings associate data categories with configurations that consist of a storage class and storage class properties. For functions, code mappings associate function categories with configurations that consist of a function customization template. Reduce the effort of preparing a model for code generation by specifying default configurations for categories of data elements and functions across a model.
Creation
Syntax
Description
returns the active code mappings for the specified dictionary as object
myCoderDictionaryObj
= coder.mapping.api.get(dictionary
)myCoderDictionaryObj
. Code mappings associate data elements and functions in the data dictionary with configurations
for code generation.
If code mappings do not exist, Simulink returns an error. You can create a code mappings object with a call to
coder.mapping.utils.create
.
creates a code mappings environment for the specified data dictionary and returns the
mappings as object myCoderDictionaryObj
= coder.mapping.utils.create(dictionary
)myCoderDictionaryObj
. Code mappings associate data
elements and functions with configurations for C or C++ code generation. If code mappings
exist for the specified data dictionary, the function returns those code mappings.
Input Arguments
Object Functions
setDataDefault | Set default code settings for data category |
getDataDefault | Get default code settings for data category |
setFunctionDefault | Set default function customization template and memory section for model functions category |
getFunctionDefault | Get default function customization template or memory section for model functions category |
Examples
Version History
Introduced in R2021a