LAPTOP-SNT8I5JK\Boounion
2025-07-14 375342c11638685d6b7fecc2a979825c56d770f9
SourceCode/Bond/Servo/HsmsPassive.h
@@ -5,6 +5,7 @@
#include <functional>
#include <vector>
#include <map>
#include "CCollectionEvent.h"
#define EQCONSTANT_VALUE_MAX   64
@@ -60,6 +61,9 @@
typedef std::function<void(void* pFrom)> SECSEQOFFLINE;
typedef std::function<void(void* pFrom, std::vector<EQConstant>&)> SECSEQCONSTANTREQUEST;
typedef std::function<void(void* pFrom, const char*, std::vector<CommandParameter>&)> SECSCommand;
typedef std::function<void(void* pFrom, SYSTEMTIME& time)> DATETIMESYNC;
typedef std::function<void(void* pFrom, bool bEnable, std::vector<unsigned int>& ids)> EDEVENTREPORT;
typedef std::function<void(void* pFrom, bool bEnable, unsigned int id)> EDALARMREPORT;
typedef struct _SECSListener
{
   SECSEQOFFLINE            onEQOffLine;
@@ -67,6 +71,9 @@
   SECSEQCONSTANTREQUEST      onEQConstantRequest;
   SECSEQCONSTANTREQUEST      onEQConstantSend;
   SECSCommand               onCommand;
   DATETIMESYNC            onDatetimeSync;
   EDEVENTREPORT            onEnableDisableEventReport;
   EDALARMREPORT            onEnableDisableAlarmReport;
} SECSListener;
@@ -104,6 +111,10 @@
   // 取消/删除所有 define report
   void deleteAllReport();
   // 从文件中加载CVariable列表
   int loadVarialbleList(const char* pszFilepath);
   void setListener(SECSListener listener);
   unsigned OnCimWork();
   void OnTimer(UINT nTimerid);
@@ -140,6 +151,7 @@
   inline void Lock() { EnterCriticalSection(&m_criticalSection); }
   inline void Unlock() { LeaveCriticalSection(&m_criticalSection); }
   int onRecvMsg(IMessage* pMessage);
   void clearAllVariabel();
private:
   CModel* m_pModel;
@@ -173,5 +185,8 @@
   // VID to Report
   std::map<unsigned int, VALUE> m_mapValue;
   // CVariable vector
   std::vector<SERVO::CVariable*> m_variabels;
};