Main Content

Configure Internal Data Types for AUTOSAR IncludedDataTypeSets

In an AUTOSAR software component model, you can import and export ARXML descriptions of AUTOSAR included data type sets (IncludedDataTypeSets). An IncludedDataTypeSet defines AUTOSAR data types that are internal to a component and not present in the component interface descriptions. Multiple components can import an IncludedDataTypeSet to share a common set of internal data types. For information about IncludedDataTypeSet workflows, see Included Data Type Sets.

In Simulink®, you can configure an AUTOSAR internal data type to be exported in an ARXML IncludedDataTypeSet and generated in a C header file. In your AUTOSAR component model, create a data type object, use it to describe the internal data type, and map the data type to header file Rte_Type.h. For example:

  1. Create or open an AUTOSAR software component model in which blocks are used internally and are not part of the component model interface. For example, here is a model in which a Constant block is not connected to a model inport or outport.

  2. Create a data type object, Type3, in the base workspace or in a data dictionary. Select the Is alias check box.

    For AUTOSAR IncludedDataTypeSet export, Simulink supports these data types:

    • Numeric

    • Alias

    • Bus

    • Fixed-point

    • Enumerated

  3. Map the Type3 data type to header file Rte_Type.h. In the data type object dialog box, Code Generation tab, set Header file to Rte_Type.h. Click Apply.

  4. To reference Type3 in the model, enter Type3 in the Constant block parameter field Output data type.

    Type3 is internal to the component and is not exported in component interface descriptions. Because you mapped it to header file Rte_Type.h, it is exported in an IncludedDataTypeSet description.

  5. Build the model. In the exported ARXML, inside the description of the component internal behavior, an IncludedDataTypeSet description references the internal data type.


    The generated Rte_Type.h header file contains an entry for the internal data type.

    /* AUTOSAR Implementation data types, specific to software component */
    typedef sint16 Type1;
    typedef sint16 Type2;
    typedef sint16 Type3;
    typedef void* Rte_Instance;

Related Examples

More About