// VH75ADlg.h : header file
//

#if !defined(AFX_VH75ADLG_H__E7C68640_8CC0_4D74_8FCB_66EF9277F836__INCLUDED_)
#define AFX_VH75ADLG_H__E7C68640_8CC0_4D74_8FCB_66EF9277F836__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "hhdaConnect.h"
#include "hhdaParam.h"
#include "hhdaBlueTooth.h"
#include "hhdaData.h"
//#include "hhdaOutput.h"
#include "EPCC1G2Test.h"


#define	 VH_SUFFEXCODELEN		(4)
#define  VH_chDateTimeNUM		(6)
#define  VH_chTypeNUM			(1)
#define  VH_chLenNUM			(1)
#define  VH_chEPCNUM			(16)
#define  VH_chLTIDNUM			(1)
#define  VH_chTIDNUM			(8)
#define  VH_chUserNUM			(1)

//包含头，引导码为250个字节，去掉则为246字节
typedef struct _VHDataMsg //sizof(VHDataMsg) = 246
{
	char chDateTime[VH_chDateTimeNUM]; //6字节,读取标签的时间,YY MM DD hh mm ss
	char chType[VH_chTypeNUM];		//1个字节,标签类型1-ISO180006B 4-ISO180006C
	char chLen[VH_chLenNUM];			//1个字节,EPC号或UID号长度
	//8-23	EPC/UID	16个字节,EPC号或UID号,剩余字节补0
	char chEPC[VH_chEPCNUM];
	
	//24	Len	1个字节,如果是6C标签为TID号长度如果是6B标签为USER数据区长度
	char chLTID[VH_chLTIDNUM];	
	
	//25-32	TID	8个字节,如果是6C标签为TID如果是6B标签则自此字节开始为USER区数据
	char chTID[VH_chTIDNUM];
	
	//33	Len	1个字节,6C标签USER区数据长度
	char chUser[VH_chUserNUM];
	
	//34-98（250）	USER	64个字节,6C标签USER区数据
	char chUserData[250-(VH_SUFFEXCODELEN+VH_chDateTimeNUM+VH_chTypeNUM+VH_chLenNUM+VH_chEPCNUM+VH_chLTIDNUM+VH_chTIDNUM+VH_chUserNUM)];
	
	
}VHDataMsg;

//////////////////////////////////////////////////////////////////////////
typedef struct stTagData
{
	BYTE	DateTime[VH_chDateTimeNUM];
	BYTE    TagType;
	BYTE	EPCLen;		
	BYTE	EPC[VH_chEPCNUM];		
	BYTE	TIDLen;		
	BYTE	TID[VH_chTIDNUM];		
	BYTE	USERLen;		
	BYTE	USER[250-(VH_chDateTimeNUM+VH_chTypeNUM+VH_chLenNUM+VH_chEPCNUM+VH_chLTIDNUM+VH_chTIDNUM+VH_chUserNUM)];			
}TagData;




/////////////////////////////////////////////////////////////////////////////
// CVH75ADlg dialog

class CVH75ADlg : public CDialog
{
// Construction
public:
	CVH75ADlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CVH75ADlg)
	enum { IDD = IDD_VH75A_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CVH75ADlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
public:
	CPropertySheet			m_Sheet;
	
	VH73BConnect			m_ConnectReaderPage;	//连接界面sheet
	VH73BParam				m_ReaderParameterPage;	//参数sheet
	VH73BBlueTooth			m_BlueToothPage;		//蓝牙sheet
	VH73BData				m_DataPage;				//下载sheet
	EPCC1G2Test				m_EPCC1G2TestPage;
	
	RECT rc;
	//VH73BOutput				m_PageOutput;
	
	
	void OnInitUIText();//界面和文本更新

protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CVH75ADlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnDestroy();
	//}}AFX_MSG
	afx_msg LRESULT OnListuserdata(WPARAM wParam, LPARAM lParam);
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_VH75ADLG_H__E7C68640_8CC0_4D74_8FCB_66EF9277F836__INCLUDED_)
