|
|
@ -1,5 +1,6 @@ |
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
extern "C" { |
|
|
|
#pragma pack(1)
|
|
|
|
typedef struct { |
|
|
@ -9,6 +10,12 @@ typedef struct { |
|
|
|
uint16_t function_id; |
|
|
|
uint8_t params[]; |
|
|
|
} zcanbus_packet_t; |
|
|
|
|
|
|
|
typedef struct { |
|
|
|
zcanbus_packet_t packet; |
|
|
|
uint8_t boardType; |
|
|
|
} heatpacket_t; |
|
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
typedef enum { |
|
|
@ -16,5 +23,35 @@ typedef enum { |
|
|
|
kreceipt, |
|
|
|
kerror_receipt, |
|
|
|
kreport, |
|
|
|
kheat, // 心跳
|
|
|
|
} packet_type_t; |
|
|
|
|
|
|
|
typedef enum { |
|
|
|
kMainBoard = 0, // 主机
|
|
|
|
kBoardType_LiquidCtrl = 1, // 液路板
|
|
|
|
kBoardType_PowerControl = 2, // 电源板
|
|
|
|
kBoardType_ExtBallValveCtrl = 3, // 外部球阀控制板
|
|
|
|
kBoardType_H2O2Sensor = 4, // H2O2传感器板
|
|
|
|
} BoardType_t; |
|
|
|
|
|
|
|
typedef enum { |
|
|
|
|
|
|
|
kcmd_heatpacket_report = 0 * 100, |
|
|
|
kcmd_read_board_info = 0 * 100 + 1, |
|
|
|
|
|
|
|
} cmd_t; |
|
|
|
|
|
|
|
#define HEART_OVERTIME_MS (10 * 1000)
|
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* 心跳包 * |
|
|
|
***********************************************************************************************************************/ |
|
|
|
typedef struct { |
|
|
|
zcanbus_packet_t packet; |
|
|
|
uint8_t boardType; |
|
|
|
} heatpacket_report_t; |
|
|
|
|
|
|
|
#pragma pack()
|
|
|
|
} |