1 |
// H7 ServerDlg.h : header file
|
2 |
//
|
3 |
|
4 |
#pragma once
|
5 |
#include "afxwin.h"
|
6 |
#include "TcpServerClass.h"
|
7 |
#include "H7Serial.h"
|
8 |
|
9 |
#include <vector>
|
10 |
|
11 |
// Fortæller at der er en funktion, et eller andet sted, der hedder GetAvailableComPorts().
|
12 |
std::vector<CString> GetAvailableComPorts();
|
13 |
|
14 |
// CH7ServerDlg dialog
|
15 |
class CH7ServerDlg : public CDialog
|
16 |
{
|
17 |
// Construction
|
18 |
public:
|
19 |
CH7ServerDlg(CWnd* pParent = NULL); // standard constructor
|
20 |
|
21 |
// Dialog Data
|
22 |
enum { IDD = IDD_H7SERVER_DIALOG };
|
23 |
|
24 |
protected:
|
25 |
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
26 |
|
27 |
|
28 |
|
29 |
// Implementation
|
30 |
protected:
|
31 |
HICON m_hIcon;
|
32 |
TcpServerClass TcpServer;
|
33 |
|
34 |
// Generated message map functions
|
35 |
virtual BOOL OnInitDialog();
|
36 |
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
37 |
afx_msg void OnPaint();
|
38 |
afx_msg HCURSOR OnQueryDragIcon();
|
39 |
DECLARE_MESSAGE_MAP()
|
40 |
public:
|
41 |
bool m_First;
|
42 |
CEdit m_Status;
|
43 |
CComboBox m_BaudRate;
|
44 |
CComboBox m_Serial;
|
45 |
CButton m_Stop;
|
46 |
CEdit m_Port;
|
47 |
int m_Start;
|
48 |
CH7Serial H7Serial;
|
49 |
CButton m_Restart;
|
50 |
afx_msg void OnBnClickedStart();
|
51 |
int StartTcp(void);
|
52 |
afx_msg void OnBnClickedTest();
|
53 |
afx_msg void OnBnClickedRestart();
|
54 |
bool ServerInit(void);
|
55 |
int StartSerial(void);
|
56 |
void NewLine(void);
|
57 |
CString OnOff(int value);
|
58 |
void UpdateStatus(CString name, short value);
|
59 |
void UpdateClient(void);
|
60 |
afx_msg void OnBnClickedStop();
|
61 |
void TcpStatus(void);
|
62 |
};
|