#ifndef _BLV_485_DEV_IN_CH6_H_
#define _BLV_485_DEV_IN_CH6_H_

#include "stdint.h"
#include "BLV_485_Protocol.h"
#include "BLV_All_Dev_Init.h"



#if 0
typedef struct{
	BLV_COMM_RECORD_G comm_record;						//通讯记录
	
	uint8_t DevSendCnt;									//设备发送计数   计数达到重发次数都没有回复，判为离线
	uint8_t DevOffline;       							//设备离线标志 1，设备离线   0，设备在线
	uint8_t DevSendSN;									//发送SN号
	
	uint8_t Send_Type;
	
	uint8_t DI_Type[INCH6_DI_CH_MAX];					//DI输入类型 0~3:检测类型 4~7:检测电平
	uint8_t DI_Start[INCH6_DI_CH_MAX];					//DI动作状态
	uint8_t DI_Report_En[INCH6_DI_CH_MAX];				//DI主动上报使能
	uint8_t DI_LastStart[INCH6_DI_CH_MAX];
	uint8_t DI_Detection_Time[INCH6_DI_CH_MAX];			//DI消抖时间
	
	uint16_t Version;       							//IO程序版本
	uint16_t control_flag;       						//控制标志位
	uint16_t DI_set_flag;								//DI设置标志位
	uint16_t Last_DI_set_flag;	
	uint16_t DI_Level_Actual_Start;	
	uint32_t DI_Actual_State;
	uint32_t DI_Perfect_State;
	
	uint32_t inquire_tick;		//询问时间戳
}__attribute__ ((__packed__)) Device_INCH6_INFO;
#endif
void BLV_485_DEV_IN_CH6_Data_Init(uint16_t data_len, uint8_t *data);
void BLV_485_DEV_IN_CH6_Data_Logic_Init(LOGICFILE_DEVICE_INFO *dev_info, uint8_t *data,uint16_t data_len);

//void BLV_485_DEV_IN_CH6_Data_Init2(uint8_t addr);
//void INCH6_Test_Task(void);

#endif
