Main Content

coder.mapping.defaults.allowedProperties

Return properties for model default mapping category

Description

properties = coder.mapping.defaults.allowedProperties(model,category) returns a cell array of names for properties that are relevant to category for the specified model. Use the property names that the coder.mapping.defaults.allowedProperties function returns in subsequent calls to coder.mapping.defaults.allowedValues and coder.mapping.defaults.set.

example

Examples

collapse all

Get a list of the properties for the model default data categories Inports, Outports, ModelParameters, and InternalData by using calls to coder.mapping.defaults.allowedProperties.

Load the model.

openExample('ConfigurationInterface');

Get a list of the properties for the model default data category Inports.

coder.mapping.defaults.allowedProperties('ConfigurationInterface',...
 'Inports')
ans =

  3×1 cell array

    {'StorageClass'      }
    {'HeaderFile'        }
    {'PreserveDimensions'}

Get a list of the properties for the model default data category Outports.

coder.mapping.defaults.allowedProperties('ConfigurationInterface',...
 'Outports')
ans =

  5×1 cell array

    {'StorageClass'      }
    {'HeaderFile'        }
    {'DefinitionFile'    }
    {'Owner'             }
    {'PreserveDimensions'}

Get a list of the properties for the model default data category ModelParameters.

coder.mapping.defaults.allowedProperties('ConfigurationInterface',...
 'ModelParameters')
ans =

  5×1 cell array

    {'StorageClass'      }
    {'HeaderFile'        }
    {'DefinitionFile'    }
    {'Owner'             }
    {'PreserveDimensions'}

Get a list of the properties for the model default data category InternalData.

coder.mapping.defaults.allowedProperties('ConfigurationInterface',...
 'InternalData')
ans =

  2×1 cell array

    {'StorageClass' }
    {'MemorySection'}

Get a list of the properties for the model default function categories InitializeTerminate and Execution by using calls to coder.mapping.defaults.allowedProperties.

Load the model.

openExample('ConfigurationInterface');

Get a list of the properties for the model default function category InitializeTerminate.

catData = coder.mapping.defaults.allowedProperties('ConfigurationInterface',...
  'InitializeTerminate');
catData
catData =

  2×1 cell array

    {'FunctionCustomizationTemplate'}
    {'MemorySection' 

Get a list of the properties for the model default function category Execution.

catFunctions = coder.mapping.defaults.allowedProperties('ConfigurationInterface',...
'Execution');
catFunctions
catFunctions =

  2×1 cell array

    {'FunctionCustomizationTemplate'}
    {'MemorySection'                }

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: 'Inports'

Data Types: char

Output Argument

collapse all

Cell array of names for properties of a default category for the specified model.

Version History

Introduced in R2018a