1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
23 #ifndef DCM_TYPES_H_
\r
24 #define DCM_TYPES_H_
\r
25 #include "Std_Types.h"
\r
30 typedef uint8 Dcm_SecLevelType;
\r
31 #define DCM_SEC_LEV_LOCKED ((Dcm_SecLevelType)0x00)
\r
32 #define DCM_SEC_LEV_L1 ((Dcm_SecLevelType)0x01)
\r
33 #define DCM_SEC_LEV_ALL ((Dcm_SecLevelType)0xFF)
\r
38 typedef uint8 Dcm_SesCtrlType;
\r
39 #define DCM_DEFAULT_SESSION ((Dcm_SesCtrlType)0x01)
\r
40 #define DCM_PROGRAMMING_SESSION ((Dcm_SesCtrlType)0x02)
\r
41 #define DCM_EXTENDED_DIAGNOSTIC_SESSION ((Dcm_SesCtrlType)0x03)
\r
42 #define DCM_SAFTEY_SYSTEM_DIAGNOSTIC_SESSION ((Dcm_SesCtrlType)0x04)
\r
43 #define DCM_ALL_SESSION_LEVEL ((Dcm_SesCtrlType)0xFF)
\r
45 typedef uint8 Dcm_ConfirmationStatusType;
\r
46 #define DCM_RES_POS_OK ((Dcm_ConfirmationStatusType)0x00)
\r
47 #define DCM_RES_POS_NOT_OK ((Dcm_ConfirmationStatusType)0x01)
\r
48 #define DCM_RES_NEG_OK ((Dcm_ConfirmationStatusType)0x02)
\r
49 #define DECM_RES_NEG_NOT_OK ((Dcm_ConfirmationStatusType)0x03)
\r
54 typedef uint8 Dcm_ProtocolType;
\r
55 #define DCM_OBD_ON_CAN ((Dcm_ProtocolType)0x00)
\r
56 #define DCM_UDS_ON_CAN ((Dcm_ProtocolType)0x01)
\r
57 #define DCM_UDS_ON_FLEAXRAY ((Dcm_ProtocolType)0x02)
\r
58 #define DCM_ROE_ON_CAN ((Dcm_ProtocolType)0x03)
\r
59 #define DCM_ROE_ON_FLEXRAY ((Dcm_ProtocolType)0x04)
\r
60 #define DCM_PERIODICTRANS_ON_CAN ((Dcm_ProtocolType)0x05)
\r
61 #define DCM_PERIODICTRANS_ON_FLEXRAY ((Dcm_ProtocolType)0x06)
\r
64 * Dcm_ReturnReadMemoryType
\r
66 typedef uint8 Dcm_ReturnReadMemoryType;
\r
67 #define DCM_READ_OK ((Dcm_ReturnReadMemoryType)0x00)
\r
68 #define DCM_READ_PENDING ((Dcm_ReturnReadMemoryType)0x01)
\r
69 #define DCM_READ_FAILED ((Dcm_ReturnReadMemoryType)0x02)
\r
72 * Dcm_ReturnWriteMemoryType
\r
74 typedef uint8 Dcm_ReturnWriteMemoryType;
\r
75 #define DCM_WRITE_OK ((Dcm_ReturnWriteMemoryType)0x00)
\r
76 #define DCM_WRITE_PENDING ((Dcm_ReturnWriteMemoryType)0x01)
\r
77 #define DCM_WRITE_FAILED ((Dcm_ReturnWriteMemoryType)0x02)
\r
82 typedef uint8 Dcm_OpStatusType;
\r
83 #define DCM_INITIAL ((Dcm_OpStatusType)0x00)
\r
84 #define DCM_PENDING ((Dcm_OpStatusType)0X01)
\r
85 #define DCM_CANCEL ((Dcm_OpStatusType)0x02)
\r
86 #define DCM_FORCE_RCRRP_OK ((Dcm_OpStatusType)0X03)
\r
89 * Dcm_NegativeResponseCodeType
\r
91 typedef uint8 Dcm_NegativeResponseCodeType;
\r
92 #define DCM_E_GENERALREJECT ((Dcm_NegativeResponseCodeType)0x10)
\r
93 #define DCM_E_BUSYREPEATREQUEST ((Dcm_NegativeResponseCodeType)0x21)
\r
94 #define DCM_E_CONDITIONSNOTCORRECT ((Dcm_NegativeResponseCodeType)0x22)
\r
95 #define DCM_E_REQUESTSEQUENCEERROR ((Dcm_NegativeResponseCodeType)0x24)
\r
96 #define DCM_E_REQUESTOUTOFRANGE ((Dcm_NegativeResponseCodeType)0x31)
\r
97 #define DCM_E_SECUTITYACCESSDENIED ((Dcm_NegativeResponseCodeType)0x33)
\r
98 #define DCM_E_GENERALPROGRAMMINGFAILURE ((Dcm_NegativeResponseCodeType)0x72)
\r
99 #define DCM_E_SUBFUNCTIONNOTSUPPORTEDINACTIVESESSION ((Dcm_NegativeResponseCodeType)0x7E)
\r
100 #define DCM_E_RPMTOOHIGH ((Dcm_NegativeResponseCodeType)0x81)
\r
101 #define DCM_E_RPMTOLOW ((Dcm_NegativeResponseCodeType)0x82)
\r
102 #define DCM_E_ENGINEISRUNNING ((Dcm_NegativeResponseCodeType)0x83)
\r
103 #define DCM_E_ENGINEISNOTRUNNING ((Dcm_NegativeResponseCodeType)0x84)
\r
104 #define DCM_E_ENGINERUNTIMETOOLOW ((Dcm_NegativeResponseCodeType)0x85)
\r
105 #define DCM_E_TEMPERATURETOOHIGH ((Dcm_NegativeResponseCodeType)0x86)
\r
106 #define DCM_E_TEMPERATURETOOLOW ((Dcm_NegativeResponseCodeType)0x87)
\r
107 #define DCM_E_VEHICLESPEEDTOOHIGH ((Dcm_NegativeResponseCodeType)0x88)
\r
108 #define DCM_E_VEHICLESPEEDTOOLOW ((Dcm_NegativeResponseCodeType)0x89)
\r
109 #define DCM_E_THROTTLE_PEDALTOOHIGH ((Dcm_NegativeResponseCodeType)0x8A)
\r
110 #define DCM_E_THROTTLE_PEDALTOOLOW ((Dcm_NegativeResponseCodeType)0x8B)
\r
111 #define DCM_E_TRANSMISSIONRANGENOTINNEUTRAL ((Dcm_NegativeResponseCodeType)0x8C)
\r
112 #define DCM_E_TRANSMISSIONRANGENOTINGEAR ((Dcm_NegativeResponseCodeType)0x8D)
\r
113 #define DCM_E_BRAKESWITCH_NOTCLOSED ((Dcm_NegativeResponseCodeType)0x8F)
\r
114 #define DCM_E_SHIFTERLEVERNOTINPARK ((Dcm_NegativeResponseCodeType)0x90)
\r
115 #define DCM_E_TORQUECONVERTERCLUTCHLOCKED ((Dcm_NegativeResponseCodeType)0x91)
\r
116 #define DCM_E_VOLTAGETOOHIGH ((Dcm_NegativeResponseCodeType)0x92)
\r
117 #define DCM_E_VOLTAGETOOLOW ((Dcm_NegativeResponseCodeType)0x93)
\r
119 #define DCM_E_POSITIVERESPONSE ((Dcm_NegativeResponseCodeType)0x00)
\r
120 #define DCM_E_SERVICENOTSUPPORTED ((Dcm_NegativeResponseCodeType)0x11)
\r
121 #define DCM_E_SUBFUNCTIONNOTSUPPORTED ((Dcm_NegativeResponseCodeType)0x12)
\r
122 #define DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT ((Dcm_NegativeResponseCodeType)0x13)
\r
123 #define DCM_E_RESPONSEPENDING ((Dcm_NegativeResponseCodeType)0x78)
\r
124 #define DCM_E_SERVICENOTSUPPORTEDINACTIVESESSION ((Dcm_NegativeResponseCodeType)0x7F)
\r
127 typedef uint8 Dcm_StatusType;
\r
128 #define DCM_E_OK (Dcm_StatusType)0x00u
\r
129 #define DCM_E_COMPARE_KEY_FAILED (Dcm_StatusType)0x01u
\r
130 #define DCM_E_TI_PREPARE_LIMITS (Dcm_StatusType)0x02u
\r
131 #define DCM_E_TI_PREPARE_INCONSTENT (Dcm_StatusType)0x03u
\r
132 #define DCM_E_SESSION_NOT_ALLOWED (Dcm_StatusType)0x04u
\r
133 #define DCM_E_PROTOCOL_NOT_ALLOWED (Dcm_StatusType)0x05u
\r
134 #define DCM_E_ROE_NOT_ACCEPTED (Dcm_StatusType)0x06u
\r
135 #define DCM_E_PERIODICID_NOT_ACCEPTED (Dcm_StatusType)0x07u
\r
136 #define DCM_E_REQUEST_NOT_ACCEPTED (Dcm_StatusType)0x08u
\r
137 #define DCM_E_REQUEST_ENV_NOK (Dcm_StatusType)0x09u
\r
139 typedef uint8 Dcm_PeriodicTransmitModeType;
\r
140 #define DCM_PERIODICTRANSMIT_DEFAULT_MODE (Dcm_PeriodicTransmitModeType)0x00u
\r
141 #define DCM_PERIODICTRANSMIT_SLOWRATE_MODE (Dcm_PeriodicTransmitModeType)0x01u
\r
142 #define DCM_PERIODICTRANSMIT_MEDIUM_MODE (Dcm_PeriodicTransmitModeType)0x02u
\r
143 #define DCM_PERIODICTRANSMIT_FAST_MODE (Dcm_PeriodicTransmitModeType)0x03u
\r
144 #define DCM_PERIODICTRANSMIT_STOPSENDING_MODE (Dcm_PeriodicTransmitModeType)0x04u
\r
148 typedef uint8 Dcm_DDDSubfunctionType;
\r
149 #define DCM_DDD_SUBFUNCTION_DEFINEBYDID (Dcm_DDDSubfunctionType)0x01u
\r
150 #define DCM_DDD_SUBFUNCTION_DEFINEBYADDRESS (Dcm_DDDSubfunctionType)0x02u
\r
151 #define DCM_DDD_SUBFUNCTION_CLEAR (Dcm_DDDSubfunctionType)0x03u
\r
154 typedef uint8 Dcm_PeriodicDidStartType;
\r
155 #define DCM_PERIODIC_TRANISMIT_STOP (Dcm_PeriodicDidStartType)0
\r
156 #define DCM_PERIODIC_TRANISMIT_START (Dcm_PeriodicDidStartType)0x01u
\r
158 typedef uint8 Dcm_DDDSourceStateType;
\r
159 #define DCM_DDDSOURCE_BY_DID (Dcm_DDDSourceStateType)0x00u
\r
160 #define DCM_DDDSOURCE_BY_ADDRESS (Dcm_DDDSourceStateType)0x01u
\r
162 typedef uint8 Dcm_IOControlParameterType;
\r
163 #define DCM_RETURN_CONTROL_TO_ECU (Dcm_IOControlParameterType)0x0
\r
164 #define DCM_RESET_TO_DEFAULT (Dcm_IOControlParameterType)0x01
\r
165 #define DCM_FREEZE_CURRENT_STATE (Dcm_IOControlParameterType)0x02
\r
166 #define DCM_SHORT_TERM_ADJUSTMENT (Dcm_IOControlParameterType)0x03
\r
168 #endif /*DCM_TYPES_H_*/
\r