Code Generation for Arrays of Buses

When you generate code for a model that includes an array of buses, a typedef that represents the underlying bus type appears in the *_types.h file.

Code generation produces an array of C structures that you can integrate with legacy C code that uses arrays of structures. As necessary, code for bus variables (arrays) are generated in the following structures:

  • Block IO

  • States

  • External inputs

  • External outputs

Here is a simplified example of some generated code for an array of buses.

Was this topic helpful?