Default Code for an Enumerated Data Type
By default, enumerated data types in generated code are defined
in the generated header file model_types.h for
the model. For example, the default code for BasicColors,
which is defined in the previous section, appears as follows:
#ifndef _DEFINED_TYPEDEF_FOR_BasicColors_
#define _DEFINED_TYPEDEF_FOR_BasicColors_
typedef enum {
Red = 0, /* Default value */
Yellow = 1,
Blue = 2,
} BasicColors;
#endif
 | About Enumerated Data Types | | Enumerated Type Safe Casting |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit