| | |
| | | { |
| | | m_nPortStatus = 0; |
| | | m_nCassetteSequenceNo = 0; |
| | | memset(m_nJobExistenceSlot, 0, sizeof(m_nJobExistenceSlot)); |
| | | m_nLoadingCassetteType = 0; |
| | | m_nQTimeFlag = 0; |
| | | m_nCassetteMappingState = 0; |
| | |
| | | m_nCassetteSequenceNo = other.m_nCassetteSequenceNo; |
| | | m_strCassetteID = other.m_strCassetteID; |
| | | |
| | | // Job Existence Slot |
| | | if (PORT_INUSE == m_nPortStatus) { |
| | | for (int i = 0; i < 12; i++) { |
| | | m_nJobExistenceSlot[i] = other.m_nJobExistenceSlot[i]; |
| | | } |
| | | // Job Existence Slot: always copy to avoid stale/uninitialized map |
| | | for (int i = 0; i < 12; i++) { |
| | | m_nJobExistenceSlot[i] = other.m_nJobExistenceSlot[i]; |
| | | } |
| | | |
| | | if (!m_strCassetteID.empty()) { |
| | |
| | | short CPortStatusReport::getPortStatus() |
| | | { |
| | | return m_nPortStatus; |
| | | } |
| | | |
| | | void CPortStatusReport::setPortStatus(short status) |
| | | { |
| | | m_nPortStatus = status; |
| | | } |
| | | |
| | | short CPortStatusReport::getCassetteSequenceNo() |
| | |
| | | memcpy(&pszBuffer[index], m_strCassetteID.c_str(), strLen); |
| | | index += 20; |
| | | |
| | | memcpy(&pszBuffer[index], &m_nJobExistenceSlot[0], sizeof(short)); |
| | | memcpy(&pszBuffer[index], &m_nJobExistenceSlot[0], sizeof(short) * 12); |
| | | index += 12 * sizeof(short); |
| | | |
| | | memcpy(&pszBuffer[index], &m_nLoadingCassetteType, sizeof(short)); |
| | |
| | | CToolUnits::convertString(&pszBuffer[index], 20, m_strCassetteID); |
| | | index += 20; |
| | | |
| | | memcpy(&m_nJobExistenceSlot[0], &pszBuffer[index], sizeof(short)); |
| | | memcpy(&m_nJobExistenceSlot[0], &pszBuffer[index], sizeof(short) * 12); |
| | | index += 12 * sizeof(short); |
| | | |
| | | memcpy(&m_nLoadingCassetteType, &pszBuffer[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | |
| | | memcpy(&m_nLoadingCassetteType, &pszBuffer[index], sizeof(short)); |
| | | index += sizeof(short); |
| | |
| | | memcpy(&m_nCassetteStatus, &pszBuffer[index], sizeof(short)); |
| | | index += sizeof(short); |
| | | |
| | | return 15 * 2; |
| | | return 32 * 2; |
| | | } |
| | | |
| | | void CPortStatusReport::getAttributeVector(CAttributeVector& attrubutes, int beginWeight) |
| | |
| | | |
| | | attrubutes.addAttribute(new CAttribute("CassetteStatus", |
| | | std::to_string(m_nCassetteStatus).c_str(), "", weight++)); |
| | | } |
| | | |
| | | void CPortStatusReport::serialize(CArchive& ar) |
| | | { |
| | | if (ar.IsStoring()) { |
| | | ar << m_nPortStatus; |
| | | ar << m_nCassetteSequenceNo; |
| | | WriteString(ar, m_strCassetteID); |
| | | for (int i = 0; i < 12; i++) { |
| | | ar << m_nJobExistenceSlot[i]; |
| | | } |
| | | ar << m_nLoadingCassetteType; |
| | | ar << m_nQTimeFlag; |
| | | ar << m_nCassetteMappingState; |
| | | ar << m_nCassetteStatus; |
| | | } |
| | | else { |
| | | ar >> m_nPortStatus; |
| | | ar >> m_nCassetteSequenceNo; |
| | | ReadString(ar, m_strCassetteID); |
| | | for (int i = 0; i < 12; i++) { |
| | | ar >> m_nJobExistenceSlot[i]; |
| | | } |
| | | ar >> m_nLoadingCassetteType; |
| | | ar >> m_nQTimeFlag; |
| | | ar >> m_nCassetteMappingState; |
| | | ar >> m_nCassetteStatus; |
| | | } |
| | | } |
| | | |
| | | bool CPortStatusReport::canPickFromPort() |
| | |
| | | |
| | | return false; |
| | | } |
| | | |
| | | short CPortStatusReport::getJobExistenceSlot() |
| | | { |
| | | return m_nJobExistenceSlot[0]; |
| | | } |
| | | |
| | | void CPortStatusReport::setJobExistenceSlot(short map) |
| | | { |
| | | m_nJobExistenceSlot[0] = map; |
| | | } |
| | | |
| | | void CPortStatusReport::setCassetteId(const char* pszId) |
| | | { |
| | | m_strCassetteID = pszId; |
| | | } |
| | | |
| | | void CPortStatusReport::WriteString(CArchive& ar, std::string& string) |
| | | { |
| | | CString strTemp = string.c_str(); |
| | | ar << strTemp; |
| | | } |
| | | |
| | | void CPortStatusReport::ReadString(CArchive& ar, std::string& string) |
| | | { |
| | | CString strTemp; |
| | | ar >> strTemp; |
| | | string = (LPTSTR)(LPCTSTR)strTemp; |
| | | } |
| | | } |
| | | |