/*
 * TcpPactHead.h
 *
 *  Created on: 2022年11月10日
 *      Author: king
 */

#ifndef TCPPACTHEAD_H_
#define TCPPACTHEAD_H_
#include "hal_adapter.h"
#include "AppFunclib.h"
#include "AppGlobalVar.h"
#pragma pack(1) /* 一字节对齐 */

#if WIFI_MASTER
typedef struct
{
	uint8 cmd;
	uint8 reserve_0;
	uint8 reserve_1;
	uint8 reserve_2;
	uint8 reserve_3;
	uint8 reserve_4;
	uint8 reserve_5;
	uint8 reserve_6;
}Heartbeat_ack;
typedef struct
{
	uint8 cmd;
	uint8 cmd_valid;
	uint8 reserve_0;
	uint8 reserve_1;
	uint8 reserve_2;
	uint8 reserve_3;
	uint8 reserve_4;
	uint8 reserve_5;
}Unlock_cmd;
#elif WIFI_SLAVE
typedef struct
{
	uint8 cmd;
	uint8 EBC_cur_sta : 3;
	uint8 EBC_net_mod : 3;
	uint8 EBC_loc_mod : 2;
	uint8 reserve_0;
	uint8 reserve_1;
	uint8 reserve_2;
	uint8 reserve_3;
	uint8 reserve_4;
	uint8 reserve_5;
}Heartbeat_cmd;
typedef struct
{
	uint8 cmd;
	uint8 unlock_sensor_sig : 3;
	uint8 lock_sensor_sig : 3;
	uint8 Key_signal : 2;
	uint8 Pressure_value;
	uint8 reserve_0;
	uint8 reserve_1;
	uint8 reserve_2;
	uint8 reserve_3;
	uint8 reserve_4;
}Unlock_ack;
#endif /* #if WIFI_MASTER */
typedef struct
{
	uint8 ack_ver_num;
	uint8 unl_sen_sig;
	uint8 loc_sen_sig;
	uint8 key_signal;
	uint8 pre_sen_val;
	uint8 cry_liq_sta;
	uint8 lock_b_plug;
}ChangeEleInfoAck;
#pragma pack()
#endif /* TCPPACTHEAD_H_ */
