getDataStore - Get code and calibration configuration from code mappings for local or shared local
data store - MATLAB ([original](https://www.mathworks.com/help/ecoder/ref/getdatastore.html)) ([raw](?raw))
Get code and calibration configuration from code mappings for local or shared local data store
Since R2020b
Syntax
Description
[propertyValue](#mw%5F7a7001fc-cad0-4780-8323-456618599829) = getDataStore([myCodeMappingObj](#mw%5F1ddddfdc-32a3-4b07-8812-696e9df426e8),[dataStore](#mw%5F09ce790e-dcbe-4fd2-94c0-34be9be5923e),[property](#mw%5Fba3828cf-5e08-4460-91df-1ae47931315b))
returns the value of a code mapping property or calibration property for the specified local or shared local data store. For example, use this function to return the storage class or the calibration access of a measurement property configured for a local or shared local data store in a model.
Examples
From the model code mappings for modelConfigurationRapidPrototypingInterface
, get the name of the storage class that is configured for local data store mode
.
openExample("ConfigurationRapidPrototypingInterface"); cm = coder.mapping.api.get("ConfigurationRapidPrototypingInterface"); scMode = getDataStore(cm,"mode","StorageClass");
From the model code mappings for modelConfigurationRapidPrototypingInterface
, get the code identifier configured for the local data store mode
.
openExample("ConfigurationRapidPrototypingInterface"); cm = coder.mapping.api.get("ConfigurationRapidPrototypingInterface"); idDSMmode = getDataStore(cm,"mode","Identifier");
From the model code mappings for modelConfigurationRapidPrototypingInterface
, get the calibration properties such as calibration access and display identifier configured for local data store mode
.
openExample("ConfigurationRapidPrototypingInterface"); cm = coder.mapping.api.get("ConfigurationRapidPrototypingInterface"); prop_export = getDataStore(cm,"mode","Export"); prop_bitmask = getDataStore(cm,"mode","BitMask"); prop_calaccess = getDataStore(cm,"mode","CalibrationAccess"); prop_compname = getDataStore(cm,"mode","CompuMethod"); prop_dispid = getDataStore(cm,"mode","DisplayIdentifier"); prop_format = getDataStore(cm,"mode","Format");
Input Arguments
Code mapping object (model code mappings) returned by a call to functioncoder.mapping.api.get
.
Example: myCM
Path of the Data Store Memory block for which to return the code mapping information, specified as a character vector or string scalar. Alternatively, you can specify a block handle or the name of the data store. If you specify the name of a data store and that name is not unique within the model, Simulink® returns an error that instructs you to specify the block path or handle.
Example: blockHandle
Data Types: char
| string
| block_handle
Code mapping property for which to return a value. For a storage class defined in the Embedded Coder Dictionary associated with the model, specify a property name or one of these property names.
Information to Return | Property Name |
---|---|
Name of storage class | StorageClass |
Name of variable for data store in the generated code | Identifier |
Name of source definition file that contains definitions for global data that is read by the data store and external code | DefinitionFile |
Name of get function called by code generated for the data store | GetFunction |
Name of source header file that contains declarations for global data that is read by the data store and external code | HeaderFile |
Name of memory section that contains data read by the state | MemorySection |
Name of model for which the code generator places the definition for a data store shared by multiple models in a model hierarchy | Owner |
Boolean value indicating whether the code generator preserves dimensions of a data store that is represented as a multidimensional array | PerserveDimensions |
Name of set function called by code generated for a data store | SetFunction |
Name of structure in generated code for a data store | StructName |
Boolean value indicating whether to export the selected data store to a calibration file (a2l) | Export |
Mask value in hexadecimal format to extract single bits from the data store in a calibration tool | BitMask |
Enumeration value indicating the access of calibration.Calibration for a data store indicates that the data store can be calibrated. NoCalibration indicates that the data store can be read-only and cannot be calibrated.NoCalibration is the default value for the property | CalibrationAccess |
Name of the conversion method used during the calibration | CompuMethod |
Optional display name of the data store for calibration | DisplayIdentifier |
Specifies the display format of the data store being measured in a calibration tool | Format |
Name of measurement service defined in Embedded Coder Dictionary | MeasurementService |
Example: "StorageClass"
Example: "CalibrationAccess"
Output Arguments
Name of the storage class or value of the specified storage class property configured for the specified data store.
Data Types: char
Version History
Introduced in R2020b