⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trans.h

📁 vc++6.0 开发的电力系统故障滤波数据管理系统
💻 H
字号:
#if !defined(AFX_TRANS_H__F0E7AEA1_255C_11D2_82C0_83FF79F70F9B__INCLUDED_)
#define AFX_TRANS_H__F0E7AEA1_255C_11D2_82C0_83FF79F70F9B__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// Trans.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CTrans dialog

#define         SOH                 0x01
#define         ACK                 0x06
#define         NAK                 0x15
#define         EOT                 0x04
#define         ETX                 0x03

#define         IsSend              0
#define         IsRece              1

#define         RECE_SOH_FOR_START_OF_SEND  101
#define         RECE_ACK_FOR_HEAD_OF_SEND   102
#define         RECE_ACK_FOR_SOH_OF_SEND    103
#define         RECE_ACK_FOR_BLOCK_OF_SEND  104
#define         RECE_ACK_FOR_REQST_OF_SEND  105
#define         RECE_512_REQST_OF_SEND      106
#define         RECE_OTHER_OF_SEND          107

#define         RECE_ACK_FOR_START_OF_RECE  201
#define         RECE_80_HEAD_OF_RECE        202
#define         RECE_SOH_FOR_BLOCK_OF_RECE  203
#define         RECE_4100BLOCK_OF_SEND      204
#define         RECE_ACK_FOR_REQST_OF_RECE  205
#define         RECE_512_REQST_OF_RECE      206
#define         RECE_OTHER_OF_RECE          207

#define         IDEL      0
#define         SENDING   1
#define         RECEIVING 2  

class CTrans : public CDialog
{
// Construction
public:
    CTrans(CWnd* pParent = NULL);   // standard constructor
     void ClearMessage(void);
	 int  WyyReceConfig(void);
	 int  CheckLink(void);
	 int AddARecord(struct FAULT_RECORD FaultRecord);
public:
	char PhoneNumber[40];
	char ReceFileName[13];
	CString NewName;
	char WyyFileName[256];
	int NameIndex[100];
	CString m_strDataPath;

	int TransStatus;
	int TransFlag[2][7];
	int FLAG;
	int SendOrRece;
    
	RECT m_StatusRect;
    CString m_strRecordPath;
	char szName[_MAX_PATH];
	char StatusStr[80];
	BYTE SendBuffer[4100];
	BYTE ReceBuffer[4100];
	double Percent;
	char m_PerStr[10];
	FILE *rfp;
	FILE *wfp;
    union {
	       unsigned char HeadBuffer[256];
	       struct{
			       unsigned char StartChar;  //1
			       char Name[220];           //220
			       char FileLength[33];      //33
			       unsigned char LJH ;       //1
			       unsigned char EndChar;    //1
			      }Head;
		}FileHead;
public:
    BOOL MissConnected(void);
	int GetNewName(void);
    int AddDirList(void);
	int WyyReceFile(void);
	int WyyReceList(void);
	int SendFile(int flag);
	int ReceiveFile(void);
	void Delay(UINT time);
	int WyySendFile(void);
	int AddLeftList(void);

// Dialog Data
	//{{AFX_DATA(CTrans)
	enum { IDD = IDD_DIALOG_SEND };
	CListCtrl	m_List1Ctrl;
	CListCtrl	m_List2Ctrl;
	BOOL	m_HangUp;
	//}}AFX_DATA


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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CTrans)
	virtual BOOL OnInitDialog();
	afx_msg void OnHangup();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnPaint();
	afx_msg void OnReceive();
	afx_msg LONG OnWMTRANSMESSAGE( UINT, LONG );
	afx_msg void OnClickList2(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDblclkList2(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnGetdir();
	afx_msg void OnReceiveConfig();
	afx_msg void OnRedial();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TRANS_H__F0E7AEA1_255C_11D2_82C0_83FF79F70F9B__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -