42 lines
948 B
C++
42 lines
948 B
C++
// OperPLC.h: interface for the COperPLC class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_OPERPLC_H__99DEF8A5_22C0_4006_A35A_385FA2A6CDF0__INCLUDED_)
|
|
#define AFX_OPERPLC_H__99DEF8A5_22C0_4006_A35A_385FA2A6CDF0__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
enum EN_PLC_CMD
|
|
{
|
|
EN_PLC_POWER_OFF = 0,
|
|
EN_PLC_POWER_ON
|
|
};
|
|
|
|
enum EN_PARSE_PLC_RES_INFO
|
|
{
|
|
EN_PLC_RES_SUCCESS = 0,
|
|
EN_PLC_RES_FAILED,
|
|
EN_PLC_RES_LEN_ERR
|
|
};
|
|
|
|
class COperPLC
|
|
{
|
|
public:
|
|
static COperPLC* GetInstance();
|
|
void GetPlcCmdInfo(BYTE ucCmd, char* pData, int& iLen, int iMaxLen);
|
|
int ParsePlcOperResInfo(char* pData, int iLen);
|
|
protected:
|
|
COperPLC();
|
|
virtual ~COperPLC();
|
|
void GetPowerOffCmd(char* pCmdData,int& iCmdLen);
|
|
void GetPowerOnCmd(char* pCmdData,int& iCmdLen);
|
|
|
|
protected:
|
|
static COperPLC* m_pOperPlc;
|
|
|
|
};
|
|
|
|
#endif // !defined(AFX_OPERPLC_H__99DEF8A5_22C0_4006_A35A_385FA2A6CDF0__INCLUDED_)
|