Application and Component Interfaces
Applications and components are units of code, which the code generator produces from top models. Deploy applications and components for use in target execution environments. For the code generator to produce C or C++ code that can interact with target environment services, you must make the code generator aware of service interface requirements by using a combination of:
Model elements in your top model
A code interface configuration defined in an Embedded Coder Dictionary (C only)
Code mappings that associate the model elements with interfaces defined in the code interface configuration
Generated application and component code interacts with target environment services through these generated code interfaces:
Entry-point functions that target software, such as a scheduler, can call
Function calls to target software, such as platform service functions
Topics
- Model Code Interfaces
Represent code interfaces in top models.
- Periodic and Aperiodic Function Interfaces
Generate callable entry-point functions for the algorithm represented by a top model.
- Startup, Reset, and Shutdown Function Interfaces
Generate callable entry-point functions for startup, reset, and shutdown processing represented by a model.
- Data Interfaces
Generate C or C++ data interface code.
- Service Interfaces
Generate C service interface code for components that interact with target environment resources. (Since R2022b)
- Message Communication Interfaces
Generate C/C++ code to use messages for communication.
- Client-Server Communication Interfaces
Design model that uses client-server communication.
- Device Driver I/O Interfaces
Design a model that reads input from or writes output to hardware devices.
- Multi-Instantiation
Design a component or subcomponent with the goal of using multiple instances within the context of an application.