* API and type definitions for ECU State Manager.\r
*/\r
\r
+/*\r
+ * Include structure:\r
+ *\r
+ *\r
+ *\r
+ * Rte_Type.h --> Std_Types.h\r
+ * ^ ^\r
+ * | |\r
+ * Rte_EcuM.h <-- EcuM_Types.h*\r
+ * ^ ^\r
+ * | | /-----> EcuM_Cfg.h\r
+ * | | /------> EcuM_Generated_Types.h\r
+ * | | /-------> EcuM_Cbk.h\r
+ * | | /\r
+ * | |/\r
+ * | EcuM.h <----- EcuM_Callout_Stubs.c\r
+ * | ^ \--- EcuM_PBCfg.c\r
+ * | |\r
+ * | |\r
+ * `---------- EcuM_xxx.c ---> Memmap.h\r
+ * \-> Det.h, Dem.h\r
+ *\r
+ * *) Only if (ECUM_USE_SERVICE_PORTS == STD_ON)\r
+ *\r
+ * Problems:\r
+ * - Can_Cfg.h can include just "EcuM_Cbk.h"...\r
+ * .. it will need at EcuM.h.. problem is that EcuM.h includes EcuM_Cbk.h\r
+ * - Most BSW modules uses DEM that in Dem_Types.h will include "Rte_Type.h"\r
+ * (if enabled by CFG_DEM_USE_RTE)\r
+ *\r
+ * - EcuM_Generated_Types.h is quite crappy since it includes the\r
+ *\r
+ *\r
+ */\r
+\r
+\r
#ifndef ECUM_H_\r
#define ECUM_H_\r
\r
#define ECUM_AR_MINOR_VERSION 2\r
#define ECUM_AR_PATCH_VERSION 2\r
\r
+struct EcuM_Config;\r
+typedef struct EcuM_Config EcuM_ConfigType;\r
+\r
+/* Holds EcuM_ConfigType */\r
+/* TODO: forward declare all config types here ? */\r
+/* TODO: EcuM_Generated_Types must have types from Ecu_Types.h */\r
+#include "EcuM_Types.h"\r
+#include "EcuM_Generated_Types.h"\r
#include "EcuM_Cfg.h"\r
+#include "EcuM_Cbk.h"\r
\r
#if defined(USE_COM)\r
#include "ComStack_Types.h"\r
#endif\r
-#if (ECUM_USE_SERVICE_PORTS == STD_ON) && defined(USE_RTE)\r
-#include "Rte_Type.h"\r
-#endif\r
\r
-#include "EcuM_Types.h"\r
\r
\r
/** @name Error Codes */\r
#define ECUM_AR_MINOR_VERSION 2\r
#define ECUM_AR_PATCH_VERSION 2\r
\r
-#include "EcuM_Cfg.h"\r
-\r
#if ( ECUM_VERSION_INFO_API == STD_ON)\r
#define EcuM_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,ECUM)\r
#endif\r
\r
//lint -emacro(904,VALIDATE,VALIDATE_RV,VALIDATE_NO_RV) //904 PC-Lint exception to MISRA 14.7 (validate macros).\r
\r
+#if (ECUM_USE_SERVICE_PORTS==STD_ON)\r
+/* Rte_EcuM.h will include Rte_Type.h */\r
+#include "Rte_EcuM.h"\r
+#endif\r
#include "EcuM.h"\r
-#include "EcuM_Cbk.h"\r
#include "EcuM_Internals.h"\r
+\r
#if defined(USE_DEM)\r
#include "Dem.h"\r
#endif\r