#pragma once
|
#include "lightcontrol.h"
|
#include <afxsock.h> // MFC ¼ÒÄÏ È®Àå
|
|
#define MAX_CHANNEL 9
|
|
class AFX_EXT_CLASS CLightControl_Shinhan_TCP : public CLightControl, public CSocket
|
{
|
public:
|
CLightControl_Shinhan_TCP(int nIndex);
|
virtual ~CLightControl_Shinhan_TCP(void);
|
|
virtual BOOL Connect(const CLightControlInfo& controlInfo);
|
virtual void Disconnect();
|
virtual LONG ConnectEx(const CLightControlInfo& controlInfo); // Multi Channel
|
virtual void DisconnectEx();
|
|
virtual BOOL GetLightLevel(int &nValue, int nChannel = 0) const;
|
virtual BOOL GetLightLevel(double &dValue, int nChannel = 0) const;
|
virtual BOOL GetLightStatus(int &nValue, int nChannel = 0) const;
|
|
virtual BOOL SetLightLevel(int nValue, int nChannel = 0);
|
virtual BOOL SetLightLevel(double dValue, int nChannel = 0);
|
virtual BOOL SetLightStatus(int nValue, int nChannel = 0);
|
virtual BOOL SetAllLightLevel(int nValue) { return TRUE; }
|
|
virtual BOOL SetLightOn();
|
virtual BOOL SetLightOff();
|
|
virtual BOOL SetLightOn(int nChannel = 0);
|
virtual BOOL SetLightOff(int nChannel = 0);
|
|
virtual BOOL SetLightAllOn();
|
virtual BOOL SetLightAllOff();
|
|
virtual void OnReceive(int nErrorCode);
|
|
// get status
|
virtual int GetStatus( int& nStatusCode, CString& strStatusMessage );
|
|
protected:
|
double m_dCurrentValue[MAX_CHANNEL];
|
int m_nCurrentStatus[MAX_CHANNEL];
|
};
|