123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #include "COTSSimuControlClr.h";
- #include "OTSControlFunExport.h"
- namespace OTSCLRINTERFACE
- {
- COTSHardwareMgrPtr g_ControllerMgrPtr = nullptr;
- CSemBasePtr g_SemBasePtr = nullptr;
- COTSSimuControlClr::COTSSimuControlClr()
- {
- g_ControllerMgrPtr = COTSHardwareMgrPtr(new COTSHardwareMgr);
- g_SemBasePtr = g_ControllerMgrPtr->GetSemControllerMgrPtr();
- }
- COTSSimuControlClr::~COTSSimuControlClr()
- {
- this->!COTSSimuControlClr();
- }
- COTSSimuControlClr::!COTSSimuControlClr()
- {
- }
- bool COTSSimuControlClr::Connect()
- {
- if (nullptr == g_SemBasePtr)
- {
- return false;
- }
- return g_SemBasePtr->Connect();
- }
- bool COTSSimuControlClr::DisConnect()
- {
- if (nullptr == g_SemBasePtr)
- {
- return false;
- }
- return g_SemBasePtr->Disconnect();
- }
- bool COTSSimuControlClr::SetWorkingDistance(double a_dWorkingDistance)
- {
- return g_SemBasePtr->SetWorkingDistance(a_dWorkingDistance);
- }
- bool COTSSimuControlClr::GetWorkingDistance(double% a_dWorkingDistance)
- {
- double WDistance;
- bool bRev = g_SemBasePtr->GetWorkingDistance(WDistance);
- a_dWorkingDistance = WDistance;
- return bRev;
- }
- bool COTSSimuControlClr::SetMagnification(double a_dMag)
- {
- return g_SemBasePtr->SetMagnification(a_dMag);
- }
- bool COTSSimuControlClr::GetMagnification(double% a_dMag)
- {
- double dMag;
- bool bRev = g_SemBasePtr->GetMagnification(dMag);
- a_dMag = dMag;
- return bRev;
- }
- }
|