⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opser.h

📁 101通讯规约代码,实现和数据库的完整对接,采用多线程多任务开发.
💻 H
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -