#ifndef __UDS_DTC_H__ #define __UDS_DTC_H__ // #include "config.h" #include "uds_config.h" #define DTC_FOREACH(func)\ /*01*/ func(0xC11187,BMS_COMM_LOSE) \ /*02*/ func(0xC29387,VCU_COMM_LOSE) \ /*03*/ func(0x911716,ECU_VOLTAGE_LOW) \ /*04*/ func(0x911717,ECU_VOLTAGE_HIGH) \ /*05*/ func(0xC07388,ECU_ENTER_BUSOFF) \ /*06*/ func(0x1F400C,INPUT_OVERVOLTAGE) \ /*07*/ func(0x1F400D,INPUT_UNDERVOLTAGE) \ /*08*/ func(0x1F4000,CHARGE_TEMP_DERATE) \ /*09*/ func(0x1F4001,INTER_TEMP_DERATE) \ /*10*/ func(0x1F4002,INTER_OVERTEMP) \ /*11*/ func(0x1F4003,CHARGE_OVERTEMP) \ /*12*/ func(0x1F4004,DC_POS_RELAY_ADH) \ /*13*/ func(0x1F4005,DC_NEG_RELAY_ADH) \ /*14*/ func(0x1F4006,AC_POS_RELAY_ADH) \ /*15*/ func(0x1F4007,AC_NEG_RELAY_ADH) \ /*16*/ func(0x1F4008,HV_INTERLOCK) \ /*17*/ func(0x1F4009,CC_CC2_RELAY_CTRL_INV) \ /*18*/ func(0x1F400A,CP_CC1_RELAY_CTRL_INV) \ /*19*/ func(0x1F400B,DCU_VOL_ABN) #define GENERATE_DTC_ID(value,name) id##name , #define GENERATE_DTC_VALUE_ARRAY(value,name) value, #define GENERATE_DTC_FAULT_FLAG(value,name) uint32_t f##name: 1; #define GENERATE_DTC_TIMER_ARRAY(value,name) uint16_t u##name; #define GENERATE_DTC_OPTION(value,name) uint32_t op##name: 1; //DTC 请求子功能 #define DTC_ReportNumberOfDTCByStatusMask 0x01 #define DTC_ReportDTCByStatusMask 0x02 #define DTC_ReportDTCSnapshotIdentification 0x03 #define DTC_ReportDTCSnapshotRecordByDTCNumber 0x04 #define DTC_ReportDTCExtendedDataRecordByDTCNumber 0x06 #define DTC_ReportSupportedDTCs 0x0A //DTCStatusMask/statusOfDtc 参数相关信息 #define DTC_STATUS_Test_Failed 0//测试失效 #define DTC_STATUS_Test_Failed_This_Monitoring_Cycle 1//本检测周期测试失效 #define DTC_STATUS_Pending_DTC 2//等待DTC #define DTC_STATUS_Confirmed_DTC 3//确认DTC" #define DTC_STATUS_Test_Not_Completed_Since_Last_Clear 4//上次清零后测试未完成 #define DTC_STATUS_Test_Failed_Since_Last_Clear 5//上次清零后测试失效 #define DTC_STATUS_Test_Not_Completed_This_Monitoring_Cycle 6//本检测周期测试未完成 #define DTC_STATUS_Warning_Indicator_Requested 7//警告指示位请求 #define DTC_STATUS_Support_Bit_Status ((1<