opser.h

来自「101通讯规约代码,实现和数据库的完整对接,采用多线程多任务开发.」· C头文件 代码 · 共 53 行

H
53
字号
// OpSer.h: interface for the COperate101 class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_OPSER_H__5641D5A3_440D_11D4_852F_000021F0F0B8__INCLUDED_)
#define AFX_OPSER_H__5641D5A3_440D_11D4_852F_000021F0F0B8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class C101Port;

#define WM_MYMSG    (WM_USER+1)
#define PC_WPARAM    230000
#define PLC_WPARAM   3100

DWORD WINAPI y101WriteProc(LPVOID pParam);
typedef struct tagScaleInfo
{
	HANDLE hThread;
	BOOL   bExitThread;
	long   lpSer;                  //receive the C101Port class point
}SCALEINFO;

DWORD WINAPI y101ReadProc(LPVOID pParam);
typedef struct tagPLCInfo
{
	HANDLE hThread;
	BOOL   bExitThread;
	long   lpSer;                   //receive the C101Port class point
}PLCINFO;

void WriteAgain(C101Port* pPoint,BOOL bIsPc);  //when send to plc failse then send again



class COperate101  
{
public:
	float GetScale();
	LPSTR PLCPorc();
	float ScalePorc();
	COperate101();
	virtual ~COperate101();
	void SendToPLC(LPSTR lpBuf);
protected:
	C101Port *m_pScaleSer,*m_pPLCSer;
	SCALEINFO m_Infos;
	PLCINFO m_Infop;
};

#endif 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?