| | |
| | | int jobExistenceSize, |
| | | short slotProcess, |
| | | short jopCount, |
| | | CJobDataB* pJobDataB) |
| | | CJobDataA* pJobDataA) |
| | | { |
| | | ASSERT(jobExistenceSize == 12); |
| | | ASSERT(pJobDataB); |
| | | ASSERT(pJobDataA); |
| | | |
| | | char szBuffer[1024] = { 0 }; |
| | | memcpy(&szBuffer[0], &cmd, sizeof(short)); |
| | | memcpy(&szBuffer[2], jobExistence, sizeof(short) * jobExistenceSize); |
| | | memcpy(&szBuffer[26], &slotProcess, sizeof(short)); |
| | | memcpy(&szBuffer[36], &jopCount, sizeof(short)); |
| | | int nLen = pJobDataB->serialize(&szBuffer[38], 1024 - 38); |
| | | int nLen = pJobDataA->serialize(&szBuffer[38], 1024 - 38); |
| | | return writeData(m_nCtrlCmdDev, (const char*)szBuffer, 38 + nLen); |
| | | } |
| | | |
| | |
| | | #pragma once |
| | | #include "CWriteStep.h" |
| | | #include "CJobDataB.h" |
| | | #include "CJobDataA.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | |
| | | int jobExistenceSize, |
| | | short slotProcess, |
| | | short jopCount, |
| | | CJobDataB* pJobDataB); |
| | | CJobDataA* pJobDataA); |
| | | void getAttributeVector(CAttributeVector& attrubutes); |
| | | |
| | | private: |
| | |
| | | attrubutes.addAttribute(new CAttribute("Dev", |
| | | ("W" + CToolUnits::toHexString(m_nJobDataBDev, strTemp)).c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("PortNo", |
| | | std::to_string(m_jobDataB.getPortNo()).c_str(), "")); |
| | | std::to_string(m_jobDataA.getPortNo()).c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("CarrierId", |
| | | m_jobDataB.getCarrierId().c_str(), "")); |
| | | m_jobDataA.getCarrierId().c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("PruductId", |
| | | m_jobDataB.getPruductId().c_str(), "")); |
| | | m_jobDataA.getPruductId().c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("CarrierState", |
| | | m_jobDataB.getCarrierStateDescription(strTemp).c_str(), "")); |
| | | m_jobDataA.getCarrierStateDescription(strTemp).c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("SlotMapping", |
| | | std::to_string(m_jobDataB.getSlotMapping()).c_str(), "")); |
| | | std::to_string(m_jobDataA.getSlotMapping()).c_str(), "")); |
| | | attrubutes.addAttribute(new CAttribute("SlotSelectedFlag", |
| | | std::to_string(m_jobDataB.getSlotSelectedFlag()).c_str(), "")); |
| | | std::vector<std::string>& ids = m_jobDataB.getGlassIds(); |
| | | std::to_string(m_jobDataA.getSlotSelectedFlag()).c_str(), "")); |
| | | std::vector<std::string>& ids = m_jobDataA.getGlassIds(); |
| | | for (int i = 0; i < ids.size(); i++) { |
| | | attrubutes.addAttribute(new CAttribute((std::string("GlassId") + std::to_string(i+1)).c_str(), |
| | | ids[i].c_str(), "")); |
| | |
| | | return -1; |
| | | } |
| | | |
| | | m_jobDataB.unserialize(szBuffer, 640); |
| | | LOGI("<CEqJobEventStep-%s>Read JobDataB\n", m_strName.c_str()); |
| | | m_jobDataA.unserialize(szBuffer, 640); |
| | | LOGI("<CEqJobEventStep-%s>Read JobDataA\n", m_strName.c_str()); |
| | | |
| | | return 0; |
| | | } |
| | |
| | | return 0; |
| | | } |
| | | |
| | | CJobDataB* CEqJobEventStep::getJobDataB() |
| | | CJobDataA* CEqJobEventStep::getJobDataA() |
| | | { |
| | | return &m_jobDataB; |
| | | return &m_jobDataA; |
| | | } |
| | | } |
| | |
| | | #pragma once |
| | | #include "CReadStep.h" |
| | | #include "CJobDataB.h" |
| | | #include "CJobDataA.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | |
| | | virtual int onComplete(); |
| | | virtual int onTimeout(); |
| | | void setJobDataDev(int nDev); |
| | | CJobDataB* getJobDataB(); |
| | | CJobDataA* getJobDataA(); |
| | | |
| | | private: |
| | | int m_nJobDataBDev; |
| | | CJobDataB m_jobDataB; |
| | | CJobDataA m_jobDataA; |
| | | }; |
| | | } |
| | | |
| 文件名从 SourceCode/Bond/Servo/CJobDataB.cpp 修改 |
| | |
| | | #include "stdafx.h" |
| | | #include "CJobDataB.h" |
| | | #include "CJobDataA.h" |
| | | #include "ToolUnits.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | CJobDataB::CJobDataB() |
| | | CJobDataA::CJobDataA() |
| | | { |
| | | |
| | | } |
| | | |
| | | CJobDataB::~CJobDataB() |
| | | CJobDataA::~CJobDataA() |
| | | { |
| | | |
| | | } |
| | | |
| | | short CJobDataB::getPortNo() |
| | | short CJobDataA::getPortNo() |
| | | { |
| | | return m_nPortNo; |
| | | } |
| | | |
| | | std::string& CJobDataB::getCarrierId() |
| | | std::string& CJobDataA::getCarrierId() |
| | | { |
| | | return m_strCarrierId; |
| | | } |
| | | |
| | | std::string& CJobDataB::getPruductId() |
| | | std::string& CJobDataA::getPruductId() |
| | | { |
| | | return m_pruductId; |
| | | } |
| | | |
| | | int CJobDataB::serialize(char* pszBuffer, int nBufferSize) |
| | | int CJobDataA::serialize(char* pszBuffer, int nBufferSize) |
| | | { |
| | | if (nBufferSize < 640) return -1; |
| | | |
| | |
| | | return 320 * 2; |
| | | } |
| | | |
| | | int CJobDataB::unserialize(char* pszBuffer, int nBufferSize) |
| | | int CJobDataA::unserialize(char* pszBuffer, int nBufferSize) |
| | | { |
| | | if (nBufferSize < 640) return -1; |
| | | |
| | |
| | | return 320 * 2; |
| | | } |
| | | |
| | | short CJobDataB::getCarrierState() |
| | | short CJobDataA::getCarrierState() |
| | | { |
| | | return m_nCarrierState; |
| | | } |
| | | |
| | | std::string& CJobDataB::getCarrierStateDescription(std::string& strDescription) |
| | | std::string& CJobDataA::getCarrierStateDescription(std::string& strDescription) |
| | | { |
| | | static char* pszDescription[20] = { |
| | | "Bind", |
| | |
| | | return strDescription; |
| | | } |
| | | |
| | | int CJobDataB::getSlotMapping() |
| | | int CJobDataA::getSlotMapping() |
| | | { |
| | | return m_nSlotMapping; |
| | | } |
| | | |
| | | int CJobDataB::getSlotSelectedFlag() |
| | | int CJobDataA::getSlotSelectedFlag() |
| | | { |
| | | return m_nSlotSelectedFlag; |
| | | } |
| | | |
| | | std::vector<std::string>& CJobDataB::getGlassIds() |
| | | std::vector<std::string>& CJobDataA::getGlassIds() |
| | | { |
| | | return m_glassIds; |
| | | } |
| 文件名从 SourceCode/Bond/Servo/CJobDataB.h 修改 |
| | |
| | | |
| | | |
| | | namespace SERVO { |
| | | class CJobDataB |
| | | class CJobDataA |
| | | { |
| | | public: |
| | | CJobDataB(); |
| | | ~CJobDataB(); |
| | | CJobDataA(); |
| | | ~CJobDataA(); |
| | | |
| | | public: |
| | | short getPortNo(); |
| | |
| | | int jobExistenceSize, |
| | | short slotProcess, |
| | | short jopCount, |
| | | CJobDataB* pJobDataB) |
| | | CJobDataA* pJobDataA) |
| | | { |
| | | int id = getID(); |
| | | if ( !(id == EQ_ID_LOADPORT1 || id == EQ_ID_LOADPORT2) ) { |
| | |
| | | |
| | | SERVO::CEqCassetteCtrlCmdStep* pStep = (SERVO::CEqCassetteCtrlCmdStep*)getCassetteCtrlCmdStep(); |
| | | ASSERT(pStep); |
| | | return pStep->sendCtrlCmd(cmd, jobExistence, jobExistenceSize, slotProcess, jopCount, pJobDataB); |
| | | return pStep->sendCtrlCmd(cmd, jobExistence, jobExistenceSize, slotProcess, jopCount, pJobDataA); |
| | | } |
| | | |
| | | CStep* CLoadPort::getCassetteCtrlCmdStep() |
| | |
| | | int jobExistenceSize, |
| | | short slotProcess, |
| | | short jopCount, |
| | | CJobDataB* pJobDataB); |
| | | CJobDataA* pJobDataA); |
| | | CStep* getCassetteCtrlCmdStep(); |
| | | }; |
| | | } |
| | |
| | | int jobExistenceSize = 12; |
| | | short slotProcess = 0; |
| | | short jobCount = 0; |
| | | SERVO::CJobDataB* pJobDataB = new SERVO::CJobDataB(); |
| | | SERVO::CJobDataA* pJobDataA = new SERVO::CJobDataA(); |
| | | |
| | | |
| | | CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_CASSETTE_CTRL_CMD); |
| | |
| | | |
| | | |
| | | pLoadPort->sendCassetteCtrlCmd(cmd, &jobExistence[0], jobExistenceSize, slotProcess, |
| | | jobCount, pJobDataB); |
| | | jobCount, pJobDataA); |
| | | } |
| | |
| | | <ClInclude Include="CGlass.h" /> |
| | | <ClInclude Include="CHMPropertyDlg.h" /> |
| | | <ClInclude Include="CHMPropertyPage.h" /> |
| | | <ClInclude Include="CJobDataB.h" /> |
| | | <ClInclude Include="CJobDataA.h" /> |
| | | <ClInclude Include="CLoadPort.h" /> |
| | | <ClInclude Include="CMeasurement.h" /> |
| | | <ClInclude Include="ColorTransfer.h" /> |
| | |
| | | <ClCompile Include="CGlass.cpp" /> |
| | | <ClCompile Include="CHMPropertyDlg.cpp" /> |
| | | <ClCompile Include="CHMPropertyPage.cpp" /> |
| | | <ClCompile Include="CJobDataB.cpp" /> |
| | | <ClCompile Include="CJobDataA.cpp" /> |
| | | <ClCompile Include="CLoadPort.cpp" /> |
| | | <ClCompile Include="CMeasurement.cpp" /> |
| | | <ClCompile Include="ColorTransfer.cpp" /> |
| | |
| | | <ClCompile Include="CEqReadIntStep.cpp" /> |
| | | <ClCompile Include="CEqCassetteTransferStateStep.cpp" /> |
| | | <ClCompile Include="CEqCassetteCtrlCmdStep.cpp" /> |
| | | <ClCompile Include="CJobDataB.cpp" /> |
| | | <ClCompile Include="CJobDataA.cpp" /> |
| | | <ClCompile Include="CPageCassetteCtrlCmd.cpp" /> |
| | | <ClCompile Include="CEqJobEventStep.cpp" /> |
| | | </ItemGroup> |
| | |
| | | <ClInclude Include="CEqReadIntStep.h" /> |
| | | <ClInclude Include="CEqCassetteTransferStateStep.h" /> |
| | | <ClInclude Include="CEqCassetteCtrlCmdStep.h" /> |
| | | <ClInclude Include="CJobDataB.h" /> |
| | | <ClInclude Include="CJobDataA.h" /> |
| | | <ClInclude Include="CPageCassetteCtrlCmd.h" /> |
| | | <ClInclude Include="CEqJobEventStep.h" /> |
| | | </ItemGroup> |