123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- // CommondServer.cpp: implementation of the CCommondServer class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "DrawObj.h"
- #include "IDE.h"
- #include "commondserver.h"
- #include "Utility.h"
- #pragma warning (disable : 4244)
- CString GetBlockFromVarAddr(CString addr)
- {
- int pos = addr.Find('[');
- if (-1 != pos)
- {
- return addr.Left(pos);
- }
- return "";
- }
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CCommondServer::CCommondServer()
- {
- }
- CCommondServer::~CCommondServer()
- {
- }
- void CCommondServer::PushCommondToDevice(CAction* action)
- {
- CAnalog* pAnalog = pVariantsManager->FindAnalog(action->m_strVariant);
- if (pAnalog == NULL)
- {
- return;
- }
- pAnalog->SetValue(atof(action->m_strActionValue));
- }
|