From bc7f1c4e028e69be51079b59dae4ae5c4d43f5bb Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期六, 31 一月 2026 21:54:56 +0800
Subject: [PATCH] 1.状态指示图,目前灰色表示掉线,绿色表示在线。增加Slot的小点表示有没有料,及加工状态 。 2.增加图示
---
SourceCode/Bond/Servo/Model.h | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/Model.h b/SourceCode/Bond/Servo/Model.h
index c38017f..78d7af5 100644
--- a/SourceCode/Bond/Servo/Model.h
+++ b/SourceCode/Bond/Servo/Model.h
@@ -3,7 +3,10 @@
#include "HsmsPassive.h"
#include "CMaster.h"
#include "CGlassPool.h"
+#include "ProcessJob.h"
#include <cstdint>
+#include <map>
+#include <string>
enum class ControlState : uint8_t {
OfflineEquipment = 0,
@@ -31,9 +34,21 @@
int init();
int term();
+ ControlState getControlState() const noexcept { return m_currentControlState; }
+ void setControlState(ControlState newState);
+ bool raiseSoftAlarm(int alarmId,
+ const std::string& desc = "",
+ int level = -1,
+ int deviceId = 0,
+ int unitId = 0,
+ const char* deviceName = "Software",
+ const char* unitName = "App");
+ void clearSoftAlarm(int alarmId, int deviceId = 0, int unitId = 0);
+
private:
void refreshDerivedSVs();
- void setControlState(ControlState newState);
+ void notifyControlJobChanged();
+ void emitPjStateEvents();
public:
int notify(int code);
@@ -63,4 +78,5 @@
private:
ControlState m_currentControlState{ ControlState::OfflineEquipment };
+ std::map<std::string, SERVO::PJState> m_prevPjStates;
};
--
Gitblit v1.9.3