mrDarker
2025-07-24 7034036d6ab7163a6ea0e5d712ba86d6cd9591bc
SourceCode/Bond/Servo/Model.cpp
@@ -52,6 +52,12 @@
   }
}
void CModel::setPortCassetteType(unsigned int index, SERVO::CassetteType type)
{
   m_master.setPortCassetteType(index, type);
   m_configuration.setPortCassetteType(index, (int)type);
}
int CModel::init()
{
   CString strIniFile;
@@ -121,13 +127,13 @@
      notify(RX_CODE_MASTER_STATE_CHANGED);
   };
   masterListener.onEqAlive = [&](void* pMaster, SERVO::CEquipment* pEquipment, BOOL bAlive) -> void {
      LOGI("<CModel>Equipment onAlive:%s(%s).\n", pEquipment->getName().c_str(),
      LOGI("<CModel>Equipment onAlive:%s(%s).", pEquipment->getName().c_str(),
         bAlive ? _T("ON") : _T("OFF"));
      notifyPtr(RX_CODE_EQ_ALIVE, pEquipment);
   };
   masterListener.onEqCimStateChanged = [&](void* pMaster, SERVO::CEquipment* pEquipment, BOOL bOn) -> void {
      LOGI("<CModel>Equipment Cim State:%s(%s).\n", pEquipment->getName().c_str(),
      LOGI("<CModel>Equipment Cim State:%s(%s).", pEquipment->getName().c_str(),
         bOn ? _T("ON") : _T("OFF"));
      notifyPtr(RX_CODE_EQ_ALIVE, pEquipment);
@@ -274,6 +280,10 @@
      notifyPtrAndInt(RX_CODE_EQ_ROBOT_TASK, pTask, nullptr, code);
   };
   masterListener.onLoadPortInUse = [&] (void* pMaster, SERVO::CEquipment* pEquipment, short scanMap) {
      LOGE("<CModel>onLoadPortInUse. scanMap = %d", scanMap);
      notifyPtr(RX_CODE_LOADPORT_INUSE, pEquipment);
   };
   m_master.setListener(masterListener);
@@ -281,7 +291,7 @@
   CString strMasterDataFile;
   strMasterDataFile.Format(_T("%s\\Master.dat"), (LPTSTR)(LPCTSTR)m_strWorkDir);
   m_master.setCacheFilepath((LPTSTR)(LPCTSTR)strMasterDataFile);
   m_master.setCompareMapsBeforeProceeding(m_configuration.isCompareMapsBeforeProceeding());
   // 加载警告信息
   AlarmManager& alarmManager = AlarmManager::getInstance();