/************************************************************************* Legend window selected agent changed! *************************************************************************/ void System::onLegendSelectChanged(int idSelectAgent, CAgentInfo_LogDlg* pLogDlg, CAgentInfo_InfoDlg* pInfoDlg) { //check Agent* pAgent = m_pAgentManager->findAgent(idSelectAgent); if(!pAgent) return; //------------------------------------------ //multi thread lock lockLog(); //------------------------------------------ //clean old log pLogDlg->clearAllLog(); pInfoDlg->clearAllLog(); m_idSelectAgent = idSelectAgent; //dump all log of this agent if(pAgent->getLog()) { pAgent->getLog()->dumpLog(pLogDlg); } //------------------------------------------ //multi thread Unlock unlockLog(); }
void serialThread::stop() { std::cout << "Attempting to stop the Serial threads..." << std::endl; // Lock mutex boost::lock_guard<boost::mutex> lockTrack(stopTrackMutex); stopTrackingFlag = true; boost::lock_guard<boost::mutex> lockLog(stopLogMutex); stopLoggingFlag = true; std::cout << "Set Flags" << std::endl; }