LAPTOP-SNT8I5JK\Boounion
2025-05-06 5bcbdac9793e19713d41b58c9eeefbd0818d192b
SourceCode/Bond/Servo/CJobDataB.cpp
@@ -5,7 +5,8 @@
namespace SERVO {
   CJobDataB::CJobDataB()
   {
      m_nCassetteSequenceNo = 0;
      m_nJobSequenceNo = 0;
   }
   CJobDataB::~CJobDataB()
@@ -13,36 +14,33 @@
   }
   int CJobDataB::serialize(char* pszBuffer, int nBufferSize)
   int CJobDataB::getCassetteSequenceNo()
   {
      int index = 0;
      memcpy(&pszBuffer[index], &m_nPortNo, sizeof(short));
      index += sizeof(short);
      return m_nCassetteSequenceNo;
   }
      int strLen = min(20, m_strCarrierId.size());
      memcpy(&pszBuffer[index], m_strCarrierId.c_str(), strLen);
      index += strLen;
   void CJobDataB::setCassetteSequenceNo(int no)
   {
      m_nCassetteSequenceNo = no;
   }
      strLen = min(20, m_pruductId.size());
      memcpy(&pszBuffer[index], m_pruductId.c_str(), strLen);
      index += strLen;
   int CJobDataB::getJobSequenceNo()
   {
      return m_nJobSequenceNo;
   }
      memcpy(&pszBuffer[index], &m_nCarrierState, sizeof(short));
      index += sizeof(short);
   void CJobDataB::setJobSequenceNo(int no)
   {
      m_nJobSequenceNo = no;
   }
      memcpy(&pszBuffer[index], &m_nSlotMapping, sizeof(int));
      index += sizeof(int);
   std::string& CJobDataB::getGlassId()
   {
      return m_strGlassId;
   }
      memcpy(&pszBuffer[index], &m_nSlotSelectedFlag, sizeof(int));
      index += sizeof(int);
      for (int i = 0; i < min(25, m_glassIds.size()); i++) {
         std::string& strGlassId = m_glassIds.at(i);
         strLen = min(20, strGlassId.size());
         memcpy(&pszBuffer[index], strGlassId.c_str(), strLen);
         index += strLen;
      }
      return 320 * 2;
   void CJobDataB::setGlassId(const char* pszGlassId)
   {
      m_strGlassId = pszGlassId;
   }
}