📄 commtestdlg.h
字号:
#if !defined(AFX_COMMTESTDLG_H__4FDAC186_34B5_11D1_9481_00805A147202__INCLUDED_)
#define AFX_COMMTESTDLG_H__4FDAC186_34B5_11D1_9481_00805A147202__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "ColorStatic.h"
#include "SerialPort.h"
#include "MediaTimer.h"
class CCommtestDlg : public CDialog
{
public:
CCommtestDlg(CWnd* pParent = NULL); // standard constructor
CProgressCtrl m_prog;
unsigned int ErrNum;
//{{AFX_DATA(CCommtestDlg)
enum { IDD = IDD_COMMTEST_DIALOG };
BYTE m_setStep;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCommtestDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
unsigned char vHexDdecoder(unsigned char hex_data);
unsigned char toint(unsigned char hex_data);
void vDataDownLoad(unsigned short int SectorOffset);
void BinToChar(unsigned char BinChar, char * * TxDataPtr);
void vWriteBuff(unsigned char * buf,unsigned char * hbuff, unsigned short int set,unsigned short int leng);
void vCOmSend(unsigned char m_ComLength, unsigned char m_ComType, unsigned short int m_AdderData);
void vHexModefy(unsigned short int SectorOffset);
void OnOpenFile(CString mStr);
void OnFileChange(CString mStr);
void OnSaveBin();
void OnSaveHex();
unsigned short int vVerify(unsigned char * buf,unsigned char * hbuff, unsigned short int set,unsigned short int leng);
// Implementation
protected:
HICON m_hIcon;
CSerialPort m_Ports;
CString m_strReceived;
CString m_Pathname;
CString m_FileNameEx[4];
CMediaTimer m_mediaTimer;
unsigned short int m_Bank;
unsigned short int m_CounterSector;
unsigned short int m_Sector;
unsigned short int m_DataLong;
unsigned char m_ProcessType;
unsigned char hexbuff[256];
char hexTxbuff[2*256+12];
unsigned char FileErrNum;
char * Txbuffptr;
unsigned char CheckSum;
unsigned char uHsector,type, data_value, sum, sum_1, sum_2;
unsigned short int ulength,nb_byte;
unsigned short int offset;
unsigned short int SectorOffset;
unsigned char status;
unsigned char * Binptr;
unsigned char Filesbuf[64*1024];
unsigned char FileBackbuf[64*1024];
// Generated message map functions
//{{AFX_MSG(CCommtestDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg LONG OnCommunication(UINT, LONG);
afx_msg LONG OnCTSDetected(UINT, LONG);
afx_msg void OnSeriaPortSet();
afx_msg void OnFileOpen();
afx_msg void OnVerify();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_COMMTESTDLG_H__4FDAC186_34B5_11D1_9481_00805A147202__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -