Main Content

createNumericType

Create万博1manbetxnumeric data type definition from imported AUTOSAR data elements

Description

example

createNumericType(arProps,name,applicationDataTypePath)creates aSimulink.NumericTypeobject from an AUTOSAR application data type. The function can be used to work with AUTOSAR elements that you imported by usingupdateAUTOSARProperties.

example

createNumericType(arProps,name,compuMethodPath,implementationDataTypePath)creates aSimulink.NumericTypeobject from an AUTOSAR implementation data type and CompuMethod.

Examples

collapse all

Create a Simulink®numeric data type with the namemyDataTypefrom the AUTOSAR application data type at path/AUTOSAR_PlatformTypes/ApplicationDataTypes/MyAppType.

dataObj = autosar.api.getAUTOSARProperties(mdlName); createNumericType(dataObj,'myDataType',...'/AUTOSAR_PlatformTypes/ApplicationDataTypes/MyAppType');

Create a Simulink numeric data type with the namemyDataTypefrom the AUTOSAR implementation data type at path/AUTOSAR_PlatformTypes/ImplementationDataTypes/uint32by using the computation method from path/a/b/myCM.

dataObj = autosar.api.getAUTOSARProperties(mdlName); createNumericType(dataObj,'myDataType','/a/b/myCM',...'/AUTOSAR_PlatformTypes/ImplementationDataTypes/uint32');

Input Arguments

collapse all

AUTOSAR properties information for a model, previously returned byarProps= autosar.api.getAUTOSARProperties(model).The parametermodelis a handle, character vector, or string scalar representing the model name.

Example:arProps

Data Types:function_handle

数值数据类型为模型创建代表的名字万博1manbetxresentation of an AUTOSAR element.

In the Simulink environment, this numeric data type is mapped to both an application data type and an implementation data type. The application data type provides application-level physical attributes such as real-world range of values, data structure, and physical semantics. The implementation data type provides implementation-level attributes, such as stored-integer minimum and maximum specifications and primitive type (for example, integer).

Example:'myDataType'

Data Types:char|string

Path to AUTOSAR application data type for created Simulink numeric data type. The application data type provides application-level physical attributes such as real-world range of values, data structure, and physical semantics. The application data type is used in simulation.

Example:'/AUTOSAR_PlatformTypes/ApplicationDataTypes/MyAppType'

Data Types:char|string

Path to the AUTOSAR CompuMethod, which is used to translate between the numeric implementation data type and the numeric application data type.

Example:'/a/b/myCM'

Data Types:char|string

Path to AUTOSAR implementation data type for created Simulink numeric data type. The implementation data type provides implementation-level attributes, such as stored-integer minimum and maximum specifications and primitive type (for example, integer). Implementation data types are used in code generation.

Example:'/AUTOSAR_PlatformTypes/ImplementationDataTypes/uint32'

Data Types:char|string

Version History

Introduced in R2019a