www.pudn.com > 200518174534292.rar > LED.CPP
// LED.cpp: implementation of the CLED class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ParkSys.h"
#include "LED.h"
#include "vicpublic.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CLED::CLED(CSerialPort* commLED)
{
if(commLED == NULL)
{
THROW(new CException);
}
else
{
m_comm = commLED;
}
}
CLED::~CLED()
{
m_comm = NULL;
}
void CLED::TakeEffect(const CString& strScript)
{
if(m_comm == NULL)
{
THROW(new CException);
return;
}
char buf[500];
wsprintf(buf, "%s", strScript);
m_comm->WriteToPort(buf);
}