| | |
| | | namespace SERVO { |
| | | CJobDataB::CJobDataB() |
| | | { |
| | | |
| | | m_nCassetteSequenceNo = 0; |
| | | m_nJobSequenceNo = 0; |
| | | } |
| | | |
| | | CJobDataB::~CJobDataB() |
| | |
| | | |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |