2025-04-14 18:35:28 +08:00
|
|
|
|
/******************************************************************************
|
|
|
|
|
* @file protocol_mqtt_bcu.h
|
|
|
|
|
* @brief protocol_mqtt_bcu.h
|
|
|
|
|
* @version V1.0
|
|
|
|
|
* @author Gary
|
|
|
|
|
* @copyright
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
#ifndef PROTOCOL_MQTT_BCU_H_
|
|
|
|
|
#define PROTOCOL_MQTT_BCU_H_
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
2025-04-16 10:59:32 +08:00
|
|
|
|
#endif
|
|
|
|
|
|
2025-04-14 18:35:28 +08:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "cJSON.h"
|
|
|
|
|
#include "drv_qfc41d.h"
|
|
|
|
|
#include "drv_rtc.h"
|
2025-04-16 10:59:32 +08:00
|
|
|
|
|
2025-04-14 18:35:28 +08:00
|
|
|
|
typedef struct {
|
2025-04-16 10:59:32 +08:00
|
|
|
|
const char* key; // JSON <20>еļ<D0B5><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "BCU_2"
|
|
|
|
|
uint8_t groupId; // mqtt<74><74>Ϊjson<6F><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7>鴫<EFBFBD><E9B4AB>,<2C><>0<EFBFBD><30>ʼ<EFBFBD><CABC>
|
|
|
|
|
uint16_t input; // get_val<61><6C><EFBFBD><EFBFBD><EFBFBD>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD>ڻ<EFBFBD>ȡkey<65><79>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2025-04-14 18:35:28 +08:00
|
|
|
|
uint32_t (*get_val)(uint16_t); // <20><>Ӧֵ<D3A6>Ļ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|
|
|
|
} devPointMap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern const devPointMap bms_points[];
|
|
|
|
|
|
|
|
|
|
void mqtt_publish_bms_data(uint32_t basetime);
|
2025-04-16 10:59:32 +08:00
|
|
|
|
|
2025-04-14 18:35:28 +08:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2025-04-16 10:59:32 +08:00
|
|
|
|
|
2025-04-14 18:35:28 +08:00
|
|
|
|
#endif
|