| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "stdafx.h" |
| | | #include "CServoUtilsTool.h" |
| | | #include "Common.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | CServoUtilsTool::CServoUtilsTool() |
| | | { |
| | | |
| | | } |
| | | |
| | | CServoUtilsTool::~CServoUtilsTool() |
| | | { |
| | | |
| | | } |
| | | |
| | | std::string CServoUtilsTool::getEqUnitName(int eqid, int unit) |
| | | { |
| | | char szBuffer[256]; |
| | | if (eqid == EQ_ID_LOADPORT1 |
| | | || eqid == EQ_ID_LOADPORT2 |
| | | || eqid == EQ_ID_LOADPORT3 |
| | | || eqid == EQ_ID_LOADPORT4 |
| | | ) { |
| | | sprintf_s(szBuffer, 256, "Port%d(Slot%d)", eqid - EQ_ID_LOADPORT1 + 1, unit + 1); |
| | | return std::string(szBuffer); |
| | | } |
| | | |
| | | if (eqid == EQ_ID_ALIGNER) { |
| | | return "Aligner"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_FLIPER) { |
| | | return "Fliper"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_VACUUMBAKE) { |
| | | if (unit == 0) return "çç¤Aè
"; |
| | | if (unit == 1) return "çç¤Bè
"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_VACUUMBAKE) { |
| | | if (unit == 0) return "çç¤Aè
"; |
| | | if (unit == 1) return "çç¤Bè
"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_Bonder1) { |
| | | return "Bonder1"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_Bonder2) { |
| | | return "Bonder2"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_BAKE_COOLING) { |
| | | |
| | | if (unit == 0) return "åçç¤Aè
"; |
| | | if (unit == 1) return "å·å´A"; |
| | | if (unit == 0) return "åçç¤Bè
"; |
| | | if (unit == 1) return "å·å´B"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_MEASUREMENT) { |
| | | return "AOI"; |
| | | } |
| | | |
| | | |
| | | if (eqid == EQ_ID_ARM_TRAY1) { |
| | | return "ARM1"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_ARM_TRAY2) { |
| | | return "ARM2"; |
| | | } |
| | | |
| | | return ""; |
| | | } |
| | | |
| | | std::string CServoUtilsTool::getEqUnitName(int eqid, int unit, int slot) |
| | | { |
| | | char szBuffer[256]; |
| | | if (eqid == EQ_ID_LOADPORT1 |
| | | || eqid == EQ_ID_LOADPORT2 |
| | | || eqid == EQ_ID_LOADPORT3 |
| | | || eqid == EQ_ID_LOADPORT4 |
| | | ) { |
| | | sprintf_s(szBuffer, 256, "Port%d(Slot%d)", eqid - EQ_ID_LOADPORT1 + 1, slot); |
| | | return std::string(szBuffer); |
| | | } |
| | | |
| | | if (eqid == EQ_ID_ALIGNER) { |
| | | return "Aligner"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_FLIPER) { |
| | | return "Fliper"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_VACUUMBAKE) { |
| | | if (unit == 0) { |
| | | sprintf_s(szBuffer, 256, "çç¤Aè
(Slot%d)", slot); |
| | | return std::string(szBuffer); |
| | | } |
| | | if (unit == 1) { |
| | | sprintf_s(szBuffer, 256, "çç¤Bè
(Slot%d)", slot); |
| | | return std::string(szBuffer); |
| | | } |
| | | } |
| | | |
| | | if (eqid == EQ_ID_Bonder1) { |
| | | sprintf_s(szBuffer, 256, "Bonder1(Slot%d)", slot); |
| | | return std::string(szBuffer); |
| | | } |
| | | |
| | | if (eqid == EQ_ID_Bonder2) { |
| | | sprintf_s(szBuffer, 256, "Bonder2(Slot%d)", slot); |
| | | return std::string(szBuffer); |
| | | } |
| | | |
| | | if (eqid == EQ_ID_BAKE_COOLING) { |
| | | |
| | | if (slot == 0) return "åçç¤Aè
"; |
| | | if (slot == 1) return "å·å´A"; |
| | | if (slot == 0) return "åçç¤Bè
"; |
| | | if (slot == 1) return "å·å´B"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_MEASUREMENT) { |
| | | return "AOI"; |
| | | } |
| | | |
| | | |
| | | if (eqid == EQ_ID_ARM_TRAY1) { |
| | | return "ARM1"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_ARM_TRAY2) { |
| | | return "ARM2"; |
| | | } |
| | | |
| | | return ""; |
| | | } |
| | | |
| | | std::string CServoUtilsTool::getMaterialsTypeText(MaterialsType type) |
| | | { |
| | | if (type == MaterialsType::G1) { |
| | | return "G1"; |
| | | } |
| | | |
| | | if (type == MaterialsType::G2) { |
| | | return "G2"; |
| | | } |
| | | |
| | | return ""; |
| | | } |
| | | |
| | | std::string CServoUtilsTool::getGlassStateText(SERVO::GlsState state) |
| | | { |
| | | switch (state) |
| | | { |
| | | case SERVO::GlsState::NoState: |
| | | return "NoState"; |
| | | break; |
| | | case SERVO::GlsState::Queued: |
| | | return "Queued"; |
| | | break; |
| | | case SERVO::GlsState::InProcess: |
| | | return "InProcess"; |
| | | break; |
| | | case SERVO::GlsState::Paused: |
| | | return "Paused"; |
| | | break; |
| | | case SERVO::GlsState::Completed: |
| | | return "Completed"; |
| | | break; |
| | | case SERVO::GlsState::Aborted: |
| | | return "Aborted"; |
| | | break; |
| | | case SERVO::GlsState::Failed: |
| | | return "Failed"; |
| | | break; |
| | | default: |
| | | return ""; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | std::string CServoUtilsTool::getInspResultText(SERVO::InspResult result) |
| | | { |
| | | switch (result) |
| | | { |
| | | case SERVO::InspResult::NotInspected: |
| | | return ""; |
| | | break; |
| | | case SERVO::InspResult::Pass: |
| | | return "Pass"; |
| | | break; |
| | | case SERVO::InspResult::Fail: |
| | | return "Fail"; |
| | | break; |
| | | default: |
| | | return ""; |
| | | break; |
| | | } |
| | | } |
| | | } |