Main Content

coder.mapping.defaults.allowedValues

Return value of property for model default mapping category

Description

example

values = coder.mapping.defaults.allowedValues(model,category,property) returns a cell array of values that are relevant to the specified combination of category and property for the specified model. To set up category, property, and value combinations for a model, use the value names that the function returns in calls to coder.mapping.defaults.set.

Examples

Get Storage Class Values for Default Data Category Model Parameters

Get the list of values that you can specify for property StorageClass for model default data category ModelParameters by calling coder.mapping.defaults.allowedValues.

lclparam_scs = coder.mapping.defaults.allowedValues('ConfigurationInterface', 'ModelParameters',...
  'StorageClass')
lclparam_scs

lclparam_scs =

  14×1 cell array

    {'Default'              }
    {'ExportedGlobal'       }
    {'ImportedExtern'       }
    {'ImportedExternPointer'}
    {'Const'                }
    {'Volatile'             }
    {'ConstVolatile'        }
    {'Define'               }
    {'ImportedDefine'       }
    {'ExportToFile'         }
    {'ImportFromFile'       }
    {'FileScope'            }
    {'GetSet'               }
    {'CompilerFlag'         }

Input Arguments

collapse all

Model file, specified as a character vector. The model must be loaded (for example, by using load_system) or open. You can omit the .slx file extension.

Example: 'myLoadedModel'

Data Types: char

Category name, specified as a character vector. To get valid data and function category names, call the functions coder.mappings.defaults.dataCategories and coder.mappings.defaults.functionCategories.

Example: 'ModelParameters'

Data Types: char

Property name, specified as a character vector. To get valid property names for a default mapping category, call the function coder.mappings.defaults.allowedProperties.

Example: 'StorageClass'

Data Types: char

Output Argument

collapse all

Cell array of values that are for a default category and property combination for the specified model.

Version History

Introduced in R2018a