From dd25d842b508e836e73b38c5970dbd276bac6fa5 Mon Sep 17 00:00:00 2001
From: darker <mr.darker@163.com>
Date: 星期一, 17 二月 2025 09:05:01 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang
---
SourceCode/Bond/Servo/Servo.vcxproj | 11 +
.gitignore | 4
SourceCode/Bond/Servo/Servo.vcxproj.user | 6
SourceCode/Bond/Servo/CEFEM.h | 20 ++
SourceCode/Bond/Servo/CMaster.h | 32 +++
SourceCode/Bond/Servo/Model.cpp | 2
SourceCode/Bond/Servo/ServoDlg.cpp | 7
SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.cpp | 46 +++-
SourceCode/Bond/Servo/Servo.vcxproj.filters | 8
SourceCode/Bond/Servo/CEquipment.cpp | 93 +++++++++
SourceCode/Bond/Servo/Model.h | 2
SourceCode/Bond/Servo/CEFEM.cpp | 40 ++++
SourceCode/Bond/Servo/CMaster.cpp | 127 ++++++++++++
SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h | 44 ++--
SourceCode/Bond/Servo/CEquipment.h | 51 +++++
SourceCode/Bond/Servo/CBonder.h | 20 ++
SourceCode/Bond/Servo/packages.config | 5
Document/Panel Bonder八零联合 SecsTest CheckList_v3.0.xlsx | 0
SourceCode/Bond/Servo/CBonder.cpp | 40 ++++
19 files changed, 525 insertions(+), 33 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8304e96..1277413 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,7 @@
SourceCode/Bond/.vs/
SourceCode/Bond/packages/
SourceCode/Bond/x64/Debug/Servo.exe.WebView2/
+SourceCode/Bond/x64/BoounionPLC/Debug/
+*.iom
+SourceCode/Bond/BoounionPLC/BoounionPLC.vcxproj.user
+SourceCode/Bond/x64/Debug/ServoConfiguration.ini
diff --git "a/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx" "b/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
index 18989d8..33de0ae 100644
--- "a/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
+++ "b/Document/Panel Bonder\345\205\253\351\233\266\350\201\224\345\220\210 SecsTest CheckList_v3.0.xlsx"
Binary files differ
diff --git a/SourceCode/Bond/Servo/CBonder.cpp b/SourceCode/Bond/Servo/CBonder.cpp
new file mode 100644
index 0000000..11d90d8
--- /dev/null
+++ b/SourceCode/Bond/Servo/CBonder.cpp
@@ -0,0 +1,40 @@
+#include "stdafx.h"
+#include "CBonder.h"
+
+namespace SERVO {
+ CBonder::CBonder()
+ {
+
+ }
+
+ CBonder::~CBonder()
+ {
+
+ }
+
+ const char* CBonder::getClassName()
+ {
+ static char* pszName = "CBonder";
+ return pszName;
+ }
+
+ void CBonder::init()
+ {
+ CEquipment::init();
+ }
+
+ void CBonder::term()
+ {
+ CEquipment::term();
+ }
+
+ void CBonder::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CBonder::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CBonder.h b/SourceCode/Bond/Servo/CBonder.h
new file mode 100644
index 0000000..3cf9c78
--- /dev/null
+++ b/SourceCode/Bond/Servo/CBonder.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "CEquipment.h"
+
+namespace SERVO {
+ class CBonder :
+ public CEquipment
+ {
+ public:
+ CBonder();
+ ~CBonder();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.cpp b/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.cpp
index bc85cc4..582cc6b 100644
--- a/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.cpp
+++ b/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.cpp
@@ -40,7 +40,7 @@
return ERROR_CODE_INVALID_DATA;
}
- // 瑙f瀽鍚勪綅鐘舵��
+ // 解析各位状态
const short nBuffer = vecLedBuffer[0];
outLedStatus.bExtPw = (nBuffer & (1 << 15)) != 0;
outLedStatus.bRd = (nBuffer & (1 << 6)) != 0;
@@ -56,26 +56,48 @@
CCLinkIEControlMode CCCLinkIEControl::ConvertToCCLinkIEControlMode(const short nMode) {
switch (static_cast<CCLinkIEControlMode>(nMode)) {
- case CCLinkIEControlMode::ONLINE: return CCLinkIEControlMode::ONLINE; // 鍦ㄧ嚎
- case CCLinkIEControlMode::OFFLINE: return CCLinkIEControlMode::OFFLINE; // 绂荤嚎
- case CCLinkIEControlMode::INTER_STATION_TEST: return CCLinkIEControlMode::INTER_STATION_TEST; // 绔欓棿娴嬭瘯
- case CCLinkIEControlMode::LINE_TEST: return CCLinkIEControlMode::LINE_TEST; // 绾胯矾娴嬭瘯
- case CCLinkIEControlMode::LOOPBACK_TEST: return CCLinkIEControlMode::LOOPBACK_TEST; // 鑷洖閫佹祴璇�
- case CCLinkIEControlMode::HW_TEST: return CCLinkIEControlMode::HW_TEST; // H/W娴嬭瘯
- case CCLinkIEControlMode::BUS_IF_TEST: return CCLinkIEControlMode::BUS_IF_TEST; // 鎬荤嚎I/F娴嬭瘯
+ case CCLinkIEControlMode::ONLINE: return CCLinkIEControlMode::ONLINE; // 在线
+ case CCLinkIEControlMode::OFFLINE: return CCLinkIEControlMode::OFFLINE; // 离线
+ case CCLinkIEControlMode::INTER_STATION_TEST: return CCLinkIEControlMode::INTER_STATION_TEST; // 站间测试
+ case CCLinkIEControlMode::LINE_TEST: return CCLinkIEControlMode::LINE_TEST; // 线路测试
+ case CCLinkIEControlMode::LOOPBACK_TEST: return CCLinkIEControlMode::LOOPBACK_TEST; // 自回送测试
+ case CCLinkIEControlMode::HW_TEST: return CCLinkIEControlMode::HW_TEST; // H/W测试
+ case CCLinkIEControlMode::BUS_IF_TEST: return CCLinkIEControlMode::BUS_IF_TEST; // 总线I/F测试
default: return CCLinkIEControlMode::UNKNOWN;
}
}
int CCCLinkIEControl::ValidateBoardStatus(const BoardStatus& status) {
if (status.nStationValue < 1 || status.nStationValue > 120) {
- return ERROR_CODE_STATION_OUT_OF_RANGE; // 绔欏彿瓒呭嚭鑼冨洿
+ return ERROR_CODE_STATION_OUT_OF_RANGE; // 站号超出范围
}
if (status.nGroupValue < 0 || status.nGroupValue > 32) {
- return ERROR_CODE_GROUP_OUT_OF_RANGE; // 缁勮秴鍑鸿寖鍥�
+ return ERROR_CODE_GROUP_OUT_OF_RANGE; // 组超出范围
}
if (status.nNetworkValue < 1 || status.nNetworkValue > 239) {
- return ERROR_CODE_NETWORK_OUT_OF_RANGE; // 缃戠粶鍙疯秴鍑鸿寖鍥�
+ return ERROR_CODE_NETWORK_OUT_OF_RANGE; // 网络号超出范围
}
- return 0; // 鏍¢獙閫氳繃
+ return 0; // 校验通过
+}
+
+int CCCLinkIEControl::ReadData2(const StationIdentifier& station, short devType, short devNo, short size, void* pData)
+{
+ // 验证站点参数和数据有效性
+ int nRet = ValidateStationAndSize(station, size);
+ if (nRet != 0) {
+ UpdateLastError(nRet);
+ return nRet;
+ }
+
+ // 确保线程安全的最小锁定范围
+ {
+ std::lock_guard<std::mutex> lock(m_mtx);
+ nRet = mdReceive(m_nPath, CombineStation(station), devType, devNo, &size, pData);
+ }
+
+ if (nRet != 0) {
+ UpdateLastError(nRet);
+ }
+
+ return nRet;
}
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h b/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h
index a7006fd..3a33626 100644
--- a/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h
+++ b/SourceCode/Bond/Servo/CCLinkPerformance/CCLinkIEControl.h
@@ -4,14 +4,14 @@
#include "PerformanceMelsec.h"
enum class CCLinkIEControlMode : short {
- UNKNOWN = 0x0194, // 鏈煡
- ONLINE = 0x0000, // 鍦ㄧ嚎
- OFFLINE = 0x0002, // 绂荤嚎
- INTER_STATION_TEST = 0x0005, // 绔欓棿娴嬭瘯
- LINE_TEST = 0x0006, // 绾胯矾娴嬭瘯
- LOOPBACK_TEST = 0x0007, // 鑷洖閫佹祴璇�
- HW_TEST = 0x0009, // H/W娴嬭瘯
- BUS_IF_TEST = 0x000E // 鎬荤嚎I/F娴嬭瘯
+ UNKNOWN = 0x0194, // 未知
+ ONLINE = 0x0000, // 在线
+ OFFLINE = 0x0002, // 离线
+ INTER_STATION_TEST = 0x0005, // 站间测试
+ LINE_TEST = 0x0006, // 线路测试
+ LOOPBACK_TEST = 0x0007, // 自回送测试
+ HW_TEST = 0x0009, // H/W测试
+ BUS_IF_TEST = 0x000E // 总线I/F测试
};
class CCCLinkIEControl final : public CPerformanceMelsec {
@@ -20,16 +20,16 @@
~CCCLinkIEControl() override;
struct LedStatus {
- bool bExtPw; // 澶栭儴鐢垫簮鐘舵�� (b15)
- bool bRd; // 鏁版嵁鎺ユ敹鐘舵�� (b6)
- bool bDLnk; // 鏁版嵁閾炬帴鐘舵�� (b5)
- bool bPrm; // 绠$悊鍔熻兘鐘舵�� (b4)
- bool bErr; // 閿欒鐘舵�� (b3)
- bool bSd; // 鏁版嵁鍙戦�佺姸鎬� (b2)
- bool bMode; // 鍔ㄤ綔妯″紡 (b1)
- bool bRun; // 杩愯鐘舵�� (b0)
+ bool bExtPw; // 外部电源状态 (b15)
+ bool bRd; // 数据接收状态 (b6)
+ bool bDLnk; // 数据链接状态 (b5)
+ bool bPrm; // 管理功能状态 (b4)
+ bool bErr; // 错误状态 (b3)
+ bool bSd; // 数据发送状态 (b2)
+ bool bMode; // 动作模式 (b1)
+ bool bRun; // 运行状态 (b0)
- // 杞崲涓哄瓧绗︿覆锛岀敤浜庤皟璇�
+ // 转换为字符串,用于调试
std::string ToString() const {
std::ostringstream oss;
oss << "CC-Link IE Control Network LED Status: {"
@@ -46,19 +46,21 @@
}
};
- // 璇诲彇鐩爣绔欑偣CPU绫诲瀷
+ // 读取目标站点CPU类型
// short ReadCPUCodeEx(const StationIdentifier& station, short& nCPUCode);
- // 鏉挎ā寮忚幏鍙�/璁剧疆
+ // 板模式获取/设置
int SetBoardModeEx(CCLinkIEControlMode mode);
CCLinkIEControlMode GetBoardModeEx();
- // 鑾峰彇鏉跨姸鎬�
+ // 获取板状态
int GetBoardStatusEx(BoardStatus& status);
- // 璇诲彇LED鐘舵��
+ // 读取LED状态
int ReadLedStatus(LedStatus& outLedStatus);
+ int ReadData2(const StationIdentifier& station, short devType, short devNo, short size, void* pData);
+
private:
static CCLinkIEControlMode ConvertToCCLinkIEControlMode(short nMode);
static int ValidateBoardStatus(const BoardStatus& status);
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
new file mode 100644
index 0000000..665aa25
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -0,0 +1,40 @@
+#include "stdafx.h"
+#include "CEFEM.h"
+
+namespace SERVO {
+ CEFEM::CEFEM()
+ {
+
+ }
+
+ CEFEM::~CEFEM()
+ {
+
+ }
+
+ const char* CEFEM::getClassName()
+ {
+ static char* pszName = "CEFEM";
+ return pszName;
+ }
+
+ void CEFEM::init()
+ {
+ CEquipment::init();
+ }
+
+ void CEFEM::term()
+ {
+ CEquipment::term();
+ }
+
+ void CEFEM::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CEFEM::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CEFEM.h b/SourceCode/Bond/Servo/CEFEM.h
new file mode 100644
index 0000000..7a7be7e
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEFEM.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "CEquipment.h"
+
+namespace SERVO {
+ class CEFEM :
+ public CEquipment
+ {
+ public:
+ CEFEM();
+ ~CEFEM();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
new file mode 100644
index 0000000..6f8cd0b
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -0,0 +1,93 @@
+#include "stdafx.h"
+#include "CEquipment.h"
+
+namespace SERVO {
+
+ CEquipment::CEquipment()
+ {
+ InitializeCriticalSection(&m_criticalSection);
+ }
+
+ CEquipment::~CEquipment()
+ {
+ DeleteCriticalSection(&m_criticalSection);
+ }
+
+ void CEquipment::init()
+ {
+
+ }
+
+ void CEquipment::term()
+ {
+
+ }
+
+ void CEquipment::setName(const char* pszName)
+ {
+ m_strName = pszName;
+ }
+
+ std::string& CEquipment::getName()
+ {
+ return m_strName;
+ }
+
+ void CEquipment::setDescription(const char* pszDescription)
+ {
+ m_strDescription = pszDescription;
+ }
+
+ std::string& CEquipment::getDescription()
+ {
+ return m_strDescription;
+ }
+
+ void CEquipment::setStation(int network, int station)
+ {
+ m_station.nNetNo = network;
+ m_station.nStNo = station;
+ }
+
+ const StationIdentifier& CEquipment::getStation()
+ {
+ return m_station;
+ }
+
+ void CEquipment::setReadBitBlock(unsigned int start, unsigned int end)
+ {
+ m_blockReadBit.type = (unsigned int)DeviceType::LB;;
+ m_blockReadBit.start = start;
+ m_blockReadBit.end = end;
+ m_blockReadBit.size = (m_blockReadBit.end - m_blockReadBit.start + 1) / 8;
+ }
+
+ MemoryBlock& CEquipment::getReadBitBlock()
+ {
+ return m_blockReadBit;
+ }
+
+ void CEquipment::setWriteBitBlock(unsigned int start, unsigned int end)
+ {
+ m_blockWriteBit.type = (unsigned int)DeviceType::LB;
+ m_blockWriteBit.start = start;
+ m_blockWriteBit.end = end;
+ m_blockWriteBit.size = (m_blockWriteBit.end - m_blockWriteBit.start + 1) / 8;
+ }
+
+ MemoryBlock& CEquipment::getWriteBitBlock()
+ {
+ return m_blockWriteBit;
+ }
+
+ void CEquipment::onTimer(UINT nTimerid)
+ {
+
+ }
+
+ void CEquipment::serialize(CArchive& ar)
+ {
+
+ }
+
+}
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
new file mode 100644
index 0000000..9f83bb8
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -0,0 +1,51 @@
+#pragma once
+#include "Log.h"
+#include "CCLinkIEControl.h"
+
+namespace SERVO {
+ // Memory Block 结构体定义
+ typedef struct _MemoryBlock {
+ unsigned int type;
+ unsigned int start;
+ unsigned int end;
+ unsigned int size;
+ } MemoryBlock;
+
+ class CEquipment
+ {
+ public:
+ CEquipment();
+ virtual ~CEquipment();
+
+
+ public:
+ virtual const char* getClassName() = 0;
+ void setName(const char* pszName);
+ std::string& getName();
+ void setDescription(const char* pszDescription);
+ std::string& getDescription();
+ void setStation(int network, int station);
+ const StationIdentifier& getStation();
+ void setReadBitBlock(unsigned int start, unsigned int end);
+ MemoryBlock& getReadBitBlock();
+ void setWriteBitBlock(unsigned int start, unsigned int end);
+ MemoryBlock& getWriteBitBlock();
+ virtual void init();
+ virtual void term();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+
+ protected:
+ inline void Lock() { EnterCriticalSection(&m_criticalSection); }
+ inline void Unlock() { LeaveCriticalSection(&m_criticalSection); }
+
+ protected:
+ std::string m_strName;
+ std::string m_strDescription;
+ CRITICAL_SECTION m_criticalSection;
+ StationIdentifier m_station;
+ MemoryBlock m_blockReadBit;
+ MemoryBlock m_blockWriteBit;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
new file mode 100644
index 0000000..85bf38e
--- /dev/null
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -0,0 +1,127 @@
+#include "stdafx.h"
+#include "CMaster.h"
+
+namespace SERVO {
+ CMaster* g_pMaster = NULL;
+ void CALLBACK MasterTimerProc(HWND hWnd, UINT nMsg, UINT nTimerid, DWORD dwTime)
+ {
+ if (g_pMaster != NULL) {
+ g_pMaster->onTimer(nTimerid);
+ }
+ }
+
+ CMaster::CMaster()
+ {
+
+ }
+
+ CMaster::~CMaster()
+ {
+ for (auto item : m_listEquipment) {
+ delete item;
+ }
+ m_listEquipment.clear();
+ }
+
+ int CMaster::init()
+ {
+ LOGI("<Master>正在初始化...");
+
+
+ // cclink
+ if (m_cclink.Connect(CC_LINK_IE_CONTROL_CHANNEL(1)) != 0) {
+ LOGE("连接CC-Link失败.");
+ return -1;
+ }
+ else {
+ LOGI("连接CC-Link成功.");
+ BoardVersion version{};
+ int nRet = m_cclink.GetBoardVersion(version);
+ if (nRet == 0) {
+ LOGI("版本信息:%s.", version.toString().c_str());
+ }
+ else {
+ LOGE("获取CC-Link版本信息失败.");
+ }
+
+ BoardStatus status;
+ nRet = m_cclink.GetBoardStatus(status);
+ if (nRet == 0) {
+ LOGI("状态:%s.", status.toString().c_str());
+ }
+ else {
+ LOGE("获取CC-Link状态失败.");
+ }
+ }
+
+
+ // 初始化添加各子设备
+ {
+ CEFEM* pEquipment = new CEFEM();
+ pEquipment->setName("EFEM(ROBOT)");
+ pEquipment->setDescription("EFEM(ROBOT).");
+ pEquipment->setReadBitBlock(0x4000, 0x45ff);
+ pEquipment->setStation(1, 2);
+ addEquipment(pEquipment);
+ LOGE("已添加“EFEM(ROBOT)”.");
+ }
+ /*
+ {
+ CBonder* pBonder = new CBonder();
+ pBonder->setName("Bonder 1");
+ pBonder->setDescription("Bonder 1.");
+ pBonder->setReadBitBlock(0x4600, 0x4bff);
+ pBonder->setStation(1, 3);
+ addEquipment(pBonder);
+ LOGE("已添加“Bonder 1”.");
+ }
+ */
+
+ // 定时器
+ g_pMaster = this;
+ SetTimer(NULL, 1, 250, (TIMERPROC)MasterTimerProc);
+
+
+ LOGI("<Master>初始化完成.");
+ return 0;
+ }
+
+ int CMaster::term()
+ {
+ return 0;
+ }
+
+ int CMaster::addEquipment(CEquipment* pEquipment)
+ {
+ m_listEquipment.push_back(pEquipment);
+ return 0;
+ }
+
+ void CMaster::onTimer(UINT nTimerid)
+ {
+ for (auto item : m_listEquipment) {
+ item->onTimer(nTimerid);
+ }
+
+
+ // 以下为测试代码
+ static int i = 0;
+ i++;
+ if (i % (4 * 1) == 0) {
+
+ for (auto item : m_listEquipment) {
+ const StationIdentifier& station = item->getStation();
+ MemoryBlock& block = item->getReadBitBlock();
+
+ char szBuffer[1024];
+ int nRet = m_cclink.ReadData2(station, (short)block.type,
+ block.start, block.size, szBuffer);
+ for (unsigned int i = 0; i < block.size; i++) {
+ if(szBuffer[i] != 0)
+ TRACE("%d[%x]\n", i, szBuffer[i]);
+ }
+ TRACE("nRet=%d\n", nRet);
+ }
+ }
+ }
+}
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
new file mode 100644
index 0000000..ad4d0df
--- /dev/null
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -0,0 +1,32 @@
+#pragma once
+#include <list>
+#include "CEquipment.h"
+#include "CEFEM.h"
+#include "CBonder.h"
+#include "CCLinkIEControl.h"
+
+
+namespace SERVO {
+ class CMaster
+ {
+ public:
+ CMaster();
+ ~CMaster();
+
+
+ public:
+ int init();
+ int term();
+ void onTimer(UINT nTimerid);
+
+
+ private:
+ int addEquipment(CEquipment* pEquipment);
+
+
+ private:
+ CCCLinkIEControl m_cclink;
+ std::list<CEquipment*> m_listEquipment;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index 8d621b0..7009492 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -96,6 +96,8 @@
{
m_hsmsPassive.term();
CLog::GetLog()->SetOnLogCallback(nullptr);
+ m_master.term();
+
return 0;
}
diff --git a/SourceCode/Bond/Servo/Model.h b/SourceCode/Bond/Servo/Model.h
index 00733d2..6e2655c 100644
--- a/SourceCode/Bond/Servo/Model.h
+++ b/SourceCode/Bond/Servo/Model.h
@@ -1,6 +1,7 @@
#pragma once
#include "Configuration.h"
#include "HsmsPassive.h"
+#include "CMaster.h"
class CModel
{
@@ -31,6 +32,7 @@
public:
CConfiguration m_configuration;
CHsmsPassive m_hsmsPassive;
+ SERVO::CMaster m_master;
private:
IObservable* m_pObservable;
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj b/SourceCode/Bond/Servo/Servo.vcxproj
index 1a138ec..3fa06f5 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj
+++ b/SourceCode/Bond/Servo/Servo.vcxproj
@@ -132,6 +132,9 @@
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
+ <PostBuildEvent>
+ <Command>copy "$(TargetDir)$(ProjectName).exe" "\\Boounion-0106\Servo\\$(ProjectName).exe"</Command>
+ </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -194,8 +197,12 @@
<ItemGroup>
<ClInclude Include="AlarmManager.h" />
<ClInclude Include="BlButton.h" />
+ <ClInclude Include="CBonder.h" />
<ClInclude Include="CCLinkPerformance\CCLinkIEControl.h" />
<ClInclude Include="CCLinkPerformance\PerformanceMelsec.h" />
+ <ClInclude Include="CEFEM.h" />
+ <ClInclude Include="CEquipment.h" />
+ <ClInclude Include="CMaster.h" />
<ClInclude Include="Common.h" />
<ClInclude Include="Configuration.h" />
<ClInclude Include="Context.h" />
@@ -218,8 +225,12 @@
<ItemGroup>
<ClCompile Include="AlarmManager.cpp" />
<ClCompile Include="BlButton.cpp" />
+ <ClCompile Include="CBonder.cpp" />
<ClCompile Include="CCLinkPerformance\CCLinkIEControl.cpp" />
<ClCompile Include="CCLinkPerformance\PerformanceMelsec.cpp" />
+ <ClCompile Include="CEFEM.cpp" />
+ <ClCompile Include="CEquipment.cpp" />
+ <ClCompile Include="CMaster.cpp" />
<ClCompile Include="Configuration.cpp" />
<ClCompile Include="Context.cpp" />
<ClCompile Include="HsmsAction.cpp" />
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj.filters b/SourceCode/Bond/Servo/Servo.vcxproj.filters
index 58314be..28a906c 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj.filters
+++ b/SourceCode/Bond/Servo/Servo.vcxproj.filters
@@ -30,6 +30,10 @@
<ClCompile Include="CCLinkPerformance\PerformanceMelsec.cpp">
<Filter>CCLinkPerformance</Filter>
</ClCompile>
+ <ClCompile Include="CEquipment.cpp" />
+ <ClCompile Include="CBonder.cpp" />
+ <ClCompile Include="CMaster.cpp" />
+ <ClCompile Include="CEFEM.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="AlarmManager.h" />
@@ -58,6 +62,10 @@
<ClInclude Include="CCLinkPerformance\PerformanceMelsec.h">
<Filter>CCLinkPerformance</Filter>
</ClInclude>
+ <ClInclude Include="CEquipment.h" />
+ <ClInclude Include="CBonder.h" />
+ <ClInclude Include="CMaster.h" />
+ <ClInclude Include="CEFEM.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Servo.rc" />
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj.user b/SourceCode/Bond/Servo/Servo.vcxproj.user
index ef958f5..3980fd1 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj.user
+++ b/SourceCode/Bond/Servo/Servo.vcxproj.user
@@ -3,4 +3,10 @@
<PropertyGroup>
<RESOURCE_FILE>Servo.rc</RESOURCE_FILE>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <RemoteDebuggerCommand>D:\CLH\Servo\Servo.exe</RemoteDebuggerCommand>
+ <RemoteDebuggerWorkingDirectory>D:\CLH\Servo\</RemoteDebuggerWorkingDirectory>
+ <RemoteDebuggerServerName>Boounion-0106</RemoteDebuggerServerName>
+ <DebuggerFlavor>WindowsRemoteDebugger</DebuggerFlavor>
+ </PropertyGroup>
</Project>
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index 2278d18..292467f 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -290,8 +290,15 @@
SetTimer(TIMER_ID_CREATE_TERMINAL, 3000, nullptr);
InitRxWindows();
+ OnBnClickedButtonLog();
UpdateLogBtn();
Resize();
+
+
+ // 相当于延时调用master的初始化
+ theApp.m_model.m_master.init();
+
+
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
}
diff --git a/SourceCode/Bond/Servo/packages.config b/SourceCode/Bond/Servo/packages.config
new file mode 100644
index 0000000..8892444
--- /dev/null
+++ b/SourceCode/Bond/Servo/packages.config
@@ -0,0 +1,5 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Microsoft.Web.WebView2" version="1.0.2903.40" targetFramework="native" />
+ <package id="Microsoft.Windows.ImplementationLibrary" version="1.0.240803.1" targetFramework="native" />
+</packages>
\ No newline at end of file
--
Gitblit v1.9.3