Main Content

Generated Code Interfacing

Tune parameters and measure signal data by using ASAP2 and C API interfaces and view generated code metadata

Some applications must exchange data between generated code and external application code. Use the ASAP2 and CDF interface to establish a communication channel between development and target computers, export an ASAP2 file containing description format of the internal ECU variables, or export a Calibration Data Format (CDF) file containing the information about parameters in a machine-readable format. Use the C API to exchange data between generated code and external code.

To obtain metadata about the generated code, use the code descriptor programming interface.

Sample Target Environment Service Implementations of Data Communication Methods shows samples of how target environment services might implement the three types of data communication methods: direct access, outside execution, and during execution.

Tools

Generate Calibration FilesGenerate ASAP2 and CDF files (Since R2021b)

Classes

expand all

coder.asap2.AxisInfoSet values for axis to describe lookup table (Since R2022b)
coder.asap2.CharacteristicCreate characteristic object (Since R2022b)
coder.asap2.CompuMethodCreate compu method object (Since R2022b)
coder.asap2.FunctionCreate function object (Since R2022b)
coder.asap2.GroupCreate group object (Since R2023b)
coder.asap2.MeasurementCreate measurement object (Since R2022b)
coder.asap2.RecordLayoutCreate record layout object (Since R2023a)
coder.asap2.UserCustomizeBaseCustomize project and module settings (Since R2022b)
coder.codedescriptor.CodeDescriptorReturn information about generated code
coder.descriptor.DataInterfaceReturn information about different types of data interfaces
coder.descriptor.FunctionInterfaceReturn information about entry-point functions
coder.descriptor.LookupTableDataInterfaceReturn information about Lookup Table blocks that have tunable parameters (Since R2020a)
coder.descriptor.BreakpointDataInterfaceReturn information about tunable breakpoint set data for a lookup table that has tunable parameters (Since R2020a)
coder.descriptor.DataTransferElementReturn information about data transfer signal (Since R2022b)
coder.descriptor.DataTransferFunctionReturn information about function prototypes for data transfer service interfaces (Since R2022b)
coder.descriptor.DataTransferServiceInterfaceReturn information about data transfer service interface (Since R2022b)
coder.descriptor.MeasurementServiceInterfaceReturn information about measurement service interfaces (Since R2023a)
coder.descriptor.ParameterTuningServiceInterfaceReturn information about parameter tuning service interfaces (Since R2023a)
coder.descriptor.ParameterArgumentTuningServiceInterfaceReturn information about parameter argument tuning service interfaces (Since R2023a)
coder.descriptor.SenderReceiverServiceInterfaceReturn information about sender and receiver service interfaces (Since R2022b)
coder.descriptor.ServiceFunctionsReturn list of service functions that entry-point function calls (Since R2022b)
coder.descriptor.ServiceInterfaceReturn service interface information required to generate service functions (Since R2022b)
coder.descriptor.TimerFunctionRetrieve information about function prototypes for timer services (Since R2022b)
coder.descriptor.TimerServiceInterfaceReturn information about timer service interface (Since R2022b)
coder.descriptor.types.AggregateReturn information about variable of aggregate type (Since R2024a)
coder.descriptor.types.AggregateElementReturn information about element of aggregate type (Since R2024a)
coder.descriptor.types.ArgumentReturn information about argument associated with function or method in generated code (Since R2024a)
coder.descriptor.types.BoolReturn information about variable of Boolean type (Since R2024a)
coder.descriptor.types.CharReturn information about variable of character type (Since R2024a)
coder.descriptor.types.ComplexReturn information about variable of complex type (Since R2024a)
coder.descriptor.types.DoubleReturn information about variable of double-precision type (Since R2024a)
coder.descriptor.types.FixedReturn information about variable of fixed-point type (Since R2024a)
coder.descriptor.types.HalfReturn information about variable of half-precision type (Since R2024a)
coder.descriptor.types.IntegerReturn information about variable of integer type (Since R2024a)
coder.descriptor.types.MatrixReturn information about variable of matrix type (Since R2024a)
coder.descriptor.types.NumericReturn information about variable of numeric type (Since R2024a)
coder.descriptor.types.PointerReturn information about variable of pointer type (Since R2024a)
coder.descriptor.types.PrototypeReturn information about function prototype in generated code (Since R2024a)
coder.descriptor.types.ReferenceReturn information about variable of reference type (Since R2024a)
coder.descriptor.types.ScalarReturn information about variable of scalar type (Since R2024a)
coder.descriptor.types.SingleReturn information about variable of single-precision type (Since R2024a)
coder.descriptor.types.StructReturn information about variable of struct type (Since R2024a)
coder.descriptor.types.TypeReturn information about data type of modeling element or corresponding variable in generated code (Since R2024a)
coder.descriptor.types.UnionReturn information about variable of union type (Since R2024a)
coder.descriptor.types.VoidRepresent base type of void pointer (Since R2024a)

Functions

expand all

coder.asap2.exportGenerate ASAP2 (A2L) file according to ASAM MCD-2 MC standards (Since R2021a)
coder.asap2.getEcuDescriptionsECU description object for model (Since R2022b)
coder.asap2.mergeMerge data elements from multiple ASAP2 (A2L) files (Since R2023a)
coder.cdf.exportGenerate CDF (Calibration Data Format) file according to ASAM AE CDF standards (Since R2021a)
getCodeDescriptorCreate coder.codedescriptor.CodeDescriptor object for model

Topics

ASAP2 and CDF Interface

C API Interface

Code Descriptor Interface