LAPTOP-SNT8I5JK\Boounion
2025-05-19 c911b82468fcbff3b927f750cefdd1df985085a5
1.增加调度模式设置(Dispatching mode: 1,EAS, 2:Local)
已添加2个文件
已修改9个文件
216 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CEFEM.cpp 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.cpp 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.h 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipmentPage3.cpp 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipmentPage3.h 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPageGraph2.cpp 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Common.h 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.rc 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.vcxproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.vcxproj.filters 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/resource.h 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEFEM.cpp
@@ -364,6 +364,17 @@
                }
            }
        }
        {
            // Dispatching Mode Change Command
            CEqWriteStep* pStep = new CEqWriteStep();
            pStep->setName(STEP_EQ_DISPATCHINT_MODE_CHANGE);
            pStep->setWriteSignalDev(0x071);
            pStep->setDataDev(0x5c6);
            if (addStep(STEP_ID_DISPATCHING_MODE_CHANGE_REPLY, pStep) != 0) {
                delete pStep;
            }
        }
    }
    int CEFEM::onStepEvent(CStep* pStep, int code)
SourceCode/Bond/Servo/CEquipment.cpp
@@ -1063,6 +1063,33 @@
        return pStep->setDateTime(year, month, day, hour, minute, second);
    }
    int CEquipment::setDispatchingMode(DISPATCHING_MODE mode, ONWRITED onWritedBlock/* = nullptr*/)
    {
        SERVO::CEqWriteStep* pStep = (SERVO::CEqWriteStep*)getStepWithName(STEP_EQ_DISPATCHINT_MODE_CHANGE);
        if (pStep == nullptr) {
            return -1;
        }
        LOGI("<CEquipment-%s>准备设置DispatchingMode<%d>", m_strName.c_str(), (int)mode);
        if (onWritedBlock != nullptr) {
            pStep->writeShort((short)mode, onWritedBlock);
        }
        else {
            pStep->writeShort((short)mode, [&, mode](int code) -> int {
                if (code == WOK) {
                    LOGI("<CEquipment-%s>设置DispatchingMode成功.", m_strName.c_str());
                }
                else {
                    LOGI("<CEquipment-%s>设置DispatchingMode失败,code:%d", m_strName.c_str(), code);
                }
                return 0;
                });
        }
        return 0;
    }
    int CEquipment::masterRecipeListRequest(short unitNo)
    {
        SERVO::CEqWriteStep* pStep = (SERVO::CEqWriteStep*)getStepWithName(STEP_EQ_MASTER_RECIPE_LIST_REQ);
SourceCode/Bond/Servo/CEquipment.h
@@ -68,6 +68,11 @@
        BOOL alive;
    } ALIVE;
    enum DISPATCHING_MODE {
        EAS = 1,
        Local = 2
    };
    class CEquipment
    {
    public:
@@ -146,7 +151,8 @@
        int setCimMessage(const char* pszMessage, short id, short nTouchPanelNo);
        int clearCimMessage(short id, short nTouchPanelNo);
        int setDateTime(short year, short month, short day, short hour, short minute, short second);
        int setDispatchingMode(DISPATCHING_MODE mode, ONWRITED onWritedBlock = nullptr);
        // è¯·æ±‚主配方列表
        // unitNo: 0:local; Others:unit No
        int masterRecipeListRequest(short unitNo);
SourceCode/Bond/Servo/CEquipmentPage3.cpp
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,118 @@
// CEquipmentPage3.cpp: å®žçŽ°æ–‡ä»¶
//
#include "stdafx.h"
#include "Servo.h"
#include "CEquipmentPage3.h"
#include "afxdialogex.h"
// CEquipmentPage3 å¯¹è¯æ¡†
IMPLEMENT_DYNAMIC(CEquipmentPage3, CHMPropertyPage)
CEquipmentPage3::CEquipmentPage3(CWnd* pParent /*=nullptr*/)
    : CHMPropertyPage(IDD_PAGE_EQUIPMENT3, pParent)
{
    m_pEquipment = nullptr;
}
CEquipmentPage3::~CEquipmentPage3()
{
}
void CEquipmentPage3::DoDataExchange(CDataExchange* pDX)
{
    CHMPropertyPage::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CEquipmentPage3, CHMPropertyPage)
    ON_WM_CTLCOLOR()
    ON_WM_DESTROY()
    ON_WM_SIZE()
    ON_BN_CLICKED(IDC_BUTTON_DISPATCHING_MODE_EAP, &CEquipmentPage3::OnBnClickedButtonDispatchingModeEap)
    ON_BN_CLICKED(IDC_BUTTON_DISPATCHING_MODE_LOCAL, &CEquipmentPage3::OnBnClickedButtonDispatchingModeLocal)
END_MESSAGE_MAP()
// CEquipmentPage3 æ¶ˆæ¯å¤„理程序
void CEquipmentPage3::OnApply()
{
    __super::OnApply();
}
void CEquipmentPage3::setEquipment(SERVO::CEquipment* pEquipment)
{
    m_pEquipment = pEquipment;
}
BOOL CEquipmentPage3::OnInitDialog()
{
    CHMPropertyPage::OnInitDialog();
    // TODO:  åœ¨æ­¤æ·»åŠ é¢å¤–çš„åˆå§‹åŒ–
    return TRUE;  // return TRUE unless you set the focus to a control
                  // å¼‚常: OCX å±žæ€§é¡µåº”返回 FALSE
}
HBRUSH CEquipmentPage3::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
    HBRUSH hbr = CHMPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);
    // TODO:  åœ¨æ­¤æ›´æ”¹ DC çš„任何特性
    // TODO:  å¦‚果默认的不是所需画笔,则返回另一个画笔
    return hbr;
}
void CEquipmentPage3::OnDestroy()
{
    CHMPropertyPage::OnDestroy();
    // TODO: åœ¨æ­¤å¤„添加消息处理程序代码
}
void CEquipmentPage3::OnSize(UINT nType, int cx, int cy)
{
    CHMPropertyPage::OnSize(nType, cx, cy);
    // TODO: åœ¨æ­¤å¤„添加消息处理程序代码
}
void CEquipmentPage3::OnBnClickedButtonDispatchingModeEap()
{
    ASSERT(m_pEquipment);
    m_pEquipment->setDispatchingMode(SERVO::DISPATCHING_MODE::EAS,
        [&](int code) -> int {
            if (code == WOK) {
                LOGI("<CEquipment-%s>设置DispatchingMode成功.", m_pEquipment->getName().c_str());
                AfxMessageBox("设置EAS模式成功!");
            }
            else {
                LOGI("<CEquipment-%s>设置DispatchingMode失败,code:%d", m_pEquipment->getName().c_str(), code);
                AfxMessageBox("设置EAS模式失败!");
            }
            return 0;
        });
}
void CEquipmentPage3::OnBnClickedButtonDispatchingModeLocal()
{
    ASSERT(m_pEquipment);
    m_pEquipment->setDispatchingMode(SERVO::DISPATCHING_MODE::Local,
        [&](int code) -> int {
            if (code == WOK) {
                LOGI("<CEquipment-%s>设置DispatchingMode成功.", m_pEquipment->getName().c_str());
                AfxMessageBox("设置Local模式成功!");
            }
            else {
                LOGI("<CEquipment-%s>设置DispatchingMode失败,code:%d", m_pEquipment->getName().c_str(), code);
                AfxMessageBox("设置Local模式失败!");
            }
            return 0;
        });
}
SourceCode/Bond/Servo/CEquipmentPage3.h
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
#pragma once
#include "CHMPropertyPage.h"
#include "CEquipment.h"
// CEquipmentPage3 å¯¹è¯æ¡†
class CEquipmentPage3 : public CHMPropertyPage
{
    DECLARE_DYNAMIC(CEquipmentPage3)
public:
    CEquipmentPage3(CWnd* pParent = nullptr);   // æ ‡å‡†æž„造函数
    virtual ~CEquipmentPage3();
    virtual void OnApply();
    void setEquipment(SERVO::CEquipment* pEquipment);
private:
    SERVO::CEquipment* m_pEquipment;
// å¯¹è¯æ¡†æ•°æ®
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_PAGE_EQUIPMENT3 };
#endif
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV æ”¯æŒ
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
    afx_msg void OnDestroy();
    afx_msg void OnSize(UINT nType, int cx, int cy);
    afx_msg void OnBnClickedButtonDispatchingModeEap();
    afx_msg void OnBnClickedButtonDispatchingModeLocal();
};
SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -8,6 +8,7 @@
#include "CHMPropertyDlg.h"
#include "CEquipmentPage1.h"
#include "CEquipmentPage2.h"
#include "CEquipmentPage3.h"
#include "CPagePortProperty.h"
#include "CPageCassetteCtrlCmd.h"
#include "CJobDataB.h"
@@ -138,6 +139,13 @@
        pPage2->Create(IDD_PAGE_EQUIPMENT2);
        dlg.addPage(pPage2, "Glass");
        if (pEquipment->getID() == EQ_ID_EFEM) {
            CEquipmentPage3* pPage3 = new CEquipmentPage3();
            pPage3->setEquipment(pEquipment);
            pPage3->Create(IDD_PAGE_EQUIPMENT3);
            dlg.addPage(pPage3, "Dispatching Mode");
        }
        if (pEquipment->getID() == EQ_ID_LOADPORT1
            || pEquipment->getID() == EQ_ID_LOADPORT2) {
            CPageCassetteCtrlCmd* pPage = new CPageCassetteCtrlCmd();
SourceCode/Bond/Servo/Common.h
@@ -207,6 +207,7 @@
#define STEP_EQ_STORED_JOB13            _T("EQStoredJobReport13")
#define STEP_EQ_STORED_JOB14            _T("EQStoredJobReport14")
#define STEP_EQ_STORED_JOB15            _T("EQStoredJobReport15")
#define STEP_EQ_DISPATCHINT_MODE_CHANGE    _T("EQDispatchingModeChangeCommand")
@@ -280,6 +281,7 @@
#define STEP_ID_FETCHED_OUT_JOB_REPORT13        0x5BB
#define STEP_ID_FETCHED_OUT_JOB_REPORT14        0x5BC
#define STEP_ID_FETCHED_OUT_JOB_REPORT15        0x5BD
#define STEP_ID_DISPATCHING_MODE_CHANGE_REPLY    0x5E2
#define STEP_ID_PORT1_TYPE_CHANGE                0x600
#define STEP_ID_PORT2_TYPE_CHANGE                0x601
#define STEP_ID_PORT3_TYPE_CHANGE                0x602
SourceCode/Bond/Servo/Servo.rc
Binary files differ
SourceCode/Bond/Servo/Servo.vcxproj
@@ -198,6 +198,7 @@
    <Text Include="ReadMe.txt" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="CEquipmentPage3.h" />
    <ClInclude Include="CGlassPool.h" />
    <ClInclude Include="PageRecipe.h" />
    <ClInclude Include="CDoubleGlass.h" />
@@ -296,6 +297,7 @@
    <ClInclude Include="VerticalLine.h" />
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="CEquipmentPage3.cpp" />
    <ClCompile Include="CGlassPool.cpp" />
    <ClCompile Include="PageRecipe.cpp" />
    <ClCompile Include="CDoubleGlass.cpp" />
SourceCode/Bond/Servo/Servo.vcxproj.filters
@@ -104,6 +104,7 @@
    <ClCompile Include="CDoubleGlass.cpp" />
    <ClCompile Include="CProcessData.cpp" />
    <ClCompile Include="CGlassPool.cpp" />
    <ClCompile Include="CEquipmentPage3.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="AlarmManager.h" />
@@ -206,6 +207,7 @@
    <ClInclude Include="CDoubleGlass.h" />
    <ClInclude Include="CProcessData.h" />
    <ClInclude Include="CGlassPool.h" />
    <ClInclude Include="CEquipmentPage3.h" />
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="Servo.rc" />
SourceCode/Bond/Servo/resource.h
Binary files differ