LAPTOP-SNT8I5JK\Boounion
2025-03-14 8379d72c7f16fc8850d51d0d6ed7ec7238f26edc
1.增加CEqDateTimeSetCmdStep;
2.相关dev读写地址用w+16进制展示;
已添加2个文件
已修改16个文件
110 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.h 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqModeChangeStep.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqModeStep.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqStatusStep.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.cpp 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CReadStep.cpp 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CStep.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CWriteStep.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Common.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.vcxproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.vcxproj.filters 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ToolUnits.cpp 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/ToolUnits.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp
@@ -30,7 +30,8 @@
    {
        CWriteStep::getAttributeVector(attrubutes);
        std::string strTemp;
        attrubutes.addAttribute(new CAttribute("Clear Cim Message Dev",
            std::to_string(m_nClearCimMessageDev).c_str(), ""));
            ("W" + CToolUnits::toHexString(m_nClearCimMessageDev, strTemp)).c_str(), ""));
    }
}
SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp
@@ -31,7 +31,8 @@
    {
        CWriteStep::getAttributeVector(attrubutes);
        std::string strTemp;
        attrubutes.addAttribute(new CAttribute("Cim Message Dev",
            std::to_string(m_nCimMessageDev).c_str(), ""));
            ("W" + CToolUnits::toHexString(m_nCimMessageDev, strTemp)).c_str(), ""));
    }
}
SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp
@@ -39,7 +39,8 @@
    {
        CWriteStep::getAttributeVector(attrubutes);
        std::string strTemp;
        attrubutes.addAttribute(new CAttribute("Cim Mode Dev",
            std::to_string(m_nCimModeDev).c_str(), ""));
            ("W" + CToolUnits::toHexString(m_nCimModeDev, strTemp)).c_str(), ""));
    }
}
SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
#include "stdafx.h"
#include "CEqDateTimeSetCmdStep.h"
namespace SERVO {
    CEqDateTimeSetCmdStep::CEqDateTimeSetCmdStep() : CWriteStep()
    {
        m_nDateTimeDev = 0;
    }
    CEqDateTimeSetCmdStep::~CEqDateTimeSetCmdStep()
    {
    }
    void CEqDateTimeSetCmdStep::setDateTimeDev(int nDev)
    {
        m_nDateTimeDev = nDev;
    }
    int CEqDateTimeSetCmdStep::setDateTime(short year, short month, short day, short hour, short minute, short second)
    {
        char szBuffer[16] = {0};
        sprintf_s(szBuffer, 16, "%d%02d%02d%02d%02d%02d", year, month, day, hour, minute, second);
        return writeData(m_nDateTimeDev, (const char*)szBuffer, 16);
    }
    void CEqDateTimeSetCmdStep::getAttributeVector(CAttributeVector& attrubutes)
    {
        CWriteStep::getAttributeVector(attrubutes);
        std::string strTemp;
        attrubutes.addAttribute(new CAttribute("DateTime Dev",
            ("W" + CToolUnits::toHexString(m_nDateTimeDev, strTemp)).c_str(), ""));
    }
}
SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.h
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
#pragma once
#include "CWriteStep.h"
namespace SERVO {
    class CEqDateTimeSetCmdStep : public CWriteStep
    {
    public:
        CEqDateTimeSetCmdStep();
        ~CEqDateTimeSetCmdStep();
    public:
        void setDateTimeDev(int nDev);
        int setDateTime(short year, short month, short day, short hour, short minute, short second);
        void getAttributeVector(CAttributeVector& attrubutes);
    private:
        int m_nDateTimeDev;
    };
}
SourceCode/Bond/Servo/CEqModeChangeStep.cpp
@@ -39,7 +39,8 @@
    {
        CWriteStep::getAttributeVector(attrubutes);
        std::string strTemp;
        attrubutes.addAttribute(new CAttribute("Equipment Mode Dev",
            std::to_string(m_nEqModeDev).c_str(), ""));
            ("W" + CToolUnits::toHexString(m_nEqModeDev, strTemp)).c_str(), ""));
    }
}
SourceCode/Bond/Servo/CEqModeStep.cpp
@@ -23,7 +23,7 @@
        attrubutes.addAttribute(new CAttribute("Mode",
            std::to_string(m_nMode).c_str(), getModeDescription(strTemp).c_str()));
        attrubutes.addAttribute(new CAttribute("Mode Dev",
            std::to_string(m_nModeDev).c_str(), ""));
            ("W" + CToolUnits::toHexString(m_nModeDev, strTemp)).c_str(), ""));
    }
    int CEqModeStep::onReadData()
SourceCode/Bond/Servo/CEqStatusStep.cpp
@@ -35,8 +35,9 @@
                std::to_string(m_nReasonCode[i]).c_str(), ""));
        }
        std::string strTemp;
        attrubutes.addAttribute(new CAttribute("Status Dev",
            std::to_string(m_nStatusDev).c_str(), ""));
            ("W" + CToolUnits::toHexString(m_nStatusDev, strTemp)).c_str(), ""));
    }
    int CEqStatusStep::getStatus(unsigned int uint)
SourceCode/Bond/Servo/CEquipment.h
@@ -9,6 +9,7 @@
#include "CEqModeChangeStep.h"
#include "CEqCimMessageCmdStep.h"
#include "CEqCimMessageClearStep.h"
#include "CEqDateTimeSetCmdStep.h"
#include <map>
SourceCode/Bond/Servo/CMaster.cpp
@@ -274,7 +274,16 @@
                delete pStep;
            }
        }
        {
            CEqDateTimeSetCmdStep* pStep = new CEqDateTimeSetCmdStep();
            pStep->setName(STEP_DATETIME_SET_CMD);
            pStep->setListener(listener);
            pStep->setWriteSignalDev(0x55);
            pStep->setDateTimeDev(0x16);
            if (pEquipment->addStep(0x354, pStep) != 0) {
                delete pStep;
            }
        }
        pEquipment->init();
        LOGE("已添加“EFEM(ROBOT)”.");
        return 0;
SourceCode/Bond/Servo/CReadStep.cpp
@@ -129,10 +129,12 @@
    void CReadStep::getAttributeVector(CAttributeVector& attrubutes)
    {
        CStep::getAttributeVector(attrubutes);
        std::string strTemp;
        attrubutes.addAttribute(new CAttribute("Current Step",
            std::to_string(m_nCurStep).c_str(), ""));
        attrubutes.addAttribute(new CAttribute("Signal Dev",
            std::to_string(m_nWriteSignalDev).c_str(), ""));
            ("W" + CToolUnits::toHexString(m_nWriteSignalDev, strTemp)).c_str(), ""));
    }
    void CReadStep::init()
SourceCode/Bond/Servo/CStep.h
@@ -1,6 +1,7 @@
#pragma once
#include "CCLinkIEControl.h"
#include "CAttributeVector.h"
#include "ToolUnits.h"
namespace SERVO {
SourceCode/Bond/Servo/CWriteStep.cpp
@@ -139,11 +139,12 @@
    void CWriteStep::getAttributeVector(CAttributeVector& attrubutes)
    {
        CStep::getAttributeVector(attrubutes);
        std::string temp;
        attrubutes.addAttribute(new CAttribute("Current Step",
            std::to_string(m_nCurStep).c_str(), ""));
        attrubutes.addAttribute(new CAttribute("Signal Dev",
            std::to_string(m_nWriteSignalDev).c_str(), ""));
            ("W" + CToolUnits::toHexString(m_nWriteSignalDev, temp)).c_str(), ""));
    }
    void CWriteStep::init()
SourceCode/Bond/Servo/Common.h
@@ -67,6 +67,7 @@
#define STEP_EQ_MODE_CHANGE        _T("EQModeChange")
#define STEP_CIM_MESSAGE_CMD    _T("EQCimMessageCmd")
#define STEP_CIM_MESSAGE_CLEAR    _T("EQCimMessageClear")
#define STEP_DATETIME_SET_CMD    _T("EQDateTimeSetCmd")
#define BASE_ALARM_EFEM        10000
SourceCode/Bond/Servo/Servo.vcxproj
@@ -208,6 +208,7 @@
    <ClInclude Include="CEqCimMessageClearStep.h" />
    <ClInclude Include="CEqCimMessageCmdStep.h" />
    <ClInclude Include="CEqCimModeChangeStep.h" />
    <ClInclude Include="CEqDateTimeSetCmdStep.h" />
    <ClInclude Include="CEqModeChangeStep.h" />
    <ClInclude Include="CEqModeStep.h" />
    <ClInclude Include="CEqProcessStep.h" />
@@ -258,6 +259,7 @@
    <ClCompile Include="CEqCimMessageClearStep.cpp" />
    <ClCompile Include="CEqCimMessageCmdStep.cpp" />
    <ClCompile Include="CEqCimModeChangeStep.cpp" />
    <ClCompile Include="CEqDateTimeSetCmdStep.cpp" />
    <ClCompile Include="CEqModeChangeStep.cpp" />
    <ClCompile Include="CEqModeStep.cpp" />
    <ClCompile Include="CEqProcessStep.cpp" />
SourceCode/Bond/Servo/Servo.vcxproj.filters
@@ -56,6 +56,7 @@
    <ClCompile Include="CEqModeChangeStep.cpp" />
    <ClCompile Include="CEqCimMessageCmdStep.cpp" />
    <ClCompile Include="CEqCimMessageClearStep.cpp" />
    <ClCompile Include="CEqDateTimeSetCmdStep.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="AlarmManager.h" />
@@ -110,6 +111,7 @@
    <ClInclude Include="CEqModeChangeStep.h" />
    <ClInclude Include="CEqCimMessageCmdStep.h" />
    <ClInclude Include="CEqCimMessageClearStep.h" />
    <ClInclude Include="CEqDateTimeSetCmdStep.h" />
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="Servo.rc" />
SourceCode/Bond/Servo/ToolUnits.cpp
@@ -2,6 +2,7 @@
#include "ToolUnits.h"
#include <chrono>
#include <memory>
#include <sstream>
CToolUnits::CToolUnits()
@@ -306,4 +307,13 @@
bool CToolUnits::startsWith(const std::string& str, const std::string& prefix)
{
    return str.size() >= prefix.size() && str.compare(0, prefix.size(), prefix) == 0;
}
std::string& CToolUnits::toHexString(int value, std::string& strOut)
{
    std::stringstream ss;
    ss << std::hex << value;
    strOut = ss.str();
    return strOut;
}
SourceCode/Bond/Servo/ToolUnits.h
@@ -29,5 +29,6 @@
    static std::string getRecipePath();
    static std::string getCurrentTimeString();
    static bool startsWith(const std::string& str, const std::string& prefix);
    static std::string& toHexString(int value, std::string& strOut);
};