SourceCode/Bond/Servo/HsmsPassive.h
@@ -5,6 +5,7 @@
#include <functional>
#include <vector>
#include <map>
#include <set>
#include "CCollectionEvent.h"
@@ -21,6 +22,7 @@
#define ER_PARAM_ERROR         -3
#define ER_NO_EVENT            -4
#define ER_UNLINK_EVENT_REPORT   -5
#define ER_NO_PPID_LIST         -6
/*
@@ -66,6 +68,7 @@
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 std::function<std::vector<std::string> (void* pFrom)> QUERYPPIDLIST;
typedef struct _SECSListener
{
   SECSEQOFFLINE            onEQOffLine;
@@ -76,6 +79,7 @@
   DATETIMESYNC            onDatetimeSync;
   EDEVENTREPORT            onEnableDisableEventReport;
   EDALARMREPORT            onEnableDisableAlarmReport;
   QUERYPPIDLIST            onQueryPPIDList;
} SECSListener;
@@ -141,7 +145,11 @@
   void OnTimer(UINT nTimerid);
   void setActionTimeout(int nSecond);
   int init(CModel* pModel, const char* pszName, unsigned int port);
   int loadCacheFromFile(const char* pszFilepath);
   int saveCache();
   int term();
   int serialize(char* pszBuffer, int nBufferSize);
   int unserialize(const char* pszBuffer, int nBufferSize);
public:
   /* request开头的函数为主动发送数据的函数 */
@@ -164,7 +172,9 @@
   int replyLinkEventReport(IMessage* pRecv);
   int replyEanbleDisableEventReport(IMessage* pRecv);
   int replyCommand(IMessage* pRecv);
   int replyConfigureSpooling(IMessage* pRecv);
   int replyEanbleDisableAlarmReport(IMessage* pRecv);
   int replyPurgeSpooledData(IMessage* pRecv);
   int replyQueryPPIDList(IMessage* pRecv);
   int replyTerminalDisplay(IMessage* pRecv);
@@ -187,6 +197,7 @@
   CRITICAL_SECTION m_criticalSection;
   std::list<CHsmsAction*> m_listAction;
   std::list<CHsmsAction*> m_listActionSent;
   std::list<CHsmsAction*> m_listActionSpooling;
private:
   SECSListener m_listener;
@@ -194,6 +205,8 @@
   HANDLE m_hCimWorkEvent;
   HANDLE m_hCimWorkThreadHandle;
   unsigned m_nCimWorkThrdaddr;
   std::string m_strCacheFilepath;
   CHsmsAction* m_pActiveAction;
private:
   // CVariable vector
@@ -204,5 +217,8 @@
   // CollectionEvent vector
   std::vector<SERVO::CCollectionEvent*> m_collectionEvents;
   // Spooling Config
   std::map<uint16_t, std::set<uint16_t>> m_spoolingConfig;
};