Choose Code Interface for Code Generation - MATLAB & Simulink (original) (raw)

Main Content

In addition to representing code interfaces as elements in your model design, for some elements, you must provide the code generator with mappings of those elements to code interfaces. The code generator uses the mappings to produce code that can interact with target platform services. You configure a model with a data or service interface, depending on your project requirements, deployment objective, and the code generation product that you are using. Service interfaces require Embedded CoderĀ®.

As the following figure shows, you must configure a model to use a data code interface for application deployment or if you are using Embedded Coder and generating C++ class code. Code generated for application deployment is optimized to a specific scheduler (single-tasking, rate-monotonic, or concurrent) based on your model configuration.

For C component deployment, a service code interface offers benefits such as:

Choose between a data or service interface based on your project requirements and deployment objective.

For more information, see: