📄 serialcommunication.h
字号:
// SerialCommunication.h: interface for the CSerialCommunication class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SERIALCOMMUNICATION_H__DC25C566_6D46_4433_ABC3_AFF6CEC292DD__INCLUDED_)
#define AFX_SERIALCOMMUNICATION_H__DC25C566_6D46_4433_ABC3_AFF6CEC292DD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "IReceiveEvent.h"
class CSerialCommunication
{
private:
HANDLE m_hComm;
CWinThread *m_receiveThread; // RS232C
public:
bool m_isReceiving; // RS232C
IReceiveEvent *m_receiveEvent; //
//CEcoPowerMeterApp *m_pApp ;
//CConfig *cfig;
public:
void Close();
/**
* @param receiveEvent
*/
CSerialCommunication(IReceiveEvent *receiveEvent);
~CSerialCommunication(void);//
//
bool Open(LPCSTR strPort);
//
//void Close();
//
void Send(LPCSTR str,DWORD strLength);
//void CSerialCommunication::OnReceive21(LPCSTR str,DWORD strLength);
private:
//
void FireOnReceive(LPCSTR str,DWORD strLength);
private:
//
static UINT ReceiveRs232cFunc(LPVOID pParam);
};
#endif // !defined(AFX_SERIALCOMMUNICATION_H__DC25C566_6D46_4433_ABC3_AFF6CEC292DD__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -