3

In Autosar, each communication module (Eg, Can, Lin, Eth) contains _type.h and _GeneralTypes.h header files.

  1. What do these header files contain?
  2. What is difference between these two header files?
  3. Why they are named in that way?
Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Girish Onte
  • 107
  • 2
  • 8

1 Answers1

2

The <mod>_type.h file is not part of the Autosar specification. So if it exists, it's specific to the supplier of the Autosar platform, and probably contains some type definitions used internally in the corresponding module.

The <mod>_GeneralTypes.h file is indeed part of the specification, and its purpose is to have types that are shared between the different levels of a particular communication stack. For instance, the CAN stack consists of several Autosar basic software modules - CanTrcv, Can, CanIf, CanTp. Any CAN-related types that are used by two or more of those modules (in practice, CanTp doesn't share types with the others normally) should go into Can_GeneralTypes.h according to the specification.

DUman
  • 2,560
  • 13
  • 16