LAPTOP-SNT8I5JK\Boounion
2025-06-26 135d1d829b36eb06c8acc5b8782a77acda767198
SourceCode/Bond/Servo/CEquipment.cpp
@@ -604,6 +604,10 @@
      // Job Data Request
      CHECK_READ_STEP_SIGNAL(STEP_ID_JOB_DATA_REQUEST, pszData, size);
      // job process start/end report
      CHECK_READ_STEP_SIGNAL(STEP_ID_JOB_PROCESS_START_REPORT, pszData, size);
      CHECK_READ_STEP_SIGNAL(STEP_ID_JOB_PROCESS_END_REPORT, pszData, size);
   }
   BOOL CEquipment::isBitOn(const char* pszData, size_t size, int index)
@@ -1682,6 +1686,131 @@
      return 0;
   }
   int CEquipment::decodeJobProcessStartReport(CStep* pStep, const char* pszData, size_t size)
   {
      LOGI("<CEquipment-%s>decodeJobProcessStartReport", getName().c_str());
      short cassetteNo, jobSequenceNo, unitNo, subUnitNo, slotNo;
      int year, month, day, hour, minute, second;
      int index = 0;
      memcpy(&cassetteNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&jobSequenceNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&unitNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&subUnitNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&slotNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&year, &pszData[index], sizeof(short));
      index += sizeof(short);
      month = (int)pszData[index];
      index += 1;
      day = (int)pszData[index];
      index += 1;
      hour = (int)pszData[index];
      index += 1;
      minute = (int)pszData[index];
      index += 1;
      second = (int)pszData[index];
      index += 1;
      LOGI("<CEquipment-%s>cassetteNo:%d, jobSequenceNo:%d,unitNo:%d, subUnitNo:%d, slotNo:%d %d-%d-%d %d:%d:%d",
         getName().c_str(),
         cassetteNo,
         jobSequenceNo,
         unitNo,
         subUnitNo,
         slotNo,
         year, month, day, hour, minute, second
         );
      // 缓存Attribute,用于调试时显示信息
      unsigned int weight = 201;
      pStep->addAttribute(new CAttribute("CassetteNo",
         std::to_string(cassetteNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("JobSequenceNo",
         std::to_string(jobSequenceNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("UnitNo",
         std::to_string(unitNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("SubUnitNo",
         std::to_string(subUnitNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("SlotNo",
         std::to_string(slotNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("ProcessStartTime",
         (std::to_string(year) + std::to_string(day) + std::to_string(day) + std::to_string(hour) + std::to_string(minute) + std::to_string(second)).c_str()
         , "", weight++));
      return 0;
   }
   int CEquipment::decodeJobProcessEndReport(CStep* pStep, const char* pszData, size_t size)
   {
      LOGI("<CEquipment-%s>decodeJobProcessEndReport", getName().c_str());
      short cassetteNo, jobSequenceNo, unitNo, subUnitNo, slotNo;
      int year, month, day, hour, minute, second;
      int index = 0;
      std::string strPanelJudgeData, strPanelGradeData;
      memcpy(&cassetteNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&jobSequenceNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&unitNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&subUnitNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&slotNo, &pszData[index], sizeof(short));
      index += sizeof(short);
      memcpy(&year, &pszData[index], sizeof(short));
      index += sizeof(short);
      month = (int)pszData[index];
      index += 1;
      day = (int)pszData[index];
      index += 1;
      hour = (int)pszData[index];
      index += 1;
      minute = (int)pszData[index];
      index += 1;
      second = (int)pszData[index];
      index += 1;
      LOGI("<CEquipment-%s>cassetteNo:%d, jobSequenceNo:%d,unitNo:%d, subUnitNo:%d, slotNo:%d %d-%d-%d %d:%d:%d",
         getName().c_str(),
         cassetteNo,
         jobSequenceNo,
         unitNo,
         subUnitNo,
         slotNo,
         year, month, day, hour, minute, second
      );
      // 缓存Attribute,用于调试时显示信息
      unsigned int weight = 201;
      pStep->addAttribute(new CAttribute("CassetteNo",
         std::to_string(cassetteNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("JobSequenceNo",
         std::to_string(jobSequenceNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("UnitNo",
         std::to_string(unitNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("SubUnitNo",
         std::to_string(subUnitNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("SlotNo",
         std::to_string(slotNo).c_str(), "", weight++));
      pStep->addAttribute(new CAttribute("ProcessStartTime",
         (std::to_string(year) + std::to_string(day) + std::to_string(day) + std::to_string(hour) + std::to_string(minute) + std::to_string(second)).c_str()
         , "", weight++));
      return 0;
   }
   int CEquipment::onPreStoredJob(int port, CJobDataB* pJobDataB, short& putSlot)
   {
      LOGI("<CEquipment-%s>onPreStoredJob:port:%d|GlassId:%s",