1.enum修改为enum class, 理顺CLoadPort各成员变量在调度中的判定作用;
| | |
| | | return -1; |
| | | } |
| | | |
| | | unsigned short operationMode = (unsigned short)(mode + getIndexerOperationModeBaseValue()); |
| | | unsigned short operationMode = (unsigned short)((unsigned short)mode + getIndexerOperationModeBaseValue()); |
| | | LOGI("<CEquipment-%s>åå¤è®¾ç½®indexerOperationMode<%d>", m_strName.c_str(), (int)mode); |
| | | if (onWritedBlock != nullptr) { |
| | | pStep->writeShort(operationMode, onWritedBlock); |
| | |
| | | #pragma once |
| | | #include "Log.h" |
| | | #include "ServoCommo.h" |
| | | #include "CCLinkIEControl.h" |
| | | #include "CSample.h" |
| | | #include "CPin.h" |
| | |
| | | |
| | | |
| | | namespace SERVO { |
| | | #define BLOCK_BUFFER_MAX 1024 |
| | | #define ALIVE_TIMEOUT 15 |
| | | #define VCR_MAX 1 |
| | | #define ARM_ALL 99 |
| | | |
| | | typedef std::function<void(void* pEiuipment, BOOL bAlive)> ONALIVE; |
| | | typedef std::function<void(void* pEiuipment, int code)> ONDATACHANGED; |
| | |
| | | ONVCREVENTREPORT onVcrEventReport; |
| | | } EquipmentListener; |
| | | |
| | | // Memory Block ç»æä½å®ä¹ |
| | | typedef struct _MemoryBlock { |
| | | unsigned int type; |
| | | unsigned int start; |
| | | unsigned int end; |
| | | unsigned int size; |
| | | char buffer[BLOCK_BUFFER_MAX]; |
| | | } MemoryBlock; |
| | | |
| | | // ALIVE |
| | | typedef struct _ALIVE { |
| | | BOOL flag; |
| | | int count; |
| | | BOOL alive; |
| | | } ALIVE; |
| | | |
| | | enum DISPATCHING_MODE { |
| | | EAS = 1, |
| | | Local = 2 |
| | | }; |
| | | |
| | | enum IDNEXER_OPERATION_MODE { |
| | | Normal = 1, |
| | | Clear_Out = 2, |
| | | Cold_Run = 2, |
| | | Start = 10, |
| | | Stop = 11, |
| | | Pause = 12, |
| | | Resume = 13, |
| | | Abort = 14, |
| | | Cancel = 15, |
| | | }; |
| | | |
| | | enum RCMD { |
| | | Robot_home = 1, |
| | | Transfer, |
| | | Move, |
| | | Get, |
| | | Put, |
| | | One_Action_Exchange, |
| | | Two_Action_Exchange, |
| | | Command_Clear, |
| | | Batch_get, |
| | | Batch_put |
| | | }; |
| | | |
| | | enum VCR_Reply_Code { |
| | | OK = 1, |
| | | NG, |
| | | Job_Data_Request, |
| | | VCR_Mismatch |
| | | }; |
| | | |
| | | // Robot cmd param |
| | | #define ROBOT_CMD_PARAM_SIZE 16 /* 鲿¢ä»¥åä¿®æ¹ROBOT_CMD_PARAMä¸ºä¸æ¯4çæ´æ°å */ |
| | | typedef struct _ROBOT_CMD_PARAM { |
| | | short sequenceNo; |
| | | short rcmd; |
| | | short armNo; |
| | | short getPosition; |
| | | short putPosition; |
| | | short getSlotNo; |
| | | short putSlotNo; |
| | | short subCmd; |
| | | } ROBOT_CMD_PARAM; |
| | | |
| | | class CEquipment |
| | | { |
| | | public: |
| | | CEquipment(); |
| | | virtual ~CEquipment(); |
| | | |
| | | |
| | | public: |
| | | virtual const char* getClassName() = 0; |
| | |
| | | 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; |
| | |
| | | void setIndex(unsigned int index); |
| | | unsigned int getIndex(); |
| | | BOOL isEnable(); |
| | | int getPortType(); |
| | | int getPortMode(); |
| | | int getCessetteType(); |
| | | int getTransferMode(); |
| | | PortType getPortType(); |
| | | PortMode getPortMode(); |
| | | CassetteType getCessetteType(); |
| | | TransferMode getTransferMode(); |
| | | BOOL isAutoChange(); |
| | | int getPortStatus(); |
| | | int getCassetteSequenceNo(); |
| | |
| | | int testGenerateGlassList(MaterialsType type, int count, const char* pszPrefix, int startSuffix); |
| | | |
| | | public: |
| | | static std::string& getPortTypeDescription(int portType, std::string& strDescription); |
| | | static std::string& getPortModeDescription(int portMode, std::string& strDescription); |
| | | static std::string& getPortCassetteTypeDescription(int casseteType, std::string& strDescription); |
| | | static std::string& getPortTransferModeDescription(int mode, std::string& strDescription); |
| | | static std::string& getPortTypeDescription(PortType portType, std::string& strDescription); |
| | | static std::string& getPortModeDescription(PortMode portMode, std::string& strDescription); |
| | | static std::string& getPortCassetteTypeDescription(CassetteType casseteType, std::string& strDescription); |
| | | static std::string& getPortTransferModeDescription(TransferMode mode, std::string& strDescription); |
| | | static std::string& getEnableModeDescription(int mode, std::string& strDescription); |
| | | static std::string& getPortStatusDescription(int portStatus, std::string& strDescription); |
| | | static std::string& getLoadingCassetteTypeDescription(int type, std::string& strDescription); |
| | |
| | | |
| | | private: |
| | | unsigned int m_nIndex; |
| | | int m_nType; |
| | | int m_nMode; |
| | | int m_nCassetteType; |
| | | int m_nTransferMode; |
| | | PortType m_portType; |
| | | PortMode m_portMode; |
| | | CassetteType m_cassetteType; |
| | | TransferMode m_transferMode; |
| | | BOOL m_bEnable; |
| | | BOOL m_bAutoChangeEnable; |
| | | CPortStatusReport m_portStatusReport; |
| | |
| | | m_ullStartTime = 0; |
| | | m_ullRunTime = 0; |
| | | m_state = MASTERSTATE::READY; |
| | | m_pActiveRobotTask = nullptr; |
| | | InitializeCriticalSection(&m_criticalSection); |
| | | } |
| | | |
| | |
| | | m_listener.onEqAlarm = listener.onEqAlarm; |
| | | m_listener.onEqVcrEventReport = listener.onEqVcrEventReport; |
| | | m_listener.onEqDataChanged = listener.onEqDataChanged; |
| | | } |
| | | |
| | | CRobotTask* CMaster::getActiveRobotTask() |
| | | { |
| | | return m_pActiveRobotTask; |
| | | } |
| | | |
| | | int CMaster::init() |
| | |
| | | unlock(); |
| | | LOGI("è°åº¦å¤çä¸..."); |
| | | Sleep(1000); |
| | | |
| | | |
| | | // LoadPort -> Fliper(G2) |
| | | |
| | | |
| | | // LoadPort -> VacuumBake(G1) |
| | | |
| | | |
| | | // Fliper(G2) -> Aligner |
| | | |
| | | |
| | | // VacuumBake(G1) -> Aligner |
| | | |
| | | |
| | | // Aligner -> Bonder |
| | | |
| | | |
| | | // Bonder -> BakeCooling |
| | | |
| | | |
| | | // BakeCooling ->Measurement |
| | | |
| | | |
| | | // Measurement -> LoadPort |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | unlock(); |
| | | } |
| | |
| | | #include "CArm.h" |
| | | #include "CArmTray.h" |
| | | #include "CCLinkIEControl.h" |
| | | #include "CRobotTask.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | |
| | | |
| | | public: |
| | | void setListener(MasterListener listener); |
| | | CRobotTask* getActiveRobotTask(); |
| | | int init(); |
| | | int term(); |
| | | int start(); |
| | |
| | | ULONGLONG m_ullStartTime; |
| | | ULONGLONG m_ullRunTime; |
| | | MASTERSTATE m_state; |
| | | |
| | | // å½åä»»å¡å已宿任å¡å表 |
| | | CRobotTask* m_pActiveRobotTask; |
| | | std::list< CRobotTask* > m_listTask; |
| | | }; |
| | | } |
| | | |
| | |
| | | |
| | | pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_PORT_TYPE); |
| | | for (int i = 1; i <= 7; i++) { |
| | | pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortTypeDescription(i, strTemp).c_str()); |
| | | pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortTypeDescription((SERVO::PortType)i, strTemp).c_str()); |
| | | } |
| | | int portType = m_pPort->getPortType(); |
| | | int portType = (int)m_pPort->getPortType(); |
| | | if (1 <= portType && portType <= 7) { |
| | | pComboBox->SetCurSel(portType - 1); |
| | | } |
| | | |
| | | pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_PORT_MODE); |
| | | for (int i = 0; i <= 5; i++) { |
| | | pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortModeDescription(i, strTemp).c_str()); |
| | | pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortModeDescription((SERVO::PortMode)i, strTemp).c_str()); |
| | | } |
| | | int portMode = m_pPort->getPortMode(); |
| | | int portMode = (int)m_pPort->getPortMode(); |
| | | if (0 <= portMode && portMode <= 5) { |
| | | pComboBox->SetCurSel(portMode); |
| | | } |
| | | |
| | | pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_PORT_CASSERT_TYPE); |
| | | for (int i = 1; i <= 3; i++) { |
| | | pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortCassetteTypeDescription(i, strTemp).c_str()); |
| | | pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortCassetteTypeDescription((SERVO::CassetteType)i, strTemp).c_str()); |
| | | } |
| | | int cessetteType = m_pPort->getCessetteType(); |
| | | int cessetteType = (int)m_pPort->getCessetteType(); |
| | | if (1 <= cessetteType && cessetteType <= 3) { |
| | | pComboBox->SetCurSel(cessetteType - 1); |
| | | } |
| | | |
| | | pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_PORT_TRANSFER_MODE); |
| | | for (int i = 1; i <= 3; i++) { |
| | | pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortTransferModeDescription(i, strTemp).c_str()); |
| | | pComboBox->InsertString(i - 1, SERVO::CLoadPort::getPortTransferModeDescription((SERVO::TransferMode)i, strTemp).c_str()); |
| | | } |
| | | int transferMode = m_pPort->getTransferMode(); |
| | | int transferMode = (int)m_pPort->getTransferMode(); |
| | | if (1 <= transferMode && transferMode <= 3) { |
| | | pComboBox->SetCurSel(transferMode - 1); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "stdafx.h" |
| | | #include "CRobotTask.h" |
| | | #include "ToolUnits.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | CRobotTask::CRobotTask() |
| | | { |
| | | generateId(m_strId); |
| | | m_timeCreate = CToolUnits::getTimestamp(); |
| | | } |
| | | |
| | | CRobotTask::~CRobotTask() |
| | | { |
| | | |
| | | } |
| | | |
| | | std::string& CRobotTask::generateId(std::string& out) |
| | | { |
| | | char szBuffer[256]; |
| | | CTime time = CTime::GetCurrentTime(); |
| | | __int64 nTick = 0; |
| | | QueryPerformanceCounter((LARGE_INTEGER*)&nTick); |
| | | sprintf_s(szBuffer, 256, "%d%02d%02d%02d%02d%02d%010llu", time.GetYear(), |
| | | time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond(), |
| | | nTick % 10000000000); |
| | | out = szBuffer; |
| | | |
| | | return out; |
| | | } |
| | | |
| | | std::string& CRobotTask::getId() |
| | | { |
| | | return m_strId; |
| | | } |
| | | |
| | | void CRobotTask::setRobotTransferParam(int seq, int armNo, int fromPos, int toPos, int fromSlot, int toSlot) |
| | | { |
| | | m_robotCmdParam = {}; |
| | | m_robotCmdParam.sequenceNo = static_cast<short>(seq); |
| | | m_robotCmdParam.rcmd = static_cast<short>(SERVO::RCMD::Transfer); |
| | | m_robotCmdParam.armNo = static_cast<short>(armNo); |
| | | m_robotCmdParam.getPosition = static_cast<short>(fromPos); |
| | | m_robotCmdParam.getSlotNo = static_cast<short>(fromSlot); |
| | | m_robotCmdParam.putPosition = static_cast<short>(toPos); |
| | | m_robotCmdParam.putSlotNo = static_cast<short>(toSlot); |
| | | } |
| | | |
| | | ROBOT_CMD_PARAM& CRobotTask::getRobotCmdParam() |
| | | { |
| | | return m_robotCmdParam; |
| | | } |
| | | |
| | | time_t CRobotTask::getCreateTime() |
| | | { |
| | | return m_timeCreate; |
| | | } |
| | | |
| | | time_t CRobotTask::getFinishTime() |
| | | { |
| | | return m_timeFinish; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | #pragma once |
| | | #include "ServoCommo.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | class CRobotTask |
| | | { |
| | | public: |
| | | CRobotTask(); |
| | | ~CRobotTask(); |
| | | |
| | | public: |
| | | std::string& getId(); |
| | | void setRobotTransferParam(int seq, int armNo, int fromPos, int toPos, int fromSlot, int toSlot); |
| | | ROBOT_CMD_PARAM& getRobotCmdParam(); |
| | | time_t getCreateTime(); |
| | | time_t getFinishTime(); |
| | | |
| | | private: |
| | | static std::string& generateId(std::string& out); |
| | | |
| | | public: |
| | | std::string m_strId; |
| | | time_t m_timeCreate; /* å建æ¶é´ */ |
| | | time_t m_timeFinish; /* ç»ææ¶é´ */ |
| | | ROBOT_CMD_PARAM m_robotCmdParam; /* åæ° */ |
| | | }; |
| | | } |
| | |
| | | <ClInclude Include="CRobotCmdTestDlg.h" /> |
| | | <ClInclude Include="CPagePortStatus.h" /> |
| | | <ClInclude Include="CPortStatusReport.h" /> |
| | | <ClInclude Include="CRobotTask.h" /> |
| | | <ClInclude Include="HorizontalLine.h" /> |
| | | <ClInclude Include="JobSlotGrid.h" /> |
| | | <ClInclude Include="MsgDlg.h" /> |
| | |
| | | <ClCompile Include="CRobotCmdTestDlg.cpp" /> |
| | | <ClCompile Include="CPagePortStatus.cpp" /> |
| | | <ClCompile Include="CPortStatusReport.cpp" /> |
| | | <ClCompile Include="CRobotTask.cpp" /> |
| | | <ClCompile Include="HorizontalLine.cpp" /> |
| | | <ClCompile Include="JobSlotGrid.cpp" /> |
| | | <ClCompile Include="MsgDlg.cpp" /> |
| | |
| | | <ClCompile Include="TopToolbar.cpp" /> |
| | | <ClCompile Include="HorizontalLine.cpp" /> |
| | | <ClCompile Include="CMyStatusbar.cpp" /> |
| | | <ClCompile Include="CRobotTask.cpp" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="AlarmManager.h" /> |
| | |
| | | <ClInclude Include="TopToolbar.h" /> |
| | | <ClInclude Include="HorizontalLine.h" /> |
| | | <ClInclude Include="CMyStatusbar.h" /> |
| | | <ClInclude Include="CRobotTask.h" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ResourceCompile Include="Servo.rc" /> |
| | |
| | | |
| | | |
| | | namespace SERVO { |
| | | enum PortType { |
| | | #define BLOCK_BUFFER_MAX 1024 |
| | | #define ALIVE_TIMEOUT 15 |
| | | #define VCR_MAX 1 |
| | | #define ARM_ALL 99 |
| | | |
| | | enum class PortType { |
| | | Loading = 1, |
| | | Unloading, |
| | | Both, |
| | |
| | | UnloadingPartial |
| | | }; |
| | | |
| | | enum PortMode { |
| | | enum class PortMode { |
| | | OutOfService = 0, |
| | | TransferBlocked, |
| | | ReadyToLoad, |
| | |
| | | TransferReady |
| | | }; |
| | | |
| | | enum MaterialsType { |
| | | enum class MaterialsType { |
| | | G1 = 0, |
| | | G2 = 1, |
| | | G1G2 = 2 |
| | | }; |
| | | typedef MaterialsType CassetteType; |
| | | |
| | | enum TransferMode { |
| | | enum class TransferMode { |
| | | MGVMode = 1, |
| | | AGVMode, |
| | | StockerInlineMode |
| | | }; |
| | | |
| | | // Memory Block ç»æä½å®ä¹ |
| | | typedef struct _MemoryBlock { |
| | | unsigned int type; |
| | | unsigned int start; |
| | | unsigned int end; |
| | | unsigned int size; |
| | | char buffer[BLOCK_BUFFER_MAX]; |
| | | } MemoryBlock; |
| | | |
| | | // ALIVE |
| | | typedef struct _ALIVE { |
| | | BOOL flag; |
| | | int count; |
| | | BOOL alive; |
| | | } ALIVE; |
| | | |
| | | enum class DISPATCHING_MODE { |
| | | EAS = 1, |
| | | Local = 2 |
| | | }; |
| | | |
| | | enum class IDNEXER_OPERATION_MODE { |
| | | Normal = 1, |
| | | Clear_Out = 2, |
| | | Cold_Run = 2, |
| | | Start = 10, |
| | | Stop = 11, |
| | | Pause = 12, |
| | | Resume = 13, |
| | | Abort = 14, |
| | | Cancel = 15, |
| | | }; |
| | | |
| | | enum class VCR_Reply_Code { |
| | | OK = 1, |
| | | NG, |
| | | Job_Data_Request, |
| | | VCR_Mismatch |
| | | }; |
| | | |
| | | // Robot cmd param |
| | | #define ROBOT_CMD_PARAM_SIZE 16 /* 鲿¢ä»¥åä¿®æ¹ROBOT_CMD_PARAMä¸ºä¸æ¯4çæ´æ°å */ |
| | | typedef struct _ROBOT_CMD_PARAM { |
| | | short sequenceNo; |
| | | short rcmd; |
| | | short armNo; |
| | | short getPosition; |
| | | short putPosition; |
| | | short getSlotNo; |
| | | short putSlotNo; |
| | | short subCmd; |
| | | } ROBOT_CMD_PARAM; |
| | | |
| | | enum class RCMD { |
| | | Robot_home = 1, |
| | | Transfer, |
| | | Move, |
| | | Get, |
| | | Put, |
| | | One_Action_Exchange, |
| | | Two_Action_Exchange, |
| | | Command_Clear, |
| | | Batch_get, |
| | | Batch_put |
| | | }; |
| | | |
| | | enum class ROBOT_TASK_STATE { |
| | | Ready = 0, |
| | | Running, |
| | | Error, |
| | | Abort, |
| | | Completed |
| | | }; |
| | | } |
| | | |
| | |
| | | ULONGLONG CToolUnits::getTimestamp() |
| | | { |
| | | auto now = std::chrono::system_clock::now(); |
| | | auto duration_in_milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()); |
| | | uint64_t timestamp = duration_in_milliseconds.count(); |
| | | return timestamp; |
| | | auto ms = std::chrono::time_point_cast<std::chrono::milliseconds>(now); |
| | | return static_cast<ULONGLONG>(ms.time_since_epoch().count()); |
| | | } |
| | | |
| | | void CToolUnits::createDir(const char* pszDir) |