]> rtime.felk.cvut.cz Git - arc.git/blob - include/WdgM.h
bc8de2cd82460c4c43aac973c3a01a87d2e7af16
[arc.git] / include / WdgM.h
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
6  * This source code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published by the
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15
16
17
18
19
20
21 #ifndef WDGM_H_
22 #define WDGM_H_
23
24 #define WDGM_SW_MAJOR_VERSION   1
25 #define WDGM_SW_MINOR_VERSION   0
26 #define WDGM_SW_PATCH_VERSION   0
27
28 /* "forward" declare types due to circular dependency chain */
29 typedef uint8 WdgM_SupervisedEntityIdType;
30 typedef uint8 WdgM_ModeType;
31
32 #include "Std_Types.h"
33 #include "WdgM_Cfg.h"
34
35 // API Service ID's
36 #define WDGM_INIT_ID                          0x00
37 #define WDGM_SETMODE_ID                       0x03
38 #define WDGM_UPDATEALIVECOUNTER_ID                        0x04
39 #define WDGM_ACTIVATEALIVESUPERVISION_ID      0x05
40 #define WDGM_DEACTIVATEALIVESUPERVISION_ID    0x06
41 #define WDGM_MAINFUNCTION_TRIGGER_ID          0x06
42 #define WDGM_MAINFUNCTION_ALIVESUPERVISION_ID 0x08
43 #define WDGM_GETMODE_ID                       0x0b
44 #define WDGM_GETALIVESUPERVISIONSTATUS_ID     0x0c
45 #define WDGM_GETGLOBALSTATUS_ID               0x0d
46
47
48 /** @req WDGM004 **/
49 #define WDGM_E_NO_INIT                          0x10
50 #define WDGM_E_PARAM_CONFIG                     0x11
51 #define WDGM_E_PARAM_MODE                           0x12
52 #define WDGM_E_PARAM_SEID                           0x13
53 #define WDGM_E_NULL_POINTER                         0x14
54 #define WDGM_E_DISABLE_NOT_ALLOWED          0x15
55 #define WDGM_E_DEACTIVATE_NOT_ALLOWED       0x16
56 //#define WDGM_E_ALIVE_SUPERVISION          DEM assigned
57 //#define WDGM_E_SET_MODE                   DEM assigned
58 \r
59 Std_ReturnType WdgM_UpdateAliveCounter (WdgM_SupervisedEntityIdType SEid);\r
60 Std_ReturnType WdgM_ActivateAliveSupervision (WdgM_SupervisedEntityIdType SEid);\r
61 Std_ReturnType WdgM_DeactivateAliveSupervision (WdgM_SupervisedEntityIdType SEid);
62 Std_ReturnType WdgM_GetGlobalStatus (WdgM_AliveSupervisionStatusType *Status);
63 Std_ReturnType WdgM_GetAliveSupervisionStatus (WdgM_SupervisedEntityIdType SEid, WdgM_AliveSupervisionStatusType *Status);\r
64 void WdgM_Init(const WdgM_ConfigType* ConfigPtr);
65 void WdgM_DeInit(void);
66 Std_ReturnType WdgM_SetMode(WdgM_ModeType Mode);\r
67 Std_ReturnType WdgM_GetMode(WdgM_ModeType *Mode);
68 void WdgM_MainFunction_AliveSupervision (void);\r
69 void WdgM_MainFunction_Trigger (void);\r
70
71 #endif /*WDGM_H_*/