Main Content

Generated Code Interfacing

Exchange data between generated code and external application code using C API interface and Code Descriptor interface

Some applications must exchange data between generated code and external application code. Use the MATLAB code descriptor API to obtain the metadata about the generated code. Use the C API to interface with the generated code at runtime and to monitor and tune model elements during the execution of model code on the target platform.

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.

Classes

expand all

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
coder.descriptor.BreakpointDataInterfaceReturn information about tunable breakpoint set data for a lookup table that has tunable parameters
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.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.SignalOfInterestReturn information about signals of interest in generated code (Since R2025a)
coder.descriptor.TimerFunctionRetrieve information about function prototypes for timer services (Since R2022b)
coder.descriptor.TimerServiceInterfaceReturn information about timer service interface (Since R2022b)
coder.descriptor.DataImplementationReturn information about implementation of data in generated code (Since R2025a)
coder.descriptor.TypedRegionReturn information about implementation of typed data in generated code (Since R2025a)
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.EnumReturn information about variable of enum type (Since R2024b)
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

getCodeDescriptorCreate coder.codedescriptor.CodeDescriptor object for model

Topics

Configure Data Types in Generated Code

C API Interface

Code Descriptor Interface