From d400f022161ff47f02cd0ea95a5076d0187ecd4d Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期五, 30 一月 2026 15:11:06 +0800
Subject: [PATCH] 1.接上,日志完善;
---
SourceCode/Bond/Servo/CPath.cpp | 39 +++++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/SourceCode/Bond/Servo/CPath.cpp b/SourceCode/Bond/Servo/CPath.cpp
index 3eb286b..5898b5b 100644
--- a/SourceCode/Bond/Servo/CPath.cpp
+++ b/SourceCode/Bond/Servo/CPath.cpp
@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "CPath.h"
#include "ToolUnits.h"
+#include "CServoUtilsTool.h"
namespace SERVO {
@@ -10,19 +11,22 @@
m_timeOut = 0;
m_timeIn = CToolUnits::getTimestamp();
m_bProcessed = FALSE;
+ m_inspResult = InspResult::NotInspected;
m_pPrev = nullptr;
m_pNext = nullptr;
}
- CPath::CPath(unsigned int nEqId, unsigned int nUnit)
+ CPath::CPath(unsigned int nEqId, unsigned int nUnit, unsigned int nSlot)
{
m_nEqID = nEqId;
m_nUnit = nUnit;
+ m_nSlot = nSlot;
m_timeOut = 0;
m_timeIn = CToolUnits::getTimestamp();
+ m_bProcessed = FALSE;
+ m_inspResult = InspResult::NotInspected;
m_pPrev = nullptr;
m_pNext = nullptr;
- m_bProcessed = FALSE;
}
CPath::~CPath()
@@ -44,25 +48,36 @@
strOut = strOut + ">";
}
+ void CPath::getSimpleDescription(std::string& strOut)
+ {
+ strOut = CServoUtilsTool::getEqUnitName(m_nEqID, m_nUnit, m_nSlot);
+ }
+
void CPath::serialize(CArchive& ar)
{
if (ar.IsStoring()) {
ar << m_nEqID;
ar << m_nUnit;
+ ar << m_nSlot;
ar << m_timeIn;
ar << m_timeOut;
ar << m_bProcessed;
+ ar << (int)m_inspResult;
ar << (ULONGLONG)m_pNext;
if (m_pNext != nullptr) {
m_pNext->serialize(ar);
}
}
else {
+ int temp;
+
ar >> m_nEqID;
ar >> m_nUnit;
+ ar >> m_nSlot;
ar >> m_timeIn;
ar >> m_timeOut;
ar >> m_bProcessed;
+ ar >> temp; m_inspResult = (InspResult)temp;
ULONGLONG ulNext;
ar >> ulNext;
if ((CPath*)ulNext != nullptr) {
@@ -82,6 +97,16 @@
unsigned int CPath::getUnit()
{
return m_nUnit;
+ }
+
+ unsigned int CPath::getSlot()
+ {
+ return m_nSlot;
+ }
+
+ void CPath::setInTime(ULONGLONG time)
+ {
+ m_timeIn = time;
}
ULONGLONG CPath::getInTime()
@@ -109,6 +134,16 @@
return m_bProcessed;
}
+ void CPath::setInspResult(InspResult result)
+ {
+ m_inspResult = result;
+ }
+
+ InspResult CPath::getInspResult()
+ {
+ return m_inspResult;
+ }
+
CPath* CPath::getPrev()
{
return m_pPrev;
--
Gitblit v1.9.3