#include "StdAfx.h" #include "WorkCmdPciPortCheck.h" #include "ExceptionMsg.h" #include "LogMgr.h" #include "PciPortMgr.h" #include "PciCh365Mgr.h" #define PER_CHECK_DELAY 50 //每隔多少时间检测一次(ms) CWorkCmdPciPortCheck::CWorkCmdPciPortCheck(CString &CtrlContent,bool NeedState) :m_CtrlContent(CtrlContent),m_NeedState(NeedState) { m_MaxCheckDelay = 0; } CWorkCmdPciPortCheck::~CWorkCmdPciPortCheck(void) { } //检查指定pci 端口,如果不满足要求的状态则抛出异常 bool CWorkCmdPciPortCheck::Excute() { if(gLogMgr->IsDebuging())//调试状态只延时 { //Sleep(gLogMgr->GetDebugCmdDelay()); //return true; } bool ret; if(m_MaxCheckDelay>0)//持续检测 { int CurDelay = 0;//当前延时时间 while(CurDelayWriteDebugLog(str); } bool CWorkCmdPciPortCheck::ReadPortState() { bool ret; ret = gPciCh365Mgr->ReadPortState(gPciPortMgr->GetCtrlPort(m_CtrlContent)); return ret; }