mrDarker
2025-05-29 958cfa6b2e1c1eec0e20edc50816ef18f10cbf09
SourceCode/Bond/Servo/CJobDataS.cpp
@@ -36,12 +36,54 @@
      }
   }
   CJobDataS::CJobDataS(CJobDataS&& other) noexcept
   {
      copy(&other);
      m_pRawData = other.m_pRawData;      // 偷资源
      other.m_pRawData = nullptr;         // 防止释放两次
   }
   CJobDataS::~CJobDataS()
   {
      if (m_pRawData != nullptr) {
         delete[] m_pRawData;
         m_pRawData = nullptr;
      }
   }
   void CJobDataS::copy(CJobDataS* pScr)
   {
      m_nCassetteSequenceNo = pScr->m_nCassetteSequenceNo;
      m_nJobSequenceNo = pScr->m_nJobSequenceNo;
      m_strLotId = pScr->m_strLotId;
      m_strProductId = pScr->m_strProductId;
      m_strOperationId = pScr->m_strOperationId;
      m_strGlass1Id = pScr->m_strGlass1Id;
      m_strGlass2Id = pScr->m_strGlass2Id;
      m_nJobType = pScr->m_nJobType;
      m_nMaterialsType = pScr->m_nMaterialsType;
      m_nProductType = pScr->m_nProductType;
      m_nDummyType = pScr->m_nDummyType;
      m_nSkipFlag = pScr->m_nSkipFlag;
      m_nProcessFlag = pScr->m_nProcessFlag;
      m_nProcessResonCode = pScr->m_nProcessResonCode;
      m_nLastGlassFlag = pScr->m_nLastGlassFlag;
      m_nFirstGlassFlag = pScr->m_nFirstGlassFlag;
      m_nQTime[0] = pScr->m_nQTime[0];
      m_nQTime[1] = pScr->m_nQTime[1];
      m_nQTime[2] = pScr->m_nQTime[2];
      m_nQTimeOverFlag = pScr->m_nQTimeOverFlag;
      m_nMasterRecipe = pScr->m_nMasterRecipe;
      m_strProductRecipeId = pScr->m_strProductRecipeId;
      m_strPCode = pScr->m_strPCode;
      m_strUseType = pScr->m_strUseType;
      m_strPanelMeasure = pScr->m_strPanelMeasure;
      m_nMode = pScr->m_nMode;
      m_nSlotUnitSelectFlag = pScr->m_nSlotUnitSelectFlag;
      m_nSourcePortNo = pScr->m_nSourcePortNo;
      m_nSourceSlotNo = pScr->m_nSourceSlotNo;
      m_nTargetPortNo = pScr->m_nTargetPortNo;
      m_nTargetSlotNo = pScr->m_nTargetSlotNo;
   }
   int CJobDataS::getCassetteSequenceNo()
@@ -455,7 +497,7 @@
   int CJobDataS::unserialize(const char* pszBuffer, int nBufferSize)
   {
      if (nBufferSize < 256 * 2) return -1;
      if (nBufferSize < JOBDATAS_SIZE) return -1;
      int index = 0;
      memcpy(&m_nCassetteSequenceNo, &pszBuffer[index], sizeof(short));
@@ -558,7 +600,7 @@
      }
      return 256 * 2;
      return JOBDATAS_SIZE;
   }
   void CJobDataS::getAttributeVector(CAttributeVector& attrubutes, int beginWeight)