HVAC_M7_StatusData/DiagnosticTask.h

46 lines
953 B
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_SET_UDS_ClearDiagnosticInformation_14 = 0x00
} eDiagnosticType;
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 void (*diagnostic_func_ptr)(tDiagnostic *env);
typedef struct {
diagnostic_func_ptr func;
char *desc;
} eDiagnosticState;
void Diagnostic_Init(tDiagnostic *env, tLoggerInterface *logger);
void Diagnostic_StartThread(tDiagnostic *env);
void setDiagnosticData(tDiagnostic *env, eDiagnosticType diagnosticType);
#endif //HVAC_M7_DIAGNOSTICTASK_H