LAPTOP-SNT8I5JK\Boounion
2025-03-21 d1fd8f9e1f5a012b301a6ce93c2ce7eb3c927e31
SourceCode/Bond/Servo/CLoadPort.cpp
@@ -34,6 +34,9 @@
   {
      // 加入Pin初始化代码
      LOGI("<CLoadPort>initPins");
      addPin(SERVO::PinType::INPUT, _T("In"));
      addPin(SERVO::PinType::OUTPUT, _T("Out1"));
      addPin(SERVO::PinType::OUTPUT, _T("Out2"));
   }
   void CLoadPort::onTimer(UINT nTimerid)
@@ -45,4 +48,32 @@
   {
      CEquipment::serialize(ar);
   }
   void CLoadPort::getAttributeVector(CAttributeVector& attrubutes)
   {
      __super::getAttributeVector(attrubutes);
   }
   int CLoadPort::recvIntent(CPin* pPin, CIntent* pIntent)
   {
      return __super::recvIntent(pPin, pIntent);
   }
   int CLoadPort::outputGlass(int port)
   {
      // 如果列表中没有Panel,模拟生成10张
      if (m_panelList.empty()) {
         static int ii = 0;
         char szBuffer[64];
         LOGI("<CLoadPort>模拟生成10张PANEL");
         for (int i = 0; i < 10; i++) {
            sprintf_s(szBuffer, "P20250320A1A%d", ++ii);
            CPanel* pPanel = new CPanel();
            pPanel->setID(szBuffer);
            addPanelToList(pPanel);
         }
      }
      return __super::outputGlass(port);
   }
}