64 lines
1.8 KiB
C
64 lines
1.8 KiB
C
//
|
|
// Created by cfif on 05.04.2024.
|
|
//
|
|
|
|
#ifndef HVAC_CAN_SPAM_RECEIVER_H
|
|
#define HVAC_CAN_SPAM_RECEIVER_H
|
|
|
|
#include <cmsis_os.h>
|
|
#include "CanSerialPortFrame.h"
|
|
#include "ccu_candb-binutil.h"
|
|
#include "LoggerInterface.h"
|
|
#include "crc32_m7.h"
|
|
|
|
|
|
typedef struct {
|
|
|
|
tSerialPortFrameIO *ioCanFrame;
|
|
osMutexId_t access;
|
|
can_rx_message_type canFrame;
|
|
|
|
char SET_HVAC_VIN[17];
|
|
bool getVIN0;
|
|
bool getVIN1;
|
|
bool getVIN2;
|
|
|
|
|
|
osMessageQueueId_t ccu_candb_rx_LOCAL_HVAC_VIN;
|
|
osMessageQueueId_t ccu_candb_rx_LOCAL_HVAC_UDS_VIN;
|
|
osMessageQueueId_t ccu_candb_rx_TM_CP;
|
|
osMessageQueueId_t ccu_candb_rx_FIU_CCU1;
|
|
osMessageQueueId_t ccu_candb_rx_FIU_CCU2;
|
|
osMessageQueueId_t ccu_candb_rx_BCM_Powertrain;
|
|
osMessageQueueId_t ccu_candb_rx_BCM_CLIMATIC_DATA;
|
|
osMessageQueueId_t ccu_candb_rx_EMS_Veh;
|
|
osMessageQueueId_t ccu_candb_rx_ESC_04;
|
|
osMessageQueueId_t ccu_candb_rx_BCM_VEH_STATE;
|
|
osMessageQueueId_t ccu_candb_rx_EMS_HVC_Req_Msg;
|
|
osMessageQueueId_t ccu_candb_rx_HVC_Err_Status_Msg;
|
|
|
|
tLoggerInterface *logger;
|
|
|
|
struct {
|
|
osThreadId_t id;
|
|
//uint32_t stack[384];
|
|
uint32_t *stack;
|
|
StaticTask_t controlBlock;
|
|
osThreadAttr_t attr;
|
|
} thread;
|
|
|
|
} tCanSpamReceiver;
|
|
|
|
void CanSpamReceiver_Init(tCanSpamReceiver *env, tSerialPortFrameIO *ioCanFrame, tLoggerInterface *logger);
|
|
|
|
void CanSpamReceiver_StartThread(tCanSpamReceiver *env);
|
|
|
|
void get_CanSpamReceiver(tCanSpamReceiver *env, char *VIN);
|
|
|
|
bool get_CanSpamReceiverUDS(tCanSpamReceiver *env, char *VIN, func_update_func update_func, void *update_func_env,
|
|
uint32_t timeout, uint32_t count);
|
|
|
|
bool get_is_NoNull_CanSpam_BCM_PowerTrain_Receiver(tCanSpamReceiver *env);
|
|
|
|
#endif //HVAC_CAN_SPAM_RECEIVER_H
|