53 lines
1.1 KiB
C
53 lines
1.1 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"
|
|
|
|
#define DIAGNOSTIC_QUEUE_SIZE 10
|
|
|
|
typedef enum {
|
|
DIAGNOSTIC_UDS_ClearDiagnosticInformation_14 = 0x00,
|
|
DIAGNOSTIC_UDS_ReadDTCInformation_19_1 = 0x01,
|
|
DIAGNOSTIC_UDS_ReadDTCInformation_19_2 = 0x2
|
|
} eDiagnosticType;
|
|
|
|
typedef struct {
|
|
uint8_t mask;
|
|
uint8_t *dataResponse;
|
|
} tDiagnosticDTC;
|
|
|
|
typedef struct {
|
|
osMutexId_t access;
|
|
osMessageQueueId_t queue;
|
|
eDiagnosticType diagnosticType;
|
|
tLoggerInterface *logger;
|
|
|
|
struct {
|
|
osThreadId_t id;
|
|
uint32_t stack[512];
|
|
StaticTask_t controlBlock;
|
|
osThreadAttr_t attr;
|
|
} thread;
|
|
|
|
} tDiagnostic;
|
|
|
|
typedef uint32_t (*diagnostic_func_ptr)(tDiagnostic *env, void *extEnv);
|
|
|
|
typedef struct {
|
|
diagnostic_func_ptr func;
|
|
char *desc;
|
|
} eDiagnosticState;
|
|
|
|
void Diagnostic_Init(tDiagnostic *env, tLoggerInterface *logger);
|
|
|
|
void Diagnostic_StartThread(tDiagnostic *env);
|
|
|
|
uint32_t SetGetDiagnosticData(tDiagnostic *env, eDiagnosticType diagnosticType, void *extEnv);
|
|
|
|
#endif //HVAC_M7_DIAGNOSTICTASK_H
|