PeugeotDoc.h
上传用户:asikq0571
上传日期:2014-07-12
资源大小:528k
文件大小:3k
- // PeugeotDoc.h : interface of the CPeugeotDoc class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_PEUGEOTDOC_H__3BAB3CF0_D550_4588_BAC1_0D00B234F5E4__INCLUDED_)
- #define AFX_PEUGEOTDOC_H__3BAB3CF0_D550_4588_BAC1_0D00B234F5E4__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- ///////////////////////
- #include ".CMMComControl.h"
- #include ".CMMDASocket.h"
- #include "PrtIEC101.h"
- #include "PrtModbus.h"
- ///////////////////////
- class CPeugeotDoc : public CDocument
- {
- protected: // create from serialization only
- CPeugeotDoc();
- DECLARE_DYNCREATE(CPeugeotDoc)
- // Attributes
- public:
- enum CmmPortType
- {CommPort,NetPort} m_CmmPortType; //通讯端口类型
- enum PrtType
- {IEC101_M,IEC101_S,Modbus_M,Modbus_S,Blank} m_PrtType; //通讯规约类型,分别无协议;IEC101主站、子站;MODBUS主站、子站
- struct NetParam //网络口参数
- {
- enum PrtType {TCPServer,TCPClient,UDP}
- TCPPrtType;
- CString LocalIPAddr;
- UINT LocalIPPort;
- CString RemoteIPAddr;
- UINT RemoteIPPort;
- } m_NetParam;
-
- ////////通讯口对象/////////
- CComControl m_ComObj;
- CDAServerSocket* m_pSrvSocketObj; //服务器
- CDAClientSocket* m_pCltSocketObj; //客户端
- CDAUDPSocket* m_pUDPSocketObj; //UDP
- //////////////////////////
-
- CPrtIEC101 m_PrtIEC101;
- CPrtModbus m_PrtModbus;
- bool m_MasterFlag; //如果是主站类型,通讯连接后启动召唤时钟
- int m_YXAddr,m_YCAddr,m_YMAddr;
- int m_YXNum,m_YCNum,m_YMNum;
- BYTE* m_pYXData; //实时数据指针
- int* m_pYCData;
- DWORD* m_pYMData;
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CPeugeotDoc)
- public:
- virtual BOOL OnNewDocument();
- virtual void Serialize(CArchive& ar);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void NewStackAddr();
- virtual ~CPeugeotDoc();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(CPeugeotDoc)
- // NOTE - the ClassWizard will add and remove member functions here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_PEUGEOTDOC_H__3BAB3CF0_D550_4588_BAC1_0D00B234F5E4__INCLUDED_)