| | |
| | | CLoadPort::CLoadPort() : CEquipment() |
| | | { |
| | | m_nIndex = 0; |
| | | m_nType = 1; |
| | | m_nMode = 1; |
| | | m_nCassetteType = 1; |
| | | m_nTransferMode = 1; |
| | | m_portType = PortType::Loading; |
| | | m_portMode = PortMode::InService; |
| | | m_cassetteType = CassetteType::G1; |
| | | m_transferMode = TransferMode::AGVMode; |
| | | m_bEnable = FALSE; |
| | | m_bAutoChangeEnable = FALSE; |
| | | } |
| | |
| | | CEqReadStep* pStep = new CEqReadStep(dev[m_nIndex], sizeof(short), |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | m_nType = (unsigned int)CToolUnits::toInt16(pszData); |
| | | m_portType = (PortType)CToolUnits::toInt16(pszData); |
| | | } |
| | | return 0; |
| | | }); |
| | |
| | | CEqReadStep* pStep = new CEqReadStep(dev[m_nIndex], sizeof(short), |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | m_nMode = (unsigned int)CToolUnits::toInt16(pszData); |
| | | m_portMode = (PortMode)CToolUnits::toInt16(pszData); |
| | | } |
| | | return 0; |
| | | }); |
| | |
| | | CEqReadStep* pStep = new CEqReadStep(dev[m_nIndex], sizeof(short), |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | m_nCassetteType = (unsigned int)CToolUnits::toInt16(pszData); |
| | | m_cassetteType = (CassetteType)CToolUnits::toInt16(pszData); |
| | | } |
| | | return 0; |
| | | }); |
| | |
| | | CEqReadStep* pStep = new CEqReadStep(dev[m_nIndex], sizeof(short), |
| | | [&](void* pFrom, int code, const char* pszData, size_t size) -> int { |
| | | if (code == ROK && pszData != nullptr && size > 0) { |
| | | m_nTransferMode = (unsigned int)CToolUnits::toInt16(pszData); |
| | | m_transferMode = (TransferMode)CToolUnits::toInt16(pszData); |
| | | } |
| | | return 0; |
| | | }); |
| | |
| | | attrubutes.addAttribute(new CAttribute("Index", |
| | | std::to_string(m_nIndex).c_str(), "", weight++)); |
| | | attrubutes.addAttribute(new CAttribute("Type", |
| | | getPortTypeDescription(m_nType, strTemp).c_str(), "", weight++)); |
| | | getPortTypeDescription(m_portType, strTemp).c_str(), "", weight++)); |
| | | attrubutes.addAttribute(new CAttribute("Mode", |
| | | getPortModeDescription(m_nMode, strTemp).c_str(), "", weight++)); |
| | | getPortModeDescription(m_portMode, strTemp).c_str(), "", weight++)); |
| | | attrubutes.addAttribute(new CAttribute("CassetteType", |
| | | getPortCassetteTypeDescription(m_nCassetteType, strTemp).c_str(), "", weight++)); |
| | | getPortCassetteTypeDescription(m_cassetteType, strTemp).c_str(), "", weight++)); |
| | | attrubutes.addAttribute(new CAttribute("TransferMode", |
| | | getPortTransferModeDescription(m_nTransferMode, strTemp).c_str(), "", weight++)); |
| | | getPortTransferModeDescription(m_transferMode, strTemp).c_str(), "", weight++)); |
| | | attrubutes.addAttribute(new CAttribute("Enable", |
| | | m_bEnable ? "Eanble" : "Disable", "", weight++)); |
| | | attrubutes.addAttribute(new CAttribute("Auto Change", |
| | |
| | | return m_bEnable; |
| | | } |
| | | |
| | | int CLoadPort::getPortType() |
| | | PortType CLoadPort::getPortType() |
| | | { |
| | | return m_nType; |
| | | return m_portType; |
| | | } |
| | | |
| | | int CLoadPort::getPortMode() |
| | | PortMode CLoadPort::getPortMode() |
| | | { |
| | | return m_nMode; |
| | | return m_portMode; |
| | | } |
| | | |
| | | int CLoadPort::getCessetteType() |
| | | CassetteType CLoadPort::getCessetteType() |
| | | { |
| | | return m_nCassetteType; |
| | | return m_cassetteType; |
| | | } |
| | | |
| | | int CLoadPort::getTransferMode() |
| | | TransferMode CLoadPort::getTransferMode() |
| | | { |
| | | return m_nTransferMode; |
| | | return m_transferMode; |
| | | } |
| | | |
| | | BOOL CLoadPort::isAutoChange() |
| | |
| | | 6: Buffer Port-Un-loader in Buffer Type |
| | | 7: Unloading Partial Port |
| | | */ |
| | | std::string& CLoadPort::getPortTypeDescription(int portType, std::string& strDescription) |
| | | std::string& CLoadPort::getPortTypeDescription(PortType portType, std::string& strDescription) |
| | | { |
| | | switch (portType) { |
| | | switch ((int)portType) { |
| | | case 1: |
| | | strDescription = _T("Loading Port"); |
| | | break; |
| | |
| | | 4: InService |
| | | 5: TransferReady |
| | | */ |
| | | std::string& CLoadPort::getPortModeDescription(int portMode, std::string& strDescription) |
| | | std::string& CLoadPort::getPortModeDescription(PortMode portMode, std::string& strDescription) |
| | | { |
| | | switch (portMode) { |
| | | switch ((int)portMode) { |
| | | case 0: |
| | | strDescription = _T("OutOfService"); |
| | | break; |
| | |
| | | 2: G2 |
| | | 3: G1&G2 |
| | | */ |
| | | std::string& CLoadPort::getPortCassetteTypeDescription(int casseteType, std::string& strDescription) |
| | | std::string& CLoadPort::getPortCassetteTypeDescription(CassetteType casseteType, std::string& strDescription) |
| | | { |
| | | switch (casseteType) { |
| | | switch ((int)casseteType) { |
| | | case 1: |
| | | strDescription = _T("G1"); |
| | | break; |
| | |
| | | 2: AGV Mode |
| | | 3: Stocker Inline Mode |
| | | */ |
| | | std::string& CLoadPort::getPortTransferModeDescription(int mode, std::string& strDescription) |
| | | std::string& CLoadPort::getPortTransferModeDescription(TransferMode mode, std::string& strDescription) |
| | | { |
| | | switch (mode) { |
| | | switch ((int)mode) { |
| | | case 1: |
| | | strDescription = _T("MGV Mode"); |
| | | break; |