TestDlg.h
4.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// TestDlg.h : 头文件
//
#pragma once
#include "afxwin.h"
#include "afxcmn.h"
class CCalcTime
{
public:
LARGE_INTEGER t1;
LARGE_INTEGER t2;
__int64 CountTick ;
__int64 Count ;
__int64 PerSec;
__int64 ThisTick;
int ThisMSecond;
int MSecond;
int ms[10000];
int Index ;
CCalcTime()
{
Clear();
}
~CCalcTime(){};
void BegginTime(){ QueryPerformanceCounter( &t1 ); };
void EndTime() {
QueryPerformanceCounter( &t2 ) ;
ThisTick = (t2.QuadPart-t1.QuadPart);
CountTick += ThisTick;
Count++;
ThisMSecond = (int)( ThisTick*1000 / PerSec);
MSecond = (int) (((double)CountTick )/ PerSec * 1000 );
ms[Index++] = (int)((double)(t2.QuadPart-t1.QuadPart) / PerSec * 1000 );
if( Index == 10000 ) Index = 0;
};
void Clear()
{
Count = 0 ;
CountTick = 0 ;
QueryPerformanceFrequency ( &t1 );
PerSec = t1.QuadPart;
MSecond =0;
Index = 0;
memset( ms , 0 , sizeof(ms) );
ThisMSecond = 0;
ThisTick = 0;
};
};
// CTestDlg 对话框
class CTestDlg : public CDialog
{
// 构造
public:
CTestDlg(CWnd* pParent = NULL); // 标准构造函数
// 对话框数据
enum { IDD = IDD_TEST_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
// 实现
protected:
HICON m_hIcon;
// 生成的消息映射函数
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
CListBox m_ListMsg;
int m_iPort;
unsigned char m_iMaxByte;
int m_iReadType;
int m_iReadSum;
int m_iReadOKSum;
int m_iReadStart;
int m_iM1ReadSum;
int m_iM1ReadOKSum;
int m_iM1ReadStart;
int m_iM1WriteSum;
int m_iM1WriteOKSum;
int m_iM1WriteStart;
int m_iLoopSum;
int m_iTime;
CFile m_fLog;
void InsertDebugMes(CString sMsg);
BOOL OpenLogFile();
afx_msg void OnBnClickedButfindreader();
afx_msg void OnBnClickedButclearmes();
afx_msg void OnBnClickedButgetsamstate();
afx_msg void OnBnClickedButsetmax();
afx_msg void OnBnClickedButrestsam();
afx_msg void OnBnClickedButgetsamid();
CListCtrl m_ListView;
afx_msg void OnBnClickedButfindcard();
afx_msg void OnBnClickedButselectcard();
afx_msg void OnBnClickedButreadcard();
afx_msg void OnBnClickedButreadcard2();
afx_msg void OnBnClickedButstartread();
afx_msg void OnBnClickedButreadcardex();
afx_msg void OnBnClickedButreadcardex2();
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnBnClickedButstopread();
afx_msg void OnBnClickedButfpExt();
afx_msg void OnBnClickedButsound();
afx_msg void OnBnClickedButfindfp();
afx_msg void OnBnClickedButgetver();
afx_msg void OnBnClickedButgetdesc();
afx_msg void OnBnClickedButclosefp();
afx_msg void OnBnClickedButbegincap();
afx_msg void OnBnClickedButgetfpraw();
afx_msg void OnBnClickedButreaderuserinfo();
afx_msg void OnBnClickedButwriteuserinfo();
afx_msg void OnBnClickedButreadfac();
afx_msg void OnBnClickedButwritefac();
afx_msg void OnBnClickedButendcap();
afx_msg void OnBnClickedButgetfpbmp();
afx_msg void ViewBmp(CString bmpFile);
int RawToBmp(unsigned char *ucRaw,CString bmpFile);
afx_msg void OnBnClickedButton5();
afx_msg void OnBnClickedButton3();
afx_msg void OnBnClickedButton4();
afx_msg void OnBnClickedButton6();
afx_msg void OnBnClickedButton7();
afx_msg void OnBnClickedButton9();
afx_msg void OnBnClickedButton10();
afx_msg void OnBnClickedButton11();
afx_msg void OnBnClickedButton12();
afx_msg void OnBnClickedM1reset();
afx_msg void OnBnClickedM1halt();
afx_msg void OnBnClickedButtonAuthena();
afx_msg void OnBnClickedButtonAuthenb();
afx_msg void OnBnClickedButtonRead();
afx_msg void OnBnClickedButtonWrite();
afx_msg void OnBnClickedButton14();
afx_msg void OnBnClickedButton17();
afx_msg void OnBnClickedButton16();
afx_msg void OnBnClickedButton18();
afx_msg void OnBnClickedButton13();
afx_msg void OnBnClickedButton15();
afx_msg void OnBnClickedButtonChanga();
afx_msg void OnBnClickedButtonChangb();
afx_msg void OnBnClickedButton19();
afx_msg void OnBnClickedButton20();
afx_msg void OnBnClickedButton1();
afx_msg void OnBnClickedButton2();
afx_msg void OnBnClickedButfpBri();
afx_msg void OnBnClickedButfpCon();
afx_msg void OnClose();
afx_msg void OnBnClickedCancel();
afx_msg void OnBnClickedButton21();
afx_msg void OnBnClickedButton23();
afx_msg void OnBnClickedButton22();
afx_msg void OnBnClickedButton24();
afx_msg void OnBnClickedButton8();
};