getInport
Get code and calibration configuration from code mappings for root-level inport
Since R2020b
Description
returns the value of a code mapping property or calibration property for the specified
root-level Inport block. For example, use this function to return the storage
class or the value of a storage class property configured for a root-level inport in a
model, or to return the calibration access of the inport.propertyValue
= getInport(myCodeMappingObj
,inportBlock
,property
)
Examples
Get Storage Class Configured for Root-Level Inport
From the model code mappings for model
ConfigurationRapidPrototypingInterface
, get the name of the storage
class that is configured for root-level inport In1
.
openExample("ConfigurationRapidPrototypingInterface"); cm = coder.mapping.api.get("ConfigurationRapidPrototypingInterface"); scIn1 = getInport(cm,"In1","StorageClass");
Get Code Identifier Configured for Root-Level Inport
From the model code mappings for model
ConfigurationRapidPrototypingInterface
, get the code identifier
configured for root-level inport In1
.
openExample("ConfigurationRapidPrototypingInterface"); cm = coder.mapping.api.get("ConfigurationRapidPrototypingInterface"); idIn1 = getInport(cm,"In1","Identifier");
Get Calibration Properties Configured for Root-Level Inport
From the model code mappings for model
ConfigurationRapidPrototypingInterface
, get the calibration
properties such as calibration access and display identifier configured for root-level
inport In1
.
openExample("ConfigurationRapidPrototypingInterface"); cm = coder.mapping.api.get("ConfigurationRapidPrototypingInterface"); prop_export = getInport(cm,"In1","Export"); prop_bitmask = getInport(cm,"In1","BitMask"); prop_calaccess = getInport(cm,"In1","CalibrationAccess"); prop_compname = getInport(cm,"In1","CompuMethod"); prop_dispid = getInport(cm,"In1","DisplayIdentifier"); prop_format = getInport(cm,"In1","Format");
Input Arguments
myCodeMappingObj
— Code mapping object
CodeMapping
object
Code mapping object (model code mappings) returned by a call to function
coder.mapping.api.get
.
Example: myCM
inportBlock
— Name, path, or handle of root-level inport
character vector | string scalar | block handle
Name, path, or handle of the root-level inport for which to return the code mapping information.
Example: "In1"
Data Types: char
| string
| block_handle
property
— Code mapping property value to return
StorageClass
| Identifier
| DefinitionFile
| GetFunction
| HeaderFile
| Owner
| PreserveDimensions
| SetFunction
| StructName
| storage class property name | Export
| BitMask
| CalibrationAccess
| CompuMethod
| DisplayIdentifier
| Format
| ReceiverService
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 inport in the generated code | Identifier |
Name of source definition file that contains definitions for global data that is read by the inport and external code | DefinitionFile |
Name of get function called by code generated for the
inport | GetFunction |
Name of source header file that contains declarations for global data that is read by the inport and external code | HeaderFile |
Name of model for which the code generator places the definition for an inport shared by multiple models in a model hierarchy | Owner |
Boolean value indicating whether the code generator preserves dimensions of an inport that is represented as a multidimensional array | PreserveDimensions |
Name of set function called by code generated for an
inport | SetFunction |
Name of structure in generated code for an inport | StructName |
Boolean value indicating whether to export the selected inport to a calibration file (a2l) | Export |
Mask value in hexadecimal format to extract single bits from the inport in a calibration tool | BitMask |
Enumeration value indicating the access of calibration.
Calibration for an inport indicates that the inport can be
calibrated. NoCalibration indicates that the inport can be
read-only but 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 inport for calibration | DisplayIdentifier |
Specifies the display format of the inport being measured in a calibration tool | Format |
Name of receiver service defined in Embedded Coder Dictionary | ReceiverService |
Example: "StorageClass"
Example: "CalibrationAccess"
Output Arguments
propertyValue
— Name or value of the property returned
character vector | boolean
Name or value of the property configured for the specified root-level inport.
Data Types: char
| logical
Version History
Introduced in R2020b
See Also
coder.mapping.api.CodeMapping
| coder.mapping.api.get
| find
| getDataDefault
| setDataDefault
| setInport
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)