50 lines
1.6 KiB
C
50 lines
1.6 KiB
C
//
|
|
// Created by cfif on 23.01.2026.
|
|
//
|
|
|
|
#ifndef HVAC_M7_DIAGNOSTICTASK_H
|
|
#define HVAC_M7_DIAGNOSTICTASK_H
|
|
|
|
#include <cmsis_os.h>
|
|
#include "LoggerInterface.h"
|
|
#include "ccu_candb-binutil.h"
|
|
#include "CanSpamReceiver.h"
|
|
#include "lfs.h"
|
|
|
|
#define LOG_DTC 1
|
|
|
|
#define DTC_TEST_FAILED 1
|
|
#define DTC_TEST_CONFIRMED 8
|
|
#define DTC_TEST_FAILED_CONFIRMED (DTC_TEST_FAILED | DTC_TEST_CONFIRMED)
|
|
|
|
typedef struct {
|
|
uint8_t mask;
|
|
uint8_t *dataResponse;
|
|
} tDiagnosticDTC;
|
|
|
|
typedef struct {
|
|
osMutexId_t access;
|
|
tLoggerInterface *logger;
|
|
|
|
tCanSpamReceiver *canSpamReceiver;
|
|
|
|
bool isNoBitsDTC;
|
|
|
|
bool isCleanDTC;
|
|
|
|
} tDiagnostic;
|
|
|
|
void Diagnostic_Init(tDiagnostic *env, tCanSpamReceiver *canSpamReceiver, tLoggerInterface *logger);
|
|
void set_NoBitsDTC(tDiagnostic *env, bool noBitsDTC);
|
|
void set_Dtc_state(tDiagnostic *env, bool isT15, CCU_Errors_t *CCU_Errors,
|
|
uint8_t *dtc_state_error_model, char *VIN,
|
|
ccu_candb_error_missing_rx_t *CAN_ERROR_MISSLE, ccu_candb_time_missing_rx_t *CAN_TIME_MISSLE,
|
|
uint8_t *LIN1_ERROR_MISSING, uint8_t *LIN2_ERROR_MISSING, uint8_t *LIN3_ERROR_MISSING,
|
|
uint8_t *LIN4_ERROR_MISSING, uint8_t *LIN5_ERROR_MISSING);
|
|
uint32_t diagnostic_ClearDiagnosticInformation_14(tDiagnostic *env);
|
|
uint32_t diagnostic_UDS_ReadDTCInformation_19_count(tDiagnostic *env, tDiagnosticDTC *diagnosticDTC);
|
|
uint32_t diagnostic_UDS_ReadDTCInformation_19_dtc(tDiagnostic *env, tDiagnosticDTC *diagnosticDTC);
|
|
uint32_t diagnostic_UDS_ReadDTCSupportDTC_19_dtc(tDiagnostic *env, tDiagnosticDTC *diagnosticDTC);
|
|
|
|
#endif //HVAC_M7_DIAGNOSTICTASK_H
|