Line | |
---|
1 | // Connection.h: interface for the CConnection class. |
---|
2 | // |
---|
3 | ////////////////////////////////////////////////////////////////////// |
---|
4 | |
---|
5 | #if !defined(AFX_CONNECTION_H__E83D7142_F7E4_11D1_8FE9_6CD504C1BC01__INCLUDED_) |
---|
6 | #define AFX_CONNECTION_H__E83D7142_F7E4_11D1_8FE9_6CD504C1BC01__INCLUDED_ |
---|
7 | |
---|
8 | #if _MSC_VER >= 1000 |
---|
9 | #pragma once |
---|
10 | #endif // _MSC_VER >= 1000 |
---|
11 | |
---|
12 | #include "RemoteModbus.h" |
---|
13 | #include "AutoModbus.h" |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | class CConnection : public CObject |
---|
19 | { |
---|
20 | |
---|
21 | DECLARE_DYNAMIC(CConnection) |
---|
22 | |
---|
23 | public: |
---|
24 | void Serialize(CArchive& archive); |
---|
25 | void DcomServer(LPCTSTR szDcomServer); |
---|
26 | CString DcomServer(); |
---|
27 | void Delete(); |
---|
28 | CRemoteModbus* RemotePtr(); |
---|
29 | CAutoModbus* AutoPtr(); |
---|
30 | CConnection(); |
---|
31 | virtual ~CConnection(); |
---|
32 | void Key(CString& sKey); |
---|
33 | CString Key(); |
---|
34 | CConnection(WORD wType , LPCTSTR sKey); |
---|
35 | CConnection(const CConnection& rConnection); |
---|
36 | WORD Type(); |
---|
37 | |
---|
38 | |
---|
39 | enum _connection_type_ { |
---|
40 | NONE=0, |
---|
41 | AUTO=1, |
---|
42 | REMOTE=2 |
---|
43 | }; |
---|
44 | |
---|
45 | CModbus* m_pModbus; //local/dcom or remote/openmodbus |
---|
46 | |
---|
47 | private: |
---|
48 | CString m_sKey; |
---|
49 | WORD m_wType; |
---|
50 | CString m_sDcomServer; |
---|
51 | |
---|
52 | }; |
---|
53 | |
---|
54 | #endif // !defined(AFX_CONNECTION_H__E83D7142_F7E4_11D1_8FE9_6CD504C1BC01__INCLUDED_) |
---|
Note: See
TracBrowser
for help on using the repository browser.