From df71cb126c2016d1e1b8b614bd9805d063068eb0 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 10 一月 2025 17:49:10 +0800
Subject: [PATCH] 1.SECS 测试,实现Are you there回复,建立通讯回复,时间设置处理及回复;
---
SourceCode/Bond/Servo/HsmsPassive.h | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/HsmsPassive.h b/SourceCode/Bond/Servo/HsmsPassive.h
index ce0c46e..cb3b047 100644
--- a/SourceCode/Bond/Servo/HsmsPassive.h
+++ b/SourceCode/Bond/Servo/HsmsPassive.h
@@ -7,7 +7,7 @@
#define ER_NOERROR 0
#define ER_NOTSELECT -1
#define ER_BUSY -2
-
+#define ER_PARAM_ERROR -3
class CModel;
class CHsmsPassive
@@ -22,8 +22,14 @@
void setActionTimeout(int nSecond);
int init(CModel* pModel, const char* pszName, unsigned int port);
int term();
- int secsAreYouThereRequest();
- int secsAreYouThereReply(unsigned int sessionId, unsigned int systemBytes);
+
+public:
+ int requestAreYouThere();
+
+private:
+ int replyAreYouThere(unsigned int systemBytes);
+ int replyEstablishCommunications(unsigned int systemBytes);
+ int replyDatetime(IMessage* pRecv);
private:
inline void Lock() { EnterCriticalSection(&m_criticalSection); }
@@ -35,6 +41,7 @@
IPassive* m_pPassive;
int m_nActionTimeout;
unsigned int m_nSystemByte;
+ unsigned short m_nSessionId;
BOOL m_bAreYouThereRequest;
std::string m_strEquipmentModelType;
std::string m_strSoftRev;
--
Gitblit v1.9.3