4 |
#pragma once |
#pragma once |
5 |
#include "afxwin.h" |
#include "afxwin.h" |
6 |
#include "TcpServerClass.h" |
#include "TcpServerClass.h" |
7 |
|
#include "H7Serial.h" |
8 |
|
|
9 |
|
//forward declaration |
10 |
|
class TcpClientClass; |
11 |
|
|
12 |
|
#include <vector> |
13 |
|
|
14 |
|
// Fortæller at der er en funktion, et eller andet sted, der hedder GetAvailableComPorts(). |
15 |
|
std::vector<CString> GetAvailableComPorts(); |
16 |
|
|
17 |
// CH7ServerDlg dialog |
// CH7ServerDlg dialog |
18 |
class CH7ServerDlg : public CDialog |
class CH7ServerDlg : public CDialog |
27 |
protected: |
protected: |
28 |
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
29 |
|
|
30 |
|
|
31 |
|
|
32 |
// Implementation |
// Implementation |
33 |
protected: |
protected: |
41 |
afx_msg HCURSOR OnQueryDragIcon(); |
afx_msg HCURSOR OnQueryDragIcon(); |
42 |
DECLARE_MESSAGE_MAP() |
DECLARE_MESSAGE_MAP() |
43 |
public: |
public: |
44 |
|
bool m_First; |
45 |
CEdit m_Status; |
CEdit m_Status; |
46 |
CComboBox m_BaudRate; |
CComboBox m_BaudRate; |
47 |
CComboBox m_Serial; |
CComboBox m_Serial; |
48 |
CButton m_Stop; |
CButton m_Stop; |
49 |
CEdit m_Port; |
CEdit m_Port; |
50 |
int m_Start; |
int m_Start; |
51 |
|
CH7Serial H7Serial; |
52 |
CButton m_Restart; |
CButton m_Restart; |
|
afx_msg void OnBnClickedStart(); |
|
53 |
int StartTcp(void); |
int StartTcp(void); |
|
afx_msg void OnBnClickedTest(); |
|
|
afx_msg void OnBnClickedRestart(); |
|
54 |
bool ServerInit(void); |
bool ServerInit(void); |
55 |
int StartSerial(void); |
int StartSerial(void); |
56 |
|
void NewLine(void); |
57 |
|
CString OnOff(int value); |
58 |
|
void UpdateStatus(CString name, short value); |
59 |
|
void UpdateClient(TcpClientClass *caller); |
60 |
|
afx_msg void OnBnClickedStart(); |
61 |
|
afx_msg void OnBnClickedTest(); |
62 |
|
afx_msg void OnBnClickedRestart(); |
63 |
|
afx_msg void OnBnClickedStop(); |
64 |
|
void TcpStatus(void); |
65 |
|
CButton m_StartB; |
66 |
|
protected: |
67 |
|
virtual void OnCancel(); |
68 |
|
|
69 |
}; |
}; |